From 8a62231c2891b241433b3f03990631578c6a1502 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Wed, 11 Nov 2026 14:12:23 +0900 Subject: [PATCH 01/47] feat: bending damping of finite-EI cables (EI|Bb, EI|-zeta|f) (#144) Finite-EI cables had axial (BA) and torsional (GJ|K|Bt) Kelvin-Voigt damping but no transverse structural damping. The LINE TYPES EI column now takes EI|Bb, a damping moment Bb [N m^2 s] times the curvature rate, or EI|-zeta|f, the damping ratio of a pure bending mode of frequency f (Bb = zeta EI/(pi f)). A mode is damped in its bending share, zeta = omega Bb/(2 EI) * EI k^2/(EI k^2 + T). The rate is the curvature rate in the frame carried with the tangent, (I - t t^T) dkappa/dt, zero for a rigid motion whose rotation is normal to the tangent; under active line control it includes the change of the unstretched length. Force and Jacobians are exact. One helper returns the axial and bending damping for the assembly, the end forces and the node recovery (unchanged without bending damping); the viscous moment stays out of the elastic moment and curvature outputs while the end forces carry it. Both deck readers refuse a damping on EI = 0 and the malformed forms by name; the Python builder writes and reads both. Tests: kernel Jacobians and the length-rate term against central differences and an independent dissipation function; free decays of a pinned cable against the bending-share damping ratio to 0.05 %; the node recovery free of the viscous moment; the deck route. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 10 + CMakeLists.txt | 16 ++ doc/capabilities.rst | 5 + doc/driver_format.md | 13 +- doc/theory.rst | 43 +++ python/cabledyn/builder.py | 17 +- python/cabledyn/deck_file.py | 40 ++- python/tests/test_builder.py | 22 ++ python/tests/test_deck_native_parity.py | 30 +++ src/CableDyn_DeckDriver.f90 | 121 ++++++++- src/CableDyn_HermiteCable.f90 | 235 ++++++++++++++++ src/CableDyn_HermiteCableDynamic.f90 | 206 +++++++++++--- src/CableDyn_OpenFAST_HermiteFMF.f90 | 25 ++ tests/test_bending_damping_deck.f90 | 184 +++++++++++++ tests/test_hermite_bending_damping.f90 | 253 ++++++++++++++++++ .../test_hermite_bending_damping_dynamic.f90 | 159 +++++++++++ 16 files changed, 1319 insertions(+), 60 deletions(-) create mode 100644 tests/test_bending_damping_deck.f90 create mode 100644 tests/test_hermite_bending_damping.f90 create mode 100644 tests/test_hermite_bending_damping_dynamic.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b8be549..c2cde749 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ All notable changes to CableDyn are recorded in this file. The format follows ## [Unreleased] +### Added + +- Bending damping of finite-EI cables: the LINE TYPES EI column takes `EI|Bb`, a Kelvin-Voigt + damping moment `Bb` [N m^2 s] times the curvature rate (in the frame carried with the tangent), + or `EI|-zeta|f`, the damping ratio of a pure bending mode of frequency `f` (Bb = zeta EI/(pi f)). + A mode is damped in its bending share, `omega Bb/(2 EI) * EI k^2/(EI k^2 + T)`; free decays of a + pinned cable match this to 0.05 %. It acts on every dynamic route beside the axial (`BA`) and + torsional (`GJ|K|Bt`) damping, with exact Jacobians; the Python deck reader and builder take the + same forms. + ## [0.4.2] - 2026-11-09 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index d92bc8ce..5379d814 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -766,6 +766,19 @@ add_executable(test_hermite_axial_damping tests/test_hermite_axial_damping.f90) target_link_libraries(test_hermite_axial_damping PRIVATE cabledyn_core) add_test(NAME hermite_axial_damping COMMAND test_hermite_axial_damping) set_tests_properties(hermite_axial_damping PROPERTIES LABELS "fortran;unit;dynamic;damping") +add_executable(test_hermite_bending_damping tests/test_hermite_bending_damping.f90) +target_link_libraries(test_hermite_bending_damping PRIVATE cabledyn_core) +add_test(NAME hermite_bending_damping COMMAND test_hermite_bending_damping) +set_tests_properties(hermite_bending_damping PROPERTIES LABELS "fortran;unit;damping") +add_executable(test_hermite_bending_damping_dynamic tests/test_hermite_bending_damping_dynamic.f90) +target_link_libraries(test_hermite_bending_damping_dynamic PRIVATE cabledyn_core) +add_test(NAME hermite_bending_damping_dynamic COMMAND test_hermite_bending_damping_dynamic) +set_tests_properties(hermite_bending_damping_dynamic PROPERTIES LABELS "fortran;unit;dynamic;damping") +# Bending damping on a deck (EI|Bb, EI|-zeta|f): resolution, effect and refusals end to end. +add_executable(test_bending_damping_deck tests/test_bending_damping_deck.f90) +target_link_libraries(test_bending_damping_deck PRIVATE cabledyn_core) +add_test(NAME bending_damping_deck COMMAND test_bending_damping_deck) +set_tests_properties(bending_damping_deck PROPERTIES LABELS "fortran;driver;integration;dynamic;damping") # Active line control of a finite-EI cable: the length update rebuilds the caches a fresh # build carries (bit for bit), is atomic and rewinds exactly; hanging, taut and paid-out @@ -3436,6 +3449,9 @@ if(CABLEDYN_ENABLE_COVERAGE) test_hermite_cable_dynamic test_hermite_drag_dynamics test_hermite_axial_damping + test_hermite_bending_damping + test_hermite_bending_damping_dynamic + test_bending_damping_deck test_hermite_cable_control test_control_torsion test_hermite_added_mass diff --git a/doc/capabilities.rst b/doc/capabilities.rst index eea4aa13..f2154c4d 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -114,6 +114,11 @@ Line and constitutive capability ``Coupled``/``Vessel`` rods, bodies other than Rigid6 and ``False alpha_force_blend``. Modal analysis carries the twist angle of every node. Not modelled: seabed friction against twist, anisotropic sections, self-contact of a loop (see :ref:`theory-torsion`) + * - Bending damping of finite-EI cables (``EI|Bb``, ``EI|-zeta|f``) + - Supported + - a bending Kelvin–Voigt damping on the curvature rate (stiffness-proportional in ``EI``; + a mode is damped in its bending share), on every dynamic route that carries the cable, + beside the axial (``BA``) and torsional (``GJ|K|Bt``) damping (:doc:`theory`) * - Hockling loops, nonlinear cross-section laws - Not provided - the buckling onset and the post-buckled shape are computed, but a loop that closes on diff --git a/doc/driver_format.md b/doc/driver_format.md index dabaf1f0..e1dac704 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -238,7 +238,7 @@ Inside OUTPUTS, a row whose first token is `END` also closes the channel list. | `MassDenInAir` | dry mass per unstretched metre [kg/m] | submerged weight = (m − ρ_w·πd²/4)·g; its magnitude at most 1e6 where used | | `EA` | axial stiffness [N] | linear (T = EA·ε); at least 1e-3 and at most 1e15 where used; see the viscoelastic and Syrope forms below | | `BA/-zeta` | axial damping: ≥ 0 is BA [N·s], < 0 is −ζ (damping ratio): by default (MoorDyn's convention) of each segment, BA = ζ L0 √(EA m) per element, which damps the line's first axial mode at about ζ π/(2N) on N elements and so depends on the mesh (a run notes the ratio); under `mode1 axialDampingRatio` of the line's first axial mode, on any mesh (see the OPTIONS table) | active in EI = 0 and finite-EI dynamics; ignored in a static-only run | -| `EI` | bending stiffness [N·m²] | finite and ≥ 0; see [EI routing](#ei-routing) | +| `EI` | bending stiffness [N·m²]; `EI|Bb` or `EI|-zeta|f` adds bending damping (below) | finite and ≥ 0; see [EI routing](#ei-routing) | | `Cd_n`, `Cd_t` | normal / tangential drag coefficients | used by EI = 0 dynamic current and Airy-wave runs | | `Ca_n`, `Ca_t` | normal / tangential added-mass coefficients | used by EI = 0 dynamic Froude–Krylov and added-mass runs | @@ -278,6 +278,17 @@ cable or wire rope (`T = EA ε + K τ`, `M = GJ τ + K ε`; see active line control changes keeps its `ζ`). It needs a finite-EI type; `GJ|0|Bt` is damping without coupling. +**Bending damping.** The `EI` column may be written `EI|Bb`, with `Bb` [N·m²·s] the bending +Kelvin–Voigt damping of a finite-EI cable: a damping moment `Bb` times the rate of the curvature +vector, taken in the frame carried with the cable's tangent (see [Bending damping](theory.rst)). It +is stiffness-proportional: a bending mode of frequency `ω` whose strain energy is all bending has +the damping ratio `ω Bb/(2 EI)`, and a mode that tension also stiffens is damped only in its +bending share, `ω Bb/(2 EI) · EI k²/(EI k² + T)` for a uniform cable of wavenumber `k` under +tension `T`. `EI|-zeta|f` gives it as the damping ratio `0 < ζ < 1` of a pure bending mode of +frequency `f` [Hz], `Bb = ζ EI/(π f)`, set once per line type (it does not depend on the mesh). +`EI|0` is the plain `EI`. It needs `EI > 0` and acts in the dynamics only (a static solve has no +rates). + **Viscoelastic axial stiffness (MoorDyn `ElasticMod`).** The EA and BA columns accept bar-separated parts: diff --git a/doc/theory.rst b/doc/theory.rst index ee8f8b64..47127f01 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -837,6 +837,49 @@ viscoelastic or Syrope section has no single ``EA`` that sets the first mode, so and a negative ``BA`` is refused under this option; ``BA`` in N·s is used as given under both conventions. +Bending damping +~~~~~~~~~~~~~~~ + +A finite-EI cable can carry a bending Kelvin–Voigt damping (``EI|Bb`` or ``EI|-zeta|f`` in +LINE TYPES, see :doc:`file_formats`). With :math:`\mathbf{a} = \mathbf{r}_{,s}`, +:math:`\mathbf{b} = \mathbf{r}_{,ss}` and the curvature vector of the elastic energy +:math:`\boldsymbol{\kappa} = \mathbf{a}\times\mathbf{b}/\lvert\mathbf{a}\rvert^3`, the element's +dissipation function is + +.. math:: + + \psi = \int_0^{L_0} \tfrac{1}{2}\,B_b\,\lvert\mathring{\boldsymbol{\kappa}}\rvert^2\,\mathrm{d}s, + \qquad + \mathring{\boldsymbol{\kappa}} = (\mathbf{I} - \mathbf{t}\mathbf{t}^\mathsf{T})\,\dot{\boldsymbol{\kappa}}, + \qquad \mathbf{t} = \mathbf{a}/\lvert\mathbf{a}\rvert , + +and the damping force is :math:`\partial\psi/\partial\mathbf{v}`, with exact position and velocity +Jacobians. Under active line control (``CONTROL``) the curvature rate also carries the change of +the element's unstretched length, on which the shape functions depend, as the axial strain rate +does. Because :math:`\boldsymbol{\kappa}` is normal to :math:`\mathbf{t}`, +:math:`\mathring{\boldsymbol{\kappa}} = \dot{\boldsymbol{\kappa}} - (\mathbf{t}\times\dot{\mathbf{t}}) +\times\boldsymbol{\kappa}`: the curvature rate in the frame carried with the tangent by the smallest +rotation. It vanishes for a rigid motion whose rotation +is normal to the tangent and equals :math:`\dot{\boldsymbol{\kappa}}` in planar bending. Without a +twist state, a curvature that turns about the centreline cannot be told from a whirl and is damped +as one; for a rigid rotation about the tangent of a curved span (the out-of-plane swing of a +catenary) the force is of order :math:`B_b\kappa^2` and negligible against the span's inertia. + +The damping is stiffness-proportional in the bending stiffness alone. A uniform cable of tension +:math:`T` vibrating in a mode of wavenumber :math:`k` and frequency :math:`\omega` has the damping +ratio + +.. math:: + + \zeta = \frac{\omega\,B_b}{2\,EI}\;\frac{EI\,k^2}{EI\,k^2 + T} , + +the pure-bending ratio times the bending share of the modal stiffness: a tension-dominated mode is +damped much less than a bending one. ``EI|-zeta|f`` sets :math:`B_b = \zeta\,EI/(\pi f)`, the ratio +:math:`\zeta` of a pure bending mode of frequency :math:`f`. The free decay of the first mode of a +pinned cable reproduces this ratio to 0.05 % in the bending- and tension-dominated limits +(``test_hermite_bending_damping_dynamic``). The force joins the axial damping as the structural +damping load (it is in the reported end forces, not in the elastic ``BendMom`` output). + Viscoelastic rope (MoorDyn ``ElasticMod`` 2 and 3) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index d73f3f31..29b37744 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -188,8 +188,11 @@ class LineType: viscoelastic type, or a :class:`SyropeEA`. ba : float | tuple[float, ...] Axial damping in N s (negative: damping ratio), or ``(Bs, Bd)``. - ei : float - Bending stiffness, in N m^2. + ei : float | tuple[float, ...] + Bending stiffness, in N m^2; ``(EI, Bb)`` adds the bending damping + ``Bb`` in N m^2 s (written ``EI|Bb``), and ``(EI, -zeta, f)`` gives it + as the damping ratio ``zeta`` of a bending mode of frequency ``f`` in Hz + (written ``EI|-zeta|f``; ``Bb = zeta EI / (pi f)``). cdn, cdt, can, cat : float Normal and tangential drag and added-mass coefficients. gas, gj, irt, irn : float | None @@ -211,7 +214,7 @@ class LineType: mass: float ea: float | tuple[float, ...] | SyropeEA ba: float | tuple[float, ...] = 0.0 - ei: float = 0.0 + ei: float | tuple[float, ...] = 0.0 cdn: float = 0.0 cdt: float = 0.0 can: float = 0.0 @@ -1627,7 +1630,7 @@ def add_line_type( mass: float, ea: float | tuple[float, ...] | SyropeEA, ba: float | tuple[float, ...] = 0.0, - ei: float = 0.0, + ei: float | tuple[float, ...] = 0.0, cdn: float = 0.0, cdt: float = 0.0, can: float = 0.0, @@ -2661,7 +2664,9 @@ def _line_type_table(self) -> tuple[str, str, list[list[str]]]: row.append(f'"{_render(ea)}"') else: row.append(_multi(item.ea, what)) - row += [_multi(item.ba, what), _num(item.ei, what)] + if isinstance(item.ei, tuple) and len(item.ei) not in (2, 3): + raise ValueError(f"{what}: ei is EI, (EI, Bb) or (EI, -zeta, f)") + row += [_multi(item.ba, what), _multi(item.ei, what)] extra = (item.gas, item.gj, item.irt, item.irn) if all(value is not None for value in extra): wide = True @@ -3171,7 +3176,7 @@ def line_type(self, row: DeckRecord) -> None: mass=_f(values["mass"]), ea=ea, ba=_fmulti(values["ba"]), - ei=_f(values["ei"]), + ei=_fmulti(values["ei"]), cdn=_f(values["cdn"]), cdt=_f(values["cdt"]), can=_f(values["can"]), diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index a6ad7d83..a69d833c 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -3729,6 +3729,8 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: for index in (1, 2, *range(5, len(row.tokens))): if len(row.tokens) == 14 and index == 7: continue # the GJ column, GJ, GJ|K or GJ|K|Bt, is read below + if index == 5: + continue # the EI column, EI, EI|Bb or EI|-zeta|f, is read below numeric(row.tokens[index], row, f"LINE TYPES column {index + 1}") ea_parts = row.tokens[3].split("|") ba_parts = row.tokens[4].split("|") @@ -3790,7 +3792,43 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: f"{self._at(row)}: LINE TYPES drag and added-mass coefficients " "(Cd_n Cd_t Ca_n Ca_t) must be non-negative" ) - ei = numeric(row.tokens[5], row, "EI") + # native parse_ei_column: EI, EI|Bb (bending damping, N m^2 s) or EI|-zeta|f + ei_parts = row.tokens[5].split("|") + if len(ei_parts) > 3: + raise DeckFormatError( + f'{self._at(row)}: LINE TYPES EI column "{row.tokens[5]}" takes EI, EI|Bb ' + "or EI|-zeta|f" + ) + ei = numeric(ei_parts[0], row, "EI") + bend_damping = 0.0 + if len(ei_parts) == 2: + bend_damping = numeric(ei_parts[1], row, "EI|Bb damping") + if bend_damping < 0.0: + raise DeckFormatError( + f'{self._at(row)}: LINE TYPES EI column "{row.tokens[5]}": a negative ' + "bending damping is -zeta and needs the frequency it holds at, EI|-zeta|f" + ) + elif len(ei_parts) == 3: + ratio = numeric(ei_parts[1], row, "EI|-zeta|f ratio") + frequency = numeric(ei_parts[2], row, "EI|-zeta|f frequency") + if not -1.0 < ratio < 0.0: + raise DeckFormatError( + f'{self._at(row)}: LINE TYPES EI column "{row.tokens[5]}": ' + "EI|-zeta|f takes a damping ratio 0 < zeta < 1, written negative" + ) + if not frequency > 0.0: + raise DeckFormatError( + f'{self._at(row)}: LINE TYPES EI column "{row.tokens[5]}": the frequency f ' + "of EI|-zeta|f must be positive [Hz]" + ) + bend_damping = -ratio * ei / (math.pi * frequency) + # a damping asked for (the ratio form, or Bb > 0) needs a finite EI: on EI = 0 the + # ratio form resolves to Bb = 0 and would pass unnoticed + if (len(ei_parts) == 3 or bend_damping > 0.0) and not ei > 0.0: + raise DeckFormatError( + f"{self._at(row)}: LINE TYPES {row.tokens[0]}: bending damping (EI|Bb) needs " + "a finite-EI cable (EI > 0)" + ) if len(row.tokens) in (11, 13): # Native check_viv_columns: MoorDyn's cross-flow VIV columns Cl [dF cF] cl = numeric(row.tokens[10], row, "Cl") diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index 8685f609..ea6f0608 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -994,6 +994,28 @@ def test_torsional_damping_round_trips_in_the_gj_column(tmp_path: Path) -> None: assert next(t for t in loaded.line_types if t.name == "cable").gj == (1.0e4, 0.0, -0.02) +@pytest.mark.parametrize("ei", [(1.0e4, 250.0), (1.0e4, -0.02, 1.5)]) +def test_bending_damping_round_trips_in_the_ei_column( + tmp_path: Path, ei: tuple[float, ...] +) -> None: + model = _chain_model(tmp_path) + cable = model.add_line_type("cable", diam=0.2, mass=40.0, ea=5.0e8, ei=ei) + assert cable.ei == ei + target = model.save(tmp_path / "bend_damped.dat") + deck = DeckFile.read(target) + row = next(r for r in deck.line_types if r.tokens[0] == "cable") + assert tuple(float(v) for v in row.tokens[5].split("|")) == ei + loaded = DeckModel.load(target) + assert next(t for t in loaded.line_types if t.name == "cable").ei == ei + + +def test_bending_damping_ei_tuple_length_is_checked(tmp_path: Path) -> None: + model = _chain_model(tmp_path) + model.add_line_type("cable", diam=0.2, mass=40.0, ea=5.0e8, ei=(1.0e4, 1.0, 2.0, 3.0)) + with pytest.raises(ValueError, match=r"ei is EI, \(EI, Bb\) or \(EI, -zeta, f\)"): + model.to_text() + + @pytest.mark.parametrize( ("gj", "ei", "message"), [ diff --git a/python/tests/test_deck_native_parity.py b/python/tests/test_deck_native_parity.py index 29f8c802..c2c839a0 100644 --- a/python/tests/test_deck_native_parity.py +++ b/python/tests/test_deck_native_parity.py @@ -953,6 +953,36 @@ def test_stiffener_rows_are_native(row, message): _rejects(_example("lazy_wave_bend_stiffener.dat", (_STIFFENER_ROOT, row)), message) +_BARE_ROW = "bare 0.160 36.70 4.69e8 0.0 1.99e4 1.2 0.1 1.0 0.0" + + +@pytest.mark.parametrize( + "ei", + ["1.99e4|250.0", "1.99e4|0", "1.99e4|-0.02|1.5"], +) +def test_bending_damping_forms_are_accepted(ei): + DeckFile.from_text( + _example("lazy_wave_bend_stiffener.dat", (_BARE_ROW, _BARE_ROW.replace("1.99e4", ei, 1))) + ) + + +@pytest.mark.parametrize( + ("ei", "message"), + [ + ("1.99e4|1|2|3", "takes EI, EI|Bb or EI|-zeta|f"), + ("1.99e4|-250.0", "a negative bending damping is -zeta and needs the frequency"), + ("1.99e4|0.02|1.5", "takes a damping ratio 0 < zeta < 1, written negative"), + ("1.99e4|-1.5|1.5", "takes a damping ratio 0 < zeta < 1, written negative"), + ("1.99e4|-0.02|0", "of EI|-zeta|f must be positive"), + ("0.0|250.0", "bending damping (EI|Bb) needs a finite-EI cable"), + ("0.0|-0.05|0.5", "bending damping (EI|Bb) needs a finite-EI cable"), + ], +) +def test_bending_damping_rows_are_native(ei, message): + text = _example("lazy_wave_bend_stiffener.dat", (_BARE_ROW, _BARE_ROW.replace("1.99e4", ei, 1))) + _rejects(text, re.escape(message)) + + def test_stiffener_needs_a_finite_ei_line(): text = _section(_HELD, "STIFFENERS", "1 A 1.0 0.5 0.5 0.3 5.0e7 1150") _rejects(text, "STIFFENERS name line 1, which is not a finite-EI line") diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index ad250b7a..fb420578 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -122,7 +122,7 @@ MODULE CableDyn_DeckDriver CD_Vessel_RAO_Motion, CD_Vessel_Ramp, CD_VESSEL_OK USE CableDyn_OpenFAST_HermiteFMF, ONLY: CD_HFMF_ModuleType, CD_HFMF_Init, CD_HFMF_Set_Drag, & CD_HFMF_Set_Section_Reference, CD_HFMF_Section_Curvature, & - CD_HFMF_Set_Axial_Damping, & + CD_HFMF_Set_Axial_Damping, CD_HFMF_Set_Bending_Damping, & CD_HFMF_Set_AddedMass, CD_HFMF_Set_ModifiedNewton, & CD_HFMF_Set_Tensile_Monitor, CD_HFMF_Get_Tensile_Diagnostics, & CD_HFMF_Get_Recovery_Diagnostics, & @@ -411,6 +411,10 @@ MODULE CableDyn_DeckDriver ! damping l0 sqrt(GJ Irn), resolved on the final mesh (and again at the lengths active line ! control sets) REAL(wp) :: bt = CD_ZERO + ! bending damping Bb [N m^2 s] of the EI column's second part (EI|Bb): the moment Bb times the + ! curvature rate (CD_HermiteCable_Bending_Damping), resolved from EI|-zeta|f (zeta at the + ! frequency f [Hz] of a bending mode, Bb = zeta EI/(pi f)) when the row gives a ratio + REAL(wp) :: bb = CD_ZERO REAL(wp) :: i_rt = CD_ZERO, i_rn = CD_ZERO REAL(wp) :: cdn = CD_ZERO, cdt = CD_ZERO, can = CD_ZERO, cat = CD_ZERO ! Viscoelastic stiffness (MoorDyn ElasticMod): the EA column's bar-separated @@ -1874,7 +1878,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(wp), ALLOCATABLE :: q_sequence(:) REAL(wp), ALLOCATABLE :: curv(:), cdn(:), cdt(:), can(:), cat(:), catenary_pos(:) REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:) - REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:) + REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:) REAL(wp) :: mode1_omega REAL(wp), ALLOCATABLE :: contact_kn(:), contact_cn(:) REAL(wp) :: anchor(3), fairlead(3), res, tvec(3), tnrm, contact_z, seed_z, seed_floor_a, seed_floor_b @@ -2216,6 +2220,8 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, IF (LEN_TRIM(fine_note) > 0 .AND. standalone_mode) WRITE (error_unit, '(A)') ' Note: '//TRIM(fine_note)//'.' ALLOCATE (ba_raw(SIZE(l0))) CALL finite_raw_ba_array(ln, sections, types, ba_raw) + ALLOCATE (bb_el(SIZE(l0))) + CALL finite_bb_array(ln, sections, types, bb_el) nnode = SIZE(l0) + 1 ndof = 6*nnode ALLOCATE (w(SIZE(l0)), nodes_ref(3, nnode), q0(ndof)) @@ -3280,6 +3286,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL remap_elem_by_reference_arc(can, l0, l0_am) CALL remap_elem_by_reference_arc(cat, l0, l0_am) CALL remap_elem_by_reference_arc(ba_raw, l0, l0_am) + CALL remap_elem_by_reference_arc(bb_el, l0, l0_am) IF (ALLOCATED(ei_cable)) CALL remap_elem_by_reference_arc(ei_cable, l0, l0_am) END IF ! The node output channels read deck nodes: map each onto the final mesh (set on the cable @@ -3454,6 +3461,12 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL fail(ErrStat, ErrMsg, 'finite-EI cable axial-damping wiring failed: '//TRIM(em)); RETURN END IF END IF + IF (ANY(bb_el > CD_ZERO)) THEN + CALL CD_HFMF_Set_Bending_Damping(cable, bb_el, es, em) + IF (es /= CD_HFMF_OK) THEN + CALL fail(ErrStat, ErrMsg, 'finite-EI cable bending-damping wiring failed: '//TRIM(em)); RETURN + END IF + END IF IF (ANY(endconn_mode /= CD_ENDCONN_PINNED)) THEN ! a connected moving End B is attached to its own parent (end_b_d0_parent), as End A to its IF (moving_b .AND. endconn_mode(1) /= CD_ENDCONN_PINNED .AND. endconn_mode(2) /= CD_ENDCONN_PINNED) THEN @@ -11473,6 +11486,24 @@ SUBROUTINE finite_raw_ba_array(ln, sections, types, ba_raw) ba_raw = ba_raw(SIZE(ba_raw):1:-1) END SUBROUTINE finite_raw_ba_array + SUBROUTINE finite_bb_array(ln, sections, types, bb) + !! The line types' bending damping Bb [N m^2 s] on the deck elements (internal order). + TYPE(DeckLine), INTENT(IN) :: ln + TYPE(DeckSection), INTENT(IN) :: sections(:) + TYPE(DeckLineType), INTENT(IN) :: types(:) + REAL(wp), INTENT(OUT) :: bb(:) + INTEGER :: i, j, e + e = 0 + DO i = 1, SIZE(sections) + IF (sections(i)%line_id /= ln%id) CYCLE + DO j = 1, sections(i)%nsegs + e = e + 1 + bb(e) = types(sections(i)%ltype)%bb + END DO + END DO + bb = bb(SIZE(bb):1:-1) + END SUBROUTINE finite_bb_array + SUBROUTINE finite_line_type_ei(ln, sections, types, ei) !! The line types' own bending stiffness on the deck elements (internal order), without !! any STIFFENERS sleeve. @@ -15615,6 +15646,74 @@ SUBROUTINE sniff_types_header(line, stock_cols) END IF END SUBROUTINE sniff_types_header + SUBROUTINE parse_ei_column(ei_str, t, ErrStat, ErrMsg) + !! The LINE TYPES EI column: EI, EI|Bb with Bb >= 0 the bending damping [N m^2 s] (the moment + !! Bb times the curvature rate), or EI|-zeta|f with 0 < zeta < 1 the damping ratio of a bending + !! mode of frequency f [Hz] whose energy is all bending, Bb = zeta EI/(pi f). Bending damping + !! needs a finite-EI cable (EI > 0). + CHARACTER(*), INTENT(IN) :: ei_str + TYPE(DeckLineType), INTENT(INOUT) :: t + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + INTEGER :: bar, bar2, ios + REAL(wp) :: second, freq + REAL(wp), PARAMETER :: PI_L = 3.14159265358979323846_wp + ErrStat = 0; ErrMsg = '' + t%bb = CD_ZERO + second = CD_ZERO + freq = CD_ZERO + bar = INDEX(ei_str, '|') + bar2 = 0 + IF (bar == 0) THEN + READ (ei_str, *, IOSTAT=ios) t%ei + ELSE + bar2 = INDEX(ei_str(bar + 1:), '|') + IF (bar2 > 0) THEN + bar2 = bar + bar2 + IF (INDEX(ei_str(bar2 + 1:), '|') > 0) THEN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'" takes EI, EI|Bb or EI|-zeta|f'); RETURN + END IF + END IF + READ (ei_str(1:bar - 1), *, IOSTAT=ios) t%ei + IF (bar2 > 0) THEN + IF (ios == 0) READ (ei_str(bar + 1:bar2 - 1), *, IOSTAT=ios) second + IF (ios == 0) READ (ei_str(bar2 + 1:), *, IOSTAT=ios) freq + ELSE + IF (ios == 0) READ (ei_str(bar + 1:), *, IOSTAT=ios) second + END IF + END IF + IF (ios /= 0) THEN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'" is not EI, EI|Bb or EI|-zeta|f'); RETURN + END IF + IF (.NOT. (IEEE_IS_FINITE(t%ei) .AND. IEEE_IS_FINITE(second) .AND. IEEE_IS_FINITE(freq))) THEN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'" must be finite'); RETURN + END IF + IF (bar == 0) RETURN + IF (bar2 == 0) THEN + IF (second < CD_ZERO) THEN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'": a negative bending damping is '// & + '-zeta and needs the frequency it holds at, EI|-zeta|f'); RETURN + END IF + t%bb = second + ELSE + IF (.NOT. (second < CD_ZERO .AND. second > -CD_ONE)) THEN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'": EI|-zeta|f takes a damping '// & + 'ratio 0 < zeta < 1, written negative'); RETURN + END IF + IF (.NOT. (freq > CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'": the frequency f of '// & + 'EI|-zeta|f must be positive [Hz]'); RETURN + END IF + t%bb = -second*t%ei/(PI_L*freq) + END IF + ! a damping asked for (a ratio form, or Bb > 0) needs a finite EI: on EI = 0 the ratio form would + ! resolve to Bb = 0 and the request would pass unnoticed + IF ((bar2 > 0 .OR. t%bb > CD_ZERO) .AND. .NOT. (t%ei > CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES '//TRIM(t%name)//': bending damping (EI|Bb) needs a '// & + 'finite-EI cable (EI > 0)'); RETURN + END IF + END SUBROUTINE parse_ei_column + SUBROUTINE parse_gj_column(gj_str, t, ErrStat, ErrMsg) !! The 14-column row's GJ column: GJ, GJ|K with K the torque-tension coupling [N m] !! (M = GJ tau + K eps, T = EA eps + K tau; K > 0 when stretching the cable twists it in the @@ -15664,7 +15763,7 @@ SUBROUTINE append_type(line, types, nt, stock_cols, ErrStat, ErrMsg) TYPE(DeckLineType) :: t ! EA may hold SYROPE:|alpha|beta, so it gets a path-length buffer CHARACTER(CD_DECK_PATHLEN) :: ea_str - CHARACTER(NAMELEN) :: ba_str, gj_str + CHARACTER(NAMELEN) :: ba_str, gj_str, ei_str INTEGER :: ios, ntok ErrStat = 0; ErrMsg = '' ntok = count_tokens(line) @@ -15679,25 +15778,25 @@ SUBROUTINE append_type(line, types, nt, stock_cols, ErrStat, ErrMsg) IF (ntok == 10) THEN IF (stock_cols) THEN ! stock MoorDyn header order: Cd Ca CdAx CaAx = (Cd_n, Ca_n, Cd_t, Ca_t) - READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, t%ei, t%cdn, t%can, t%cdt, t%cat + READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%cdn, t%can, t%cdt, t%cat ELSE - READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, t%ei, t%cdn, t%cdt, t%can, t%cat + READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%cdn, t%cdt, t%can, t%cat END IF ELSE IF (ntok == 11 .OR. ntok == 13) THEN ! MoorDyn v2's optional cross-flow VIV columns after the ten standard ones: Cl, or ! Cl dF cF (MoorDyn.f90 line-type parse; dF and cF default to 0.08 and 0.18) IF (stock_cols) THEN IF (ntok == 11) THEN - READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, t%ei, t%cdn, t%can, t%cdt, t%cat, t%cl + READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%cdn, t%can, t%cdt, t%cat, t%cl ELSE - READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, t%ei, t%cdn, t%can, t%cdt, t%cat, & + READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%cdn, t%can, t%cdt, t%cat, & t%cl, t%viv_df, t%viv_cf END IF ELSE IF (ntok == 11) THEN - READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, t%ei, t%cdn, t%cdt, t%can, t%cat, t%cl + READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%cdn, t%cdt, t%can, t%cat, t%cl ELSE - READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, t%ei, t%cdn, t%cdt, t%can, t%cat, & + READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%cdn, t%cdt, t%can, t%cat, & t%cl, t%viv_df, t%viv_cf END IF END IF @@ -15706,12 +15805,14 @@ SUBROUTINE append_type(line, types, nt, stock_cols, ErrStat, ErrMsg) CALL fail(ErrStat, ErrMsg, 'the 14-column LINE TYPES row is a CableDyn form (... Cd_n Cd_t '// & 'Ca_n Ca_t); it does not combine with a stock-order header (Cd Ca CdAx CaAx)'); RETURN END IF - READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, t%ei, t%gas, gj_str, t%i_rt, t%i_rn, & + READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%gas, gj_str, t%i_rt, t%i_rn, & t%cdn, t%cdt, t%can, t%cat END IF IF (ios /= 0) THEN CALL fail(ErrStat, ErrMsg, 'malformed LINE TYPES row'); RETURN END IF + CALL parse_ei_column(ei_str, t, ErrStat, ErrMsg) + IF (ErrStat /= 0) RETURN IF (ntok == 14) THEN CALL parse_gj_column(gj_str, t, ErrStat, ErrMsg) IF (ErrStat /= 0) RETURN diff --git a/src/CableDyn_HermiteCable.f90 b/src/CableDyn_HermiteCable.f90 index dc62e175..39c08462 100644 --- a/src/CableDyn_HermiteCable.f90 +++ b/src/CableDyn_HermiteCable.f90 @@ -44,6 +44,7 @@ MODULE CableDyn_HermiteCable PUBLIC :: CD_HermiteCable_Shapes PUBLIC :: CD_HermiteCable_Gauss_Rule PUBLIC :: CD_HermiteCable_Dry_Buoyancy + PUBLIC :: CD_HermiteCable_Bending_Damping INTEGER, PARAMETER, PUBLIC :: CD_HCABLE_OK = 0, CD_HCABLE_BADINPUT = 1 INTEGER, PARAMETER :: NG = 4 !! default Gauss points per element @@ -380,6 +381,240 @@ END SUBROUTINE fail END SUBROUTINE hermite_element_integrated + SUBROUTINE CD_HermiteCable_Bending_Damping(qr, vr, L, Bb, fdamp, Kq, Kv, ErrStat, ErrMsg, quadrature_order, & + l0_dot) + !! Kelvin-Voigt bending damping of one cubic-Hermite element: the dissipation function + !! psi = integral_0^L 1/2 Bb |kdot|^2 ds, kdot = (I - t t^T) d kappa/dt, + !! with kappa = (a x b)/|a|^3 the curvature vector of the elastic energy (a = dr/ds, + !! b = d^2r/ds^2, s the unstretched arc length) and t = a/|a| the unit tangent. kdot is the + !! curvature rate convected with the tangent by the smallest rotation: since kappa is normal + !! to t, (I - t t^T) dkappa/dt = dkappa/dt - (t x dt/dt) x kappa. It is zero for every rigid + !! motion whose rotation is normal to the tangent and equals dkappa/dt in planar bending; a + !! rotation about the tangent itself (a curvature that turns about the centreline) cannot be + !! told from a whirl without a twist state and is damped as one. A bending mode of frequency + !! omega whose energy is all bending has the damping ratio omega Bb / (2 EI). + !! + !! fdamp = d psi / d v is an INTERNAL generalised force (v . fdamp >= 0); Kq = d fdamp/dq + !! and Kv = d fdamp/dv are the exact Jacobians (Kq is not symmetric in general). qr and vr + !! are the element DOFs [r1, m1, r2, m2] and their rates; L the unstretched length; Bb >= 0 + !! [N m^2 s]. + !! + !! l0_dot (optional): the unstretched-length rate of an element under active line control. The + !! shape functions depend on L: a = p/L + g and b = P/L^2 + G/L, with p, P the end-position parts + !! and g, G the tangent-handle parts, so at fixed DOFs a changes at -(L'/L) a_pos and b at + !! -(L'/L)(2 b_pos + b_tan). These join the rates of a and b, and their dependence on the end + !! positions and tangent handles joins Kq; Kv is unchanged. + REAL(wp), INTENT(IN) :: qr(12), vr(12), L, Bb + REAL(wp), INTENT(OUT) :: fdamp(12) + REAL(wp), INTENT(OUT), OPTIONAL :: Kq(12, 12), Kv(12, 12) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + INTEGER, INTENT(IN), OPTIONAL :: quadrature_order + REAL(wp), INTENT(IN), OPTIONAL :: l0_dot + + REAL(wp) :: gp(MAX_NG), gw(MAX_NG), H(4), dH(4), ddH(4), b1(4), b2(4), rho, ca(4), cb(4) + REAL(wp) :: av(3), bv(3), ad(3), bd(3), xd(6), cr(3), tv(3), s2, sp, g, ga, gaa2 + REAL(wp) :: Dcr(3, 6), Dg(6), J(3, 6), Pm(3, 3), Km(3, 6), kr(3), dK(3, 6, 6), T(3, 6, 6), dP(3, 3, 3) + REAL(wp) :: g6(6), Q6(6, 6), V6(6, 6), a6(6), wgL, w11, w12, w21, w22, acc, dik, dmk + INTEGER :: order, qg, i, jj, k, m, c, dd, ic, jc, kn, mn + INTEGER, PARAMETER :: sd(4) = [0, 3, 6, 9] + LOGICAL :: has_rate + + ErrStat = CD_HCABLE_OK + ErrMsg = '' + fdamp = CD_ZERO + IF (PRESENT(Kq)) Kq = CD_ZERO + IF (PRESENT(Kv)) Kv = CD_ZERO + order = NG + IF (PRESENT(quadrature_order)) order = quadrature_order + IF (.NOT. CD_All_Finite(qr) .OR. .NOT. CD_All_Finite(vr) .OR. .NOT. CD_Is_Finite(L) .OR. & + .NOT. CD_Is_Finite(Bb)) THEN + CALL fail('inputs must be finite'); RETURN + END IF + IF (L <= GEOM_TOL) THEN + CALL fail('element length must be positive'); RETURN + END IF + IF (Bb < CD_ZERO) THEN + CALL fail('Bb must be non-negative'); RETURN + END IF + IF (order < 1 .OR. order > MAX_NG) THEN + CALL fail('quadrature_order must lie in [1,6]'); RETURN + END IF + rho = CD_ZERO + IF (PRESENT(l0_dot)) THEN + IF (.NOT. CD_Is_Finite(l0_dot)) THEN + CALL fail('l0_dot must be finite'); RETURN + END IF + rho = l0_dot/L + END IF + has_rate = ABS(rho) > CD_ZERO + IF (.NOT. (Bb > CD_ZERO)) RETURN + + CALL CD_HermiteCable_Gauss_Rule(order, gp, gw) + V6 = CD_ZERO + Q6 = CD_ZERO + DO qg = 1, order + CALL hermite_shapes(gp(qg), L, H, dH, ddH) + b1 = dH/L + b2 = ddH/(L*L) + DO c = 1, 3 + av(c) = SUM(b1*qr(sd + c)); bv(c) = SUM(b2*qr(sd + c)) + ad(c) = SUM(b1*vr(sd + c)); bd(c) = SUM(b2*vr(sd + c)) + END DO + ! the length-rate weights of the effective rates: d a/dt -= rho sum_k ca(k) q_k and + ! d b/dt -= rho sum_k cb(k) q_k (end positions k = 1, 3; tangent handles k = 2, 4) + ca = [b1(1), CD_ZERO, b1(3), CD_ZERO] + cb = [2.0_wp*b2(1), b2(2), 2.0_wp*b2(3), b2(4)] + IF (has_rate) THEN + DO c = 1, 3 + ad(c) = ad(c) - rho*SUM(ca*qr(sd + c)) + bd(c) = bd(c) - rho*SUM(cb*qr(sd + c)) + END DO + END IF + xd(1:3) = ad; xd(4:6) = bd + s2 = SUM(av*av) + IF (s2 <= GEOM_TOL*GEOM_TOL) THEN + CALL fail('degenerate centreline: |dr/ds| ~ 0 at a Gauss point'); RETURN + END IF + sp = SQRT(s2) + tv = av/sp + g = CD_ONE/(sp*s2) ! |a|^-3 + ga = -3.0_wp/(s2*s2*sp) ! d g/d a = ga a; d2 g/da da = ga I + gaa2 a a^T + gaa2 = 15.0_wp/(s2*s2*s2*sp) + cr = [av(2)*bv(3) - av(3)*bv(2), av(3)*bv(1) - av(1)*bv(3), av(1)*bv(2) - av(2)*bv(1)] + ! first derivatives: d cr/d a = -[b]x, d cr/d b = [a]x + Dcr(:, 1:3) = -skew(bv) + Dcr(:, 4:6) = skew(av) + Dg = CD_ZERO + Dg(1:3) = ga*av + a6 = CD_ZERO + a6(1:3) = av + DO jj = 1, 6 + J(:, jj) = Dcr(:, jj)*g + cr*Dg(jj) + END DO + ! second derivatives of kappa = cr g: T(i,j,k) = d2 kappa_i / dx_j dx_k, x = (a, b) + DO k = 1, 6 + DO jj = 1, 6 + DO i = 1, 3 + acc = Dcr(i, jj)*Dg(k) + Dcr(i, k)*Dg(jj) + IF (jj <= 3 .AND. k >= 4) acc = acc + levi(i, jj, k - 3)*g + IF (jj >= 4 .AND. k <= 3) acc = acc + levi(i, k, jj - 3)*g + IF (jj <= 3 .AND. k <= 3) THEN + acc = acc + cr(i)*gaa2*a6(jj)*a6(k) + IF (jj == k) acc = acc + cr(i)*ga + END IF + T(i, jj, k) = acc + END DO + END DO + END DO + ! projector P = I - t t^T and dP(i,m,k) = d P_im / d a_k (zero for b) + DO m = 1, 3 + DO i = 1, 3 + Pm(i, m) = -tv(i)*tv(m) + END DO + Pm(m, m) = Pm(m, m) + CD_ONE + END DO + DO k = 1, 3 + DO m = 1, 3 + DO i = 1, 3 + dik = CD_ZERO; IF (i == k) dik = CD_ONE + dmk = CD_ZERO; IF (m == k) dmk = CD_ONE + dP(i, m, k) = -(((dik - tv(i)*tv(k))/sp)*tv(m) + tv(i)*((dmk - tv(m)*tv(k))/sp)) + END DO + END DO + END DO + Km = MATMUL(Pm, J) + kr = MATMUL(Km, xd) + ! dK(i,j,k) = d K_ij / d x_k = sum_m dP(i,m,k) J(m,j) + sum_m P(i,m) T(m,j,k) + DO k = 1, 6 + DO jj = 1, 6 + DO i = 1, 3 + acc = SUM(Pm(i, :)*T(:, jj, k)) + IF (k <= 3) acc = acc + SUM(dP(i, :, k)*J(:, jj)) + dK(i, jj, k) = acc + END DO + END DO + END DO + g6 = Bb*MATMUL(TRANSPOSE(Km), kr) + IF (PRESENT(Kv) .OR. (PRESENT(Kq) .AND. has_rate)) V6 = Bb*MATMUL(TRANSPOSE(Km), Km) + IF (PRESENT(Kq)) THEN + ! d (K^T K xd)_j / d x_k = sum_i dK(i,j,k) kr_i + K_ij sum_l dK(i,l,k) xd_l + DO k = 1, 6 + DO jj = 1, 6 + acc = CD_ZERO + DO i = 1, 3 + acc = acc + dK(i, jj, k)*kr(i) + Km(i, jj)*SUM(dK(i, :, k)*xd) + END DO + Q6(jj, k) = Bb*acc + END DO + END DO + END IF + wgL = gw(qg)*L + DO kn = 1, 4 + DO c = 1, 3 + ic = sd(kn) + c + fdamp(ic) = fdamp(ic) + wgL*(b1(kn)*g6(c) + b2(kn)*g6(3 + c)) + END DO + END DO + IF (.NOT. (PRESENT(Kq) .OR. PRESENT(Kv))) CYCLE + DO mn = 1, 4 + DO kn = 1, 4 + w11 = wgL*b1(kn)*b1(mn); w12 = wgL*b1(kn)*b2(mn) + w21 = wgL*b2(kn)*b1(mn); w22 = wgL*b2(kn)*b2(mn) + DO dd = 1, 3 + jc = sd(mn) + dd + DO c = 1, 3 + ic = sd(kn) + c + IF (PRESENT(Kq)) THEN + Kq(ic, jc) = Kq(ic, jc) + w11*Q6(c, dd) + w12*Q6(c, 3 + dd) & + + w21*Q6(3 + c, dd) + w22*Q6(3 + c, 3 + dd) + ! the effective rates' dependence on the DOFs under a length rate + IF (has_rate) Kq(ic, jc) = Kq(ic, jc) - rho*wgL* & + ((b1(kn)*V6(c, dd) + b2(kn)*V6(3 + c, dd))*ca(mn) + & + (b1(kn)*V6(c, 3 + dd) + b2(kn)*V6(3 + c, 3 + dd))*cb(mn)) + END IF + IF (PRESENT(Kv)) Kv(ic, jc) = Kv(ic, jc) + w11*V6(c, dd) + w12*V6(c, 3 + dd) & + + w21*V6(3 + c, dd) + w22*V6(3 + c, 3 + dd) + END DO + END DO + END DO + END DO + END DO + IF (.NOT. CD_All_Finite(fdamp)) THEN + CALL fail('non-finite bending damping force'); RETURN + END IF + IF (PRESENT(Kq)) THEN + IF (.NOT. CD_All_Finite(Kq)) THEN + CALL fail('non-finite bending damping Jacobian'); RETURN + END IF + END IF + + CONTAINS + + PURE FUNCTION skew(v) RESULT(s) + !! [v]x, so that skew(v) u = v x u + REAL(wp), INTENT(IN) :: v(3) + REAL(wp) :: s(3, 3) + s = RESHAPE([CD_ZERO, v(3), -v(2), -v(3), CD_ZERO, v(1), v(2), -v(1), CD_ZERO], [3, 3]) + END FUNCTION skew + + PURE REAL(wp) FUNCTION levi(i, jj, k) + !! Levi-Civita symbol for indices in 1..3 + INTEGER, INTENT(IN) :: i, jj, k + levi = REAL((i - jj)*(jj - k)*(k - i), wp)/2.0_wp + END FUNCTION levi + + SUBROUTINE fail(msg) + CHARACTER(*), INTENT(IN) :: msg + ErrStat = CD_HCABLE_BADINPUT + ErrMsg = 'CD_HermiteCable_Bending_Damping: '//msg + fdamp = CD_ZERO + IF (PRESENT(Kq)) Kq = CD_ZERO + IF (PRESENT(Kv)) Kv = CD_ZERO + END SUBROUTINE fail + + END SUBROUTINE CD_HermiteCable_Bending_Damping + SUBROUTINE CD_HermiteCable_Mass(rho_a, L, M, ErrStat, ErrMsg) !! Consistent (kinetic-energy) mass matrix of the cubic-Hermite bending-cable element. !! diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index ff12e0c5..793d61f5 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -62,6 +62,7 @@ MODULE CableDyn_HermiteCableDynamic CD_HermiteCable_Gauss_Rule, & CD_HermiteCable_Axial_Resultant, & CD_HermiteCable_Axial_Strain_Lower_Bound, CD_HermiteCable_Dry_Buoyancy, & + CD_HermiteCable_Bending_Damping, & CD_HCABLE_OK USE CableDyn_Linalg, ONLY: CD_Factor_Banded, CD_Solve_Factored_Banded, CD_LINALG_OK USE CableDyn_VIV, ONLY: CD_VIV_Lift_Per_Length, CD_VIV_Crossflow_Along, CD_VIV_Phase_Rate, CD_VIV_Mean_Square, & @@ -93,6 +94,7 @@ MODULE CableDyn_HermiteCableDynamic PUBLIC :: CD_HermiteCable_Dyn_Init PUBLIC :: CD_HermiteCable_Dyn_Set_Drag PUBLIC :: CD_HermiteCable_Dyn_Set_Axial_Damping + PUBLIC :: CD_HermiteCable_Dyn_Set_Bending_Damping PUBLIC :: CD_HermiteCable_Dyn_Set_EndConnection PUBLIC :: CD_HermiteCable_Dyn_Set_Torsion PUBLIC :: CD_HermiteCable_Dyn_Torsion_State @@ -257,6 +259,12 @@ MODULE CableDyn_HermiteCableDynamic ! axial quadrature as the elastic resultant. Off by default. LOGICAL :: has_axial_damping = .FALSE. REAL(wp), ALLOCATABLE :: BA(:) + ! Optional bending Kelvin-Voigt damping (CD_HermiteCable_Bending_Damping): Bb [N m^2 s] per + ! element, the coefficient of the convected curvature rate, integrated over reference arc length + ! with the bending quadrature. It joins the axial damping in the structural-damping load (the + ! element-load column 2 and the Kvel tangent). Off by default. + LOGICAL :: has_bend_damping = .FALSE. + REAL(wp), ALLOCATABLE :: Bb(:) ! Active line control (CD_HermiteCable_Dyn_Set_SegmentLength): a host changes the ! unstretched lengths l0 of chosen elements between steps. has_ctrl is set by the first ! change; from then on l0_dot(ne) holds the unstretched-length rate of every element @@ -2992,6 +3000,141 @@ SUBROUTINE fail(msg) END SUBROUTINE fail END SUBROUTINE CD_HermiteCable_Dyn_Set_Axial_Damping + SUBROUTINE CD_HermiteCable_Dyn_Set_Bending_Damping(model, Bb, ErrStat, ErrMsg) + !! Install the per-element bending Kelvin-Voigt coefficients Bb [N m^2 s]: the damping moment + !! Bb times the curvature rate convected with the tangent (CD_HermiteCable_Bending_Damping). An + !! all-zero array disables the contribution exactly. Transactional, and it refreshes the + !! consistent acceleration, as CD_HermiteCable_Dyn_Set_Axial_Damping. + TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model + REAL(wp), INTENT(IN) :: Bb(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + + REAL(wp), ALLOCATABLE :: old_Bb(:), new_Bb(:), old_a(:) + LOGICAL :: old_has + INTEGER :: es, istat + CHARACTER(1024) :: em + + ErrStat = CD_HCDYN_OK + model%rc_epoch = model%rc_epoch + 1 + model%fc_valid = .FALSE. + model%fc_clears = model%fc_clears + 1 + model%tr_valid = .FALSE. + ErrMsg = '' + IF (.NOT. model%initialized) THEN + CALL fail('model not initialised'); RETURN + END IF + IF (SIZE(Bb) /= model%ne) THEN + CALL fail('Bb must have length ne'); RETURN + END IF + IF (.NOT. CD_All_Finite(Bb) .OR. ANY(Bb < CD_ZERO)) THEN + CALL fail('Bb must be finite and non-negative'); RETURN + END IF + + ALLOCATE (new_Bb(model%ne), old_a(model%ndof), STAT=istat) + IF (istat /= 0) THEN + CALL fail('workspace allocation failed'); RETURN + END IF + new_Bb = Bb + old_a = model%a + old_has = model%has_bend_damping + CALL MOVE_ALLOC(model%Bb, old_Bb) + IF (ANY(new_Bb > CD_ZERO)) THEN + CALL MOVE_ALLOC(new_Bb, model%Bb) + model%has_bend_damping = .TRUE. + ELSE + model%has_bend_damping = .FALSE. + END IF + + CALL solve_consistent_acceleration(model, es, em) + IF (es /= CD_HCDYN_OK) THEN + IF (ALLOCATED(model%Bb)) DEALLOCATE (model%Bb) + CALL MOVE_ALLOC(old_Bb, model%Bb) + model%has_bend_damping = old_has + model%a = old_a + CALL fail('initial acceleration refresh failed: '//TRIM(em)); RETURN + END IF + + CONTAINS + SUBROUTINE fail(msg) + CHARACTER(*), INTENT(IN) :: msg + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_Bending_Damping: '//msg + END SUBROUTINE fail + END SUBROUTINE CD_HermiteCable_Dyn_Set_Bending_Damping + + SUBROUTINE structural_damping_element(model, e, qe, ve, fdamp, ErrStat, ErrMsg, kdq, kdv, fixed_length, & + fbend) + !! The structural (Kelvin-Voigt) damping load of element e: the axial dashpot (BA, with the + !! controlled-length rate) and the bending dashpot (Bb), summed, as an internal generalised + !! force, with their exact Jacobians kdq = d/dq, kdv = d/dv when requested. Without bending + !! damping the axial kernel's output is returned as it stands (bit for bit). Under active line + !! control both rates include the controlled-length rate l0_dot; fixed_length = .TRUE. leaves it + !! out (the node recovery's form). fbend (optional) returns the bending part of fdamp alone. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + REAL(wp), INTENT(IN) :: qe(12), ve(12) + REAL(wp), INTENT(OUT) :: fdamp(12) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + REAL(wp), INTENT(OUT), OPTIONAL :: kdq(12, 12), kdv(12, 12) + LOGICAL, INTENT(IN), OPTIONAL :: fixed_length + REAL(wp), INTENT(OUT), OPTIONAL :: fbend(12) + REAL(wp) :: fb(12), kbq(12, 12), kbv(12, 12) + LOGICAL :: want, ctrl + INTEGER :: es + want = PRESENT(kdq) .AND. PRESENT(kdv) + ctrl = model%has_ctrl + IF (PRESENT(fixed_length)) ctrl = ctrl .AND. .NOT. fixed_length + ErrStat = CD_HCDYN_OK + ErrMsg = '' + fdamp = CD_ZERO + IF (want) THEN + kdq = CD_ZERO; kdv = CD_ZERO + END IF + IF (PRESENT(fbend)) fbend = CD_ZERO + IF (model%has_axial_damping) THEN + IF (want .AND. ctrl) THEN + CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), fdamp, kdq, kdv, ErrStat, ErrMsg, & + model%axial_quadrature_order, model%l0_dot(e)) + ELSE IF (want) THEN + CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), fdamp, kdq, kdv, ErrStat, ErrMsg, & + model%axial_quadrature_order) + ELSE IF (ctrl) THEN + CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), fdamp, ErrStat=ErrStat, & + ErrMsg=ErrMsg, quadrature_order=model%axial_quadrature_order, & + l0_dot=model%l0_dot(e)) + ELSE + CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), fdamp, ErrStat=ErrStat, & + ErrMsg=ErrMsg, quadrature_order=model%axial_quadrature_order) + END IF + IF (ErrStat /= CD_HCDYN_OK) RETURN + END IF + IF (.NOT. model%has_bend_damping) RETURN + IF (.NOT. (model%Bb(e) > CD_ZERO)) RETURN + IF (want .AND. ctrl) THEN + CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, kbq, kbv, es, ErrMsg, & + quadrature_order=model%bending_quadrature_order, l0_dot=model%l0_dot(e)) + ELSE IF (want) THEN + CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, kbq, kbv, es, ErrMsg, & + quadrature_order=model%bending_quadrature_order) + ELSE IF (ctrl) THEN + CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, ErrStat=es, ErrMsg=ErrMsg, & + quadrature_order=model%bending_quadrature_order, l0_dot=model%l0_dot(e)) + ELSE + CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, ErrStat=es, ErrMsg=ErrMsg, & + quadrature_order=model%bending_quadrature_order) + END IF + IF (es /= CD_HCABLE_OK) THEN + ErrStat = CD_HCDYN_NOCONVERGE; RETURN + END IF + fdamp = fdamp + fb + IF (PRESENT(fbend)) fbend = fb + IF (want) THEN + kdq = kdq + kbq; kdv = kdv + kbv + END IF + END SUBROUTINE structural_damping_element + SUBROUTINE CD_HermiteCable_Dyn_Set_AddedMass(model, rho_w, diam, can, cat, waterline_z, ErrStat, ErrMsg) !! Enable per-element Morison added mass on the (already initialised) dynamic model: the !! submerged cable accelerates surrounding fluid, adding rho_w A (Can (I - t t^T) + Cat t t^T) @@ -6526,15 +6669,8 @@ SUBROUTINE CD_HermiteCable_Dyn_End_Force(model, node, force, ErrStat, ErrMsg) ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'CD_HermiteCable_Dyn_End_Force: '//TRIM(em2); RETURN END IF r3 = fe(i0 + 1:i0 + 3) - IF (model%has_axial_damping) THEN - IF (model%has_ctrl) THEN - CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), fdamp, ErrStat=es, ErrMsg=em2, & - quadrature_order=model%axial_quadrature_order, & - l0_dot=model%l0_dot(e)) - ELSE - CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), fdamp, ErrStat=es, ErrMsg=em2, & - quadrature_order=model%axial_quadrature_order) - END IF + IF (model%has_axial_damping .OR. model%has_bend_damping) THEN + CALL structural_damping_element(model, e, qe, ve, fdamp, es, em2) IF (es /= CD_HCDYN_OK) THEN ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'CD_HermiteCable_Dyn_End_Force: '//TRIM(em2); RETURN END IF @@ -6786,7 +6922,8 @@ SUBROUTINE CD_HermiteCable_Dyn_Node_Recovery(model, ErrStat, ErrMsg, tension, cu !! Effective tension, curvature and bend moment at every node (internal order) recovered !! from nodal equilibrium, in one pass over the elements. !! - !! For element e the end residual g_e = f_int + f_damp - f_ext + M_e a_e holds the element's + !! For element e the end residual g_e = f_int + f_damp - f_ext + M_e a_e (without the tangent + !! rows of the bending damping, a viscous moment that is not EI r'') holds the element's !! own distributed loads (consistent submerged weight, dry-part buoyancy, drag, !! Froude-Krylov force, the seabed contact of its end nodes spread over their tributary !! lengths, and the structural and added-mass inertia): it is the generalized force the two @@ -7451,7 +7588,7 @@ SUBROUTINE element_end_residual(model, e, g, ErrStat, ErrMsg) CHARACTER(*), INTENT(OUT) :: ErrMsg REAL(wp), PARAMETER :: PI_L = 3.14159265358979323846_wp INTEGER, PARAMETER :: ZS(4) = [3, 6, 9, 12] - REAL(wp) :: qe(12), ve(12), ae(12), fe(12), fx(12), energy, fdry(4), kdry(4, 4) + REAL(wp) :: qe(12), ve(12), ae(12), fe(12), fx(12), fbd(12), energy, fdry(4), kdry(4, 4) REAL(wp) :: dry_wl, dry_b, dry_r, hf_mid(3), l0, fca(3), fcb(3), c, a4(4), m4(4, 4) REAL(wp) :: support(3), dsupport(3), nin(3), xa, xb, ca(4), cb(4) INTEGER :: es, k, inode @@ -7468,11 +7605,15 @@ SUBROUTINE element_end_residual(model, e, g, ErrStat, ErrMsg) bending_quadrature_order=model%bending_quadrature_order) IF (es /= CD_HCABLE_OK) GOTO 900 g = fe - IF (model%has_axial_damping) THEN - CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, l0, model%BA(e), fx, ErrStat=es, ErrMsg=em2, & - quadrature_order=model%axial_quadrature_order) + IF (model%has_axial_damping .OR. model%has_bend_damping) THEN + CALL structural_damping_element(model, e, qe, ve, fx, es, em2, fixed_length=.TRUE., fbend=fbd) IF (es /= CD_HCDYN_OK) GOTO 900 g = g + fx + ! the viscous bending moment is not elastic: its tangent rows (the section moment the outputs + ! turn into curvature over EI) are left out, its position rows (the shear it carries) stay in + ! the section forces + g(4:6) = g(4:6) - fbd(4:6) + g(10:12) = g(10:12) - fbd(10:12) END IF ! consistent submerged weight (as assemble_residual) g(3) = g(3) + model%w(e)*0.5_wp*l0 @@ -8389,6 +8530,8 @@ SUBROUTINE CD_HermiteCable_Dyn_End(model) IF (ALLOCATED(model%w)) DEALLOCATE (model%w) IF (ALLOCATED(model%BA)) DEALLOCATE (model%BA) model%has_axial_damping = .FALSE. + IF (ALLOCATED(model%Bb)) DEALLOCATE (model%Bb) + model%has_bend_damping = .FALSE. IF (ALLOCATED(model%trib)) DEALLOCATE (model%trib) IF (ALLOCATED(model%contact_kn)) DEALLOCATE (model%contact_kn) IF (ALLOCATED(model%contact_cn)) DEALLOCATE (model%contact_cn) @@ -8823,7 +8966,7 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta CALL asm_mark(HC_ASM_CONTACT, asm_t) ! Scatter the element-private hydrodynamic tangents in the same phase and element ! order as the serial formulation, retaining its floating-point accumulation order. - IF (tangent_only .AND. (model%has_drag .OR. model%has_axial_damping)) THEN + IF (tangent_only .AND. (model%has_drag .OR. model%has_axial_damping .OR. model%has_bend_damping)) THEN DO e = 1, ne CALL scatter12_band(Kb, model%ws_elem_Kdrag(:, :, e), e) CALL scatter12_band(Kvb, model%ws_elem_Kv(:, :, e), e) @@ -8843,7 +8986,7 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta CALL asm_mark(HC_ASM_SCATTER, asm_t) ! Axial Kelvin-Voigt damping is an internal constitutive force. It uses the same ! reference-arc Hermite interpolation and axial quadrature as the elastic resultant. - IF (model%has_axial_damping .AND. .NOT. tangent_only) THEN + IF ((model%has_axial_damping .OR. model%has_bend_damping) .AND. .NOT. tangent_only) THEN DO e = e_lo, e_hi IF (kept) THEN DO a = 1, 12 @@ -8856,23 +8999,10 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta qe(7:9) = q_cfg(6*e + 1:6*e + 3); qe(10:12) = q_cfg(6*e + 4:6*e + 6) ve(1:3) = v_cfg(6*(e - 1) + 1:6*(e - 1) + 3); ve(4:6) = v_cfg(6*(e - 1) + 4:6*(e - 1) + 6) ve(7:9) = v_cfg(6*e + 1:6*e + 3); ve(10:12) = v_cfg(6*e + 4:6*e + 6) - IF (want_tangent .AND. model%has_ctrl) THEN - CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), & - fdamp, kdq, kdv, es, em_e, & - model%axial_quadrature_order, model%l0_dot(e)) - ELSE IF (want_tangent) THEN - CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), & - fdamp, kdq, kdv, es, em_e, & - model%axial_quadrature_order) - ELSE IF (model%has_ctrl) THEN - CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), & - fdamp, ErrStat=es, ErrMsg=em_e, & - quadrature_order=model%axial_quadrature_order, & - l0_dot=model%l0_dot(e)) + IF (want_tangent) THEN + CALL structural_damping_element(model, e, qe, ve, fdamp, es, em_e, kdq, kdv) ELSE - CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), & - fdamp, ErrStat=es, ErrMsg=em_e, & - quadrature_order=model%axial_quadrature_order) + CALL structural_damping_element(model, e, qe, ve, fdamp, es, em_e) END IF IF (es /= CD_HCDYN_OK) THEN ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = TRIM(em_e); RETURN @@ -10468,16 +10598,8 @@ SUBROUTINE evaluate_tangent_element(model, e, q_cfg, v_cfg, t_eval, Kstruct, Kdr ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'element: '//TRIM(em); RETURN END IF - IF (model%has_axial_damping) THEN - IF (model%has_ctrl) THEN - CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), & - fload, djq, djv, es, em, & - model%axial_quadrature_order, model%l0_dot(e)) - ELSE - CALL CD_HermiteCable_Axial_Damping_Element(qe, ve, model%l0(e), model%BA(e), & - fload, djq, djv, es, em, & - model%axial_quadrature_order) - END IF + IF (model%has_axial_damping .OR. model%has_bend_damping) THEN + CALL structural_damping_element(model, e, qe, ve, fload, es, em, djq, djv) IF (es /= CD_HCDYN_OK) THEN ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = TRIM(em); RETURN END IF diff --git a/src/CableDyn_OpenFAST_HermiteFMF.f90 b/src/CableDyn_OpenFAST_HermiteFMF.f90 index 1038c1c0..39a8447f 100644 --- a/src/CableDyn_OpenFAST_HermiteFMF.f90 +++ b/src/CableDyn_OpenFAST_HermiteFMF.f90 @@ -25,6 +25,7 @@ MODULE CableDyn_OpenFAST_HermiteFMF USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & CD_HermiteCable_Dyn_Set_Drag, CD_HermiteCable_Dyn_Set_AddedMass, & CD_HermiteCable_Dyn_Set_Axial_Damping, & + CD_HermiteCable_Dyn_Set_Bending_Damping, & CD_HermiteCable_Dyn_Set_Waves, CD_HermiteCable_Dyn_Set_Held_Fluid, & CD_HermiteCable_Dyn_Set_Contact, CD_HermiteCable_Dyn_Set_Attachments, & CD_HermiteCable_Dyn_Set_EndConnection, & @@ -59,6 +60,7 @@ MODULE CableDyn_OpenFAST_HermiteFMF PUBLIC :: CD_HFMF_Init PUBLIC :: CD_HFMF_Set_Drag PUBLIC :: CD_HFMF_Set_Axial_Damping + PUBLIC :: CD_HFMF_Set_Bending_Damping PUBLIC :: CD_HFMF_Set_ModifiedNewton PUBLIC :: CD_HFMF_Set_Tensile_Safety PUBLIC :: CD_HFMF_Set_Tensile_Monitor @@ -371,6 +373,29 @@ SUBROUTINE CD_HFMF_Set_Axial_Damping(self, BA, ErrStat, ErrMsg) END IF END SUBROUTINE CD_HFMF_Set_Axial_Damping + SUBROUTINE CD_HFMF_Set_Bending_Damping(self, Bb, ErrStat, ErrMsg) + !! Install the per-element bending Kelvin-Voigt coefficients Bb [N m^2 s] on the cable + !! (CD_HermiteCable_Dyn_Set_Bending_Damping). + TYPE(CD_HFMF_ModuleType), INTENT(INOUT) :: self + REAL(wp), INTENT(IN) :: Bb(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + INTEGER :: es + CHARACTER(1024) :: em + ErrStat = CD_HFMF_OK + ErrMsg = '' + IF (.NOT. self%initialized) THEN + ErrStat = CD_HFMF_BADINPUT + ErrMsg = 'CD_HFMF_Set_Bending_Damping: module not initialised' + RETURN + END IF + CALL CD_HermiteCable_Dyn_Set_Bending_Damping(self%line, Bb, es, em) + IF (es /= CD_HCDYN_OK) THEN + ErrStat = CD_HFMF_BADINPUT + ErrMsg = 'CD_HFMF_Set_Bending_Damping: '//TRIM(em) + END IF + END SUBROUTINE CD_HFMF_Set_Bending_Damping + SUBROUTINE CD_HFMF_Set_EndConnection(self, k_rot, d0_global, ErrStat, ErrMsg, & coupled_d0_parent, parent_orientation, connection_mode, & end_b_d0_parent, end_b_parent_orientation) diff --git a/tests/test_bending_damping_deck.f90 b/tests/test_bending_damping_deck.f90 new file mode 100644 index 00000000..0d1389ba --- /dev/null +++ b/tests/test_bending_damping_deck.f90 @@ -0,0 +1,184 @@ +! File: tests/test_bending_damping_deck.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_bending_damping_deck + !! Bending damping on a deck (LINE TYPES EI|Bb and EI|-zeta|f): an 80 m power cable hanging from + !! a clamped hang-off to a seabed anchor, in a regular sea. + !! E1 EI|-zeta|f and the EI|Bb it resolves to (Bb = zeta EI/(pi f)) give the same run, to the + !! printed digits; + !! E2 the damping lowers the hang-off curvature range against the undamped deck, and EI|0 is + !! the undamped deck exactly; + !! E3 bending damping on an EI = 0 type (as Bb or as a ratio) and malformed EI columns are + !! refused by name. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp, EI = 2.0e4_wp, ZETA = 0.05_wp, FREQ = 0.5_wp + INTEGER :: nfail = 0 + + CALL check_runs() + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: bending-damping deck gates' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE write_deck(path, ei_col, tmax, rope) + CHARACTER(*), INTENT(IN) :: path, ei_col + REAL(wp), INTENT(IN) :: tmax + LOGICAL, INTENT(IN), OPTIONAL :: rope + INTEGER :: u + LOGICAL :: on_rope + on_rope = .FALSE. + IF (PRESENT(rope)) on_rope = rope + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '--------------------- CableDyn Input File ------------------------------------' + WRITE (u, '(A)') 'hang-off cable with bending damping' + WRITE (u, '(A)') '--------------------- LINE TYPES ---------------------------------------------' + WRITE (u, '(A)') 'TypeName Diam MassDenInAir EA BA EI Cd_n Cd_t Ca_n Ca_t' + WRITE (u, '(A)') '(-) (m) (kg/m) (N) (-) (N-m2) (-) (-) (-) (-)' + IF (on_rope) THEN + WRITE (u, '(A)') 'pc 0.15 40.0 5.0e8 0.0 2.0e4 1.2 0.1 1.0 0.0' + WRITE (u, '(A)') 'rope 0.10 20.0 5.0e7 0.0 '//TRIM(ei_col)//' 1.2 0.1 1.0 0.0' + ELSE + WRITE (u, '(A)') 'pc 0.15 40.0 5.0e8 0.0 '//TRIM(ei_col)//' 1.2 0.1 1.0 0.0' + END IF + WRITE (u, '(A)') '--------------------- POINTS -------------------------------------------------' + WRITE (u, '(A)') 'ID Type X Y Z' + WRITE (u, '(A)') '(-) (-) (m) (m) (m)' + WRITE (u, '(A)') '1 Coupled 0.0 0.0 -5.0' + WRITE (u, '(A)') '2 Fixed 60.0 0.0 -50.0' + WRITE (u, '(A)') '--------------------- LINES --------------------------------------------------' + WRITE (u, '(A)') 'ID NodeA NodeB Outputs' + WRITE (u, '(A)') '(-) (-) (-) (-)' + WRITE (u, '(A)') '1 1 2 -' + WRITE (u, '(A)') '--------------------- SECTIONS -----------------------------------------------' + WRITE (u, '(A)') 'LineID LineType Length NumSegs' + WRITE (u, '(A)') '(-) (-) (m) (-)' + WRITE (u, '(A)') '1 pc 80.0 320' + WRITE (u, '(A)') '--------------------- END CONNECTIONS ----------------------------------------' + WRITE (u, '(A)') 'LineID End Stiffness EzX EzY EzZ' + WRITE (u, '(A)') '(-) (-) (N-m/rad) (-) (-) (-)' + WRITE (u, '(A)') '1 A Rigid 0.3746 0.0 -0.9272' + WRITE (u, '(A)') '--------------------- OPTIONS ------------------------------------------------' + WRITE (u, '(A)') '9.80665 g' + WRITE (u, '(A)') '1025.0 rhoW' + WRITE (u, '(A)') '50.0 WtrDpth' + WRITE (u, '(A)') '0.02 dtM' + WRITE (u, '(A,F8.3,A)') ' ', tmax, ' TMax' + WRITE (u, '(A)') 'airy 3.0 8.0 0.0 waves' + WRITE (u, '(A)') '5.0 rampTime' + WRITE (u, '(A)') '--------------------- OUTPUTS ------------------------------------------------' + WRITE (u, '(A)') '"FairTen1"' + WRITE (u, '(A)') '"BendMom1N1"' + WRITE (u, '(A)') '"Curv1N1"' + WRITE (u, '(A)') 'END' + CLOSE (u) + END SUBROUTINE write_deck + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK .AND. conv + END SUBROUTINE run + + SUBROUTINE read_out(path, tab, n) + CHARACTER(*), INTENT(IN) :: path + REAL(wp), ALLOCATABLE, INTENT(OUT) :: tab(:, :) + INTEGER, INTENT(OUT) :: n + CHARACTER(1024) :: rec + INTEGER :: u, ios + ALLOCATE (tab(4, 20000)) + n = 0 + OPEN (NEWUNIT=u, FILE=path, STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (u, '(A)') rec + READ (u, '(A)') rec + DO + READ (u, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + n = n + 1 + READ (rec, *) tab(:, n) + END DO + CLOSE (u) + END SUBROUTINE read_out + + SUBROUTINE check_runs() + REAL(wp), ALLOCATABLE :: tz(:, :), tb(:, :), tp(:, :), t0(:, :) + INTEGER :: nz, nb, np, n0 + REAL(wp) :: bb, rz, rp, r0 + LOGICAL :: ok + CHARACTER(1024) :: msg + CHARACTER(64) :: col + bb = ZETA*EI/(PI*FREQ) + WRITE (col, '(ES22.15)') bb + CALL write_deck('bdd_zeta.dat', '2.0e4|-0.05|0.5', 20.0_wp) + CALL run('bdd_zeta.dat', 'bdd_zeta', ok, msg) + CALL require(ok, 'E1: the EI|-zeta|f deck runs: '//TRIM(msg)) + CALL write_deck('bdd_bb.dat', '2.0e4|'//TRIM(ADJUSTL(col)), 20.0_wp) + CALL run('bdd_bb.dat', 'bdd_bb', ok, msg) + CALL require(ok, 'E1: the EI|Bb deck runs: '//TRIM(msg)) + CALL write_deck('bdd_plain.dat', '2.0e4', 20.0_wp) + CALL run('bdd_plain.dat', 'bdd_plain', ok, msg) + CALL require(ok, 'E2: the undamped deck runs: '//TRIM(msg)) + CALL write_deck('bdd_zero.dat', '2.0e4|0', 20.0_wp) + CALL run('bdd_zero.dat', 'bdd_zero', ok, msg) + CALL require(ok, 'E2: the EI|0 deck runs: '//TRIM(msg)) + CALL read_out('bdd_zeta.out', tz, nz) + CALL read_out('bdd_bb.out', tb, nb) + CALL read_out('bdd_plain.out', tp, np) + CALL read_out('bdd_zero.out', t0, n0) + CALL require(nz > 10 .AND. nz == nb .AND. nz == np .AND. nz == n0, 'E1/E2: the runs wrote matching rows') + IF (.NOT. (nz > 10 .AND. nz == nb .AND. nz == np .AND. nz == n0)) RETURN + WRITE (*, '(A,ES11.4)') 'E1: max |EI|-zeta|f - EI|Bb| over the channels ', MAXVAL(ABS(tz(:, :nz) - tb(:, :nb))) + CALL require(MAXVAL(ABS(tz(:, :nz) - tb(:, :nb))) <= 1.0e-6_wp*MAXVAL(ABS(tz(:, :nz))), & + 'E1: EI|-zeta|f is EI|Bb with Bb = zeta EI/(pi f)') + CALL require(MAXVAL(ABS(t0(:, :n0) - tp(:, :np))) == 0.0_wp, 'E2: EI|0 is the undamped deck exactly') + rz = MAXVAL(tz(4, nz/2:nz)) - MINVAL(tz(4, nz/2:nz)) + rp = MAXVAL(tp(4, np/2:np)) - MINVAL(tp(4, np/2:np)) + r0 = MAXVAL(tz(3, nz/2:nz)) - MINVAL(tz(3, nz/2:nz)) + WRITE (*, '(A,ES11.4,A,ES11.4,A)') 'E2: hang-off curvature range, damped ', rz, ' 1/m, undamped ', rp, ' 1/m' + CALL require(rz < rp, 'E2: the bending damping lowers the hang-off curvature range') + CALL require(r0 > 0.0_wp, 'E2: the hang-off moment varies in the sea') + END SUBROUTINE check_runs + + SUBROUTINE check_refusals() + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('bdd_rope.dat', '0.0|250.0', 0.0_wp, rope=.TRUE.) + CALL run('bdd_rope.dat', 'bdd_rope', ok, msg) + WRITE (*, '(A)') 'E3 EI = 0: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'bending damping (EI|Bb) needs a finite-EI cable') > 0, & + 'E3: bending damping on an EI = 0 type') + CALL write_deck('bdd_rope_ratio.dat', '0.0|-0.05|0.5', 0.0_wp, rope=.TRUE.) + CALL run('bdd_rope_ratio.dat', 'bdd_rope_ratio', ok, msg) + WRITE (*, '(A)') 'E3 EI = 0, ratio form: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'bending damping (EI|Bb) needs a finite-EI cable') > 0, & + 'E3: a damping ratio on an EI = 0 type') + CALL write_deck('bdd_neg.dat', '2.0e4|-250.0', 0.0_wp) + CALL run('bdd_neg.dat', 'bdd_neg', ok, msg) + WRITE (*, '(A)') 'E3 negative without f: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'needs the frequency it holds at') > 0, 'E3: negative Bb without f') + CALL write_deck('bdd_four.dat', '2.0e4|1|2|3', 0.0_wp) + CALL run('bdd_four.dat', 'bdd_four', ok, msg) + WRITE (*, '(A)') 'E3 four parts: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'takes EI, EI|Bb or EI|-zeta|f') > 0, 'E3: four-part EI column') + END SUBROUTINE check_refusals + +END PROGRAM test_bending_damping_deck diff --git a/tests/test_hermite_bending_damping.f90 b/tests/test_hermite_bending_damping.f90 new file mode 100644 index 00000000..0409ef66 --- /dev/null +++ b/tests/test_hermite_bending_damping.f90 @@ -0,0 +1,253 @@ +! File: tests/test_hermite_bending_damping.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_hermite_bending_damping + !! Kernel gates of the Kelvin-Voigt bending damping (CD_HermiteCable_Bending_Damping): + !! K1 Kv equals the central difference of fdamp in the rates, Kq that in the positions, on a + !! stretched, twisted 3D element and on a straight one; + !! K2 fdamp is linear in the rates, dissipative (v . fdamp >= 0) and zero for Bb = 0; + !! K3 zero for a rigid translation and for a rigid rotation whose axis is normal to the + !! tangent everywhere (a planar arc spun about the normal of its plane); + !! K4 the planar rate: a straight element bent in its plane at curvature rate kdot dissipates + !! Bb kdot^2 L, the dissipation function's closed form; + !! K5 bad inputs are refused by name; + !! K6 with a length rate l0_dot (active line control) the force is d psi / d v of the + !! dissipation function built independently from the public curvature (kappa_b = t x kvec, + !! CD_HermiteCable_Curvature) with its rate by central differences in the DOFs and the + !! length, and a length change alone (v = 0) is damped; + !! K7 Kq and Kv with a length rate equal the central differences of the force. + USE CableDyn_Precision, ONLY: wp + USE, INTRINSIC :: IEEE_ARITHMETIC, ONLY: IEEE_VALUE, IEEE_POSITIVE_INF + USE CableDyn_HermiteCable, ONLY: CD_HermiteCable_Bending_Damping, CD_HCABLE_OK, CD_HermiteCable_Curvature, & + CD_HermiteCable_Shapes, CD_HermiteCable_Gauss_Rule + IMPLICIT NONE + INTEGER :: nfail = 0 + REAL(wp), PARAMETER :: L = 2.5_wp, BB = 37.0_wp + + CALL check_jacobians() + CALL check_linear_dissipative() + CALL check_rigid_motions() + CALL check_planar_rate() + CALL check_refusals() + CALL check_length_rate() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: Hermite bending damping kernel' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE curved_state(q, v) + !! A stretched, out-of-plane curved element with arbitrary nodal rates. + REAL(wp), INTENT(OUT) :: q(12), v(12) + q = [0.0_wp, 0.0_wp, 0.0_wp, 1.02_wp, 0.3_wp, -0.2_wp, & + 2.4_wp, 0.5_wp, -0.3_wp, 0.9_wp, -0.25_wp, 0.35_wp] + v = [0.11_wp, -0.23_wp, 0.31_wp, 0.4_wp, -0.15_wp, 0.27_wp, & + -0.19_wp, 0.08_wp, 0.42_wp, -0.33_wp, 0.21_wp, 0.12_wp] + END SUBROUTINE curved_state + + SUBROUTINE fd_check(q, v, label) + REAL(wp), INTENT(IN) :: q(12), v(12) + CHARACTER(*), INTENT(IN) :: label + REAL(wp) :: f(12), Kq(12, 12), Kv(12, 12), fp(12), fm(12), Kq_fd(12, 12), Kv_fd(12, 12), dq(12), h + REAL(wp) :: eq, ev + INTEGER :: es, j + CHARACTER(256) :: em + CALL CD_HermiteCable_Bending_Damping(q, v, L, BB, f, Kq, Kv, es, em) + CALL require(es == CD_HCABLE_OK, 'K1 '//label//': evaluation: '//TRIM(em)) + DO j = 1, 12 + h = 1.0e-6_wp*MAX(1.0_wp, ABS(q(j))) + dq = 0.0_wp; dq(j) = h + CALL CD_HermiteCable_Bending_Damping(q + dq, v, L, BB, fp, ErrStat=es, ErrMsg=em) + CALL CD_HermiteCable_Bending_Damping(q - dq, v, L, BB, fm, ErrStat=es, ErrMsg=em) + Kq_fd(:, j) = (fp - fm)/(2.0_wp*h) + h = 1.0e-6_wp*MAX(1.0_wp, ABS(v(j))) + dq = 0.0_wp; dq(j) = h + CALL CD_HermiteCable_Bending_Damping(q, v + dq, L, BB, fp, ErrStat=es, ErrMsg=em) + CALL CD_HermiteCable_Bending_Damping(q, v - dq, L, BB, fm, ErrStat=es, ErrMsg=em) + Kv_fd(:, j) = (fp - fm)/(2.0_wp*h) + END DO + eq = MAXVAL(ABS(Kq - Kq_fd))/MAX(1.0e-12_wp, MAXVAL(ABS(Kq_fd))) + ev = MAXVAL(ABS(Kv - Kv_fd))/MAX(1.0e-12_wp, MAXVAL(ABS(Kv_fd))) + WRITE (*, '(A,2ES11.3)') 'K1 '//label//': relative |Kq - FD|, |Kv - FD| ', eq, ev + CALL require(eq < 1.0e-6_wp, 'K1 '//label//': Kq matches the central difference') + CALL require(ev < 1.0e-6_wp, 'K1 '//label//': Kv matches the central difference') + CALL require(MAXVAL(ABS(Kv - TRANSPOSE(Kv))) <= 1.0e-12_wp*MAXVAL(ABS(Kv)), 'K1 '//label//': Kv symmetric') + END SUBROUTINE fd_check + + SUBROUTINE check_jacobians() + REAL(wp) :: q(12), v(12) + CALL curved_state(q, v) + CALL fd_check(q, v, 'curved 3D') + ! straight, unstretched element along x (the zero-curvature state) + q = [0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, L, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp] + CALL fd_check(q, v, 'straight') + END SUBROUTINE check_jacobians + + SUBROUTINE check_linear_dissipative() + REAL(wp) :: q(12), v(12), f1(12), f2(12) + INTEGER :: es + CHARACTER(256) :: em + CALL curved_state(q, v) + CALL CD_HermiteCable_Bending_Damping(q, v, L, BB, f1, ErrStat=es, ErrMsg=em) + CALL CD_HermiteCable_Bending_Damping(q, 2.0_wp*v, L, BB, f2, ErrStat=es, ErrMsg=em) + CALL require(MAXVAL(ABS(f2 - 2.0_wp*f1)) <= 1.0e-12_wp*MAXVAL(ABS(f1)), 'K2: linear in the rates') + CALL require(DOT_PRODUCT(v, f1) > 0.0_wp, 'K2: dissipative (v . f > 0)') + CALL CD_HermiteCable_Bending_Damping(q, v, L, 0.0_wp, f1, ErrStat=es, ErrMsg=em) + CALL require(es == CD_HCABLE_OK .AND. MAXVAL(ABS(f1)) == 0.0_wp, 'K2: zero for Bb = 0') + END SUBROUTINE check_linear_dissipative + + SUBROUTINE check_rigid_motions() + REAL(wp) :: q(12), v(12), f(12), scale, omega(3) + INTEGER :: es, k + CHARACTER(256) :: em + CALL curved_state(q, v) + ! rigid translation: every node moves with c, tangents fixed + v = [0.3_wp, -0.7_wp, 0.2_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.3_wp, -0.7_wp, 0.2_wp, 0.0_wp, 0.0_wp, 0.0_wp] + CALL CD_HermiteCable_Bending_Damping(q, v, L, BB, f, ErrStat=es, ErrMsg=em) + CALL require(MAXVAL(ABS(f)) <= 1.0e-12_wp*BB, 'K3: zero for a rigid translation') + ! a planar arc in the x-z plane spun about y (normal to every tangent): v = omega x r, m' = omega x m + q = [0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.4_wp, 2.3_wp, 0.0_wp, 0.6_wp, 0.8_wp, 0.0_wp, -0.3_wp] + omega = [0.0_wp, 0.9_wp, 0.0_wp] + DO k = 0, 3 + v(3*k + 1:3*k + 3) = cross(omega, q(3*k + 1:3*k + 3)) + END DO + CALL CD_HermiteCable_Bending_Damping(q, v, L, BB, f, ErrStat=es, ErrMsg=em) + ! reference: the same element bent at the same rate scale + scale = BB*0.9_wp/L + WRITE (*, '(A,ES11.3)') 'K3: rigid in-plane rotation, max |f| / (Bb omega / L) ', MAXVAL(ABS(f))/scale + CALL require(MAXVAL(ABS(f)) <= 1.0e-12_wp*scale, 'K3: zero for a rigid rotation normal to the tangents') + END SUBROUTINE check_rigid_motions + + SUBROUTINE check_planar_rate() + !! A straight unstretched element along x bent in the x-z plane with rates that give a + !! uniform curvature rate kdot (w(x) = 1/2 kdot x^2 t, end slopes kdot x): the dissipation + !! v . f = 2 psi = Bb kdot^2 L at the straight state. + REAL(wp) :: q(12), v(12), f(12), kdot, d + INTEGER :: es + CHARACTER(256) :: em + kdot = 0.17_wp + q = [0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, L, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp] + v = 0.0_wp + ! w = kdot x^2 / 2: node 2 rate kdot L^2/2, slope handle m = dr/ds -> rate kdot L + v(9) = 0.5_wp*kdot*L*L + v(12) = kdot*L + CALL CD_HermiteCable_Bending_Damping(q, v, L, BB, f, ErrStat=es, ErrMsg=em) + d = DOT_PRODUCT(v, f) + WRITE (*, '(A,ES14.6,A,ES14.6)') 'K4: v . f ', d, ', Bb kdot^2 L ', BB*kdot*kdot*L + CALL require(ABS(d - BB*kdot*kdot*L) <= 1.0e-10_wp*BB*kdot*kdot*L, 'K4: planar dissipation Bb kdot^2 L') + END SUBROUTINE check_planar_rate + + SUBROUTINE check_refusals() + REAL(wp) :: q(12), v(12), f(12) + INTEGER :: es + CHARACTER(256) :: em + CALL curved_state(q, v) + CALL CD_HermiteCable_Bending_Damping(q, v, L, -1.0_wp, f, ErrStat=es, ErrMsg=em) + CALL require(es /= CD_HCABLE_OK .AND. INDEX(em, 'Bb must be non-negative') > 0, 'K5: negative Bb') + CALL CD_HermiteCable_Bending_Damping(q, v, 0.0_wp, BB, f, ErrStat=es, ErrMsg=em) + CALL require(es /= CD_HCABLE_OK .AND. INDEX(em, 'length must be positive') > 0, 'K5: zero length') + q(4:6) = 0.0_wp; q(7:9) = 0.0_wp; q(10:12) = 0.0_wp + CALL CD_HermiteCable_Bending_Damping(q, v, L, BB, f, ErrStat=es, ErrMsg=em) + CALL require(es /= CD_HCABLE_OK .AND. INDEX(em, 'degenerate centreline') > 0, 'K5: collapsed element') + END SUBROUTINE check_refusals + + SUBROUTINE kappa_b(q, el, xi, kb) + !! The binormal curvature vector (a x b)/|a|^3 from the public routines: t x kvec, with + !! kvec = (r' x r'') x r'/|r'|^4 of CD_HermiteCable_Curvature and t from the shape derivatives. + REAL(wp), INTENT(IN) :: q(12), el, xi + REAL(wp), INTENT(OUT) :: kb(3) + REAL(wp) :: H(4), dH(4), a(3), kv(3), cv + INTEGER :: es, c + CHARACTER(256) :: em + CALL CD_HermiteCable_Shapes(xi, el, H, dH) + DO c = 1, 3 + a(c) = (dH(1)*q(c) + dH(2)*q(3 + c) + dH(3)*q(6 + c) + dH(4)*q(9 + c))/el + END DO + CALL CD_HermiteCable_Curvature(q, el, xi, cv, es, em, kvec=kv) + kb = cross(a/NORM2(a), kv) + END SUBROUTINE kappa_b + + REAL(wp) FUNCTION psi_fd(q, v, ldot) RESULT(psi) + !! 1/2 Bb int |(I - t t^T) dkappa_b/dt|^2 ds over the element, the rate by central differences + !! along (v, ldot), with the kernel's Gauss rule (order 4) on the unstretched length. + REAL(wp), INTENT(IN) :: q(12), v(12), ldot + REAL(wp) :: gp(6), gw(6), kp(3), km(3), kd(3), H(4), dH(4), a(3), tv(3), eps + INTEGER :: ig, c + eps = 1.0e-6_wp + CALL CD_HermiteCable_Gauss_Rule(4, gp, gw) + psi = 0.0_wp + DO ig = 1, 4 + CALL kappa_b(q + eps*v, L + eps*ldot, gp(ig), kp) + CALL kappa_b(q - eps*v, L - eps*ldot, gp(ig), km) + kd = (kp - km)/(2.0_wp*eps) + CALL CD_HermiteCable_Shapes(gp(ig), L, H, dH) + DO c = 1, 3 + a(c) = (dH(1)*q(c) + dH(2)*q(3 + c) + dH(3)*q(6 + c) + dH(4)*q(9 + c))/L + END DO + tv = a/NORM2(a) + kd = kd - tv*DOT_PRODUCT(tv, kd) + psi = psi + 0.5_wp*BB*DOT_PRODUCT(kd, kd)*gw(ig)*L + END DO + END FUNCTION psi_fd + + SUBROUTINE check_length_rate() + REAL(wp) :: q(12), v(12), f(12), fx(12), dv(12), h, ldot, scale, Kq(12, 12), Kv(12, 12), fp(12), fm(12) + REAL(wp) :: Kq_fd(12, 12), Kv_fd(12, 12), eq, ev + INTEGER :: es, j + CHARACTER(256) :: em + CALL curved_state(q, v) + ldot = 0.37_wp + CALL CD_HermiteCable_Bending_Damping(q, v, L, BB, f, ErrStat=es, ErrMsg=em, l0_dot=ldot) + CALL require(es == CD_HCABLE_OK, 'K6: evaluation with l0_dot: '//TRIM(em)) + ! d psi / d v by central differences (psi is quadratic in v) + h = 1.0e-2_wp + DO j = 1, 12 + dv = 0.0_wp; dv(j) = h + fx(j) = (psi_fd(q, v + dv, ldot) - psi_fd(q, v - dv, ldot))/(2.0_wp*h) + END DO + scale = MAXVAL(ABS(fx)) + WRITE (*, '(A,ES11.3)') 'K6: max |f - d psi/d v| / max |f| with l0_dot ', MAXVAL(ABS(f - fx))/scale + CALL require(MAXVAL(ABS(f - fx)) <= 1.0e-6_wp*scale, 'K6: the force is d psi/d v with the length rate') + v = 0.0_wp + CALL CD_HermiteCable_Bending_Damping(q, v, L, BB, f, ErrStat=es, ErrMsg=em, l0_dot=ldot) + CALL require(MAXVAL(ABS(f)) > 0.0_wp, 'K6: a length change alone is damped') + ! K7: Jacobians with the length rate + CALL curved_state(q, v) + CALL CD_HermiteCable_Bending_Damping(q, v, L, BB, f, Kq, Kv, es, em, l0_dot=ldot) + DO j = 1, 12 + h = 1.0e-6_wp*MAX(1.0_wp, ABS(q(j))) + dv = 0.0_wp; dv(j) = h + CALL CD_HermiteCable_Bending_Damping(q + dv, v, L, BB, fp, ErrStat=es, ErrMsg=em, l0_dot=ldot) + CALL CD_HermiteCable_Bending_Damping(q - dv, v, L, BB, fm, ErrStat=es, ErrMsg=em, l0_dot=ldot) + Kq_fd(:, j) = (fp - fm)/(2.0_wp*h) + h = 1.0e-6_wp*MAX(1.0_wp, ABS(v(j))) + dv = 0.0_wp; dv(j) = h + CALL CD_HermiteCable_Bending_Damping(q, v + dv, L, BB, fp, ErrStat=es, ErrMsg=em, l0_dot=ldot) + CALL CD_HermiteCable_Bending_Damping(q, v - dv, L, BB, fm, ErrStat=es, ErrMsg=em, l0_dot=ldot) + Kv_fd(:, j) = (fp - fm)/(2.0_wp*h) + END DO + eq = MAXVAL(ABS(Kq - Kq_fd))/MAXVAL(ABS(Kq_fd)) + ev = MAXVAL(ABS(Kv - Kv_fd))/MAXVAL(ABS(Kv_fd)) + WRITE (*, '(A,2ES11.3)') 'K7: relative |Kq - FD|, |Kv - FD| with l0_dot ', eq, ev + CALL require(eq < 1.0e-6_wp .AND. ev < 1.0e-6_wp, 'K7: Jacobians with the length rate') + CALL CD_HermiteCable_Bending_Damping(q, v, L, BB, f, ErrStat=es, ErrMsg=em, l0_dot=IEEE_VALUE(1.0_wp, IEEE_POSITIVE_INF)) + CALL require(es /= CD_HCABLE_OK .AND. INDEX(em, 'l0_dot must be finite') > 0, 'K5: non-finite l0_dot refused') + END SUBROUTINE check_length_rate + + PURE FUNCTION cross(a, b) RESULT(c) + REAL(wp), INTENT(IN) :: a(3), b(3) + REAL(wp) :: c(3) + c = [a(2)*b(3) - a(3)*b(2), a(3)*b(1) - a(1)*b(3), a(1)*b(2) - a(2)*b(1)] + END FUNCTION cross + +END PROGRAM test_hermite_bending_damping diff --git a/tests/test_hermite_bending_damping_dynamic.f90 b/tests/test_hermite_bending_damping_dynamic.f90 new file mode 100644 index 00000000..39ab0911 --- /dev/null +++ b/tests/test_hermite_bending_damping_dynamic.f90 @@ -0,0 +1,159 @@ +! File: tests/test_hermite_bending_damping_dynamic.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_hermite_bending_damping_dynamic + !! Free decay of the first mode of a weightless, pinned-pinned, tensioned finite-EI cable with + !! bending Kelvin-Voigt damping (CD_HermiteCable_Dyn_Set_Bending_Damping), generalised-alpha with + !! rho_inf = 1 (no numerical damping). For mode shape sin(k x), k = pi/L, the bending moment is + !! EI k^2 a and the tension carries T k^2 a, so the mode's damping ratio is + !! zeta_1 = omega_1 Bb / (2 EI) * EI k^2 / (EI k^2 + T), omega_1^2 = (EI k^4 + T k^2)/m: + !! only the bending share of the modal stiffness is damped. + !! B1 a bending-dominated cable (share 0.96) decays at that zeta to 1 %; + !! B2 a tension-dominated cable (share 0.2) decays at that smaller zeta to 1 %; + !! B3 Bb = 0 leaves the undamped decay (|zeta| below 1e-5) and installing an all-zero array + !! keeps the configuration off; + !! B4 a negative coefficient or a wrong length is refused; + !! B5 a straight cable moving in its first bending mode with zero acceleration has no elastic + !! curvature: the node recovery reports none although the bending damping acts (its viscous + !! moment is not EI kappa), while the end force carries the damping. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & + CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Set_Bending_Damping, & + CD_HermiteCable_Dyn_Node_Recovery, CD_HermiteCable_Dyn_End_Force, & + CD_HCDYN_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp + REAL(wp), PARAMETER :: LL = 20.0_wp, EA = 1.0e8_wp, EI = 1.0e5_wp, RHOA = 10.0_wp + INTEGER, PARAMETER :: NE = 40, NN = NE + 1, NDOF = 6*NN, MID = NE/2 + 1 + INTEGER :: nfail = 0 + + CALL decay_case('B1 bending-dominated', 1.0e2_wp, 0.02_wp) + CALL decay_case('B2 tension-dominated', 1.0e4_wp, 0.02_wp) + CALL decay_case('B3 undamped', 1.0e4_wp, 0.0_wp) + CALL check_refusals() + CALL check_recovery() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: Hermite bending damping dynamic decay' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE setup(model, tens, a0) + TYPE(CD_HermiteCableDynType), INTENT(OUT) :: model + REAL(wp), INTENT(IN) :: tens, a0 + REAL(wp) :: l0(NE), ea_(NE), ei_(NE), rho(NE), w(NE), q(NDOF), eps, lt, x + INTEGER :: k, es + CHARACTER(512) :: em + eps = tens/EA; lt = (1.0_wp + eps)*LL + l0 = LL/REAL(NE, wp); ea_ = EA; ei_ = EI; rho = RHOA; w = 0.0_wp + DO k = 1, NN + x = lt*REAL(k - 1, wp)/REAL(NE, wp) + q(6*k - 5:6*k) = [x, 0.0_wp, a0*SIN(PI*x/lt), (1.0_wp + eps), 0.0_wp, (1.0_wp + eps)*a0*PI/lt*COS(PI*x/lt)] + END DO + CALL CD_HermiteCable_Dyn_Init(model, l0, ea_, ei_, rho, w, q, [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3], & + -1.0e4_wp, 0.0_wp, 1.0_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'init: '//TRIM(em)) + END SUBROUTINE setup + + SUBROUTINE decay_case(label, tens, zeta_ref) + CHARACTER(*), INTENT(IN) :: label + REAL(wp), INTENT(IN) :: tens, zeta_ref + TYPE(CD_HermiteCableDynType) :: model + REAL(wp) :: kk, om1, share, bb, zeta_expect, dt, z, zprev, zprev2, peaks(200), tpk(200), delta, zeta_meas, res + INTEGER :: n, k, np, es, it, nstep + CHARACTER(512) :: em + kk = PI/LL + om1 = SQRT((EI*kk**4 + tens*kk**2)/RHOA) + share = EI*kk**2/(EI*kk**2 + tens) + bb = 2.0_wp*zeta_ref*EI/om1 + zeta_expect = om1*bb/(2.0_wp*EI)*share + CALL setup(model, tens, 1.0e-3_wp) + CALL CD_HermiteCable_Dyn_Set_Bending_Damping(model, [(bb, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK, label//': set damping: '//TRIM(em)) + dt = (2.0_wp*PI/om1)/200.0_wp + nstep = 200*12 + np = 0; zprev = model%q(6*(MID - 1) + 3); zprev2 = zprev + DO n = 1, nstep + CALL CD_HermiteCable_Dyn_Step(model, dt, 50, 1.0e-10_wp, es, em, it, res) + IF (es /= CD_HCDYN_OK) THEN + CALL require(.FALSE., label//': step failed: '//TRIM(em)); RETURN + END IF + z = model%q(6*(MID - 1) + 3) + ! a positive peak of the midspan deflection (parabolic refinement of the sampled peak) + IF (n >= 2 .AND. zprev > zprev2 .AND. zprev >= z .AND. zprev > 0.0_wp .AND. np < SIZE(peaks)) THEN + np = np + 1 + peaks(np) = zprev - 0.125_wp*(z - zprev2)**2/(z - 2.0_wp*zprev + zprev2) + tpk(np) = dt*REAL(n - 1, wp) + END IF + zprev2 = zprev; zprev = z + END DO + CALL require(np >= 8, label//': enough peaks') + IF (np < 8) RETURN + delta = LOG(peaks(2)/peaks(np))/REAL(np - 2, wp) + zeta_meas = delta/SQRT(4.0_wp*PI*PI + delta*delta) + WRITE (*, '(A,A,F7.4,A,ES11.4,A,ES11.4,A,F8.3)') label, ': bending share ', share, ', zeta expected ', & + zeta_expect, ', measured ', zeta_meas, ', period ratio ', (tpk(np) - tpk(2))/REAL(np - 2, wp)*om1/(2.0_wp*PI) + IF (zeta_ref > 0.0_wp) THEN + CALL require(ABS(zeta_meas - zeta_expect) <= 0.01_wp*zeta_expect, label//': decay matches zeta to 1 %') + ELSE + CALL require(ABS(zeta_meas) <= 1.0e-5_wp, label//': no damping without Bb') + END IF + END SUBROUTINE decay_case + + SUBROUTINE check_refusals() + TYPE(CD_HermiteCableDynType) :: model + INTEGER :: es, k + CHARACTER(512) :: em + CALL setup(model, 1.0e4_wp, 0.02_wp) + CALL CD_HermiteCable_Dyn_Set_Bending_Damping(model, [(-1.0_wp, k=1, NE)], es, em) + CALL require(es /= CD_HCDYN_OK .AND. INDEX(em, 'finite and non-negative') > 0, 'B4: negative Bb refused') + CALL CD_HermiteCable_Dyn_Set_Bending_Damping(model, [(1.0_wp, k=1, NE - 1)], es, em) + CALL require(es /= CD_HCDYN_OK .AND. INDEX(em, 'length ne') > 0, 'B4: wrong length refused') + CALL CD_HermiteCable_Dyn_Set_Bending_Damping(model, [(0.0_wp, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK .AND. .NOT. model%has_bend_damping, 'B3: all-zero Bb keeps it off') + END SUBROUTINE check_refusals + + SUBROUTINE check_recovery() + TYPE(CD_HermiteCableDynType) :: model + REAL(wp) :: curv(NN), bb, v0, lt, x, kdot, f_damped(3), f_plain(3) + INTEGER :: es, k + CHARACTER(512) :: em + v0 = 0.3_wp + bb = 2.0e3_wp + CALL setup(model, 1.0e4_wp, 0.0_wp) + lt = model%q(6*(NN - 1) + 1) + CALL CD_HermiteCable_Dyn_Set_Bending_Damping(model, [(bb, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK, 'B5: set damping: '//TRIM(em)) + ! straight line, first-mode velocity z' = v0 sin(pi x/lt) and its slope rate, no acceleration + model%v = 0.0_wp + DO k = 1, NN + x = model%q(6*(k - 1) + 1) + model%v(6*(k - 1) + 3) = v0*SIN(PI*x/lt) + model%v(6*(k - 1) + 6) = v0*PI/lt*COS(PI*x/lt) + END DO + model%v([1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3]) = 0.0_wp + model%a = 0.0_wp + CALL CD_HermiteCable_Dyn_Node_Recovery(model, es, em, curvature=curv) + CALL require(es == CD_HCDYN_OK, 'B5: node recovery: '//TRIM(em)) + kdot = v0*(PI/lt)**2 + WRITE (*, '(A,ES11.3,A,ES11.3)') 'B5: max recovered curvature ', MAXVAL(ABS(curv)), & + ' 1/m; the viscous moment over EI would read ', bb*kdot/EI + CALL require(MAXVAL(ABS(curv)) <= 1.0e-6_wp*bb*kdot/EI, 'B5: no viscous curvature in the node recovery') + CALL CD_HermiteCable_Dyn_End_Force(model, 1, f_damped, es, em) + model%has_bend_damping = .FALSE. + CALL CD_HermiteCable_Dyn_End_Force(model, 1, f_plain, es, em) + WRITE (*, '(A,ES11.3,A)') 'B5: the bending damping changes the end force by ', NORM2(f_damped - f_plain), ' N' + CALL require(NORM2(f_damped - f_plain) > 0.0_wp, 'B5: the end force carries the damping') + END SUBROUTINE check_recovery + +END PROGRAM test_hermite_bending_damping_dynamic From 7e6350c435e05f5f644f93ee7ffc4eb5cd1e1879 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Wed, 11 Nov 2026 17:38:35 +0900 Subject: [PATCH 02/47] feat: in-line VIV of finite-EI cables (the VIV section) (#145) The synchronisation model carried the cross-flow lift only. A finite-EI line type now takes the in-line shedding force of Ulveseter, Thorsen, Saevik and Larsen (Mar. Struct. 60, 2018), an optional VIV section row TypeName ClX [alpha]: per unit length 1/2 rho D ClX cos(phi_x) U v_n along the relative normal flow, the direction of the drag, with its phase slaved to twice the cross-flow one, d phi_x/dt = 2 (d phi/dt) [1 + alpha sin(phi_xd - phi_x)], phi_xd the phase of the in-line motion from the running RMS values (alpha 0.15 by default). ClX > 0 needs the type's cross-flow Cl > 0. The kernels give the node and per-length forces with exact Jacobians and the in-line motion and phase rate. The Hermite cable integrates the force with the lift at its Gauss points; the phase is explicit with the Heun commit (its end rate from the end cross-flow rate) and sits in the step-recovery, snapshot and HFMF checkpoint state (3 nn more values in the VIV block). Both deck readers take the section and refuse malformed rows, unknown or repeated types, ClX on a type without the lift, alpha outside [0, 1) and in-line VIV on an EI = 0 line, which follows later; the Python builder writes and reads it. Tests: kernel forces and Jacobians against central differences; on the taut line of the lock-in benchmark the in-line response runs at twice the cross-flow frequency (2.000 on the Hermite march, 1.95 through the deck) with A/D 0.19 against 0.03 from the lift alone; ClX 0 reproduces the cross-flow-only run bit for bit; snapshot replay, the recovering step and the mirror round trip are bit-exact. New example viv_taut_cable_inline.dat. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 7 + CMakeLists.txt | 12 +- doc/capabilities.rst | 8 +- doc/concepts.rst | 5 +- doc/driver_format.md | 48 +++- doc/examples.rst | 6 + doc/outputs.rst | 3 +- doc/references.rst | 6 + doc/theory.rst | 37 +++ examples/viv_taut_cable_inline.dat | 60 +++++ python/cabledyn/builder.py | 50 +++- python/cabledyn/deck_file.py | 67 ++++- python/tests/test_builder.py | 30 +++ python/tests/test_deck_native_parity.py | 44 ++++ src/CableDyn_DeckDriver.f90 | 152 ++++++++++- src/CableDyn_HermiteCableDynamic.f90 | 229 ++++++++++++++-- src/CableDyn_OpenFAST_HermiteFMF.f90 | 28 +- src/CableDyn_VIV.f90 | 176 ++++++++++++- tests/test_hermite_viv_inline.f90 | 336 ++++++++++++++++++++++++ tests/test_hfmf_mirror.f90 | 48 +++- tests/test_viv_inline_deck.f90 | 254 ++++++++++++++++++ tests/test_viv_kernels.f90 | 84 +++++- 22 files changed, 1625 insertions(+), 65 deletions(-) create mode 100644 examples/viv_taut_cable_inline.dat create mode 100644 tests/test_hermite_viv_inline.f90 create mode 100644 tests/test_viv_inline_deck.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index c2cde749..79d6a942 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,13 @@ All notable changes to CableDyn are recorded in this file. The format follows pinned cable match this to 0.05 %. It acts on every dynamic route beside the axial (`BA`) and torsional (`GJ|K|Bt`) damping, with exact Jacobians; the Python deck reader and builder take the same forms. +- In-line VIV of finite-EI cables: an optional `VIV` section row `TypeName ClX [alpha]` adds the + in-line vortex-shedding force of Ulveseter et al. (2018), `1/2 rho D ClX cos(phi_x) U v_n` along + the relative flow, with its phase slaved to twice the cross-flow one in a band `alpha` (default + 0.15). On the taut line of `examples/viv_taut_cable_inline.dat` the in-line response runs at + twice the cross-flow frequency, A/D 0.19 against 0.03 with the lift alone. Exact Jacobians; the + phase is in the step-recovery, snapshot and checkpoint state; the Python deck reader and + builder take the section. `EI = 0` lines refuse it for now. ## [0.4.2] - 2026-11-09 diff --git a/CMakeLists.txt b/CMakeLists.txt index 5379d814..cfd12517 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1321,6 +1321,16 @@ target_link_libraries(test_hermite_viv PRIVATE cabledyn_core) add_test(NAME hermite_viv COMMAND test_hermite_viv) set_tests_properties(hermite_viv PROPERTIES LABELS "fortran;dynamic;viv") +add_executable(test_hermite_viv_inline tests/test_hermite_viv_inline.f90) +target_link_libraries(test_hermite_viv_inline PRIVATE cabledyn_core) +add_test(NAME hermite_viv_inline COMMAND test_hermite_viv_inline) +set_tests_properties(hermite_viv_inline PROPERTIES LABELS "fortran;dynamic;viv") + +add_executable(test_viv_inline_deck tests/test_viv_inline_deck.f90) +target_link_libraries(test_viv_inline_deck PRIVATE cabledyn_core) +add_test(NAME viv_inline_deck COMMAND test_viv_inline_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(viv_inline_deck PROPERTIES LABELS "fortran;integration;dynamic;viv;driver") + add_executable(test_viv_coupled tests/test_viv_coupled.f90) target_link_libraries(test_viv_coupled PRIVATE cabledyn_core) add_test(NAME viv_coupled COMMAND test_viv_coupled WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) @@ -3568,7 +3578,7 @@ foreach(_feature_example IN ITEMS airy_wave_shallow_chain laid_cable_cross_current chain_modes lazy_wave_modes buoy_clamped_cable moordynC_wavekin/chain_wavekin7_currents1 spar_pinned_rods mixed_body_rods_points als_volturnus_line_break_time als_volturnus_line_break_tension - viv_taut_line_crossflow composite_axial_damping_mode1 composite_ve_syrope_jonswap + viv_taut_line_crossflow viv_taut_cable_inline composite_axial_damping_mode1 composite_ve_syrope_jonswap composite_chain_poly_chain_modes shared_cable_two_floaters lazy_wave_modules_stiffener chain_sloped_bathymetry_friction torsion_free_end_armoured_cable moordynC_currents/chain_wavekin3_currents2 moordynC_currents/chain_currents5_grid) diff --git a/doc/capabilities.rst b/doc/capabilities.rst index f2154c4d..a19239c3 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -143,8 +143,12 @@ Line and constitutive capability - Standalone and coupled - MoorDyn v2's synchronisation model on ``EI = 0`` lines and, as a distributed lift, on 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 + host's fluid field on the coupled routes and its state in the checkpoint + * - In-line VIV (``VIV`` section ``ClX``, ``alpha``) + - Standalone and coupled + - the in-line shedding force of Ulveseter et al. (2018) at twice the cross-flow frequency, on + finite-EI cables of the Hermite and multibody marches (:ref:`theory-viv-inline`), its state + in the checkpoint; not on ``EI = 0`` lines yet Loads and environment --------------------- diff --git a/doc/concepts.rst b/doc/concepts.rst index 0f9e57c4..f54b1075 100644 --- a/doc/concepts.rst +++ b/doc/concepts.rst @@ -80,9 +80,10 @@ A ``LINE TYPES`` row is the reusable material a section refers to by name: diame metre, axial stiffness ``EA``, axial damping ``BA``, bending stiffness ``EI``, and the four Morison coefficients (``Cd_n``, ``Cd_t``, ``Ca_n``, ``Ca_t``). ``EI`` is the switch between the two solver paths (next section). Axial response can be linear ``EA`` or a stateful constitutive model -(viscoelastic, Syrope) — see :doc:`theory`. An ``EI = 0`` row may end with MoorDyn's cross-flow +(viscoelastic, Syrope) — see :doc:`theory`. A 10-column row may end with MoorDyn's cross-flow VIV columns ``Cl`` or ``Cl dF cF`` (lift coefficient and synchronisation band; see -:ref:`theory-viv`). +:ref:`theory-viv`), and a ``VIV`` section row adds the in-line force of a finite-EI type +(:ref:`theory-viv-inline`). Two solver paths, selected by ``EI`` ------------------------------------ diff --git a/doc/driver_format.md b/doc/driver_format.md index e1dac704..e2c3548f 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -133,8 +133,8 @@ except that `SYROPE IC` must come **after** `LINES`, because its rows name lines exist. A conventional layout is: LINE TYPES → BODIES → EXTERNAL LOADS → ROD TYPES → RODS → POINTS → TURBINES → LINES → SYROPE IC → -SECTIONS → END CONNECTIONS / EQUIVALENT BUOYANCY / ATTACHMENTS / STIFFENERS / FAILURE / CONTROL → -OPTIONS → OUTPUTS +SECTIONS → END CONNECTIONS / EQUIVALENT BUOYANCY / ATTACHMENTS / STIFFENERS / VIV / FAILURE / +CONTROL → OPTIONS → OUTPUTS Within LINE TYPES, the header row must precede the data rows because it selects their column order. @@ -210,6 +210,7 @@ are collapsed. It must match one of the spellings below; any other name fails wi | EQUIVALENT BUOYANCY | `EQUIVALENT BUOYANCY`, `EQUIVALENT SECTIONS`, `BUOYANCY SECTIONS` | | ATTACHMENTS | `ATTACHMENTS`, `LINE ATTACHMENTS`, `CLUMPS` | | STIFFENERS | `STIFFENERS`, `STIFFENER`, `BEND STIFFENERS`, `BEND STIFFENER` | +| VIV | `VIV`, `VORTEX-INDUCED VIBRATION`, `VORTEX INDUCED VIBRATION` | | FAILURE | `FAILURE`, `FAILURES` | | CONTROL | `CONTROL`, `CONTROLS` | | TURBINES | `TURBINES`, `TURBINE` | @@ -289,6 +290,14 @@ frequency `f` [Hz], `Bb = ζ EI/(π f)`, set once per line type (it does not dep `EI|0` is the plain `EI`. It needs `EI > 0` and acts in the dynamics only (a static solve has no rates). +**Cross-flow VIV columns (MoorDyn v2).** A 10-column row may end with `Cl` (11 columns) or +`Cl dF cF` (13 columns): the lift coefficient of the vortex-shedding synchronisation model and +the half-range and centre of its band in non-dimensional frequency (MoorDyn's `dF = 0.08` and +`cF = 0.18` when only `Cl` is given). `Cl = 0` is no VIV; `Cl > 0` needs `cF > 0` and +`0 <= dF < cF`, and the line's drag in water. It acts in the dynamics on `EI = 0` lines and +finite-EI cables (see [Cross-flow VIV](theory.rst)); the 14-column row has no VIV columns. The +in-line force of a finite-EI type is a [VIV](#viv-optional-finite-ei-lines) section row. + **Viscoelastic axial stiffness (MoorDyn `ElasticMod`).** The EA and BA columns accept bar-separated parts: @@ -1136,6 +1145,41 @@ Behaviour: `NodeA`) the `End` column follows the written row, so the stiffener stays on the same physical end. Stiffeners run wherever the cubic-Hermite cable does, standalone and coupled. +### VIV (optional, finite-EI lines) + +In-line vortex-induced vibration of a line type: a second vortex-shedding force along the +relative flow, the direction of the drag, at twice the cross-flow frequency (Ulveseter et al. +2018; see [In-line VIV](theory.rst)). One row per line type, which must carry the cross-flow lift +(`Cl > 0` in LINE TYPES), since the in-line phase runs at twice the cross-flow one. + +```text +--------------------- VIV ---------------------------------------------- +TypeName ClX alpha +(-) (-) (-) +cable 0.85 0.15 +``` + +| Column | Meaning | +|--------|---------| +| `TypeName` | an existing LINE TYPES name (case-insensitive), at most one row each | +| `ClX` | in-line shedding coefficient `C_x` >= 0, at most 1e15; `0` is no in-line VIV | +| `alpha` | optional frequency band of the in-line phase about twice the cross-flow one, `0 <= alpha < 1` (default 0.15) | + +Behaviour: + +- Per unit length the force is `1/2 rho D ClX cos(phi_x) U v_n`, with `v_n` the relative normal + flow and `U` its speed; its phase follows `dphi_x/dt = 2 (dphi/dt) [1 + alpha sin(phi_xd - phi_x)]`, + `phi` the cross-flow phase and `phi_xd` the phase of the in-line motion. Ulveseter et al. take + `ClX = 0.85` and `alpha = 0.15` with `Cl = 0.65`. +- The Outputs flag `V` file carries the in-line force with the lift, and the phase is part of + the step-recovery, snapshot and checkpoint state. A row with `ClX = 0` leaves the run exactly as + without it. +- It acts on finite-EI lines (`EI > 0`) on every route the cubic-Hermite cable runs; an `EI = 0` + line of a type with `ClX > 0` stops by name. A row fails if it is not `TypeName ClX [alpha]`, + names an undefined or already named type, or holds a value out of range, and `ClX > 0` fails + on a type without the cross-flow lift. +- See `examples/viv_taut_cable_inline.dat`. + ### FAILURE (optional, EI = 0 decks) A FAILURE row detaches line ends from a point during a dynamic run, with MoorDyn's trigger rules. diff --git a/doc/examples.rst b/doc/examples.rst index 994bcd4d..7967f217 100644 --- a/doc/examples.rst +++ b/doc/examples.rst @@ -265,6 +265,12 @@ Dynamic environment :ref:`theory-viv` - cable, dynamic - ~2 s + * - ``viv_taut_cable_inline.dat`` + - in-line VIV (the ``VIV`` section, ``ClX`` and ``alpha``): the same line as a finite-EI + cable; the quarter span moves in line at twice the cross-flow frequency, A/D 0.19 against + 0.03 with the cross-flow lift alone — :ref:`theory-viv` + - cable, dynamic + - ~2 s Points, buoys, bodies, and rods ------------------------------- diff --git a/doc/outputs.rst b/doc/outputs.rst index 1fd0325e..b2b106ba 100644 --- a/doc/outputs.rst +++ b/doc/outputs.rst @@ -340,7 +340,8 @@ write. Any other letter is a parse error. Mixed ``EI = 0`` + finite-EI decks rej flag ``V``; a static run carries no lift and writes no file). On an ``EI = 0`` line the end nodes carry none, as in MoorDyn; on a finite-EI line each element's lift is lumped to its two nodes (the translational part of its consistent load), so the end nodes carry - the lift of their half-elements. Zero on a line without VIV (``Cl = 0``) + the lift of their half-elements, and a type with in-line VIV (the ``VIV`` section) adds + its in-line force. Zero on a line without VIV (``Cl = 0``) * - ``r`` - ``.Line.range.out`` - range graph: minimum, maximum and mean over the run of the node tension, curvature, bend diff --git a/doc/references.rst b/doc/references.rst index 9498856b..a4a4db4f 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -89,6 +89,12 @@ Hydrodynamics and ocean environment vortex-induced vibrations in stationary and oscillating flows. *Journal of Fluids and Structures* **61**, 1–19. https://doi.org/10.1016/j.jfluidstructs.2015.11.006 +.. _ref-ulveseter2018: + +- **Ulveseter, J. V., Thorsen, M. J., Sævik, S. & Larsen, C. M. (2018).** Time domain + simulation of riser VIV in current and irregular waves. *Marine Structures* **60**, 241–260. + https://doi.org/10.1016/j.marstruc.2018.04.001 + .. _ref-morison1950: - **Morison, J. R., O'Brien, M. P., Johnson, J. W. & Schaaf, S. A. (1950).** The force diff --git a/doc/theory.rst b/doc/theory.rst index 47127f01..500779dc 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1169,6 +1169,43 @@ phases, the running mean squares and the averaging time are part of the checkpoi restart continues the uninterrupted run bit for bit. The OpenFAST correction iterations rewind them with the rest of the state. +.. _theory-viv-inline: + +In-line vortex-induced vibration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A finite-EI line type can add the in-line shedding force of the combined cross-flow and in-line +model of :ref:`Ulveseter et al. (2018) `, a ``VIV`` section row +``TypeName ClX [alpha]`` (see :doc:`file_formats`). A second phase :math:`\phi_x` per node drives +a force along the relative normal flow, per unit deformed length + +.. math:: + + \mathbf{f}_x = \tfrac{1}{2}\rho\,d\,C_{x}\cos\phi_x\;U\,\mathbf{v}_n , + +the direction of the drag, at twice the cross-flow frequency. Its phase is slaved to the +cross-flow shedding phase :math:`\phi`, with a band :math:`\alpha` in which it locks onto the +in-line motion :math:`\dot x = \dot{\mathbf{r}}\cdot\mathbf{v}_n/U`: + +.. math:: + + \dot\phi_x = 2\,\dot\phi\,\bigl[1 + \alpha\sin(\phi_{\dot x} - \phi_x)\bigr], \qquad + \phi_{\dot x} = \operatorname{atan2}\!\left(-\frac{\ddot x}{\ddot x_\text{rms}},\, + \frac{\dot x}{\dot x_\text{rms}}\right), + +with the running RMS values of the cross-flow phase (:math:`\phi_{\dot x} = 0` at a node with no +in-line motion). Ulveseter et al. take :math:`C_x = 0.85` and :math:`\alpha = 0.15` (the default +here) with a cross-flow :math:`C_L` of 0.65. The in-line phase starts at twice the cross-flow +one, so the two start locked. The in-line rate is twice the cross-flow one, so ``ClX > 0`` +needs the type's cross-flow :math:`C_L > 0`. The force is integrated with the lift at the same +Gauss points, :math:`\cos\phi_x` interpolated between the element's end nodes, and its exact +position and velocity derivatives enter the tangent. The phase is explicit with the Heun commit, +its end-state rate taken from the end-state cross-flow rate. The phase and the two mean squares +are part of the step-recovery, snapshot and checkpoint state, and a ``ClX`` of zero leaves the +run exactly as without the row. On the taut line of ``viv_taut_cable_inline.dat`` the quarter +span moves in line at twice the cross-flow frequency, A/D 0.19 against 0.03 with the cross-flow +lift alone. ``EI = 0`` lines do not take in-line VIV yet. + .. _theory-dry-buoyancy: Buoyancy and wetting diff --git a/examples/viv_taut_cable_inline.dat b/examples/viv_taut_cable_inline.dat new file mode 100644 index 00000000..187a9ee7 --- /dev/null +++ b/examples/viv_taut_cable_inline.dat @@ -0,0 +1,60 @@ +--------------------- CableDyn Input File ------------------------------------ +CableDyn driver deck -- cross-flow and in-line VIV of a taut cable in a uniform current, 90 s +-- The taut line of viv_taut_line_crossflow.dat as a finite-EI cable (EI 1 N m^2, a string to +-- within 1e-6 of its geometric stiffness): 100 m, D 0.1 m, 10 kg/m, EA 5e7 N, about 50 kN, held +-- at both ends 50 m below the surface in a 0.15 m/s current along +Y. The LINE TYPES columns +-- Cl dF cF give the cross-flow lift (0.8 in MoorDyn's band), which locks the first vertical mode +-- in across the flow (Z). The VIV section adds the in-line shedding force of Ulveseter et al. +-- (Mar. Struct. 60, 2018) along the flow (Y): ClX 0.85 and the band alpha 0.15 of its phase +-- about twice the cross-flow one. Over 60-90 s the quarter span (L1N13py) moves in line at A/D +-- 0.19, at twice the 0.29 Hz cross-flow frequency of the mid span (L1N26pz, A/D 0.82); with the +-- cross-flow lift alone (drop the VIV section) they are 0.03 and 0.66. The Outputs flag V writes +-- the VIV force, lift and in-line, at every node to .Line1.V.out. +--------------------- LINE TYPES --------------------------------------- +TypeName Diam MassDenInAir EA BA/-zeta EI Cd_n Cd_t Ca_n Ca_t Cl dF cF +(-) (m) (kg/m) (N) (N-s/-) (N-m^2) (-) (-) (-) (-) (-) (-) (-) +riser 0.10 10.0 5.0e7 -0.8 1.0 1.2 0.0 1.0 0.0 0.8 0.08 0.18 +--------------------- POINTS ------------------------------------------- +ID Type X Y Z Mass Vol CdA Ca +(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) +1 Coupled 0.0 0.0 -50.0 0 0 0 0 +2 Fixed 100.0 0.0 -50.0 0 0 0 0 +--------------------- LINES -------------------------------------------- +ID NodeA NodeB Outputs +(-) (-) (-) (-) +1 1 2 V +--------------------- SECTIONS ----------------------------------------- +-- 99.9 m unstretched: 50 kN stretches it to the 100 m span (EA 5e7 N, strain 0.1 %). +LineID LineType Length NumSegs +(-) (-) (m) (-) +1 riser 99.9001 50 +--------------------- VIV ---------------------------------------------- +-- In-line VIV of a line type: the in-line shedding coefficient ClX (0 = off; it needs the type's +-- cross-flow Cl > 0) and the band alpha (0 <= alpha < 1, default 0.15). Finite-EI lines only. +TypeName ClX alpha +(-) (-) (-) +riser 0.85 0.15 +--------------------- OPTIONS ------------------------------------------ +9.80665 g - Gravitational acceleration (m/s^2) [default: 9.80665] +1025.0 rhoW - Water density (kg/m^3) [default: 1025] +100.0 WtrDpth - Water depth (m) [default: absent standalone; host-owned OpenFAST] +1.0e5 kBot - Seabed penalty stiffness base (Pa/m) [default: 1.0e5] +1.0e4 cBot - Seabed normal damping base (Pa-s/m) [default: 1.0e4] +0.02 dtM - CableDyn internal time step (s) [default: omitted standalone; the glue DT in OpenFAST] +90.0 TMax - Standalone simulation duration (s) [default: omitted standalone; host-owned OpenFAST] +0.25 VIVrmsWindow - Averaging time of the VIV running RMS motion (s) {0=500 steps of dtM} [default: 0] +spread VIVphaseSeed - Initial VIV phases {spread=2 pi i/N, MoorDyn-C; zero=MoorDyn-F} [default: spread] +uniform 0.0 0.15 0.0 current - Current model and X/Y/Z velocity (m/s) {none; uniform; profile} [default: none] +none waves - Wave model, height, period, and direction (m, s, deg) {none; airy; jonswap} [default: none] +0 WaterKin - Water-kinematics source {0/none; 3; 7; file; SEASTATE coupled only} [default: no policy] +0.4 rhoInf - Generalised-alpha spectral radius {0<=rhoInf<=1} [default: 0.4] +False modified_newton - Tangent-reuse mode {False=full Newton; True=guarded reuse} [default: False] +False adaptive_mesh - Automatic finite-EI refinement {False; True} [default: False] +dynamic_solver 1.0e-8 1.0e-14 30 12 - Relative tolerance, absolute tolerance, max iterations, backtracks [defaults shown] +none frictionMu - Seabed friction coefficient {none; value>=0} [default: none] +-- Complete option/default reference: cabledyn_options_reference.dat and doc/options.rst. +--------------------- OUTPUTS ------------------------------------------ +"FairTen1" +"L1N26pz" +"L1N13py" +--------------------- need this line ----------------------------------- diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 29b37744..0e38138d 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -207,6 +207,12 @@ class LineType: coefficient and the half-range and centre of the synchronisation band in non-dimensional frequency). ``cl`` set writes the 13-column row, with MoorDyn's ``df = 0.08`` and ``cf = 0.18`` where they are ``None``. + clx, il_alpha : float | None + Optional in-line VIV of a finite-EI type, a ``VIV`` section row + ``Name ClX [alpha]``: the in-line shedding coefficient (it needs ``cl``, + the in-line phase running at twice the cross-flow one) and the frequency + band of that phase, ``0 <= il_alpha < 1``; ``None`` leaves alpha out of + the row (the solver takes 0.15). """ name: str @@ -226,6 +232,8 @@ class LineType: cl: float | None = None df: float | None = None cf: float | None = None + clx: float | None = None + il_alpha: float | None = None @dataclass(eq=False) @@ -1642,6 +1650,8 @@ def add_line_type( cl: float | None = None, df: float | None = None, cf: float | None = None, + clx: float | None = None, + il_alpha: float | None = None, ) -> LineType: """Add a ``LINE TYPES`` row; see :class:`LineType` for the fields. @@ -1658,7 +1668,25 @@ def add_line_type( _text(name, "line-type name") self._check_new_key(self.line_types, name) item = LineType( - name, diam, mass, ea, ba, ei, cdn, cdt, can, cat, gas, gj, irt, irn, cl, df, cf + name, + diam, + mass, + ea, + ba, + ei, + cdn, + cdt, + can, + cat, + gas, + gj, + irt, + irn, + cl, + df, + cf, + clx, + il_alpha, ) self._line_types.append(item) return item @@ -2549,6 +2577,7 @@ def to_text(self, *, validate: bool = True) -> str: _emit(out, "EQUIVALENT BUOYANCY", *self._equivalent_table()) _emit(out, "ATTACHMENTS", *self._attachment_table()) _emit(out, "STIFFENERS", *self._stiffener_table()) + _emit(out, "VIV", *self._viv_table()) _emit(out, "FAILURE", *self._failure_table()) _emit(out, "CONTROL", *self._control_table()) _emit(out, "EXTERNAL LOADS", *self._external_load_table()) @@ -2912,6 +2941,20 @@ def _stiffener_table(self) -> tuple[str, str, list[list[str]]]: header = "LineID End Length RootOD TipOD InnerD E Density" return header, "(-) (-) (m) (m) (m) (m) (Pa) (kg/m^3)", rows + def _viv_table(self) -> tuple[str, str, list[list[str]]]: + rows: list[list[str]] = [] + for item in self._line_types: + what = f"line type {item.name!r}" + if item.clx is None: + if item.il_alpha is not None: + raise ValueError(f"{what}: il_alpha needs the in-line VIV coefficient clx") + continue + row = [_text(item.name, what), _num(item.clx, what)] + if item.il_alpha is not None: + row.append(_num(item.il_alpha, what)) + rows.append(row) + return "Name ClX alpha", "(-) (-) (-)", rows + def _syrope_table(self) -> tuple[str, str, list[list[str]]]: rows = [ [_line_list(row.lines), _num(row.tmax0, "SYROPE IC"), _num(row.tmean0, "SYROPE IC")] @@ -3110,6 +3153,11 @@ def load(self) -> None: for row in self.rows("STIFFENERS"): t = row.tokens model.add_stiffener(_native_int(t[0]), t[1][-1], *(_f(token) for token in t[2:8])) + for row in self.rows("VIV"): + t = row.tokens + item = model.line_types[t[0]] + item.clx = _f(t[1]) + item.il_alpha = _f(t[2]) if len(t) == 3 else None for row in self.rows("ATTACHMENTS"): t = row.tokens arc: float | tuple[float, float, float] diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index a69d833c..6e4ca43f 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -76,6 +76,9 @@ "STIFFENER": "STIFFENERS", "BEND STIFFENERS": "STIFFENERS", "BEND STIFFENER": "STIFFENERS", + "VIV": "VIV", + "VORTEX-INDUCED VIBRATION": "VIV", + "VORTEX INDUCED VIBRATION": "VIV", } # Table sections whose rows the native reader takes through a Fortran # list-directed READ. Their descriptive and units rows are recognized by the @@ -98,7 +101,7 @@ # Table sections the native reader splits on whitespace and parses column by # column (their comma-separated line lists are valid there). _WHITESPACE_TABLE_SECTIONS = frozenset( - {"FAILURE", "CONTROL", "SYROPE IC", "ATTACHMENTS", "STIFFENERS"} + {"FAILURE", "CONTROL", "SYROPE IC", "ATTACHMENTS", "STIFFENERS", "VIV"} ) _TABLE_SECTIONS = _LIST_DIRECTED_SECTIONS | _WHITESPACE_TABLE_SECTIONS _NATIVE_RECORD_LENGTH = 512 @@ -3175,6 +3178,67 @@ def _check_stiffeners( "(End A and End B stiffeners together)" ) + def _check_viv_section( + self, + line_ids: set[str], + section_types_by_line: dict[str, list[str]], + line_type_meta: dict[str, tuple[float, float, float, float]], + lift_type_names: set[str], + ) -> None: + """Native ``apply_type_viv`` and its finalize check for the VIV section. + + A row ``TypeName ClX [alpha]`` gives a line type in-line VIV: the in-line shedding + coefficient ``ClX >= 0`` (0 = off) and the band ``0 <= alpha < 1`` (default 0.15) of + its phase about twice the cross-flow one, so ``ClX > 0`` needs the type's LINE TYPES + lift ``Cl > 0``. A type takes one row; the in-line force acts on finite-EI lines. + """ + named: set[str] = set() + inline_types: set[str] = set() + for row in self._rows("VIV"): + where = self._at(row) + if len(row.tokens) not in (2, 3): + raise DeckFormatError(f"{where}: VIV rows must be: TypeName ClX [alpha]") + name = row.tokens[0].lower() + if name not in line_type_meta: + raise DeckFormatError( + f'{where}: VIV row names undefined LINE TYPE "{row.tokens[0]}"' + ) + if name in named: + raise DeckFormatError(f'{where}: VIV names LINE TYPE "{row.tokens[0]}" twice') + named.add(name) + try: + clx = _native_float(row.tokens[1]) + alpha = _native_float(row.tokens[2]) if len(row.tokens) == 3 else 0.15 + except ValueError as exc: + raise DeckFormatError(f"{where}: VIV ClX and alpha must be plain numbers") from exc + if not (math.isfinite(clx) and math.isfinite(alpha)): + raise DeckFormatError(f"{where}: VIV ClX and alpha must be finite") + if clx < 0.0 or clx > _NATIVE_MAX_COEFFICIENT: + raise DeckFormatError( + f"{where}: VIV in-line coefficient ClX must be non-negative (0 = in-line VIV " + "off) and at most 1e15" + ) + if not 0.0 <= alpha < 1.0: + raise DeckFormatError( + f"{where}: VIV in-line frequency band alpha must satisfy 0 <= alpha < 1" + ) + if clx > 0.0 and name not in lift_type_names: + raise DeckFormatError( + f'{where}: VIV in-line VIV of LINE TYPE "{row.tokens[0]}" needs its ' + "cross-flow lift (LINE TYPES Cl > 0): the in-line phase runs at twice the " + "cross-flow one" + ) + if clx > 0.0: + inline_types.add(name) + for line_id in sorted(line_ids, key=int): + names = section_types_by_line.get(line_id, []) + finite = any(line_type_meta[name][3] > 0.0 for name in names if name in line_type_meta) + if not finite and inline_types & set(names): + raise DeckFormatError( + f"{self._label}: line {line_id} is an EI = 0 line of a type with in-line VIV " + "(VIV ClX > 0): in-line VIV acts on finite-EI lines (EI > 0)" + ) + def _legacy_rod_type_columns(self, record: DeckRecord) -> bool: """Return whether ``record`` sits under a legacy CableDyn ROD TYPES header. @@ -4345,6 +4409,7 @@ def end_key(token: str) -> str: ) self._check_stiffeners(line_ids, section_types_by_line, line_type_meta, line_lengths) + self._check_viv_section(line_ids, section_types_by_line, line_type_meta, viv_type_names) self._check_attachments(line_ids, section_types_by_line, line_type_meta, line_lengths) assigned_end_connections: set[tuple[str, str]] = set() diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index ea6f0608..2e0abd73 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -1009,6 +1009,36 @@ def test_bending_damping_round_trips_in_the_ei_column( assert next(t for t in loaded.line_types if t.name == "cable").ei == ei +@pytest.mark.parametrize(("clx", "il_alpha"), [(0.85, 0.15), (0.85, None), (0.0, 0.2)]) +def test_inline_viv_round_trips_in_the_viv_section( + tmp_path: Path, clx: float, il_alpha: float | None +) -> None: + model = _chain_model(tmp_path) + cable = model.add_line_type( + "cable", diam=0.2, mass=40.0, ea=5.0e8, ei=1.0e4, cl=0.8, clx=clx, il_alpha=il_alpha + ) + assert (cable.clx, cable.il_alpha) == (clx, il_alpha) + target = model.save(tmp_path / "inline_viv.dat") + deck = DeckFile.read(target) + row = next(r for r in deck._rows("VIV") if r.tokens[0] == "cable") + assert [float(v) for v in row.tokens[1:]] == [clx] + ([] if il_alpha is None else [il_alpha]) + loaded = next(t for t in DeckModel.load(target).line_types if t.name == "cable") + assert (loaded.clx, loaded.il_alpha) == (clx, il_alpha) + + +def test_inline_viv_alpha_needs_the_coefficient(tmp_path: Path) -> None: + model = _chain_model(tmp_path) + model.add_line_type("cable", diam=0.2, mass=40.0, ea=5.0e8, ei=1.0e4, cl=0.8, il_alpha=0.15) + with pytest.raises(ValueError, match="il_alpha needs the in-line VIV coefficient clx"): + model.to_text() + + +def test_no_viv_section_without_inline_viv(tmp_path: Path) -> None: + model = _chain_model(tmp_path) + model.add_line_type("cable", diam=0.2, mass=40.0, ea=5.0e8, ei=1.0e4, cl=0.8) + assert "VIV ---" not in model.to_text() + + def test_bending_damping_ei_tuple_length_is_checked(tmp_path: Path) -> None: model = _chain_model(tmp_path) model.add_line_type("cable", diam=0.2, mass=40.0, ea=5.0e8, ei=(1.0e4, 1.0, 2.0, 3.0)) diff --git a/python/tests/test_deck_native_parity.py b/python/tests/test_deck_native_parity.py index c2c839a0..4a71b909 100644 --- a/python/tests/test_deck_native_parity.py +++ b/python/tests/test_deck_native_parity.py @@ -983,6 +983,50 @@ def test_bending_damping_rows_are_native(ei, message): _rejects(text, re.escape(message)) +_VIV_EI0 = "-0.8 0.0 1.2" +# the cross-flow VIV example as a finite-EI cable (EI 1 N m^2) +_VIV_CABLE = _example("viv_taut_line_crossflow.dat", (_VIV_EI0, "-0.8 1.0 1.2")) + + +@pytest.mark.parametrize( + "rows", [("riser 0.85 0.15",), ("riser 0.85",), ("riser 0",), ("RISER 0.5 0.0",)] +) +def test_inline_viv_rows_are_accepted(rows): + DeckFile.from_text(_section(_VIV_CABLE, "VIV", "TypeName ClX alpha", "(-) (-) (-)", *rows)) + + +@pytest.mark.parametrize( + ("rows", "message"), + [ + (("riser 0.85 0.15 7",), "VIV rows must be: TypeName ClX [alpha]"), + (("cable 0.85",), 'VIV row names undefined LINE TYPE "cable"'), + (("riser 0.85", "riser 0.5"), 'VIV names LINE TYPE "riser" twice'), + (("riser 0.85 x",), "VIV ClX and alpha must be plain numbers"), + (("riser -0.1",), "ClX must be non-negative"), + (("riser 2.0e15",), "ClX must be non-negative"), + (("riser 0.85 1.0",), "alpha must satisfy 0 <= alpha < 1"), + (("riser 0.85 -0.1",), "alpha must satisfy 0 <= alpha < 1"), + ], +) +def test_inline_viv_rows_are_native(rows, message): + _rejects(_section(_VIV_CABLE, "VIV", *rows), re.escape(message)) + + +def test_inline_viv_needs_the_crossflow_lift(): + text = _edit(_VIV_CABLE, ("0.0 0.8 0.08 0.18", "0.0 0.0 0.08 0.18")) + _rejects( + _section(text, "VIV", "riser 0.85"), + re.escape("needs its cross-flow lift (LINE TYPES Cl > 0)"), + ) + + +def test_inline_viv_needs_a_finite_ei_line(): + text = _section(_example("viv_taut_line_crossflow.dat"), "VIV", "riser 0.85") + _rejects(text, re.escape("in-line VIV acts on finite-EI lines (EI > 0)")) + # a zero in-line coefficient is no in-line VIV, which the EI = 0 line takes + DeckFile.from_text(_section(_example("viv_taut_line_crossflow.dat"), "VIV", "riser 0.0")) + + def test_stiffener_needs_a_finite_ei_line(): text = _section(_HELD, "STIFFENERS", "1 A 1.0 0.5 0.5 0.3 5.0e7 1150") _rejects(text, "STIFFENERS name line 1, which is not a finite-EI line") diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index fb420578..c51a2817 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -135,7 +135,7 @@ MODULE CableDyn_DeckDriver CD_HFMF_SetCoupledKinematics, CD_HFMF_GetCoupledKinematics, & CD_HFMF_Set_Moving_End_B, CD_HFMF_GetEndBKinematics, & CD_HFMF_End, CD_HFMF_OK - USE CableDyn_VIV, ONLY: CD_VIV_DEFAULT_DF, CD_VIV_DEFAULT_CF, CD_VIV_NM + USE CableDyn_VIV, ONLY: CD_VIV_DEFAULT_DF, CD_VIV_DEFAULT_CF, CD_VIV_NM, CD_VIV_DEFAULT_IL_ALPHA USE CableDyn_Hydro, ONLY: CD_Airy_Wave_Kinematics_Precomputed, CD_Component_Wave_Kinematics, & CD_Current_Profile_Velocity, CD_CurrentGridType, CD_Current_Grid_Resample, & CD_Current_Grid_Velocity, & @@ -445,6 +445,12 @@ MODULE CableDyn_DeckDriver ! non-dimensional shedding frequency. A row with Cl only takes MoorDyn's dF = 0.08 and ! cF = 0.18. REAL(wp) :: cl = CD_ZERO, viv_df = CD_VIV_DEFAULT_DF, viv_cf = CD_VIV_DEFAULT_CF + ! In-line VIV (the optional VIV section, a row per type: TypeName ClX [alpha]; Ulveseter et + ! al., Mar. Struct. 60, 2018): the in-line shedding coefficient C_vx (0 = off) and the + ! frequency band alpha of its phase about twice the cross-flow one; has_viv_row marks a type + ! the section names. + REAL(wp) :: clx = CD_ZERO, il_alpha = CD_VIV_DEFAULT_IL_ALPHA + LOGICAL :: has_viv_row = .FALSE. ! Deck file line of the row (0 when not read from a file), for error messages. INTEGER :: deck_line = 0 END TYPE @@ -1877,7 +1883,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(wp), ALLOCATABLE :: gas(:), gj(:), rho_a(:), i_rt(:), i_rn(:), w(:), nodes_ref(:, :), q0(:), q_static(:) REAL(wp), ALLOCATABLE :: q_sequence(:) REAL(wp), ALLOCATABLE :: curv(:), cdn(:), cdt(:), can(:), cat(:), catenary_pos(:) - REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:) + REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:) REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:) REAL(wp) :: mode1_omega REAL(wp), ALLOCATABLE :: contact_kn(:), contact_cn(:) @@ -3273,12 +3279,14 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, ! property of the original element containing its reference-arc midpoint. ALLOCATE (cdn(SIZE(l0)), cdt(SIZE(l0)), can(SIZE(l0)), cat(SIZE(l0))) CALL finite_hydro_arrays(ln, sections, types, diam, cdn, cdt, can, cat) - ALLOCATE (viv_cl(SIZE(l0)), viv_cf(SIZE(l0)), viv_df(SIZE(l0))) - CALL finite_viv_arrays(ln, sections, types, viv_cl, viv_cf, viv_df) + ALLOCATE (viv_cl(SIZE(l0)), viv_cf(SIZE(l0)), viv_df(SIZE(l0)), viv_clx(SIZE(l0)), viv_al(SIZE(l0))) + CALL finite_viv_arrays(ln, sections, types, viv_cl, viv_cf, viv_df, viv_clx, viv_al) IF (SIZE(l0_am) /= SIZE(l0)) THEN CALL remap_elem_by_reference_arc(viv_cl, l0, l0_am) CALL remap_elem_by_reference_arc(viv_cf, l0, l0_am) CALL remap_elem_by_reference_arc(viv_df, l0, l0_am) + CALL remap_elem_by_reference_arc(viv_clx, l0, l0_am) + CALL remap_elem_by_reference_arc(viv_al, l0, l0_am) CALL remap_elem_by_reference_arc(rho_a, l0, l0_am) CALL remap_elem_by_reference_arc(diam, l0, l0_am) CALL remap_elem_by_reference_arc(cdn, l0, l0_am) @@ -3591,11 +3599,20 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, ELSE CALL CD_Deck_VIV_Phase_Seed(cable%line%l0, ln%ends_swapped, seed, zero=opts%viv_phase_zero) 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, & - tangent_reversed=.NOT. ln%ends_swapped) + ! with the in-line VIV of the VIV section where a type has ClX > 0 + IF (ANY(viv_clx > 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, phase_seed=seed, & + tangent_reversed=.NOT. ln%ends_swapped, clx=viv_clx, il_alpha=viv_al) + 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, phase_seed=seed, & + tangent_reversed=.NOT. ln%ends_swapped) + END IF END BLOCK IF (es /= CD_HCDYN_OK) THEN CALL fail(ErrStat, ErrMsg, 'finite-EI cable VIV wiring failed: '//TRIM(em)); RETURN @@ -11556,13 +11573,13 @@ SUBROUTINE finite_hydro_arrays(ln, sections, types, diam, cdn, cdt, can, cat) cat = cat(SIZE(cat):1:-1) END SUBROUTINE finite_hydro_arrays - SUBROUTINE finite_viv_arrays(ln, sections, types, cl, cf, df) - !! Expand the section VIV columns (Cl dF cF) to finite-EI element arrays, in the element - !! order of finite_hydro_arrays. + SUBROUTINE finite_viv_arrays(ln, sections, types, cl, cf, df, clx, il_alpha) + !! Expand the section VIV columns (Cl dF cF) and the VIV section's in-line ClX and alpha to + !! finite-EI element arrays, in the element order of finite_hydro_arrays. TYPE(DeckLine), INTENT(IN) :: ln TYPE(DeckSection), INTENT(IN) :: sections(:) TYPE(DeckLineType), INTENT(IN) :: types(:) - REAL(wp), INTENT(OUT) :: cl(:), cf(:), df(:) + REAL(wp), INTENT(OUT) :: cl(:), cf(:), df(:), clx(:), il_alpha(:) INTEGER :: i, j, e, tidx e = 0 @@ -11574,13 +11591,31 @@ SUBROUTINE finite_viv_arrays(ln, sections, types, cl, cf, df) cl(e) = types(tidx)%cl cf(e) = types(tidx)%viv_cf df(e) = types(tidx)%viv_df + clx(e) = types(tidx)%clx + il_alpha(e) = types(tidx)%il_alpha END DO END DO cl = cl(SIZE(cl):1:-1) cf = cf(SIZE(cf):1:-1) df = df(SIZE(df):1:-1) + clx = clx(SIZE(clx):1:-1) + il_alpha = il_alpha(SIZE(il_alpha):1:-1) END SUBROUTINE finite_viv_arrays + LOGICAL FUNCTION line_has_viv_il(ln, types, sections) RESULT(has) + !! Whether a section of the line uses a line type with in-line VIV (VIV ClX > 0). + TYPE(DeckLine), INTENT(IN) :: ln + TYPE(DeckLineType), INTENT(IN) :: types(:) + TYPE(DeckSection), INTENT(IN) :: sections(:) + INTEGER :: j + has = .FALSE. + DO j = 1, SIZE(sections) + IF (sections(j)%line_id /= ln%id) CYCLE + IF (sections(j)%ltype < 1 .OR. sections(j)%ltype > SIZE(types)) CYCLE + IF (types(sections(j)%ltype)%clx > CD_ZERO) has = .TRUE. + END DO + END FUNCTION line_has_viv_il + LOGICAL FUNCTION line_has_viv(ln, types, sections) RESULT(has) !! Whether a section of the line uses a line type with a VIV lift coefficient Cl > 0. TYPE(DeckLine), INTENT(IN) :: ln @@ -13692,6 +13727,9 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti CHARACTER(DECK_RECLEN), ALLOCATABLE :: stf_rows(:) INTEGER, ALLOCATABLE :: stf_lines(:) INTEGER :: n_stf + CHARACTER(DECK_RECLEN), ALLOCATABLE :: viv_rows(:) + INTEGER, ALLOCATABLE :: viv_lines(:) + INTEGER :: n_viv CHARACTER(2*NAMELEN), ALLOCATABLE :: channel_keys(:) LOGICAL :: ext_march, types_stock_cols, rodtypes_legacy_cols, turb_ok, static_finite_ok, tors_marched INTEGER :: unit, ios, section, nt, nb, nrt, nr, np, nlin, nsec, neq, nch, nfl, nct, nec, lineno @@ -13709,7 +13747,7 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti SEC_SECTIONS = 5, SEC_OPTIONS = 6, SEC_OUTPUTS = 7, SEC_RODTYPES = 8, SEC_RODS = 9, & SEC_EQUIV = 10, SEC_FAILURE = 11, SEC_CONTROL = 12, SEC_SYROPE_IC = 13, & SEC_ENDCONN = 14, SEC_TURBINES = 15, SEC_EXTLOADS = 16, SEC_ATTACH = 17, & - SEC_STIFF = 18 + SEC_STIFF = 18, SEC_VIV = 19 ErrStat = 0; ErrMsg = '' ext_march = .FALSE. @@ -13731,6 +13769,8 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti n_att = 0 ALLOCATE (stf_rows(0), stf_lines(0)) n_stf = 0 + ALLOCATE (viv_rows(0), viv_lines(0)) + n_viv = 0 nt = 0; nb = 0; nrt = 0; nr = 0; np = 0; nlin = 0; nsec = 0; neq = 0; nch = 0; nfl = 0; nct = 0; nec = 0 section = SEC_NONE ALLOCATE (channel_lines(0)) @@ -13856,6 +13896,15 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti END IF stf_rows(n_stf) = line(1:MIN(LEN(line), DECK_RECLEN)) stf_lines(n_stf) = lineno + CASE (SEC_VIV) + IF (.NOT. has_numeric_token(line)) CYCLE + n_viv = n_viv + 1 + IF (n_viv > SIZE(viv_rows)) THEN + viv_rows = [viv_rows, [(REPEAT(' ', DECK_RECLEN), i_ch=1, 8)]] + viv_lines = [viv_lines, [(0, i_ch=1, 8)]] + END IF + viv_rows(n_viv) = line(1:MIN(LEN(line), DECK_RECLEN)) + viv_lines(n_viv) = lineno CASE (SEC_OPTIONS) CALL apply_option(line, opts, ErrStat, ErrMsg) CASE (SEC_OUTPUTS) @@ -13953,6 +14002,13 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti RETURN END IF END DO + DO i_ch = 1, n_viv + CALL apply_type_viv(viv_rows(i_ch), types, ErrStat, ErrMsg) + IF (ErrStat /= 0) THEN + CALL add_row_context('deck', viv_lines(i_ch), viv_rows(i_ch), ErrMsg) + RETURN + END IF + END DO ! Caller-supplied environment overrides land HERE -- before equivalent-buoyancy ! conversion and validation -- so both run under the environment the model is @@ -15619,6 +15675,8 @@ SUBROUTINE set_section(secname, section, ErrStat, ErrMsg) section = 17 CASE ('STIFFENERS', 'STIFFENER', 'BEND STIFFENERS', 'BEND STIFFENER') section = 18 + CASE ('VIV', 'VORTEX-INDUCED VIBRATION', 'VORTEX INDUCED VIBRATION') + section = 19 CASE DEFAULT IF (LEN_TRIM(secname) > NAMELEN) THEN CALL fail(ErrStat, ErrMsg, 'unknown deck section "'//secname(1:NAMELEN)//'..."') @@ -17135,6 +17193,63 @@ SUBROUTINE append_line_attachment(row, lines, ErrStat, ErrMsg) CALL MOVE_ALLOC(grown, lines(li)%att) END SUBROUTINE append_line_attachment + SUBROUTINE apply_type_viv(row, types, ErrStat, ErrMsg) + !! One VIV row: TypeName ClX [alpha] -- the in-line VIV of a line type (Ulveseter et al. 2018): + !! the in-line shedding coefficient C_vx >= 0 (0 = off) and the frequency band 0 <= alpha < 1 + !! of its phase about twice the cross-flow one (default 0.15). The in-line phase rate is + !! slaved to the cross-flow one, so ClX > 0 needs the type's LINE TYPES lift Cl > 0. A type + !! takes one row. + CHARACTER(*), INTENT(IN) :: row + TYPE(DeckLineType), INTENT(INOUT) :: types(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + CHARACTER(DECK_RECLEN) :: tok + INTEGER :: it, ntok + REAL(wp) :: clx, alpha + LOGICAL :: found, ok + + ErrStat = 0; ErrMsg = '' + ntok = count_tokens(row) + IF (ntok /= 2 .AND. ntok /= 3) THEN + CALL fail(ErrStat, ErrMsg, 'VIV rows must be: TypeName ClX [alpha]'); RETURN + END IF + CALL get_token(row, 1, tok, found) + it = find_type(types, TRIM(tok)) + IF (it == 0) THEN + CALL fail(ErrStat, ErrMsg, 'VIV row names undefined LINE TYPE "'//TRIM(tok)//'"'); RETURN + END IF + IF (types(it)%has_viv_row) THEN + CALL fail(ErrStat, ErrMsg, 'VIV names LINE TYPE "'//TRIM(types(it)%name)//'" twice'); RETURN + END IF + CALL get_token(row, 2, tok, found) + CALL parse_real_token(tok, clx, ok) + alpha = CD_VIV_DEFAULT_IL_ALPHA + IF (ok .AND. ntok == 3) THEN + CALL get_token(row, 3, tok, found) + CALL parse_real_token(tok, alpha, ok) + END IF + IF (.NOT. ok) THEN + CALL fail(ErrStat, ErrMsg, 'VIV ClX and alpha must be plain numbers'); RETURN + END IF + IF (.NOT. (IEEE_IS_FINITE(clx) .AND. IEEE_IS_FINITE(alpha))) THEN + CALL fail(ErrStat, ErrMsg, 'VIV ClX and alpha must be finite'); RETURN + END IF + IF (clx < CD_ZERO .OR. clx > MAX_COEFFICIENT) THEN + CALL fail(ErrStat, ErrMsg, 'VIV in-line coefficient ClX must be non-negative (0 = in-line VIV off) and at '// & + 'most 1e15'); RETURN + END IF + IF (.NOT. (alpha >= CD_ZERO .AND. alpha < CD_ONE)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV in-line frequency band alpha must satisfy 0 <= alpha < 1'); RETURN + END IF + IF (clx > CD_ZERO .AND. .NOT. (types(it)%cl > CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV in-line VIV of LINE TYPE "'//TRIM(types(it)%name)//'" needs its '// & + 'cross-flow lift (LINE TYPES Cl > 0): the in-line phase runs at twice the cross-flow one'); RETURN + END IF + types(it)%clx = clx + types(it)%il_alpha = alpha + types(it)%has_viv_row = .TRUE. + END SUBROUTINE apply_type_viv + SUBROUTINE append_line_stiffener(row, lines, ErrStat, ErrMsg) !! One STIFFENERS row: LineID End Length RootOD TipOD InnerD E Density -- a conical segment of !! the bend stiffener sleeving End A or End B of a finite-EI line. The rows of one line end @@ -19668,6 +19783,15 @@ SUBROUTINE finalize_checks(types, bodies, rod_types, rods, points, lines, sectio END IF END DO + ! VIV in-line rows: the in-line force acts on finite-EI lines + DO j = 1, SIZE(lines) + IF (line_is_finite_ei(lines(j), types, sections)) CYCLE + IF (.NOT. line_has_viv_il(lines(j), types, sections)) CYCLE + at_line = lines(j)%deck_line + CALL fail(ErrStat, ErrMsg, 'line '//TRIM(int_to_str(lines(j)%id))//' is an EI = 0 line of a type with '// & + 'in-line VIV (VIV ClX > 0): in-line VIV acts on finite-EI lines (EI > 0)'); RETURN + END DO + ! STIFFENERS: bend stiffeners sleeving the ends of a finite-EI line DO j = 1, SIZE(lines) IF (.NOT. ALLOCATED(lines(j)%stf)) CYCLE diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 793d61f5..e1bef7bc 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -66,7 +66,8 @@ MODULE CableDyn_HermiteCableDynamic CD_HCABLE_OK USE CableDyn_Linalg, ONLY: CD_Factor_Banded, CD_Solve_Factored_Banded, CD_LINALG_OK USE CableDyn_VIV, ONLY: CD_VIV_Lift_Per_Length, CD_VIV_Crossflow_Along, CD_VIV_Phase_Rate, CD_VIV_Mean_Square, & - CD_VIV_Wrap_Phase, CD_VIV_TWO_PI, CD_VIV_NM + CD_VIV_Wrap_Phase, CD_VIV_TWO_PI, CD_VIV_NM, CD_VIV_Inline_Per_Length, & + CD_VIV_Inline_Phase_Rate USE CableDyn_Hydro, ONLY: CD_Morison_Drag_Per_Length_Jac, CD_Airy_Wave_Kinematics_Precomputed, & CD_Component_Wave_Kinematics, CD_Solve_Dispersion_Wavenumber, CD_HYDRO_OK USE CableDyn_SeabedContact, ONLY: CD_Seabed_Normal_Law, CD_Seabed_Contact_Gate, CD_SEABED_CONTACT_BLEND, & @@ -126,6 +127,7 @@ MODULE CableDyn_HermiteCableDynamic PUBLIC :: CD_HermiteCable_Dyn_On_Seabed PUBLIC :: CD_HermiteCable_Dyn_Set_Irregular_Waves PUBLIC :: CD_HermiteCable_Drag_Element + PUBLIC :: CD_HermiteCable_VIV_Lift_Element PUBLIC :: CD_HermiteCable_Axial_Damping_Element PUBLIC :: CD_HermiteCable_Axial_Damping_Resultant PUBLIC :: CD_HermiteCable_AddedMass_Element @@ -327,6 +329,16 @@ MODULE CableDyn_HermiteCableDynamic REAL(wp), ALLOCATABLE :: viv_rate(:), viv_ms(:, :), viv_ms_next(:, :) REAL(wp), ALLOCATABLE :: ws_recovery_viv_phi(:), ws_recovery_viv_ms(:, :), snap_viv_phi(:), snap_viv_ms(:, :) LOGICAL, ALLOCATABLE :: viv_node(:) + ! In-line VIV (Set_VIV clx, il_alpha; CableDyn_VIV): vil_k(e) = 1/2 rho D C_vx of each element + ! (0: no in-line force), the frequency band alpha per node (vil_alpha), the in-line shedding + ! phase and the running mean squares of the in-line velocity and acceleration per node, with + ! the cross-flow state's eval, rate, next, recovery and snapshot twins. Its phase rate is + ! twice the cross-flow one, so it lives on cross-flow (viv_node) nodes only. + LOGICAL :: has_viv_il = .FALSE. + REAL(wp), ALLOCATABLE :: vil_cx(:), vil_k(:), vil_alpha(:), vil_phi(:), vil_phi_eval(:), vil_rate(:) + REAL(wp), ALLOCATABLE :: vil_ms(:, :), vil_ms_next(:, :), ws_recovery_vil_phi(:), ws_recovery_vil_ms(:, :) + REAL(wp), ALLOCATABLE :: snap_vil_phi(:), snap_vil_ms(:, :) + LOGICAL, ALLOCATABLE :: vil_node(:) REAL(wp), ALLOCATABLE :: Mgb(:, :) ! constant global mass (band) LOGICAL, ALLOCATABLE :: freemask(:), solve_mask(:) INTEGER, ALLOCATABLE :: fmap(:) ! free -> global DOF index @@ -1084,7 +1096,8 @@ 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, phase_seed, tangent_reversed) + SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg, phase_seed, tangent_reversed, & + clx, il_alpha) !! 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 @@ -1099,6 +1112,11 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! 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. + !! + !! In-line VIV (Ulveseter et al. 2018; both or neither): clx, per element, the in-line shedding + !! coefficient C_vx (0: none; > 0 only where cl > 0, the in-line phase rate being twice the + !! cross-flow one) and il_alpha its frequency band (0 <= alpha < 1). The in-line phase of a + !! node starts at twice its cross-flow phase. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: cl(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -1108,14 +1126,17 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! MoorDyn's node tangent, so a node at rest takes the cross-flow phase pi !! (CD_VIV_Phase_Rate phi_rest); .FALSE. on a line the reader turned around LOGICAL, INTENT(IN), OPTIONAL :: tangent_reversed + REAL(wp), INTENT(IN), OPTIONAL :: clx(:), il_alpha(:) INTEGER :: e, k, ne, nn, es REAL(wp) :: wsum, tw_old, rest_old - LOGICAL :: had_viv + LOGICAL :: had_viv, had_il, want_il CHARACTER(LEN=1024) :: em REAL(wp), ALLOCATABLE :: a_old(:), o_cl(:), o_k(:), o_cf(:), o_df(:), o_dn(:), o_phi(:), o_phi_eval(:), & o_rate(:), o_ms(:, :), o_ms_next(:, :), o_rec_phi(:), o_rec_ms(:, :), & o_snap_phi(:), o_snap_ms(:, :) - LOGICAL, ALLOCATABLE :: o_node(:) + REAL(wp), ALLOCATABLE :: x_cx(:), x_k(:), x_al(:), x_phi(:), x_phi_eval(:), x_rate(:), x_ms(:, :), & + x_ms_next(:, :), x_rec_phi(:), x_rec_ms(:, :), x_snap_phi(:), x_snap_ms(:, :) + LOGICAL, ALLOCATABLE :: o_node(:), x_node(:) ErrStat = CD_HCDYN_OK; ErrMsg = '' IF (.NOT. model%initialized) THEN @@ -1152,8 +1173,33 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: internal waves are configured; VIV takes waves as a held '// & 'host fluid field (CD_HermiteCable_Dyn_Set_Held_Fluid)'; RETURN END IF + IF (PRESENT(clx) .NEQV. PRESENT(il_alpha)) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the in-line clx and il_alpha go together'; RETURN + END IF + want_il = .FALSE. + IF (PRESENT(clx)) THEN + IF (SIZE(clx) /= ne .OR. SIZE(il_alpha) /= ne) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: clx and il_alpha must each have one value per element'; RETURN + END IF + IF (.NOT. (CD_All_Finite(clx) .AND. CD_All_Finite(il_alpha))) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: clx and il_alpha must be finite'; RETURN + END IF + IF (ANY(clx < CD_ZERO) .OR. ANY(clx > CD_ZERO .AND. .NOT. (il_alpha >= CD_ZERO .AND. il_alpha < CD_ONE))) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: need clx >= 0 and 0 <= il_alpha < 1 where clx > 0'; RETURN + END IF + IF (ANY(clx > CD_ZERO .AND. .NOT. (cl > CD_ZERO))) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: in-line VIV (clx > 0) needs the cross-flow lift (cl > 0) on the '// & + 'same element: its phase rate is twice the cross-flow one'; RETURN + END IF + want_il = ANY(clx > CD_ZERO) + END IF ! the previous configuration and state, kept for a rollback had_viv = model%has_viv + had_il = model%has_viv_il tw_old = model%viv_tw rest_old = model%viv_phi_rest a_old = model%a @@ -1194,6 +1240,38 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err model%viv_phi(k) = CD_VIV_Wrap_Phase(CD_VIV_TWO_PI*(REAL(nn - k, wp)/REAL(ne, wp) + 0.5_wp)) IF (PRESENT(phase_seed)) model%viv_phi(k) = CD_VIV_TWO_PI*phase_seed(k) END DO + IF (want_il) THEN + ALLOCATE (model%vil_cx(ne), model%vil_k(ne), model%vil_alpha(nn), model%vil_phi(nn), model%vil_phi_eval(nn), & + model%vil_rate(nn), model%vil_ms(2, nn), model%vil_ms_next(2, nn), model%ws_recovery_vil_phi(nn), & + model%ws_recovery_vil_ms(2, nn), model%snap_vil_phi(nn), model%snap_vil_ms(2, nn), & + model%vil_node(nn)) + model%vil_cx = clx + model%vil_alpha = CD_ZERO + model%vil_node = .FALSE. + model%vil_phi = CD_ZERO + model%vil_ms = CD_ZERO + ! node values: the length-weighted average over the node's in-line elements + DO k = 1, nn + wsum = CD_ZERO + DO e = MAX(1, k - 1), MIN(ne, k) + IF (.NOT. (clx(e) > CD_ZERO)) CYCLE + wsum = wsum + model%l0(e) + model%vil_alpha(k) = model%vil_alpha(k) + model%l0(e)*il_alpha(e) + END DO + IF (.NOT. (wsum > CD_ZERO)) CYCLE + model%vil_node(k) = .TRUE. + model%vil_alpha(k) = model%vil_alpha(k)/wsum + model%vil_phi(k) = CD_VIV_Wrap_Phase(2.0_wp*model%viv_phi(k)) + END DO + model%vil_phi_eval = model%vil_phi + model%vil_rate = CD_ZERO + model%vil_ms_next = model%vil_ms + model%ws_recovery_vil_phi = model%vil_phi + model%ws_recovery_vil_ms = model%vil_ms + model%snap_vil_phi = model%vil_phi + model%snap_vil_ms = model%vil_ms + model%has_viv_il = .TRUE. + END IF CALL viv_drag_terms(model) model%viv_phi_eval = model%viv_phi model%viv_rate = CD_ZERO @@ -1216,6 +1294,7 @@ SUBROUTINE refresh_acceleration() CALL clear_viv(model) CALL move_viv(.TRUE.) model%has_viv = had_viv + model%has_viv_il = had_il model%viv_tw = tw_old model%viv_phi_rest = rest_old model%a = a_old @@ -1235,6 +1314,13 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(o_rec_phi, model%ws_recovery_viv_phi); CALL MOVE_ALLOC(o_rec_ms, model%ws_recovery_viv_ms) CALL MOVE_ALLOC(o_snap_phi, model%snap_viv_phi); CALL MOVE_ALLOC(o_snap_ms, model%snap_viv_ms) CALL MOVE_ALLOC(o_node, model%viv_node) + CALL MOVE_ALLOC(x_cx, model%vil_cx); CALL MOVE_ALLOC(x_k, model%vil_k) + CALL MOVE_ALLOC(x_al, model%vil_alpha); CALL MOVE_ALLOC(x_phi, model%vil_phi) + CALL MOVE_ALLOC(x_phi_eval, model%vil_phi_eval); CALL MOVE_ALLOC(x_rate, model%vil_rate) + CALL MOVE_ALLOC(x_ms, model%vil_ms); CALL MOVE_ALLOC(x_ms_next, model%vil_ms_next) + CALL MOVE_ALLOC(x_rec_phi, model%ws_recovery_vil_phi); CALL MOVE_ALLOC(x_rec_ms, model%ws_recovery_vil_ms) + CALL MOVE_ALLOC(x_snap_phi, model%snap_vil_phi); CALL MOVE_ALLOC(x_snap_ms, model%snap_vil_ms) + CALL MOVE_ALLOC(x_node, model%vil_node) ELSE CALL MOVE_ALLOC(model%viv_cl, o_cl); CALL MOVE_ALLOC(model%viv_k, o_k) CALL MOVE_ALLOC(model%viv_cf, o_cf); CALL MOVE_ALLOC(model%viv_df, o_df) @@ -1244,6 +1330,13 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(model%ws_recovery_viv_phi, o_rec_phi); CALL MOVE_ALLOC(model%ws_recovery_viv_ms, o_rec_ms) CALL MOVE_ALLOC(model%snap_viv_phi, o_snap_phi); CALL MOVE_ALLOC(model%snap_viv_ms, o_snap_ms) CALL MOVE_ALLOC(model%viv_node, o_node) + CALL MOVE_ALLOC(model%vil_cx, x_cx); CALL MOVE_ALLOC(model%vil_k, x_k) + CALL MOVE_ALLOC(model%vil_alpha, x_al); CALL MOVE_ALLOC(model%vil_phi, x_phi) + CALL MOVE_ALLOC(model%vil_phi_eval, x_phi_eval); CALL MOVE_ALLOC(model%vil_rate, x_rate) + CALL MOVE_ALLOC(model%vil_ms, x_ms); CALL MOVE_ALLOC(model%vil_ms_next, x_ms_next) + CALL MOVE_ALLOC(model%ws_recovery_vil_phi, x_rec_phi); CALL MOVE_ALLOC(model%ws_recovery_vil_ms, x_rec_ms) + CALL MOVE_ALLOC(model%snap_vil_phi, x_snap_phi); CALL MOVE_ALLOC(model%snap_vil_ms, x_snap_ms) + CALL MOVE_ALLOC(model%vil_node, x_node) END IF END SUBROUTINE move_viv END SUBROUTINE CD_HermiteCable_Dyn_Set_VIV @@ -1257,18 +1350,25 @@ SUBROUTINE clear_viv(model) model%viv_ms_next, model%ws_recovery_viv_phi, & model%ws_recovery_viv_ms, model%snap_viv_phi, model%snap_viv_ms, & model%viv_node) + IF (ALLOCATED(model%vil_k)) DEALLOCATE (model%vil_cx, model%vil_k, model%vil_alpha, model%vil_phi, & + model%vil_phi_eval, model%vil_rate, model%vil_ms, model%vil_ms_next, & + model%ws_recovery_vil_phi, model%ws_recovery_vil_ms, & + model%snap_vil_phi, model%snap_vil_ms, model%vil_node) model%has_viv = .FALSE. + model%has_viv_il = .FALSE. model%viv_tw = CD_ZERO END SUBROUTINE clear_viv SUBROUTINE viv_drag_terms(model) !! The VIV quantities taken from the drag configuration, set with VIV and again whenever the !! drag is reconfigured: the lift scale viv_k = 1/2 rho D Cl of each element and the node - !! diameter viv_dn, the length-weighted average over the node's lifting elements. + !! diameter viv_dn, the length-weighted average over the node's lifting elements, and the + !! in-line scale vil_k = 1/2 rho D C_vx. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model INTEGER :: e, k REAL(wp) :: wsum model%viv_k = 0.5_wp*model%rho_w*model%diam*model%viv_cl + IF (model%has_viv_il) model%vil_k = 0.5_wp*model%rho_w*model%diam*model%vil_cx model%viv_dn = CD_ZERO DO k = 1, model%nn IF (.NOT. model%viv_node(k)) CYCLE @@ -1282,20 +1382,27 @@ SUBROUTINE viv_drag_terms(model) END DO END SUBROUTINE viv_drag_terms - SUBROUTINE viv_node_motion(model, k, yd, ydd, un, ok) + SUBROUTINE viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) !! Cross-flow velocity and acceleration of node k at the committed state, along its own - !! tangent (the slope DOFs), in the flow the drag sees there (current plus a held field). + !! tangent (the slope DOFs), in the flow the drag sees there (current plus a held field); + !! optionally (both or neither) the in-line ones. TYPE(CD_HermiteCableDynType), INTENT(IN) :: model INTEGER, INTENT(IN) :: k REAL(wp), INTENT(OUT) :: yd, ydd, un LOGICAL, INTENT(OUT) :: ok + REAL(wp), INTENT(OUT), OPTIONAL :: xd, xdd REAL(wp) :: uu(3) INTEGER :: i0 i0 = 6*(k - 1) uu = model%current IF (model%has_held_field) uu = uu + model%hf_u(:, k) - CALL CD_VIV_Crossflow_Along(model%q(i0 + 4:i0 + 6), model%v(i0 + 1:i0 + 3), model%a(i0 + 1:i0 + 3), uu, & - yd, ydd, un, ok) + IF (PRESENT(xd)) THEN + CALL CD_VIV_Crossflow_Along(model%q(i0 + 4:i0 + 6), model%v(i0 + 1:i0 + 3), model%a(i0 + 1:i0 + 3), uu, & + yd, ydd, un, ok, xd, xdd) + ELSE + CALL CD_VIV_Crossflow_Along(model%q(i0 + 4:i0 + 6), model%v(i0 + 1:i0 + 3), model%a(i0 + 1:i0 + 3), uu, & + yd, ydd, un, ok) + END IF END SUBROUTINE viv_node_motion SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) @@ -1309,7 +1416,7 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: k - REAL(wp) :: w, frac, yd, ydd, un + REAL(wp) :: w, frac, yd, ydd, un, xd, xdd LOGICAL :: ok ErrStat = CD_HCDYN_OK; ErrMsg = '' IF (.NOT. (model%viv_tw > CD_ZERO)) model%viv_tw = REAL(CD_VIV_NM, wp)*dt @@ -1319,9 +1426,14 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) model%viv_rate = CD_ZERO model%viv_ms_next = model%viv_ms model%viv_phi_eval = model%viv_phi + IF (model%has_viv_il) THEN + model%vil_rate = CD_ZERO + model%vil_ms_next = model%vil_ms + model%vil_phi_eval = model%vil_phi + END IF DO k = 1, model%nn IF (.NOT. model%viv_node(k)) CYCLE - CALL viv_node_motion(model, k, yd, ydd, un, ok) + CALL viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) IF (.NOT. ok) THEN ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'VIV phase: degenerate node tangent'; RETURN END IF @@ -1331,6 +1443,13 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) model%viv_phi(k), un, model%viv_dn(k), model%viv_cf(k), & model%viv_df(k), phi_rest=model%viv_phi_rest) model%viv_phi_eval(k) = model%viv_phi(k) + frac*dt*model%viv_rate(k) + IF (.NOT. model%has_viv_il) CYCLE + IF (.NOT. model%vil_node(k)) CYCLE + model%vil_ms_next(1, k) = CD_VIV_Mean_Square(model%vil_ms(1, k), xd, w) + model%vil_ms_next(2, k) = CD_VIV_Mean_Square(model%vil_ms(2, k), xdd, w) + model%vil_rate(k) = CD_VIV_Inline_Phase_Rate(xd, xdd, model%vil_ms_next(1, k), model%vil_ms_next(2, k), & + model%vil_phi(k), model%viv_rate(k), model%vil_alpha(k)) + model%vil_phi_eval(k) = model%vil_phi(k) + frac*dt*model%vil_rate(k) END DO END SUBROUTINE viv_step_begin @@ -1344,29 +1463,47 @@ SUBROUTINE viv_step_end(model, dt) TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: dt INTEGER :: k - REAL(wp) :: w, yd, ydd, un, ms1, ms2, rate_end - LOGICAL :: ok + REAL(wp) :: w, yd, ydd, un, ms1, ms2, rate_end, xd, xdd, rate_end_x + LOGICAL :: ok, il w = MIN(CD_ONE, dt/model%viv_tw) DO k = 1, model%nn IF (.NOT. model%viv_node(k)) CYCLE + il = .FALSE. + IF (model%has_viv_il) il = model%vil_node(k) rate_end = model%viv_rate(k) - CALL viv_node_motion(model, k, yd, ydd, un, ok) + rate_end_x = CD_ZERO + IF (il) rate_end_x = model%vil_rate(k) + CALL viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) IF (ok) THEN ms1 = CD_VIV_Mean_Square(model%viv_ms_next(1, k), yd, w) ms2 = CD_VIV_Mean_Square(model%viv_ms_next(2, k), ydd, w) rate_end = CD_VIV_Phase_Rate(yd, ydd, ms1, ms2, model%viv_phi(k) + dt*model%viv_rate(k), un, & model%viv_dn(k), model%viv_cf(k), model%viv_df(k), phi_rest=model%viv_phi_rest) IF (.NOT. CD_Is_Finite(rate_end)) rate_end = model%viv_rate(k) + IF (il) THEN + ! the in-line rate at the end state is slaved to the end cross-flow rate (Eq. 6) + ms1 = CD_VIV_Mean_Square(model%vil_ms_next(1, k), xd, w) + ms2 = CD_VIV_Mean_Square(model%vil_ms_next(2, k), xdd, w) + rate_end_x = CD_VIV_Inline_Phase_Rate(xd, xdd, ms1, ms2, model%vil_phi(k) + dt*model%vil_rate(k), & + rate_end, model%vil_alpha(k)) + IF (.NOT. CD_Is_Finite(rate_end_x)) rate_end_x = model%vil_rate(k) + END IF END IF model%viv_phi(k) = CD_VIV_Wrap_Phase(model%viv_phi(k) + 0.5_wp*dt*(model%viv_rate(k) + rate_end)) + IF (il) model%vil_phi(k) = CD_VIV_Wrap_Phase(model%vil_phi(k) + 0.5_wp*dt*(model%vil_rate(k) + rate_end_x)) END DO model%viv_ms = model%viv_ms_next model%viv_phi_eval = model%viv_phi + IF (model%has_viv_il) THEN + model%vil_ms = model%vil_ms_next + model%vil_phi_eval = model%vil_phi + END IF END SUBROUTINE viv_step_end SUBROUTINE viv_element_lift(model, q_cfg, v_cfg, e, flift, ErrStat, ErrMsg, djq, djv) !! The VIV lift load of element e at the phase viv_phi_eval in the flow the drag sees (current, - !! held field), with its Jacobians djq, djv (both or neither). + !! held field), with its Jacobians djq, djv (both or neither); with in-line VIV it includes the + !! in-line shedding force at the phase vil_phi_eval. TYPE(CD_HermiteCableDynType), INTENT(IN) :: model REAL(wp), INTENT(IN) :: q_cfg(:), v_cfg(:) INTEGER, INTENT(IN) :: e @@ -1374,7 +1511,8 @@ SUBROUTINE viv_element_lift(model, q_cfg, v_cfg, e, flift, ErrStat, ErrMsg, djq, INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg REAL(wp), INTENT(OUT), OPTIONAL :: djq(12, 12), djv(12, 12) - REAL(wp) :: qe(12), ve(12), uu(3), wl, kn(2) + REAL(wp) :: qe(12), ve(12), uu(3), wl, kn(2), knx(2) + LOGICAL :: il flift = CD_ZERO IF (PRESENT(djq)) THEN djq = CD_ZERO; djv = CD_ZERO @@ -1390,7 +1528,18 @@ SUBROUTINE viv_element_lift(model, q_cfg, v_cfg, e, flift, ErrStat, ErrMsg, djq, wl = 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)) END IF kn = model%viv_k(e)*[COS(model%viv_phi_eval(e)), COS(model%viv_phi_eval(e + 1))] - IF (PRESENT(djq)) THEN + il = .FALSE. + IF (model%has_viv_il) il = model%vil_k(e) > CD_ZERO + IF (il) THEN + knx = model%vil_k(e)*[COS(model%vil_phi_eval(e)), COS(model%vil_phi_eval(e + 1))] + IF (PRESENT(djq)) THEN + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, model%l0(e), uu, wl, kn, flift, djq, djv, ErrStat, ErrMsg, & + kx_node=knx) + ELSE + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, model%l0(e), uu, wl, kn, flift, ErrStat=ErrStat, & + ErrMsg=ErrMsg, kx_node=knx) + END IF + ELSE IF (PRESENT(djq)) THEN CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, model%l0(e), uu, wl, kn, flift, djq, djv, ErrStat, ErrMsg) ELSE CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, model%l0(e), uu, wl, kn, flift, ErrStat=ErrStat, & @@ -1401,7 +1550,8 @@ END SUBROUTINE viv_element_lift SUBROUTINE CD_HermiteCable_Dyn_VIV_Node_Lift(model, lift, ErrStat, ErrMsg) !! The VIV lift on every node at the committed state [N] (3, nn), in the model frame: the !! translational components of the elements' consistent lift loads, summed at the nodes - !! (MoorDyn's nodal lift on a lumped line). Zero on a cable without VIV. + !! (MoorDyn's nodal lift on a lumped line), with the in-line shedding force where it is on. + !! Zero on a cable without VIV. TYPE(CD_HermiteCableDynType), INTENT(IN) :: model REAL(wp), INTENT(OUT) :: lift(:, :) INTEGER, INTENT(OUT) :: ErrStat @@ -3725,6 +3875,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Step(model, dt, max_iter, tol, ErrStat, ErrMsg, i model%tors_use_step = .FALSE. ! every evaluation outside a step takes the committed VIV phase IF (model%has_viv) model%viv_phi_eval = model%viv_phi + IF (model%has_viv_il) model%vil_phi_eval = model%vil_phi END SUBROUTINE CD_HermiteCable_Dyn_Step SUBROUTINE CD_HermiteCable_Dyn_Set_Torsion_Drive(model, ends, phi, ErrStat, ErrMsg) @@ -5582,6 +5733,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Step_Recovering(model, dt, max_iter, tol, ErrStat model%ws_recovery_viv_phi = model%viv_phi model%ws_recovery_viv_ms = model%viv_ms END IF + IF (model%has_viv_il) THEN + model%ws_recovery_vil_phi = model%vil_phi + model%ws_recovery_vil_ms = model%vil_ms + END IF IF (model%has_ctrl) THEN model%ws_recovery_l0_c = model%l0_c model%ws_recovery_l0_dot_c = model%l0_dot_c @@ -5679,6 +5834,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Step_Recovering(model, dt, max_iter, tol, ErrStat model%viv_phi = model%ws_recovery_viv_phi; model%viv_ms = model%ws_recovery_viv_ms model%viv_phi_eval = model%viv_phi END IF + IF (model%has_viv_il) THEN + model%vil_phi = model%ws_recovery_vil_phi; model%vil_ms = model%ws_recovery_vil_ms + model%vil_phi_eval = model%vil_phi + END IF IF (model%has_ctrl) model%l0_c = model%ws_recovery_l0_c IF (model%has_ctrl) model%l0_dot_c = model%ws_recovery_l0_dot_c model%na_steps_done = na_steps_save; model%na_iter_sum = na_sum_save; model%na_mn_active = na_mn_save @@ -5759,6 +5918,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Step_Recovering(model, dt, max_iter, tol, ErrStat model%viv_phi = model%ws_recovery_viv_phi; model%viv_ms = model%ws_recovery_viv_ms model%viv_phi_eval = model%viv_phi END IF + IF (model%has_viv_il) THEN + model%vil_phi = model%ws_recovery_vil_phi; model%vil_ms = model%ws_recovery_vil_ms + model%vil_phi_eval = model%vil_phi + END IF IF (model%has_ctrl) model%l0_c = model%ws_recovery_l0_c IF (model%has_ctrl) model%l0_dot_c = model%ws_recovery_l0_dot_c model%na_steps_done = na_steps_save @@ -5809,6 +5972,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Step_Recovering(model, dt, max_iter, tol, ErrStat model%viv_phi = model%ws_recovery_viv_phi; model%viv_ms = model%ws_recovery_viv_ms model%viv_phi_eval = model%viv_phi END IF + IF (model%has_viv_il) THEN + model%vil_phi = model%ws_recovery_vil_phi; model%vil_ms = model%ws_recovery_vil_ms + model%vil_phi_eval = model%vil_phi + END IF IF (model%has_ctrl) model%l0_c = model%ws_recovery_l0_c IF (model%has_ctrl) model%l0_dot_c = model%ws_recovery_l0_dot_c model%na_steps_done = na_steps_save; model%na_iter_sum = na_sum_save; model%na_mn_active = na_mn_save @@ -8391,6 +8558,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Snapshot(model, ErrStat, ErrMsg) model%snap_viv_phi = model%viv_phi model%snap_viv_ms = model%viv_ms END IF + IF (model%has_viv_il) THEN + model%snap_vil_phi = model%vil_phi + model%snap_vil_ms = model%vil_ms + END IF ! the cached committed force goes with the state it describes (see fc_clears) model%snap_fc_valid = model%fc_valid .AND. ALLOCATED(model%fc_R) model%snap_fc_clears = model%fc_clears @@ -8473,6 +8644,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Restore(model, ErrStat, ErrMsg) model%viv_phi = model%snap_viv_phi; model%viv_ms = model%snap_viv_ms model%viv_phi_eval = model%viv_phi END IF + IF (model%has_viv_il) THEN + model%vil_phi = model%snap_vil_phi; model%vil_ms = model%snap_vil_ms + model%vil_phi_eval = model%vil_phi + END IF model%na_steps_done = model%snap_na_steps_done model%na_iter_sum = model%snap_na_iter_sum model%na_mn_active = model%snap_na_mn_active @@ -11100,21 +11275,24 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia END SUBROUTINE CD_HermiteCable_Drag_Element SUBROUTINE CD_HermiteCable_VIV_Lift_Element(qe, ve, l0, fluid, waterline_z, k_node, flift, djq, djv, & - ErrStat, ErrMsg) + ErrStat, ErrMsg, kx_node) !! Consistent Gauss-integrated cross-flow VIV lift on one cubic-Hermite element: the load !! integral N^T f ds of the per-length lift f = k(xi) U (t x v_r) (CD_VIV_Lift_Per_Length), !! with k = 1/2 rho D Cl cos(phi) interpolated linearly between the element's end nodes !! (k_node), and its force Jacobians djq = d flift/d qe, djv = d flift/d ve (both or neither). !! The interpolation, measure and wet/dry culling are the drag element's (still waterline). + !! kx_node (optional) adds the in-line shedding force k_x U v_n (CD_VIV_Inline_Per_Length), + !! k_x = 1/2 rho D C_vx cos(phi_x) interpolated the same way. REAL(wp), INTENT(IN) :: qe(12), ve(12), l0, fluid(3), waterline_z, k_node(2) REAL(wp), INTENT(OUT) :: flift(12) REAL(wp), INTENT(OUT), OPTIONAL :: djq(12, 12), djv(12, 12) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg + REAL(wp), INTENT(IN), OPTIONAL :: kx_node(2) INTEGER, PARAMETER :: NGP = 3 REAL(wp), PARAMETER :: G3 = 0.7745966692414834_wp ! sqrt(3/5) REAL(wp) :: gp(NGP), gw(NGP), H(4), dH(4), rpos(3), vvel(3), rp(3), speed, tangent(3), fpl(3) - REAL(wp) :: jrel(3, 3), jtan(3, 3), scale, kg + REAL(wp) :: jrel(3, 3), jtan(3, 3), scale, kg, fx(3), jrx(3, 3), jtx(3, 3) LOGICAL :: want_jac, ok INTEGER :: g, s, c, sp, cp, a, b @@ -11144,6 +11322,17 @@ SUBROUTINE CD_HermiteCable_VIV_Lift_Element(qe, ve, l0, fluid, waterline_z, k_no ErrStat = CD_HCDYN_NOCONVERGE ErrMsg = 'CD_HermiteCable_VIV_Lift_Element: degenerate centreline (|dr/dxi| ~ 0)'; RETURN END IF + IF (PRESENT(kx_node)) THEN + kg = (CD_ONE - gp(g))*kx_node(1) + gp(g)*kx_node(2) + IF (want_jac) THEN + CALL CD_VIV_Inline_Per_Length(fluid - vvel, rp, kg, fx, ok, jrx, jtx) + jrel = jrel + jrx + jtan = jtan + jtx + ELSE + CALL CD_VIV_Inline_Per_Length(fluid - vvel, rp, kg, fx, ok) + END IF + fpl = fpl + fx + END IF speed = SQRT(rp(1)**2 + rp(2)**2 + rp(3)**2) tangent = rp/speed scale = gw(g)*speed diff --git a/src/CableDyn_OpenFAST_HermiteFMF.f90 b/src/CableDyn_OpenFAST_HermiteFMF.f90 index 39a8447f..9c0ab817 100644 --- a/src/CableDyn_OpenFAST_HermiteFMF.f90 +++ b/src/CableDyn_OpenFAST_HermiteFMF.f90 @@ -2249,13 +2249,15 @@ INTEGER FUNCTION CD_HFMF_ForceMirrorSize(self) RESULT(n) END FUNCTION CD_HFMF_ForceMirrorSize INTEGER FUNCTION CD_HFMF_VIVMirrorSize(self) RESULT(n) - !! Mirror slots of the cross-flow VIV state, before the torsion block: the shedding phase + !! Mirror slots of the VIV state, before the torsion block: the cross-flow shedding phase !! per node, the running mean squares of the cross-flow velocity and acceleration per node - !! (interleaved) and the averaging time (3 nn + 1 values); zero without VIV. + !! (interleaved) and the averaging time (3 nn + 1 values); with in-line VIV then the in-line + !! phase and mean squares (3 nn more); zero without VIV. TYPE(CD_HFMF_ModuleType), INTENT(IN) :: self n = 0 IF (.NOT. self%initialized) RETURN IF (self%line%has_viv) n = 3*self%line%nn + 1 + IF (self%line%has_viv_il) n = n + 3*self%line%nn END FUNCTION CD_HFMF_VIVMirrorSize INTEGER FUNCTION CD_HFMF_FrictionMirrorSize(self) RESULT(n) @@ -2338,6 +2340,11 @@ SUBROUTINE CD_HFMF_PackMirror(self, buf, ErrStat, ErrMsg) buf(k + 3*self%line%nn + 1) = self%line%viv_tw k = k + 3*self%line%nn + 1 END IF + IF (self%line%has_viv_il) THEN + buf(k + 1:k + self%line%nn) = self%line%vil_phi + buf(k + self%line%nn + 1:k + 3*self%line%nn) = RESHAPE(self%line%vil_ms, [2*self%line%nn]) + k = k + 3*self%line%nn + END IF IF (self%line%torsion%active) THEN buf(k + 1) = self%line%torsion%theta buf(k + 2) = self%line%torsion%phi @@ -2427,6 +2434,14 @@ SUBROUTINE CD_HFMF_UnpackMirror(self, buf, t, ErrStat, ErrMsg) RETURN END IF END IF + IF (self%line%has_viv_il) THEN + kb = SIZE(buf) - CD_HFMF_TorsionMirrorSize(self) - 2*self%line%nn + IF (ANY(buf(kb + 1:kb + 2*self%line%nn) < CD_ZERO)) THEN + ErrStat = CD_HFMF_BADINPUT + ErrMsg = 'CD_HFMF_UnpackMirror: the in-line VIV mean squares must be non-negative' + RETURN + END IF + END IF k = 0 DO i = 1, self%line%ndof IF (self%line%freemask(i)) THEN @@ -2497,6 +2512,15 @@ SUBROUTINE CD_HFMF_UnpackMirror(self, buf, t, ErrStat, ErrMsg) self%line%ws_recovery_viv_ms = self%line%viv_ms k = k + 3*self%line%nn + 1 END IF + IF (self%line%has_viv_il) THEN + self%line%vil_phi = buf(k + 1:k + self%line%nn) + self%line%vil_ms = RESHAPE(buf(k + self%line%nn + 1:k + 3*self%line%nn), [2, self%line%nn]) + self%line%vil_phi_eval = self%line%vil_phi + self%line%vil_ms_next = self%line%vil_ms + self%line%ws_recovery_vil_phi = self%line%vil_phi + self%line%ws_recovery_vil_ms = self%line%vil_ms + k = k + 3*self%line%nn + END IF IF (self%line%torsion%active) THEN self%line%torsion%theta = buf(k + 1) self%line%torsion%phi = buf(k + 2) diff --git a/src/CableDyn_VIV.f90 b/src/CableDyn_VIV.f90 index 94a60ae0..966d9cd2 100644 --- a/src/CableDyn_VIV.f90 +++ b/src/CableDyn_VIV.f90 @@ -30,6 +30,18 @@ MODULE CableDyn_VIV !! (w_e the submerged fraction of element e): per unit length 1/2 rho D Cl U^2 cos(phi) !! along e, exactly MoorDyn's Lf = 1/2 rho_w d |Vp| Cl cos(phi) (q x Vp) l_node. !! + !! In-line VIV (Ulveseter, Thorsen, Saevik and Larsen, Mar. Struct. 60, 2018, 241-260, + !! Eq. 1, 2, 6 and 7): a second shedding force along the relative normal flow, + !! + !! F_x = C_x cos(phi_x) U v_n , per unit length 1/2 rho D C_vx U v_n cos(phi_x) + !! + !! whose phase is slaved to twice the cross-flow shedding rate with a free band alpha, + !! + !! d phi_x/dt = 2 (d phi/dt) [1 + alpha sin(phi_xd - phi_x)] + !! + !! phi_xd the phase of the in-line velocity x' = r'.v_n/U from x', x'' normalised by their + !! running RMS values, as phi_y. + !! !! Load convention (CableDyn_Hydro, CD_Cable_Dynamic_Load_Proc): `force` is the external !! load; the Jacobians are residual contributions, -dF/d(node velocity) and !! -dF/d(neighbour positions) through the node tangent. The wetted-fraction factor in C is @@ -46,6 +58,9 @@ MODULE CableDyn_VIV PUBLIC :: CD_VIV_Phase_Rate PUBLIC :: CD_VIV_Mean_Square PUBLIC :: CD_VIV_Wrap_Phase + PUBLIC :: CD_VIV_Node_Inline + PUBLIC :: CD_VIV_Inline_Per_Length + PUBLIC :: CD_VIV_Inline_Phase_Rate !> MoorDyn's running-RMS window in time steps (Line%n_m): each step updates the stored !> mean square as ((n_m - 1) old + new) / n_m. @@ -55,6 +70,8 @@ MODULE CableDyn_VIV REAL(wp), PARAMETER, PUBLIC :: CD_VIV_DEFAULT_DF = 0.08_wp REAL(wp), PARAMETER, PUBLIC :: CD_VIV_DEFAULT_CF = 0.18_wp REAL(wp), PARAMETER, PUBLIC :: CD_VIV_TWO_PI = 6.283185307179586476925286766559005768394_wp + !> The in-line frequency band alpha of Ulveseter et al. (2018, Table 3) and Thorsen et al. + REAL(wp), PARAMETER, PUBLIC :: CD_VIV_DEFAULT_IL_ALPHA = 0.15_wp !> Chord below which a node tangent is undefined (a collapsed pair of neighbours). REAL(wp), PARAMETER :: TINY_CHORD = 1.0e-12_wp @@ -155,23 +172,33 @@ PURE SUBROUTINE CD_VIV_Node_Lift(r_prev, r_next, rd, u, coef, phi, force, ok, ja jac_prev = -jac_next END SUBROUTINE CD_VIV_Node_Lift - PURE SUBROUTINE CD_VIV_Crossflow_Motion(r_prev, r_next, rd, rdd, u, yd, ydd, un, ok) + PURE SUBROUTINE CD_VIV_Crossflow_Motion(r_prev, r_next, rd, rdd, u, yd, ydd, un, ok, xd, xdd) !! Cross-flow velocity y' and acceleration y'' of a node along e = q x v_n / U, and the !! normal relative flow speed U. Both are zero when there is no normal flow (MoorDyn's - !! normalisation of a zero vector). + !! normalisation of a zero vector). Optionally (both or neither) the in-line velocity x' and + !! acceleration x'' along v_n/U, zero in the same cases. REAL(wp), INTENT(IN) :: r_prev(3), r_next(3), rd(3), rdd(3), u(3) REAL(wp), INTENT(OUT) :: yd, ydd, un LOGICAL, INTENT(OUT) :: ok + REAL(wp), INTENT(OUT), OPTIONAL :: xd, xdd REAL(wp) :: q(3), chord, vr(3), vn(3), e(3) yd = CD_ZERO ydd = CD_ZERO + IF (PRESENT(xd)) THEN + xd = CD_ZERO + xdd = CD_ZERO + END IF CALL node_frame(r_prev, r_next, rd, u, q, chord, vr, vn, un, ok) IF (.NOT. ok) RETURN IF (.NOT. (un > CD_ZERO)) RETURN e = cross3(q, vn)/un yd = rd(1)*e(1) + rd(2)*e(2) + rd(3)*e(3) ydd = rdd(1)*e(1) + rdd(2)*e(2) + rdd(3)*e(3) + IF (PRESENT(xd)) THEN + xd = (rd(1)*vn(1) + rd(2)*vn(2) + rd(3)*vn(3))/un + xdd = (rdd(1)*vn(1) + rdd(2)*vn(2) + rdd(3)*vn(3))/un + END IF END SUBROUTINE CD_VIV_Crossflow_Motion PURE SUBROUTINE CD_VIV_Lift_Per_Length(urel, rp, k, f, ok, jrel, jtan) @@ -237,17 +264,23 @@ PURE SUBROUTINE CD_VIV_Lift_Per_Length(urel, rp, k, f, ok, jrel, jtan) jtan = MATMUL(dfdt, proj) END SUBROUTINE CD_VIV_Lift_Per_Length - PURE SUBROUTINE CD_VIV_Crossflow_Along(tdir, rd, rdd, u, yd, ydd, un, ok) + PURE SUBROUTINE CD_VIV_Crossflow_Along(tdir, rd, rdd, u, yd, ydd, un, ok, xd, xdd) !! CD_VIV_Crossflow_Motion with the line tangent given directly (tdir, any length: the - !! slope DOFs of a finite-EI node) instead of the chord of two neighbours. + !! slope DOFs of a finite-EI node) instead of the chord of two neighbours, with the same + !! optional in-line velocity and acceleration (both or neither). REAL(wp), INTENT(IN) :: tdir(3), rd(3), rdd(3), u(3) REAL(wp), INTENT(OUT) :: yd, ydd, un LOGICAL, INTENT(OUT) :: ok + REAL(wp), INTENT(OUT), OPTIONAL :: xd, xdd REAL(wp) :: speed, t(3), vr(3), vn(3), e(3) yd = CD_ZERO ydd = CD_ZERO un = CD_ZERO + IF (PRESENT(xd)) THEN + xd = CD_ZERO + xdd = CD_ZERO + END IF speed = SQRT(tdir(1)*tdir(1) + tdir(2)*tdir(2) + tdir(3)*tdir(3)) ok = speed > TINY_CHORD IF (.NOT. ok) RETURN @@ -259,6 +292,10 @@ PURE SUBROUTINE CD_VIV_Crossflow_Along(tdir, rd, rdd, u, yd, ydd, un, ok) e = cross3(t, vn)/un yd = rd(1)*e(1) + rd(2)*e(2) + rd(3)*e(3) ydd = rdd(1)*e(1) + rdd(2)*e(2) + rdd(3)*e(3) + IF (PRESENT(xd)) THEN + xd = (rd(1)*vn(1) + rd(2)*vn(2) + rd(3)*vn(3))/un + xdd = (rdd(1)*vn(1) + rdd(2)*vn(2) + rdd(3)*vn(3))/un + END IF END SUBROUTINE CD_VIV_Crossflow_Along ELEMENTAL REAL(wp) FUNCTION CD_VIV_Mean_Square(ms_old, sample, weight) RESULT(ms) @@ -276,20 +313,131 @@ PURE REAL(wp) FUNCTION CD_VIV_Phase_Rate(yd, ydd, ms_yd, ms_ydd, phi, un, diamet !! tangent runs against MoorDyn's, which turns the cross-flow axis and so phi_y half a turn. REAL(wp), INTENT(IN) :: yd, ydd, ms_yd, ms_ydd, phi, un, diameter, cf, df REAL(wp), INTENT(IN), OPTIONAL :: phi_rest - REAL(wp) :: phi_y + REAL(wp) :: phi_y, rest - IF (.NOT. (ABS(yd) > CD_ZERO .OR. ABS(ydd) > CD_ZERO)) THEN - phi_y = CD_ZERO - IF (PRESENT(phi_rest)) phi_y = phi_rest - ELSE IF (ms_yd > CD_ZERO .AND. ms_ydd > CD_ZERO) THEN - phi_y = ATAN2(-ydd/SQRT(ms_ydd), yd/SQRT(ms_yd)) - ELSE - phi_y = ATAN2(-ydd, yd) - END IF - IF (phi_y < CD_ZERO) phi_y = phi_y + CD_VIV_TWO_PI + rest = CD_ZERO + IF (PRESENT(phi_rest)) rest = phi_rest + phi_y = motion_phase(yd, ydd, ms_yd, ms_ydd, rest) rate = CD_VIV_TWO_PI*(cf + df*SIN(phi_y - phi))*un/diameter END FUNCTION CD_VIV_Phase_Rate + PURE REAL(wp) FUNCTION CD_VIV_Inline_Phase_Rate(xd, xdd, ms_xd, ms_xdd, phi_x, rate_y, alpha) RESULT(rate) + !! Rate of the in-line shedding phase, d phi_x/dt = 2 rate_y [1 + alpha sin(phi_xd - phi_x)] + !! (Ulveseter et al. 2018, Eq. 6), rate_y the cross-flow shedding rate (CD_VIV_Phase_Rate) and + !! phi_xd the phase of the in-line velocity from x', x'' as the cross-flow one; a node with no + !! in-line motion takes phi_xd = 0. + REAL(wp), INTENT(IN) :: xd, xdd, ms_xd, ms_xdd, phi_x, rate_y, alpha + rate = 2.0_wp*rate_y*(CD_ONE + alpha*SIN(motion_phase(xd, xdd, ms_xd, ms_xdd, CD_ZERO) - phi_x)) + END FUNCTION CD_VIV_Inline_Phase_Rate + + PURE REAL(wp) FUNCTION motion_phase(sd, sdd, ms_sd, ms_sdd, rest) RESULT(ph) + !! The phase of a velocity in [0, 2 pi), atan2(-s''/rms(s''), s'/rms(s')), unnormalised while + !! either mean square is still zero (MoorDyn), and rest for a node with no motion. + REAL(wp), INTENT(IN) :: sd, sdd, ms_sd, ms_sdd, rest + IF (.NOT. (ABS(sd) > CD_ZERO .OR. ABS(sdd) > CD_ZERO)) THEN + ph = rest + ELSE IF (ms_sd > CD_ZERO .AND. ms_sdd > CD_ZERO) THEN + ph = ATAN2(-sdd/SQRT(ms_sdd), sd/SQRT(ms_sd)) + ELSE + ph = ATAN2(-sdd, sd) + END IF + IF (ph < CD_ZERO) ph = ph + CD_VIV_TWO_PI + END FUNCTION motion_phase + + PURE SUBROUTINE CD_VIV_Node_Inline(r_prev, r_next, rd, u, coef, phi_x, force, ok, jac_v, jac_prev, jac_next) + !! In-line shedding force on one node, F = coef cos(phi_x) U v_n, and optionally its residual + !! Jacobians (all three present or none) in CD_VIV_Node_Lift's convention: jac_v = -dF/dr', + !! jac_prev = -dF/dr_prev, jac_next = -dF/dr_next. ok = .FALSE. (and F = 0) when the two + !! neighbours coincide. + REAL(wp), INTENT(IN) :: r_prev(3), r_next(3), rd(3), u(3), coef, phi_x + REAL(wp), INTENT(OUT) :: force(3) + LOGICAL, INTENT(OUT) :: ok + REAL(wp), INTENT(OUT), OPTIONAL :: jac_v(3, 3), jac_prev(3, 3), jac_next(3, 3) + REAL(wp) :: q(3), chord, vr(3), vn(3), un, s, dfdv(3, 3), dfdq(3, 3), proj(3, 3) + INTEGER :: i, j + + force = CD_ZERO + IF (PRESENT(jac_v)) THEN + jac_v = CD_ZERO + jac_prev = CD_ZERO + jac_next = CD_ZERO + END IF + CALL node_frame(r_prev, r_next, rd, u, q, chord, vr, vn, un, ok) + IF (.NOT. ok) RETURN + s = coef*COS(phi_x) + force = (s*un)*vn + IF (.NOT. PRESENT(jac_v)) RETURN + IF (.NOT. (un > CD_ZERO)) RETURN + ! dF/dv_r and dF/dq of F = s U v_n (inline_jacobians); dr' enters v_r with a minus sign + CALL inline_jacobians(s, q, vr, vn, un, dfdv, dfdq) + jac_v = dfdv + DO j = 1, 3 + DO i = 1, 3 + proj(i, j) = -q(i)*q(j)/chord + END DO + proj(j, j) = proj(j, j) + CD_ONE/chord + END DO + jac_next = -MATMUL(dfdq, proj) + jac_prev = -jac_next + END SUBROUTINE CD_VIV_Node_Inline + + PURE SUBROUTINE CD_VIV_Inline_Per_Length(urel, rp, k, f, ok, jrel, jtan) + !! In-line shedding force per unit length of a cable centreline point, f = k U v_n with + !! k = 1/2 rho D C_vx cos(phi_x), the unit tangent t = rp/|rp|, the relative flow v_r = urel, + !! its normal part v_n and speed U; optionally (both or neither) jrel = df/dv_r and + !! jtan = df/drp, as CD_VIV_Lift_Per_Length. ok = .FALSE. (and f = 0) for a degenerate + !! centreline; f and its derivatives vanish with the normal flow. + REAL(wp), INTENT(IN) :: urel(3), rp(3), k + REAL(wp), INTENT(OUT) :: f(3) + LOGICAL, INTENT(OUT) :: ok + REAL(wp), INTENT(OUT), OPTIONAL :: jrel(3, 3), jtan(3, 3) + REAL(wp) :: speed, t(3), vn(3), un, dfdt(3, 3), proj(3, 3) + INTEGER :: i, j + + f = CD_ZERO + IF (PRESENT(jrel)) THEN + jrel = CD_ZERO + jtan = CD_ZERO + END IF + speed = SQRT(rp(1)*rp(1) + rp(2)*rp(2) + rp(3)*rp(3)) + ok = speed > TINY_CHORD + IF (.NOT. ok) RETURN + t = rp/speed + vn = urel - (t(1)*urel(1) + t(2)*urel(2) + t(3)*urel(3))*t + un = SQRT(vn(1)*vn(1) + vn(2)*vn(2) + vn(3)*vn(3)) + f = (k*un)*vn + IF (.NOT. PRESENT(jrel)) RETURN + IF (.NOT. (un > CD_ZERO)) RETURN + CALL inline_jacobians(k, t, urel, vn, un, jrel, dfdt) + DO j = 1, 3 + DO i = 1, 3 + proj(i, j) = -t(i)*t(j)/speed + END DO + proj(j, j) = proj(j, j) + CD_ONE/speed + END DO + jtan = MATMUL(dfdt, proj) + END SUBROUTINE CD_VIV_Inline_Per_Length + + PURE SUBROUTINE inline_jacobians(s, t, vr, vn, un, dfdv, dfdt) + !! Derivatives of F = s U v_n, v_n = (I - t t^T) v_r, U = |v_n| > 0, with respect to the + !! relative flow and the unit tangent: dF/dv_r = s [v_n (x) v_n/U + U (I - t t^T)] and, with + !! alpha = t.v_r (dv_n/dt = -(alpha I + t (x) v_r), dU/dt = -alpha v_n/U as v_n.t = 0), + !! dF/dt = -s [alpha v_n (x) v_n/U + U (alpha I + t (x) v_r)]. + REAL(wp), INTENT(IN) :: s, t(3), vr(3), vn(3), un + REAL(wp), INTENT(OUT) :: dfdv(3, 3), dfdt(3, 3) + REAL(wp) :: alpha + INTEGER :: i, j + alpha = t(1)*vr(1) + t(2)*vr(2) + t(3)*vr(3) + DO j = 1, 3 + DO i = 1, 3 + dfdv(i, j) = s*(vn(i)*vn(j)/un - un*t(i)*t(j)) + dfdt(i, j) = -s*(alpha*vn(i)*vn(j)/un + un*t(i)*vr(j)) + END DO + dfdv(j, j) = dfdv(j, j) + s*un + dfdt(j, j) = dfdt(j, j) - s*un*alpha + END DO + END SUBROUTINE inline_jacobians + ELEMENTAL REAL(wp) FUNCTION CD_VIV_Wrap_Phase(phi) RESULT(wrapped) !! The phase mapped to [0, 2 pi); the model only uses cos(phi) and sin(. - phi). REAL(wp), INTENT(IN) :: phi diff --git a/tests/test_hermite_viv_inline.f90 b/tests/test_hermite_viv_inline.f90 new file mode 100644 index 00000000..63acaff8 --- /dev/null +++ b/tests/test_hermite_viv_inline.f90 @@ -0,0 +1,336 @@ +! File: tests/test_hermite_viv_inline.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_hermite_viv_inline + !! In-line VIV on the cubic-Hermite cable (CD_HermiteCable_Dyn_Set_VIV clx, il_alpha; Ulveseter, + !! Thorsen, Saevik and Larsen, Mar. Struct. 60, 2018): a second shedding force + !! 1/2 rho D C_vx cos(phi_x) U v_n along the relative normal flow, its phase slaved to twice the + !! cross-flow shedding rate, d phi_x/dt = 2 (d phi/dt) [1 + alpha sin(phi_xd - phi_x)]. + !! + !! The line is test_hermite_viv's: 100 m taut, pinned, 20 elements, D 0.1 m, in a 0.15 m/s + !! current along y, so the cross-flow lift acts along z and the in-line force along y. + !! + !! Gates: + !! * I1 the setter refuses clx without il_alpha, mismatched sizes, a negative clx, alpha >= 1 and + !! an in-line coefficient on an element without the cross-flow lift; an all-zero clx installs + !! no in-line state; the in-line phase starts at twice the cross-flow phase; + !! * I2 the element load: a straight element at rest across the current carries + !! U^2 l0 (k_x1 + k_x2)/2 along the flow; the in-line part adds to the cross-flow one; its + !! Jacobians match central differences on a curved, moving element; + !! * I3 an all-zero clx reproduces the cross-flow-only run bit for bit; + !! * I4 at rest the committed node load carries the in-line force along y, absent without it; + !! * I5 in lock-in the in-line response at the quarter span oscillates at twice the cross-flow + !! frequency of the mid span, and is larger than the cross-flow-only run's; + !! * I6 a snapshot taken mid-run and restored replays the following steps bit for bit (state and + !! both phases), and the recovering step equals the plain step. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & + CD_HermiteCable_Dyn_Set_Drag, CD_HermiteCable_Dyn_Set_AddedMass, & + CD_HermiteCable_Dyn_Set_VIV, CD_HermiteCable_Dyn_VIV_Node_Lift, & + CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Step_Recovering, & + CD_HermiteCable_Dyn_Snapshot, CD_HermiteCable_Dyn_Restore, & + CD_HermiteCable_Dyn_End, CD_HermiteCable_VIV_Lift_Element, CD_HCDYN_OK + IMPLICIT NONE + + REAL(wp), PARAMETER :: PI = 3.141592653589793_wp + REAL(wp), PARAMETER :: RHOW = 1025.0_wp, GACC = 9.80665_wp + REAL(wp), PARAMETER :: D = 0.1_wp, MLIN = 8.10_wp, EA = 5.0e7_wp, EI = 1.0_wp, TENS = 5.0e4_wp + REAL(wp), PARAMETER :: SPAN = 100.0_wp, U = 0.15_wp, DT = 0.02_wp, CVX = 0.85_wp, ALPHA = 0.15_wp + INTEGER, PARAMETER :: NE = 20 + + TYPE(CD_HermiteCableDynType) :: model, twin + REAL(wp), ALLOCATABLE :: cl(:), cf(:), df(:), clx(:), al(:), q_ref(:, :), phi_ref(:, :), phx_ref(:, :) + REAL(wp) :: lift(3, NE + 1) + INTEGER :: es, nfail, k, mid, quarter + CHARACTER(1024) :: em + + nfail = 0 + mid = 6*(NE/2) ! base index of the mid-span node + quarter = 6*(NE/4) ! and of the quarter-span node + ALLOCATE (cl(NE), cf(NE), df(NE), clx(NE), al(NE)) + cl = 0.8_wp; cf = 0.18_wp; df = 0.08_wp; clx = CVX; al = ALPHA + + ! ---- I1 refusals and the start ---- + CALL build(model) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=clx) + CALL require(es /= CD_HCDYN_OK, 'I1: clx without il_alpha is refused') + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=clx(1:NE - 1), il_alpha=al(1:NE - 1)) + CALL require(es /= CD_HCDYN_OK, 'I1: mismatched in-line arrays are refused') + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=-clx, il_alpha=al) + CALL require(es /= CD_HCDYN_OK, 'I1: a negative clx is refused') + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=al + 1.0_wp) + CALL require(es /= CD_HCDYN_OK, 'I1: alpha >= 1 is refused') + BLOCK + REAL(wp) :: cl2(NE) + cl2 = cl + cl2(3) = 0.0_wp + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl2, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=al) + CALL require(es /= CD_HCDYN_OK .AND. INDEX(em, 'cross-flow') > 0, & + 'I1: an in-line coefficient without the cross-flow lift is refused: '//TRIM(em)) + END BLOCK + CALL require(.NOT. model%has_viv .AND. .NOT. model%has_viv_il, 'I1: a refused call installs nothing') + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=0.0_wp*clx, il_alpha=al) + CALL require(es == CD_HCDYN_OK .AND. model%has_viv .AND. .NOT. model%has_viv_il, & + 'I1: an all-zero clx installs the cross-flow VIV only') + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=al) + CALL require(es == CD_HCDYN_OK .AND. model%has_viv_il, 'I1: in-line VIV installs: '//TRIM(em)) + CALL require(ALL(ABS(model%vil_phi - MODULO(2.0_wp*model%viv_phi, 2.0_wp*PI)) <= 1.0e-12_wp), & + 'I1: the in-line phase starts at twice the cross-flow phase') + CALL require(ALL(ABS(model%vil_k - 0.5_wp*RHOW*D*CVX) <= 1.0e-12_wp), 'I1: the in-line scale is 1/2 rho D C_vx') + + ! ---- I4 the committed node load at rest: in-line along y, cross-flow along z ---- + CALL CD_HermiteCable_Dyn_VIV_Node_Lift(model, lift, es, em) + CALL require(es == CD_HCDYN_OK, 'I4: node lift: '//TRIM(em)) + BLOCK + REAL(wp) :: lift0(3, NE + 1), ref_y, term, scale + INTEGER :: e + ! the in-line force of each (stretched) element at rest: U^2 (SPAN/NE) (k_x1 + k_x2)/2 along y; + ! the spread start phases nearly cancel in the sum, so the tolerance scales with its terms + ref_y = 0.0_wp + scale = 0.0_wp + DO e = 1, NE + term = U*U*(SPAN/REAL(NE, wp))*0.5_wp*model%vil_k(e)*(COS(model%vil_phi(e)) + COS(model%vil_phi(e + 1))) + ref_y = ref_y + term + scale = scale + ABS(term) + END DO + CALL require(ABS(SUM(lift(2, :)) - ref_y) <= 1.0e-12_wp*scale .AND. MAXVAL(ABS(lift(2, :))) > 1.0e-2_wp, & + 'I4: the node load carries the in-line force along the flow') + CALL twin_without_il(twin) + CALL CD_HermiteCable_Dyn_VIV_Node_Lift(twin, lift0, es, em) + CALL require(MAXVAL(ABS(lift0(2, :))) <= 1.0e-12_wp .AND. & + MAXVAL(ABS(lift0(3, :) - lift(3, :))) <= 1.0e-12_wp*MAXVAL(ABS(lift0(3, :))), & + 'I4: without in-line VIV no force along y, the same cross-flow lift') + CALL CD_HermiteCable_Dyn_End(twin) + END BLOCK + + ! ---- I2 element load and Jacobians ---- + CALL check_element() + + ! ---- I3 an all-zero clx is the cross-flow-only run ---- + CALL CD_HermiteCable_Dyn_End(model) + CALL build(model) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=0.0_wp*clx, il_alpha=al) + CALL twin_without_il(twin) + DO k = 1, 300 + CALL advance(model, 1, .FALSE.) + CALL advance(twin, 1, .FALSE.) + IF (ANY(model%q /= twin%q) .OR. ANY(model%viv_phi /= twin%viv_phi)) EXIT + END DO + CALL require(k > 300, 'I3: an all-zero clx reproduces the cross-flow-only run bit for bit') + CALL CD_HermiteCable_Dyn_End(model) + CALL CD_HermiteCable_Dyn_End(twin) + + ! ---- I5 lock-in: the in-line response at twice the cross-flow frequency ---- + BLOCK + REAL(wp) :: fy, fx, ax_il, ax_cf, ay + CALL build(model) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=al) + CALL run_response(model, fy, fx, ay, ax_il) + CALL CD_HermiteCable_Dyn_End(model) + CALL twin_without_il(twin) + CALL run_response(twin, fy, fx, ay, ax_cf) + CALL CD_HermiteCable_Dyn_End(twin) + CALL build(model) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=al) + CALL run_response(model, fy, fx, ay, ax_il) + WRITE (*, '(A,F7.4,A,F7.4,A,F7.3)') ' I5: cross-flow ', fy, ' Hz, in-line ', fx, ' Hz, ratio ', fx/fy + WRITE (*, '(A,F8.4,A,F8.4,A,F8.4)') ' I5: CF amplitude/D ', ay/D, ', IL amplitude/D ', ax_il/D, & + ', IL amplitude/D without in-line VIV ', ax_cf/D + CALL require(ay > 0.3_wp*D, 'I5: the line locks in cross-flow') + CALL require(ABS(fx/fy - 2.0_wp) <= 0.15_wp, 'I5: the in-line response is at twice the cross-flow frequency') + CALL require(ax_il > 2.0_wp*ax_cf, 'I5: the in-line force raises the in-line response') + END BLOCK + + ! ---- I6 snapshot replay and the recovering step ---- + CALL CD_HermiteCable_Dyn_Snapshot(model, es, em) + CALL require(es == CD_HCDYN_OK, 'I6: snapshot: '//TRIM(em)) + ALLOCATE (q_ref(SIZE(model%q), 100), phi_ref(NE + 1, 100), phx_ref(NE + 1, 100)) + DO k = 1, 100 + CALL advance(model, 1, .FALSE.) + q_ref(:, k) = model%q + phi_ref(:, k) = model%viv_phi + phx_ref(:, k) = model%vil_phi + END DO + CALL CD_HermiteCable_Dyn_Restore(model, es, em) + CALL require(es == CD_HCDYN_OK, 'I6: restore: '//TRIM(em)) + DO k = 1, 100 + CALL advance(model, 1, .FALSE.) + IF (ANY(model%q /= q_ref(:, k)) .OR. ANY(model%viv_phi /= phi_ref(:, k)) .OR. & + ANY(model%vil_phi /= phx_ref(:, k))) EXIT + END DO + CALL require(k > 100, 'I6: the restored snapshot replays the state and both phases bit for bit') + CALL CD_HermiteCable_Dyn_Restore(model, es, em) + DO k = 1, 100 + CALL advance(model, 1, .TRUE.) + IF (ANY(model%q /= q_ref(:, k)) .OR. ANY(model%viv_phi /= phi_ref(:, k)) .OR. & + ANY(model%vil_phi /= phx_ref(:, k))) EXIT + END DO + CALL require(k > 100, 'I6: the recovering step equals the plain step') + CALL CD_HermiteCable_Dyn_End(model) + + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: in-line VIV on the cubic-Hermite cable' + +CONTAINS + + SUBROUTINE build(m) + !! The pinned taut line along x, pretensioned through its unstretched length, with the current + !! along y (drag) and the normal added mass. + TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: m + REAL(wp) :: seed(6*(NE + 1)), l0(NE), eav(NE), eiv(NE), wv(NE), rhoa(NE), hd(NE), hn(NE), ht(NE) + INTEGER :: fixed(6), i + seed = 0.0_wp + DO i = 1, NE + 1 + seed(6*(i - 1) + 1) = SPAN*REAL(i - 1, wp)/REAL(NE, wp) + seed(6*(i - 1) + 3) = -50.0_wp + seed(6*(i - 1) + 4) = 1.0_wp + END DO + l0 = SPAN/REAL(NE, wp)/(1.0_wp + TENS/EA) + eav = EA; eiv = EI; rhoa = MLIN + wv = (MLIN - RHOW*0.25_wp*PI*D**2)*GACC + fixed = [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3] + CALL CD_HermiteCable_Dyn_Init(m, l0, eav, eiv, rhoa, wv, seed, fixed, -200.0_wp, 0.0_wp, 0.5_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'init: '//TRIM(em)) + hd = D; hn = 1.2_wp; ht = 0.0_wp + CALL CD_HermiteCable_Dyn_Set_Drag(m, RHOW, hd, hn, ht, 0.0_wp, [0.0_wp, U, 0.0_wp], es, em) + CALL require(es == CD_HCDYN_OK, 'drag: '//TRIM(em)) + hn = 1.0_wp + CALL CD_HermiteCable_Dyn_Set_AddedMass(m, RHOW, hd, hn, ht, 0.0_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'added mass: '//TRIM(em)) + END SUBROUTINE build + + SUBROUTINE twin_without_il(m) + !! The same line with the cross-flow VIV only. + TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: m + CALL build(m) + CALL CD_HermiteCable_Dyn_Set_VIV(m, cl, cf, df, 0.25_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'cross-flow VIV: '//TRIM(em)) + END SUBROUTINE twin_without_il + + SUBROUTINE advance(m, n, recovering) + TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: m + INTEGER, INTENT(IN) :: n + LOGICAL, INTENT(IN) :: recovering + INTEGER :: s + DO s = 1, n + IF (recovering) THEN + CALL CD_HermiteCable_Dyn_Step_Recovering(m, DT, 50, 1.0e-8_wp, es, em) + ELSE + CALL CD_HermiteCable_Dyn_Step(m, DT, 50, 1.0e-8_wp, es, em) + END IF + IF (es /= CD_HCDYN_OK) THEN + CALL require(.FALSE., 'step: '//TRIM(em)); RETURN + END IF + END DO + END SUBROUTINE advance + + SUBROUTINE run_response(m, fy, fx, ay, ax) + !! March 100 s and, over 50-100 s, the dominant frequencies of the mid-span cross-flow (z) + !! and quarter-span in-line (y) motions (the peak of a direct Fourier scan of the detrended + !! records) and the amplitudes, half the peak-to-peak excursions. + TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: m + REAL(wp), INTENT(OUT) :: fy, fx, ay, ax + INTEGER, PARAMETER :: NS = NINT(100.0_wp/DT), N0 = NINT(50.0_wp/DT) + REAL(wp) :: zrec(NS - N0), yrec(NS - N0) + INTEGER :: s + DO s = 1, NS + CALL advance(m, 1, .FALSE.) + IF (es /= CD_HCDYN_OK) EXIT + IF (s <= N0) CYCLE + zrec(s - N0) = m%q(mid + 3) + yrec(s - N0) = m%q(quarter + 2) + END DO + ay = 0.5_wp*(MAXVAL(zrec) - MINVAL(zrec)) + ax = 0.5_wp*(MAXVAL(yrec) - MINVAL(yrec)) + fy = peak_frequency(zrec) + fx = peak_frequency(yrec) + END SUBROUTINE run_response + + REAL(wp) FUNCTION peak_frequency(x) RESULT(fpk) + !! The frequency of the largest Fourier amplitude of x - mean(x) on 0.05-2 Hz (0.002 Hz grid). + REAL(wp), INTENT(IN) :: x(:) + REAL(wp) :: xm(SIZE(x)), f, best, re, im, tt + INTEGER :: i, j + xm = x - SUM(x)/REAL(SIZE(x), wp) + best = -1.0_wp + fpk = 0.0_wp + DO j = 0, 975 + f = 0.05_wp + 0.002_wp*REAL(j, wp) + re = 0.0_wp; im = 0.0_wp + DO i = 1, SIZE(x) + tt = REAL(i, wp)*DT + re = re + xm(i)*COS(2.0_wp*PI*f*tt) + im = im + xm(i)*SIN(2.0_wp*PI*f*tt) + END DO + IF (re*re + im*im > best) THEN + best = re*re + im*im + fpk = f + END IF + END DO + END FUNCTION peak_frequency + + SUBROUTINE check_element() + !! I2: the element load at rest across the current, additivity, and the Jacobians against + !! central differences on a curved, moving element. + REAL(wp) :: qe(12), ve(12), fl(12), f_cf(12), f_il(12), djq(12, 12), djv(12, 12), fp(12), fm(12) + REAL(wp) :: fdq(12, 12), fdv(12, 12), kn(2), kx(2), le, h, uu(3) + INTEGER :: j + le = 5.0_wp + uu = [0.0_wp, U, 0.0_wp] + kn = [0.0_wp, 0.0_wp] + kx = [30.0_wp, 50.0_wp] + ! straight along x at rest, unit tangents + qe = 0.0_wp + qe(4) = 1.0_wp; qe(7) = le; qe(10) = 1.0_wp + ve = 0.0_wp + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, le, uu, 0.0_wp, kn, fl, ErrStat=es, ErrMsg=em, kx_node=kx) + CALL require(es == CD_HCDYN_OK, 'I2: element: '//TRIM(em)) + CALL require(ABS(fl(2) + fl(8) - U*U*le*0.5_wp*(kx(1) + kx(2))) <= 1.0e-12_wp*U*U*le*kx(2) .AND. & + ABS(fl(1) + fl(7)) + ABS(fl(3) + fl(9)) <= 1.0e-12_wp*U*U*le*kx(2), & + 'I2: a straight element at rest carries U^2 l0 (k_x1 + k_x2)/2 along the flow') + ! curved and moving, off the flow plane + qe = [0.1_wp, -0.2_wp, -10.0_wp, 0.9_wp, 0.3_wp, 0.2_wp, 4.8_wp, 0.4_wp, -9.6_wp, 1.0_wp, -0.2_wp, 0.15_wp] + ve = [0.02_wp, -0.05_wp, 0.08_wp, 0.01_wp, 0.02_wp, -0.03_wp, -0.04_wp, 0.06_wp, 0.03_wp, 0.0_wp, -0.01_wp, & + 0.02_wp] + uu = [0.05_wp, U, -0.02_wp] + kn = [20.0_wp, -15.0_wp] + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, le, uu, 0.0_wp, kn, f_cf, ErrStat=es, ErrMsg=em) + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, le, uu, 0.0_wp, [0.0_wp, 0.0_wp], f_il, ErrStat=es, ErrMsg=em, & + kx_node=kx) + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, le, uu, 0.0_wp, kn, fl, djq, djv, es, em, kx_node=kx) + CALL require(MAXVAL(ABS(fl - f_cf - f_il)) <= 1.0e-12_wp*MAXVAL(ABS(fl)), & + 'I2: the in-line load adds to the cross-flow one') + h = 1.0e-6_wp + DO j = 1, 12 + qe(j) = qe(j) + h + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, le, uu, 0.0_wp, kn, fp, ErrStat=es, ErrMsg=em, kx_node=kx) + qe(j) = qe(j) - 2.0_wp*h + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, le, uu, 0.0_wp, kn, fm, ErrStat=es, ErrMsg=em, kx_node=kx) + qe(j) = qe(j) + h + fdq(:, j) = (fp - fm)/(2.0_wp*h) + ve(j) = ve(j) + h + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, le, uu, 0.0_wp, kn, fp, ErrStat=es, ErrMsg=em, kx_node=kx) + ve(j) = ve(j) - 2.0_wp*h + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, le, uu, 0.0_wp, kn, fm, ErrStat=es, ErrMsg=em, kx_node=kx) + ve(j) = ve(j) + h + fdv(:, j) = (fp - fm)/(2.0_wp*h) + END DO + WRITE (*, '(A,ES10.2,A,ES10.2)') ' I2: Jacobian errors, position ', MAXVAL(ABS(djq - fdq))/MAXVAL(ABS(fdq)), & + ', velocity ', MAXVAL(ABS(djv - fdv))/MAXVAL(ABS(fdv)) + CALL require(MAXVAL(ABS(djq - fdq)) <= 1.0e-6_wp*MAXVAL(ABS(fdq)), 'I2: position Jacobian matches differences') + CALL require(MAXVAL(ABS(djv - fdv)) <= 1.0e-6_wp*MAXVAL(ABS(fdv)), 'I2: velocity Jacobian matches differences') + END SUBROUTINE check_element + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (.NOT. cond) THEN + WRITE (*, '(A,A)') 'MISMATCH: ', label + nfail = nfail + 1 + END IF + END SUBROUTINE require + +END PROGRAM test_hermite_viv_inline diff --git a/tests/test_hfmf_mirror.f90 b/tests/test_hfmf_mirror.f90 index b6c67360..be409d82 100644 --- a/tests/test_hfmf_mirror.f90 +++ b/tests/test_hfmf_mirror.f90 @@ -18,13 +18,17 @@ PROGRAM test_hfmf_mirror !! identically built cable, re-pack -- bit-identical buffers, and the line clock !! carries the restart time; !! 4) wrong-sized / non-finite buffers, a non-orthogonal parent orientation and a - !! non-finite time fail closed. + !! non-finite time fail closed; + !! 5) with cross-flow and in-line VIV the VIV block is 6 nn + 1 values (the in-line phase and + !! mean squares after the cross-flow block), it round-trips bit-identically into the twin's + !! in-line state, and a negative in-line mean square fails closed. USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Init_Deck_HermiteCable, CD_DECKDRV_OK USE CableDyn_OpenFAST_HermiteFMF, ONLY: CD_HFMF_ModuleType, CD_HFMF_MirrorSize, CD_HFMF_PackMirror, & CD_HFMF_UnpackMirror, CD_HFMF_FrictionMirrorSize, CD_HFMF_ForceMirrorSize, & - CD_HFMF_BoundaryMirrorSize, & + CD_HFMF_BoundaryMirrorSize, CD_HFMF_VIVMirrorSize, CD_HFMF_TorsionMirrorSize, & CD_HFMF_End, CD_HFMF_OK, CD_HFMF_BADINPUT + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCable_Dyn_Set_VIV, CD_HCDYN_OK USE, INTRINSIC :: IEEE_ARITHMETIC, ONLY: IEEE_IS_FINITE, IEEE_VALUE, IEEE_QUIET_NAN IMPLICIT NONE INTEGER :: nfail @@ -106,6 +110,46 @@ PROGRAM test_hfmf_mirror CALL CD_HFMF_UnpackMirror(twin, buf, IEEE_VALUE(1.0_wp, IEEE_QUIET_NAN), es, em) CALL require(es == CD_HFMF_BADINPUT, 'non-finite restart time fails closed') + ! (5) the in-line VIV block + BLOCK + REAL(wp), ALLOCATABLE :: cl(:), cf(:), df(:), clx(:), al(:), vb(:), vb2(:) + INTEGER :: ne, nn, kv + buf(1) = 0.0_wp + ne = cable%line%ne + nn = cable%line%nn + ALLOCATE (cl(ne), cf(ne), df(ne), clx(ne), al(ne)) + cl = 0.8_wp; cf = 0.18_wp; df = 0.08_wp; clx = 0.85_wp; al = 0.15_wp + CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, cl, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=al) + CALL require(es == CD_HCDYN_OK, 'in-line VIV on the cable: '//TRIM(em)) + CALL CD_HermiteCable_Dyn_Set_VIV(twin%line, cl, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=al) + CALL require(es == CD_HCDYN_OK, 'in-line VIV on the twin: '//TRIM(em)) + CALL require(CD_HFMF_VIVMirrorSize(cable) == 6*nn + 1, 'VIV block with in-line VIV: 6 nn + 1 values') + ALLOCATE (vb(CD_HFMF_MirrorSize(cable)), vb2(CD_HFMF_MirrorSize(cable))) + CALL CD_HFMF_PackMirror(cable, vb, es, em) + CALL require(es == CD_HFMF_OK, 'pack with in-line VIV: '//TRIM(em)) + ! the in-line block: phase then mean squares, just before the (absent) torsion block + kv = SIZE(vb) - CD_HFMF_TorsionMirrorSize(cable) - 3*nn + CALL require(nan_max_abs(vb(kv + 1:kv + nn) - cable%line%vil_phi) <= 0.0_wp, & + 'the in-line phase follows the cross-flow block') + DO i = 1, 3*nn + vb(kv + i) = vb(kv + i) + 1.0e-3_wp*REAL(i, wp) + END DO + kb = 3*nf + CD_HFMF_FrictionMirrorSize(cable) + 3*(cable%line%ndof - nf) + vb(kb + 7:kb + 15) = [1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp] + CALL CD_HFMF_UnpackMirror(twin, vb, 3.0_wp, es, em) + CALL require(es == CD_HFMF_OK, 'unpack with in-line VIV: '//TRIM(em)) + CALL require(nan_max_abs(twin%line%vil_phi - vb(kv + 1:kv + nn)) <= 0.0_wp .AND. & + nan_max_abs(twin%line%vil_phi_eval - twin%line%vil_phi) <= 0.0_wp .AND. & + nan_max_abs(twin%line%ws_recovery_vil_ms - twin%line%vil_ms) <= 0.0_wp, & + 'the in-line phase and its step copies reload') + CALL CD_HFMF_PackMirror(twin, vb2, es, em) + CALL require(nan_max_abs(vb2 - vb) <= 0.0_wp, 'the in-line VIV block round-trips bit-identically') + vb(kv + nn + 1) = -1.0_wp + CALL CD_HFMF_UnpackMirror(twin, vb, 3.0_wp, es, em) + CALL require(es == CD_HFMF_BADINPUT .AND. INDEX(em, 'in-line') > 0, & + 'a negative in-line mean square fails closed') + END BLOCK + CALL CD_HFMF_End(cable) CALL CD_HFMF_End(twin) CALL finish() diff --git a/tests/test_viv_inline_deck.f90 b/tests/test_viv_inline_deck.f90 new file mode 100644 index 00000000..a84c40c3 --- /dev/null +++ b/tests/test_viv_inline_deck.f90 @@ -0,0 +1,254 @@ +! File: tests/test_viv_inline_deck.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_inline_deck + !! In-line VIV on a deck (the optional VIV section, TypeName ClX [alpha]): the taut line of the + !! cross-flow lock-in benchmark (tests/test_viv_lockin.py) as a finite-EI cable, 100 m pinned + !! at 50 m depth in a uniform 0.15 m/s current along y, Cl 0.8 with MoorDyn's band. + !! D1 with ClX 0.85 the quarter-span in-line (y) response oscillates at twice the mid-span + !! cross-flow (z) frequency and is larger than without the VIV section; + !! D2 a VIV row with ClX 0 is the deck without the section, to the printed digits; + !! D3 malformed rows, an unknown or repeated type, ClX on a type without the cross-flow lift, + !! alpha outside [0, 1) and in-line VIV on an EI = 0 line are refused by name. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp, D = 0.1_wp + INTEGER :: nfail = 0 + + CALL write_current('vid_current.dat') + CALL check_runs() + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: in-line VIV deck gates' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE write_current(path) + CHARACTER(*), INTENT(IN) :: path + INTEGER :: u + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') 'MoorDyn v2 water kinematics file' + WRITE (u, '(A)') 'uniform current along y for the in-line VIV deck gate' + WRITE (u, '(A)') '--------------------------- WAVES -------------------------------------' + WRITE (u, '(A)') '0 WaveKinMod - type of wave input' + WRITE (u, '(A)') '"" WaveKinFile - file containing wave elevation time series' + WRITE (u, '(A)') '0.000000E+00 dtWave - time step to use in setting up wave kinematics grid (s)' + WRITE (u, '(A)') '0 WaveDir - wave heading (deg)' + WRITE (u, '(A)') '2 - X wave input type' + WRITE (u, '(A)') '-10, 110, 2 - X wave grid point data' + WRITE (u, '(A)') '2 - Y wave input type' + WRITE (u, '(A)') '-10, 10, 2 - Y wave grid point data' + WRITE (u, '(A)') '2 - Z wave input type' + WRITE (u, '(A)') '-100, 0, 2 - Z wave grid point data' + WRITE (u, '(A)') '--------------------------- CURRENT -------------------------------------' + WRITE (u, '(A)') '1 CurrentMod - type of current input' + WRITE (u, '(A)') 'z-depth x-current y-current' + WRITE (u, '(A)') '(m) (m/s) (m/s)' + WRITE (u, '(A)') '0.0 0.0 0.15' + WRITE (u, '(A)') '-100.0 0.0 0.15' + WRITE (u, '(A)') '--------------------- need this line ------------------' + CLOSE (u) + END SUBROUTINE write_current + + SUBROUTINE write_deck(path, viv_rows, tmax, ei, cl) + !! viv_rows: the VIV section's data rows, ';'-separated ('' for no section). + CHARACTER(*), INTENT(IN) :: path, viv_rows + REAL(wp), INTENT(IN) :: tmax + CHARACTER(*), INTENT(IN), OPTIONAL :: ei, cl + CHARACTER(32) :: ei_col, cl_col + INTEGER :: u, i0, i1 + ei_col = '1.0' + IF (PRESENT(ei)) ei_col = ei + cl_col = '0.8' + IF (PRESENT(cl)) cl_col = cl + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' + WRITE (u, '(A)') 'in-line VIV deck gate: taut cable in a uniform current' + WRITE (u, '(A)') '----------------------- LINE TYPES ------------------------------------------' + WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' + WRITE (u, '(A)') '(name) (m) (kg/m) (N) (N-s/-) (-) (-) (-) (-) (-) (-) (-) (-)' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//TRIM(ei_col)//' 1.2 1.0 0.0 0.0 '// & + TRIM(cl_col)//' 0.08 0.18' + WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' + WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' + WRITE (u, '(A)') '(#) (-) (m) (m) (m) (kg) (m^3) (m^2) (-)' + WRITE (u, '(A)') '1 Coupled 0.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '2 Fixed 100.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '----------------------- LINES -----------------------------------------------' + WRITE (u, '(A)') 'ID LineType AttachA AttachB UnstrLen NumSegs Outputs' + WRITE (u, '(A)') '(#) (name) (#) (#) (m) (-) (-)' + WRITE (u, '(A)') '1 riser 1 2 99.900100 50 -' + IF (LEN_TRIM(viv_rows) > 0) THEN + WRITE (u, '(A)') '----------------------- VIV -------------------------------------------------' + WRITE (u, '(A)') 'TypeName ClX alpha' + WRITE (u, '(A)') '(name) (-) (-)' + i0 = 1 + DO + i1 = INDEX(viv_rows(i0:), ';') + IF (i1 == 0) THEN + WRITE (u, '(A)') TRIM(viv_rows(i0:)) + EXIT + END IF + WRITE (u, '(A)') viv_rows(i0:i0 + i1 - 2) + i0 = i0 + i1 + END DO + END IF + WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' + WRITE (u, '(A)') '0.01 dtM' + WRITE (u, '(A)') '100.0 WtrDpth' + WRITE (u, '(A)') '1025.0 rhoW' + WRITE (u, '(A)') '9.80665 g' + WRITE (u, '(A)') 'vid_current.dat WaterKin' + WRITE (u, '(A)') '0.25 VIVrmsWindow' + WRITE (u, '(A,F8.3,A)') ' ', tmax, ' TMax' + WRITE (u, '(A)') '---------------------- OUTPUTS -----------------------------------------------' + WRITE (u, '(A)') 'L1N25PZ' + WRITE (u, '(A)') 'L1N12PY' + WRITE (u, '(A)') 'END' + WRITE (u, '(A)') '------------------------- need this line --------------------------------------' + CLOSE (u) + END SUBROUTINE write_deck + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK .AND. conv + END SUBROUTINE run + + SUBROUTINE read_out(path, tab, n) + !! The rows (time, L1N25PZ, L1N12PY) of a deck's main output file. + CHARACTER(*), INTENT(IN) :: path + REAL(wp), ALLOCATABLE, INTENT(OUT) :: tab(:, :) + INTEGER, INTENT(OUT) :: n + CHARACTER(1024) :: rec + INTEGER :: u, ios + ALLOCATE (tab(3, 20000)) + n = 0 + OPEN (NEWUNIT=u, FILE=path, STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (u, '(A)') rec + READ (u, '(A)') rec + DO + READ (u, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + IF (n == SIZE(tab, 2)) EXIT + n = n + 1 + READ (rec, *) tab(:, n) + END DO + CLOSE (u) + END SUBROUTINE read_out + + REAL(wp) FUNCTION peak_frequency(tt, x) RESULT(fpk) + !! The frequency of the largest Fourier amplitude of x - mean(x) on 0.05-2 Hz (0.002 Hz grid). + REAL(wp), INTENT(IN) :: tt(:), x(:) + REAL(wp) :: xm(SIZE(x)), f, best, re, im + INTEGER :: i, j + xm = x - SUM(x)/REAL(SIZE(x), wp) + best = -1.0_wp + fpk = 0.0_wp + DO j = 0, 975 + f = 0.05_wp + 0.002_wp*REAL(j, wp) + re = 0.0_wp; im = 0.0_wp + DO i = 1, SIZE(x) + re = re + xm(i)*COS(2.0_wp*PI*f*tt(i)) + im = im + xm(i)*SIN(2.0_wp*PI*f*tt(i)) + END DO + IF (re*re + im*im > best) THEN + best = re*re + im*im + fpk = f + END IF + END DO + END FUNCTION peak_frequency + + SUBROUTINE window(tab, n, t0, tt, z, y) + !! The rows of tab from time t0 on. + REAL(wp), INTENT(IN) :: tab(:, :), t0 + INTEGER, INTENT(IN) :: n + REAL(wp), ALLOCATABLE, INTENT(OUT) :: tt(:), z(:), y(:) + LOGICAL :: keep(n) + keep = tab(1, 1:n) >= t0 + tt = PACK(tab(1, 1:n), keep) + z = PACK(tab(2, 1:n), keep) + y = PACK(tab(3, 1:n), keep) + END SUBROUTINE window + + SUBROUTINE check_runs() + REAL(wp), ALLOCATABLE :: ti(:, :), tc(:, :), t0(:, :), tt(:), z(:), y(:) + INTEGER :: ni, nc, n0 + REAL(wp) :: fz, fy, ay_il, ay_cf + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('vid_il.dat', 'riser 0.85 0.15', 100.0_wp) + CALL run('vid_il.dat', 'vid_il', ok, msg) + CALL require(ok, 'D1: the in-line VIV deck runs: '//TRIM(msg)) + CALL write_deck('vid_cf.dat', '', 100.0_wp) + CALL run('vid_cf.dat', 'vid_cf', ok, msg) + CALL require(ok, 'D1: the cross-flow-only deck runs: '//TRIM(msg)) + CALL write_deck('vid_zero.dat', 'riser 0.0', 100.0_wp) + CALL run('vid_zero.dat', 'vid_zero', ok, msg) + CALL require(ok, 'D2: the ClX 0 deck runs: '//TRIM(msg)) + CALL read_out('vid_il.out', ti, ni) + CALL read_out('vid_cf.out', tc, nc) + CALL read_out('vid_zero.out', t0, n0) + CALL require(ni > 100 .AND. ni == nc .AND. ni == n0, 'D1/D2: the runs wrote matching rows') + IF (.NOT. (ni > 100 .AND. ni == nc .AND. ni == n0)) RETURN + CALL require(ALL(t0(:, 1:n0) == tc(:, 1:nc)), 'D2: a VIV row with ClX 0 is the deck without the section') + CALL window(ti, ni, 50.0_wp, tt, z, y) + fz = peak_frequency(tt, z) + fy = peak_frequency(tt, y) + ay_il = 0.5_wp*(MAXVAL(y) - MINVAL(y)) + WRITE (*, '(A,F7.4,A,F7.4,A,F7.3,A,F7.4)') 'D1: cross-flow ', fz, ' Hz, in-line ', fy, ' Hz, ratio ', fy/fz, & + ', CF amplitude/D ', 0.5_wp*(MAXVAL(z) - MINVAL(z))/D + CALL window(tc, nc, 50.0_wp, tt, z, y) + ay_cf = 0.5_wp*(MAXVAL(y) - MINVAL(y)) + WRITE (*, '(A,F8.4,A,F8.4)') 'D1: quarter-span in-line amplitude/D ', ay_il/D, ', without the VIV section ', & + ay_cf/D + CALL require(ABS(fy/fz - 2.0_wp) <= 0.15_wp, 'D1: the in-line response is at twice the cross-flow frequency') + CALL require(ay_il > 2.0_wp*ay_cf, 'D1: the in-line force raises the in-line response') + END SUBROUTINE check_runs + + SUBROUTINE check_refusals() + CALL refused('riser 0.85 0.15 7', 'TypeName ClX [alpha]', 'a row of four columns') + CALL refused('cable 0.85', 'undefined LINE TYPE', 'an unknown type') + CALL refused('riser 0.85;riser 0.5', 'twice', 'a repeated type') + CALL refused('riser -0.1', 'non-negative', 'a negative ClX') + CALL refused('riser 0.85 1.0', '0 <= alpha < 1', 'alpha = 1') + CALL refused('riser 0.85 x', 'plain numbers', 'a non-numeric alpha') + CALL refused('riser 0.85', 'cross-flow lift', 'ClX on a type without the cross-flow lift', cl='0.0') + CALL refused('riser 0.85', 'finite-EI lines', 'in-line VIV on an EI = 0 line', ei='0.0') + END SUBROUTINE check_refusals + + SUBROUTINE refused(rows, needle, what, ei, cl) + CHARACTER(*), INTENT(IN) :: rows, needle, what + CHARACTER(*), INTENT(IN), OPTIONAL :: ei, cl + LOGICAL :: ok + CHARACTER(1024) :: msg + IF (PRESENT(ei)) THEN + CALL write_deck('vid_bad.dat', rows, 1.0_wp, ei=ei) + ELSE IF (PRESENT(cl)) THEN + CALL write_deck('vid_bad.dat', rows, 1.0_wp, cl=cl) + ELSE + CALL write_deck('vid_bad.dat', rows, 1.0_wp) + END IF + CALL run('vid_bad.dat', 'vid_bad', ok, msg) + CALL require(.NOT. ok .AND. INDEX(msg, needle) > 0, 'D3: '//what//' is refused: '//TRIM(msg)) + END SUBROUTINE refused + +END PROGRAM test_viv_inline_deck diff --git a/tests/test_viv_kernels.f90 b/tests/test_viv_kernels.f90 index e6ddad46..1fc11b77 100644 --- a/tests/test_viv_kernels.f90 +++ b/tests/test_viv_kernels.f90 @@ -11,15 +11,22 @@ PROGRAM test_viv_kernels !! 4) the phase rate is 2 pi (cF + dF sin(phi_y - phi)) U/D, with phi_y from the RMS-normalised !! y', y'' (cF at phase lock, cF + dF a quarter period ahead); !! 5) the running mean square is MoorDyn's ((n_m - 1) old^2 + new^2)/n_m; - !! 6) the phase wraps to [0, 2 pi), and a node whose neighbours coincide fails closed. + !! 6) the phase wraps to [0, 2 pi), and a node whose neighbours coincide fails closed; + !! 7) the per-length lift of a centreline point (the finite-EI Gauss points); + !! 8) in-line VIV (Ulveseter et al. 2018): the node and per-length forces are + !! 1/2 rho D C_vx cos(phi_x) U v_n along the normal flow, their Jacobians match central + !! differences, the in-line motion is the component along v_n/U, and the phase rate is + !! 2 rate_y [1 + alpha sin(phi_xd - phi_x)] (twice the cross-flow rate at phase lock). USE CableDyn_Precision, ONLY: wp USE CableDyn_VIV, ONLY: CD_VIV_Node_Lift, CD_VIV_Crossflow_Motion, CD_VIV_Phase_Rate, CD_VIV_Mean_Square, & - CD_VIV_Wrap_Phase, CD_VIV_TWO_PI, CD_VIV_NM, CD_VIV_Lift_Per_Length + CD_VIV_Wrap_Phase, CD_VIV_TWO_PI, CD_VIV_NM, CD_VIV_Lift_Per_Length, & + CD_VIV_Node_Inline, CD_VIV_Inline_Per_Length, CD_VIV_Inline_Phase_Rate, & + CD_VIV_Crossflow_Along IMPLICIT NONE REAL(wp), PARAMETER :: RHO = 1025.0_wp, DIAM = 0.1_wp, CL = 0.8_wp, L1 = 2.0_wp, L2 = 1.5_wp REAL(wp) :: rp(3), rn(3), rd(3), u(3), coef, phi, f(3), q(3), vr(3), vn(3), un, w(3), ref(3) REAL(wp) :: jv(3, 3), jp(3, 3), jn(3, 3), fd(3, 3), fp(3), fm(3), h, e(3), yd, ydd, un2, rate - REAL(wp) :: ms, ms_md, rpv(3), kk, fl(3), jr(3, 3), jt(3, 3) + REAL(wp) :: ms, ms_md, rpv(3), kk, fl(3), jr(3, 3), jt(3, 3), xd, xdd, yd2, ydd2, un3, rdd(3) LOGICAL :: ok INTEGER :: nfail, j, k @@ -119,6 +126,77 @@ PROGRAM test_viv_kernels CALL CD_VIV_Lift_Per_Length(u - rd, 3.0_wp*rpv, kk, fp, ok) CALL require(NORM2(fp - fl) <= 1.0e-12_wp*NORM2(fl), 'per-length lift does not depend on |dr/dxi|') + ! (8) in-line VIV: the node force along the normal flow and its Jacobians + CALL CD_VIV_Node_Inline(rp, rn, rd, u, coef, phi, f, ok) + ref = 0.25_wp*RHO*DIAM*un*CL*COS(phi)*vn*(L1 + L2) + CALL require(ok .AND. NORM2(f - ref) <= 1.0e-12_wp*NORM2(ref), 'in-line: node force = coef cos(phi_x) U v_n') + CALL require(ABS(DOT_PRODUCT(f, q)) <= 1.0e-12_wp*NORM2(f), 'in-line: node force normal to the tangent') + CALL CD_VIV_Node_Inline(rp, rn, rd, rd + 0.3_wp*q, coef, phi, f, ok) + CALL require(ok .AND. NORM2(f) <= 1.0e-14_wp, 'in-line: no force for flow along the line') + CALL CD_VIV_Node_Inline(rp, rn, rd, u, coef, phi, f, ok, jv, jp, jn) + DO j = 1, 3 + CALL CD_VIV_Node_Inline(rp, rn, rd + h*unit(j), u, coef, phi, fp, ok) + CALL CD_VIV_Node_Inline(rp, rn, rd - h*unit(j), u, coef, phi, fm, ok) + fd(:, j) = -(fp - fm)/(2.0_wp*h) + END DO + CALL require(MAXVAL(ABS(jv - fd)) <= 1.0e-6_wp*MAXVAL(ABS(fd)), 'in-line: velocity Jacobian matches differences') + DO j = 1, 3 + CALL CD_VIV_Node_Inline(rp + h*unit(j), rn, rd, u, coef, phi, fp, ok) + CALL CD_VIV_Node_Inline(rp - h*unit(j), rn, rd, u, coef, phi, fm, ok) + fd(:, j) = -(fp - fm)/(2.0_wp*h) + END DO + CALL require(MAXVAL(ABS(jp - fd)) <= 1.0e-6_wp*MAXVAL(ABS(fd)), 'in-line: previous-node Jacobian matches differences') + DO j = 1, 3 + CALL CD_VIV_Node_Inline(rp, rn + h*unit(j), rd, u, coef, phi, fp, ok) + CALL CD_VIV_Node_Inline(rp, rn - h*unit(j), rd, u, coef, phi, fm, ok) + fd(:, j) = -(fp - fm)/(2.0_wp*h) + END DO + CALL require(MAXVAL(ABS(jn - fd)) <= 1.0e-6_wp*MAXVAL(ABS(fd)), 'in-line: next-node Jacobian matches differences') + CALL CD_VIV_Node_Inline(rp, rp, rd, u, coef, phi, f, ok) + CALL require(.NOT. ok .AND. NORM2(f) <= 0.0_wp, 'in-line: coinciding neighbours fail closed with no force') + + ! in-line force per unit length: the node formula with the exact tangent, independent of |dr/dxi| + CALL CD_VIV_Inline_Per_Length(u - rd, rpv, kk, fl, ok, jr, jt) + CALL CD_VIV_Node_Inline(rp, rn, rd, u, 1.0_wp, phi, f, ok) + CALL require(ok .AND. NORM2(fl - 0.5_wp*RHO*DIAM*CL*f) <= 1.0e-12_wp*NORM2(fl), & + 'in-line: per-length force = 1/2 rho D C_vx cos(phi_x) U v_n') + DO j = 1, 3 + CALL CD_VIV_Inline_Per_Length(u - rd + h*unit(j), rpv, kk, fp, ok) + CALL CD_VIV_Inline_Per_Length(u - rd - h*unit(j), rpv, kk, fm, ok) + fd(:, j) = (fp - fm)/(2.0_wp*h) + END DO +CALL require(MAXVAL(ABS(jr - fd)) <= 1.0e-6_wp*MAXVAL(ABS(fd)), 'in-line: per-length flow Jacobian matches differences') + DO j = 1, 3 + CALL CD_VIV_Inline_Per_Length(u - rd, rpv + h*unit(j), kk, fp, ok) + CALL CD_VIV_Inline_Per_Length(u - rd, rpv - h*unit(j), kk, fm, ok) + fd(:, j) = (fp - fm)/(2.0_wp*h) + END DO + CALL require(MAXVAL(ABS(jt - fd)) <= 1.0e-6_wp*MAXVAL(ABS(fd)), & + 'in-line: per-length tangent Jacobian matches differences') + CALL CD_VIV_Inline_Per_Length(u - rd, 3.0_wp*rpv, kk, fp, ok) + CALL require(NORM2(fp - fl) <= 1.0e-12_wp*NORM2(fl), 'in-line: per-length force does not depend on |dr/dxi|') + + ! in-line motion along v_n/U, from both motion routines; the cross-flow outputs are unchanged + rdd = [1.0_wp, 2.0_wp, -0.5_wp] + CALL CD_VIV_Crossflow_Motion(rp, rn, rd, rdd, u, yd2, ydd2, un3, ok, xd, xdd) + CALL require(ok .AND. yd2 == yd .AND. ydd2 == ydd, 'in-line: the cross-flow motion is unchanged') + CALL require(ABS(xd - DOT_PRODUCT(rd, vn)/un) <= 1.0e-14_wp .AND. ABS(xdd - DOT_PRODUCT(rdd, vn)/un) <= 1.0e-14_wp, & + 'in-line: velocity and acceleration along v_n/U') + CALL CD_VIV_Crossflow_Along(rn - rp, rd, rdd, u, yd2, ydd2, un3, ok, xd, xdd) + CALL require(ok .AND. ABS(yd2 - yd) <= 1.0e-14_wp .AND. ABS(xd - DOT_PRODUCT(rd, vn)/un) <= 1.0e-14_wp .AND. & + ABS(xdd - DOT_PRODUCT(rdd, vn)/un) <= 1.0e-14_wp, 'in-line: motion along a given tangent') + + ! in-line phase rate: twice the cross-flow rate at phase lock, (1 + alpha) times that a quarter + ! period ahead; a node with no in-line motion takes phi_xd = 0 + rate = CD_VIV_Inline_Phase_Rate(COS(2.2_wp), -SIN(2.2_wp), 1.0_wp, 1.0_wp, 2.2_wp, 3.0_wp, 0.15_wp) + CALL require(ABS(rate - 6.0_wp) <= 1.0e-12_wp*rate, 'in-line: rate at phase lock is twice the cross-flow rate') + rate = CD_VIV_Inline_Phase_Rate(COS(2.2_wp), -SIN(2.2_wp), 1.0_wp, 1.0_wp, 2.2_wp - 0.25_wp*CD_VIV_TWO_PI, & + 3.0_wp, 0.15_wp) + CALL require(ABS(rate - 6.0_wp*1.15_wp) <= 1.0e-12_wp*rate, 'in-line: rate a quarter period ahead is 2 (1+alpha) rate_y') + rate = CD_VIV_Inline_Phase_Rate(0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.5_wp, 3.0_wp, 0.15_wp) + CALL require(ABS(rate - 6.0_wp*(1.0_wp + 0.15_wp*SIN(-0.5_wp))) <= 1.0e-12_wp*rate, & + 'in-line: no in-line motion takes phi_xd = 0') + ! (6) wrap and degenerate frame CALL require(CD_VIV_Wrap_Phase(-1.0e-300_wp) >= 0.0_wp .AND. CD_VIV_Wrap_Phase(-1.0e-300_wp) < CD_VIV_TWO_PI, & 'a tiny negative phase wraps into [0, 2 pi)') From 4a91d68ee99a5870ae9b2166702956f7b91d32a1 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Wed, 11 Nov 2026 20:07:17 +0900 Subject: [PATCH 03/47] feat: in-line VIV on EI = 0 lines (#146) #145 gave finite-EI cables the in-line shedding force of Ulveseter et al. (2018) and refused it on EI = 0 lines (the two-node elements with consistent mass). Those lines now take it too, so a VIV section row acts wherever the cross-flow lift does. On an EI = 0 line the in-line force is a node force like the lift, 1/4 rho d C_x (l_i + l_i+1) U cos(phi_x) v_n, with the lift's wetted fractions, node tangent and neighbour-averaged kinematics, and its exact velocity and neighbour-position Jacobians. The in-line phase starts at twice the cross-flow phase and advances with the Heun commit, its end-state rate slaved to the end cross-flow rate, as on the cable. The in-line phase and mean squares follow the cross-flow state everywhere it goes: the sub-step slots, step recovery, the system's rollback and frame snapshot, model copies, and the OpenFAST line checkpoint (3 more reals per node). Checks: - the deck of #145 as an EI = 0 line matches the finite-EI cable: CF A/D 0.8228 vs 0.8219, IL A/D 0.1915 vs 0.1905, the same frequencies; - coupled restart and rewind with in-line VIV continue bit for bit, and a rebuild without the VIV state does not; - the sub-stepping restore of tests/test_model carries the in-line state; - full ctest 412/412 on the default and Prescott kernels, Debug -fcheck=all on the VIV, model and system tests, pytest, the example fallback scan clean. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 9 +- doc/capabilities.rst | 4 +- doc/concepts.rst | 2 +- doc/driver_format.md | 9 +- doc/outputs.rst | 4 +- doc/theory.rst | 18 +- examples/viv_taut_cable_inline.dat | 2 +- python/cabledyn/builder.py | 2 +- python/cabledyn/deck_file.py | 19 +- python/tests/test_deck_native_parity.py | 8 +- src/CableDyn_DeckDriver.f90 | 44 ++- src/CableDyn_Model.f90 | 361 +++++++++++++++++++++--- src/CableDyn_System.f90 | 77 ++++- tests/test_model.f90 | 28 +- tests/test_viv_coupled.f90 | 53 +++- tests/test_viv_inline_deck.f90 | 36 ++- 16 files changed, 535 insertions(+), 141 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79d6a942..75944cee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,13 +17,14 @@ All notable changes to CableDyn are recorded in this file. The format follows pinned cable match this to 0.05 %. It acts on every dynamic route beside the axial (`BA`) and torsional (`GJ|K|Bt`) damping, with exact Jacobians; the Python deck reader and builder take the same forms. -- In-line VIV of finite-EI cables: an optional `VIV` section row `TypeName ClX [alpha]` adds the +- In-line VIV: an optional `VIV` section row `TypeName ClX [alpha]` adds the in-line vortex-shedding force of Ulveseter et al. (2018), `1/2 rho D ClX cos(phi_x) U v_n` along the relative flow, with its phase slaved to twice the cross-flow one in a band `alpha` (default 0.15). On the taut line of `examples/viv_taut_cable_inline.dat` the in-line response runs at - twice the cross-flow frequency, A/D 0.19 against 0.03 with the lift alone. Exact Jacobians; the - phase is in the step-recovery, snapshot and checkpoint state; the Python deck reader and - builder take the section. `EI = 0` lines refuse it for now. + twice the cross-flow frequency, A/D 0.19 against 0.03 with the lift alone, on `EI = 0` lines and + finite-EI cables alike (within 1 % of each other). Exact Jacobians; the phase is in the + step-recovery, snapshot and checkpoint state; the Python deck reader and builder take the + section. ## [0.4.2] - 2026-11-09 diff --git a/doc/capabilities.rst b/doc/capabilities.rst index a19239c3..165be866 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -147,8 +147,8 @@ Line and constitutive capability * - In-line VIV (``VIV`` section ``ClX``, ``alpha``) - Standalone and coupled - the in-line shedding force of Ulveseter et al. (2018) at twice the cross-flow frequency, on - finite-EI cables of the Hermite and multibody marches (:ref:`theory-viv-inline`), its state - in the checkpoint; not on ``EI = 0`` lines yet + ``EI = 0`` lines and finite-EI cables wherever the cross-flow lift runs + (:ref:`theory-viv-inline`), its state in the checkpoint Loads and environment --------------------- diff --git a/doc/concepts.rst b/doc/concepts.rst index f54b1075..6038ea98 100644 --- a/doc/concepts.rst +++ b/doc/concepts.rst @@ -82,7 +82,7 @@ coefficients (``Cd_n``, ``Cd_t``, ``Ca_n``, ``Ca_t``). ``EI`` is the switch betw (next section). Axial response can be linear ``EA`` or a stateful constitutive model (viscoelastic, Syrope) — see :doc:`theory`. A 10-column row may end with MoorDyn's cross-flow VIV columns ``Cl`` or ``Cl dF cF`` (lift coefficient and synchronisation band; see -:ref:`theory-viv`), and a ``VIV`` section row adds the in-line force of a finite-EI type +:ref:`theory-viv`), and a ``VIV`` section row adds the in-line force of a type (:ref:`theory-viv-inline`). Two solver paths, selected by ``EI`` diff --git a/doc/driver_format.md b/doc/driver_format.md index e2c3548f..9c7d6382 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -296,7 +296,7 @@ the half-range and centre of its band in non-dimensional frequency (MoorDyn's `d `cF = 0.18` when only `Cl` is given). `Cl = 0` is no VIV; `Cl > 0` needs `cF > 0` and `0 <= dF < cF`, and the line's drag in water. It acts in the dynamics on `EI = 0` lines and finite-EI cables (see [Cross-flow VIV](theory.rst)); the 14-column row has no VIV columns. The -in-line force of a finite-EI type is a [VIV](#viv-optional-finite-ei-lines) section row. +in-line force of a type is a [VIV](#viv-optional) section row. **Viscoelastic axial stiffness (MoorDyn `ElasticMod`).** The EA and BA columns accept bar-separated parts: @@ -1145,7 +1145,7 @@ Behaviour: `NodeA`) the `End` column follows the written row, so the stiffener stays on the same physical end. Stiffeners run wherever the cubic-Hermite cable does, standalone and coupled. -### VIV (optional, finite-EI lines) +### VIV (optional) In-line vortex-induced vibration of a line type: a second vortex-shedding force along the relative flow, the direction of the drag, at twice the cross-flow frequency (Ulveseter et al. @@ -1174,8 +1174,9 @@ Behaviour: - The Outputs flag `V` file carries the in-line force with the lift, and the phase is part of the step-recovery, snapshot and checkpoint state. A row with `ClX = 0` leaves the run exactly as without it. -- It acts on finite-EI lines (`EI > 0`) on every route the cubic-Hermite cable runs; an `EI = 0` - line of a type with `ClX > 0` stops by name. A row fails if it is not `TypeName ClX [alpha]`, +- It acts wherever the cross-flow lift does: on `EI = 0` lines (a node force over the node's + half elements, as the lift) and on finite-EI cables (integrated with the lift), standalone and + coupled. A row fails if it is not `TypeName ClX [alpha]`, names an undefined or already named type, or holds a value out of range, and `ClX > 0` fails on a type without the cross-flow lift. - See `examples/viv_taut_cable_inline.dat`. diff --git a/doc/outputs.rst b/doc/outputs.rst index b2b106ba..a9c7ffaa 100644 --- a/doc/outputs.rst +++ b/doc/outputs.rst @@ -340,8 +340,8 @@ write. Any other letter is a parse error. Mixed ``EI = 0`` + finite-EI decks rej flag ``V``; a static run carries no lift and writes no file). On an ``EI = 0`` line the end nodes carry none, as in MoorDyn; on a finite-EI line each element's lift is lumped to its two nodes (the translational part of its consistent load), so the end nodes carry - the lift of their half-elements, and a type with in-line VIV (the ``VIV`` section) adds - its in-line force. Zero on a line without VIV (``Cl = 0``) + the lift of their half-elements. On both, a type with in-line VIV (the ``VIV`` section) + adds its in-line force. Zero on a line without VIV (``Cl = 0``) * - ``r`` - ``.Line.range.out`` - range graph: minimum, maximum and mean over the run of the node tension, curvature, bend diff --git a/doc/theory.rst b/doc/theory.rst index 500779dc..a35635fa 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1174,7 +1174,7 @@ them with the rest of the state. In-line vortex-induced vibration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -A finite-EI line type can add the in-line shedding force of the combined cross-flow and in-line +A line type can add the in-line shedding force of the combined cross-flow and in-line model of :ref:`Ulveseter et al. (2018) `, a ``VIV`` section row ``TypeName ClX [alpha]`` (see :doc:`file_formats`). A second phase :math:`\phi_x` per node drives a force along the relative normal flow, per unit deformed length @@ -1197,14 +1197,22 @@ with the running RMS values of the cross-flow phase (:math:`\phi_{\dot x} = 0` a in-line motion). Ulveseter et al. take :math:`C_x = 0.85` and :math:`\alpha = 0.15` (the default here) with a cross-flow :math:`C_L` of 0.65. The in-line phase starts at twice the cross-flow one, so the two start locked. The in-line rate is twice the cross-flow one, so ``ClX > 0`` -needs the type's cross-flow :math:`C_L > 0`. The force is integrated with the lift at the same -Gauss points, :math:`\cos\phi_x` interpolated between the element's end nodes, and its exact -position and velocity derivatives enter the tangent. The phase is explicit with the Heun commit, +needs the type's cross-flow :math:`C_L > 0`. On an ``EI = 0`` line it is a node force like the +lift, + +.. math:: + + \mathbf{F}_x = \tfrac{1}{4}\rho\,d\,C_x\,(l_{i} + l_{i+1})\,U\cos\phi_x\;\mathbf{v}_n , + +with the lift's wetted fractions, node tangent and neighbour-averaged kinematics (for the phase +and in the force). On a finite-EI cable it is integrated with the lift at the same Gauss points, +:math:`\cos\phi_x` interpolated between the element's end nodes. Its exact position and velocity +derivatives enter the tangent on both. The phase is explicit with the Heun commit, its end-state rate taken from the end-state cross-flow rate. The phase and the two mean squares are part of the step-recovery, snapshot and checkpoint state, and a ``ClX`` of zero leaves the run exactly as without the row. On the taut line of ``viv_taut_cable_inline.dat`` the quarter span moves in line at twice the cross-flow frequency, A/D 0.19 against 0.03 with the cross-flow -lift alone. ``EI = 0`` lines do not take in-line VIV yet. +lift alone, and the same line as an ``EI = 0`` line gives the cable's amplitudes within 1 %. .. _theory-dry-buoyancy: diff --git a/examples/viv_taut_cable_inline.dat b/examples/viv_taut_cable_inline.dat index 187a9ee7..f8c64b16 100644 --- a/examples/viv_taut_cable_inline.dat +++ b/examples/viv_taut_cable_inline.dat @@ -30,7 +30,7 @@ LineID LineType Length NumSegs 1 riser 99.9001 50 --------------------- VIV ---------------------------------------------- -- In-line VIV of a line type: the in-line shedding coefficient ClX (0 = off; it needs the type's --- cross-flow Cl > 0) and the band alpha (0 <= alpha < 1, default 0.15). Finite-EI lines only. +-- cross-flow Cl > 0) and the band alpha (0 <= alpha < 1, default 0.15). EI = 0 lines take it too. TypeName ClX alpha (-) (-) (-) riser 0.85 0.15 diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 0e38138d..1fd9b948 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -208,7 +208,7 @@ class LineType: in non-dimensional frequency). ``cl`` set writes the 13-column row, with MoorDyn's ``df = 0.08`` and ``cf = 0.18`` where they are ``None``. clx, il_alpha : float | None - Optional in-line VIV of a finite-EI type, a ``VIV`` section row + Optional in-line VIV of a type, a ``VIV`` section row ``Name ClX [alpha]``: the in-line shedding coefficient (it needs ``cl``, the in-line phase running at twice the cross-flow one) and the frequency band of that phase, ``0 <= il_alpha < 1``; ``None`` leaves alpha out of diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index 6e4ca43f..c55ac019 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -3180,20 +3180,17 @@ def _check_stiffeners( def _check_viv_section( self, - line_ids: set[str], - section_types_by_line: dict[str, list[str]], line_type_meta: dict[str, tuple[float, float, float, float]], lift_type_names: set[str], ) -> None: - """Native ``apply_type_viv`` and its finalize check for the VIV section. + """Native ``apply_type_viv`` for the VIV section. A row ``TypeName ClX [alpha]`` gives a line type in-line VIV: the in-line shedding coefficient ``ClX >= 0`` (0 = off) and the band ``0 <= alpha < 1`` (default 0.15) of its phase about twice the cross-flow one, so ``ClX > 0`` needs the type's LINE TYPES - lift ``Cl > 0``. A type takes one row; the in-line force acts on finite-EI lines. + lift ``Cl > 0``. A type takes one row. """ named: set[str] = set() - inline_types: set[str] = set() for row in self._rows("VIV"): where = self._at(row) if len(row.tokens) not in (2, 3): @@ -3228,16 +3225,6 @@ def _check_viv_section( "cross-flow lift (LINE TYPES Cl > 0): the in-line phase runs at twice the " "cross-flow one" ) - if clx > 0.0: - inline_types.add(name) - for line_id in sorted(line_ids, key=int): - names = section_types_by_line.get(line_id, []) - finite = any(line_type_meta[name][3] > 0.0 for name in names if name in line_type_meta) - if not finite and inline_types & set(names): - raise DeckFormatError( - f"{self._label}: line {line_id} is an EI = 0 line of a type with in-line VIV " - "(VIV ClX > 0): in-line VIV acts on finite-EI lines (EI > 0)" - ) def _legacy_rod_type_columns(self, record: DeckRecord) -> bool: """Return whether ``record`` sits under a legacy CableDyn ROD TYPES header. @@ -4409,7 +4396,7 @@ def end_key(token: str) -> str: ) self._check_stiffeners(line_ids, section_types_by_line, line_type_meta, line_lengths) - self._check_viv_section(line_ids, section_types_by_line, line_type_meta, viv_type_names) + self._check_viv_section(line_type_meta, viv_type_names) self._check_attachments(line_ids, section_types_by_line, line_type_meta, line_lengths) assigned_end_connections: set[tuple[str, str]] = set() diff --git a/python/tests/test_deck_native_parity.py b/python/tests/test_deck_native_parity.py index 4a71b909..735d489b 100644 --- a/python/tests/test_deck_native_parity.py +++ b/python/tests/test_deck_native_parity.py @@ -1020,11 +1020,9 @@ def test_inline_viv_needs_the_crossflow_lift(): ) -def test_inline_viv_needs_a_finite_ei_line(): - text = _section(_example("viv_taut_line_crossflow.dat"), "VIV", "riser 0.85") - _rejects(text, re.escape("in-line VIV acts on finite-EI lines (EI > 0)")) - # a zero in-line coefficient is no in-line VIV, which the EI = 0 line takes - DeckFile.from_text(_section(_example("viv_taut_line_crossflow.dat"), "VIV", "riser 0.0")) +@pytest.mark.parametrize("row", ["riser 0.85", "riser 0.0"]) +def test_inline_viv_acts_on_an_ei0_line(row): + DeckFile.from_text(_section(_example("viv_taut_line_crossflow.dat"), "VIV", row)) def test_stiffener_needs_a_finite_ei_line(): diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index c51a2817..ec1aa327 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -10367,7 +10367,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er REAL(wp), ALLOCATABLE :: ba(:), fluid_velocity(:, :), fluid_acceleration(:, :), drag_waterline(:) REAL(wp), ALLOCATABLE :: hydro_diam(:), hydro_cdn(:), hydro_cdt(:), hydro_can(:), hydro_cat(:) REAL(wp), ALLOCATABLE :: ve_ead(:), ve_bas(:), ve_bad(:), ve_ambl(:), ve_vbet(:) - REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:) + REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:) LOGICAL, ALLOCATABLE :: syr_el(:) REAL(wp) :: anchor(3), fairlead(3), mode1_omega REAL(wp), PARAMETER :: factors(4) = [0.25_wp, 0.5_wp, 0.75_wp, CD_ONE] @@ -10406,10 +10406,12 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er ALLOCATE (ba(SIZE(l0)), hydro_diam(SIZE(l0)), hydro_cdn(SIZE(l0)), hydro_cdt(SIZE(l0)), & 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_df(SIZE(l0)), syr_el(SIZE(l0)), viv_clx(SIZE(l0)), viv_al(SIZE(l0))) viv_cl = CD_ZERO viv_cf = CD_ZERO viv_df = CD_ZERO + viv_clx = CD_ZERO + viv_al = CD_ZERO ve_ead = CD_ZERO ve_bas = CD_ZERO ve_bad = CD_ZERO @@ -10468,6 +10470,8 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er viv_cl(e) = types(line_section_type(sections, ln%id, i))%cl viv_cf(e) = types(line_section_type(sections, ln%id, i))%viv_cf viv_df(e) = types(line_section_type(sections, ln%id, i))%viv_df + viv_clx(e) = types(line_section_type(sections, ln%id, i))%clx + viv_al(e) = types(line_section_type(sections, ln%id, i))%il_alpha syr_el(e) = types(line_section_type(sections, ln%id, i))%is_syrope END DO END DO @@ -10475,6 +10479,8 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er viv_cl = viv_cl(SIZE(viv_cl):1:-1) viv_cf = viv_cf(SIZE(viv_cf):1:-1) viv_df = viv_df(SIZE(viv_df):1:-1) + viv_clx = viv_clx(SIZE(viv_clx):1:-1) + viv_al = viv_al(SIZE(viv_al):1:-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) @@ -10764,8 +10770,15 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er BLOCK REAL(wp) :: seed(model%n_dof/3) CALL CD_Deck_VIV_Phase_Seed(model%l0, ln%ends_swapped, seed, zero=opts%viv_phase_zero) - CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em, & - phase_seed=seed, tangent_reversed=.NOT. ln%ends_swapped) + ! with the in-line VIV of the VIV section where a type has ClX > 0 + IF (ANY(viv_clx > CD_ZERO)) THEN + CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em, & + phase_seed=seed, tangent_reversed=.NOT. ln%ends_swapped, clx=viv_clx, & + il_alpha=viv_al) + ELSE + CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em, & + phase_seed=seed, tangent_reversed=.NOT. ln%ends_swapped) + END IF END BLOCK IF (es == CD_MODEL_OK) CALL CD_Recompute_Model_Acceleration(model, es, em) IF (es /= CD_MODEL_OK) THEN @@ -11602,20 +11615,6 @@ SUBROUTINE finite_viv_arrays(ln, sections, types, cl, cf, df, clx, il_alpha) il_alpha = il_alpha(SIZE(il_alpha):1:-1) END SUBROUTINE finite_viv_arrays - LOGICAL FUNCTION line_has_viv_il(ln, types, sections) RESULT(has) - !! Whether a section of the line uses a line type with in-line VIV (VIV ClX > 0). - TYPE(DeckLine), INTENT(IN) :: ln - TYPE(DeckLineType), INTENT(IN) :: types(:) - TYPE(DeckSection), INTENT(IN) :: sections(:) - INTEGER :: j - has = .FALSE. - DO j = 1, SIZE(sections) - IF (sections(j)%line_id /= ln%id) CYCLE - IF (sections(j)%ltype < 1 .OR. sections(j)%ltype > SIZE(types)) CYCLE - IF (types(sections(j)%ltype)%clx > CD_ZERO) has = .TRUE. - END DO - END FUNCTION line_has_viv_il - LOGICAL FUNCTION line_has_viv(ln, types, sections) RESULT(has) !! Whether a section of the line uses a line type with a VIV lift coefficient Cl > 0. TYPE(DeckLine), INTENT(IN) :: ln @@ -19783,15 +19782,6 @@ SUBROUTINE finalize_checks(types, bodies, rod_types, rods, points, lines, sectio END IF END DO - ! VIV in-line rows: the in-line force acts on finite-EI lines - DO j = 1, SIZE(lines) - IF (line_is_finite_ei(lines(j), types, sections)) CYCLE - IF (.NOT. line_has_viv_il(lines(j), types, sections)) CYCLE - at_line = lines(j)%deck_line - CALL fail(ErrStat, ErrMsg, 'line '//TRIM(int_to_str(lines(j)%id))//' is an EI = 0 line of a type with '// & - 'in-line VIV (VIV ClX > 0): in-line VIV acts on finite-EI lines (EI > 0)'); RETURN - END DO - ! STIFFENERS: bend stiffeners sleeving the ends of a finite-EI line DO j = 1, SIZE(lines) IF (.NOT. ALLOCATED(lines(j)%stf)) CYCLE diff --git a/src/CableDyn_Model.f90 b/src/CableDyn_Model.f90 index 638ba1fc..06960125 100644 --- a/src/CableDyn_Model.f90 +++ b/src/CableDyn_Model.f90 @@ -57,7 +57,7 @@ MODULE CableDyn_Model CD_Added_Mass_Element, CD_Added_Mass_Element_Matrix, CD_Added_Mass_Element_Force, & CD_Submerged_Fraction USE CableDyn_VIV, ONLY: CD_VIV_Node_Lift, CD_VIV_Crossflow_Motion, CD_VIV_Phase_Rate, CD_VIV_Mean_Square, & - CD_VIV_Wrap_Phase, CD_VIV_NM, CD_VIV_TWO_PI + CD_VIV_Wrap_Phase, CD_VIV_NM, CD_VIV_TWO_PI, CD_VIV_Node_Inline, CD_VIV_Inline_Phase_Rate USE CableDyn_Dynamic, ONLY: GenAlphaConfig, CD_CableGenAlphaWorkspace, CD_Clear_GenAlpha_Workspace, & CD_Cable_Initial_Acceleration, CD_Cable_Gen_Alpha_Step, CD_Cable_Step_Loads, & CD_DYN_OK, CD_DYN_ALLOCFAIL, & @@ -98,6 +98,7 @@ MODULE CableDyn_Model PUBLIC :: CD_Set_Model_VIV PUBLIC :: CD_Latch_Model_VIV_Window PUBLIC :: CD_Get_Model_VIV_State, CD_Set_Model_VIV_State, CD_Model_Has_VIV, CD_Get_Model_VIV_Lift + PUBLIC :: CD_Model_Has_VIV_Inline PUBLIC :: CD_Get_Model_Tension PUBLIC :: CD_Get_Model_Internal_Rates PUBLIC :: CD_Get_Model_EndForces @@ -153,6 +154,7 @@ MODULE CableDyn_Model TYPE :: CD_ModelCommitSlot REAL(wp), ALLOCATABLE :: q(:), v(:), a(:), ve_dl_1(:), syrope_slow(:), syrope_tmax(:) REAL(wp), ALLOCATABLE :: fr_anchor(:, :), l0_c(:), l0_dot_c(:), viv_phi(:), viv_ms(:, :) + REAL(wp), ALLOCATABLE :: vil_phi(:), vil_ms(:, :) END TYPE CD_ModelCommitSlot ! Diagnostics of the rotation- and snap-resolved sub-stepping (CD_Step_Model): calls counts @@ -410,6 +412,17 @@ MODULE CableDyn_Model REAL(wp), ALLOCATABLE :: viv_phi_rollback(:), viv_ms_rollback(:, :) REAL(wp), ALLOCATABLE :: recovery_viv_phi(:), recovery_viv_ms(:, :) REAL(wp), ALLOCATABLE :: viv_phi_eval(:), viv_rate(:), viv_ms_next(:, :), viv_phi_next(:) + ! In-line VIV (CD_Set_Model_VIV clx, il_alpha; Ulveseter et al. 2018): per element the in-line + ! shedding coefficient vil_cx (0 = no in-line force), per node the band vil_alpha, the in-line + ! phase vil_phi and the running mean squares of the in-line velocity and acceleration vil_ms, + ! with the cross-flow state's rollback, recovery, eval, rate and next twins. vil_node marks a + ! cross-flow node next to a vil_cx > 0 element. + LOGICAL :: has_viv_il = .FALSE. + REAL(wp), ALLOCATABLE :: vil_cx(:), vil_alpha(:) + LOGICAL, ALLOCATABLE :: vil_node(:) + REAL(wp), ALLOCATABLE :: vil_phi(:), vil_ms(:, :), vil_phi_rollback(:), vil_ms_rollback(:, :) + REAL(wp), ALLOCATABLE :: recovery_vil_phi(:), recovery_vil_ms(:, :) + REAL(wp), ALLOCATABLE :: vil_phi_eval(:), vil_rate(:), vil_ms_next(:, :), vil_phi_next(:) TYPE(GenAlphaConfig) :: cfg ! Run audit of the committed host steps (CD_Audit_Model_Step), diagnostics only: never part ! of the state, of a copy, or of a result. audit_t holds the segment tensions of the last two @@ -2301,6 +2314,13 @@ LOGICAL FUNCTION sub_alloc(model, has_pres) RESULT(ok) IF (istat /= 0) RETURN END IF END IF + IF (model%has_viv_il) THEN + IF (.NOT. sized(s%vil_phi, SIZE(model%vil_phi))) THEN + IF (ALLOCATED(s%vil_phi)) DEALLOCATE (s%vil_phi, s%vil_ms) + ALLOCATE (s%vil_phi(SIZE(model%vil_phi)), s%vil_ms(2, SIZE(model%vil_phi)), STAT=istat) + IF (istat /= 0) RETURN + END IF + END IF END ASSOCIATE END DO IF (.NOT. sized(model%sub_t0, model%n_elem)) THEN @@ -2331,11 +2351,12 @@ END FUNCTION sized END FUNCTION sub_alloc SUBROUTINE commit_state_copy(model, to_model, q, v, a, ve_dl_1, syrope_slow, syrope_tmax, fr_anchor, & - l0_c, l0_dot_c, viv_phi, viv_ms) + l0_c, l0_dot_c, viv_phi, viv_ms, vil_phi, vil_ms) !! The one list of the state a line step commits: the kinematics, the viscoelastic dl_1, the !! Syrope slow strain and running maximum tension, the friction anchors, the unstretched !! lengths and rates the committed state was reached with (l0_c, l0_dot_c, active line - !! control), and the VIV shedding phases and running mean squares. to_model = + !! control), and the VIV shedding phases and running mean squares (cross-flow, and in-line + !! with vil_phi, vil_ms). to_model = !! .FALSE. saves the model's state into the arrays given, .TRUE. returns the model to them. !! Every snapshot of the committed state in this module goes through here (the sub-step !! slots of CD_Step_Model, save_recovery_state and restore_recovery_state). A state a step @@ -2349,6 +2370,7 @@ SUBROUTINE commit_state_copy(model, to_model, q, v, a, ve_dl_1, syrope_slow, syr REAL(wp), INTENT(INOUT) :: q(:), v(:), a(:) REAL(wp), INTENT(INOUT), OPTIONAL :: ve_dl_1(:), syrope_slow(:), syrope_tmax(:), fr_anchor(:, :) REAL(wp), INTENT(INOUT), OPTIONAL :: l0_c(:), l0_dot_c(:), viv_phi(:), viv_ms(:, :) + REAL(wp), INTENT(INOUT), OPTIONAL :: vil_phi(:), vil_ms(:, :) IF (to_model) THEN model%q = q model%v = v @@ -2368,6 +2390,11 @@ SUBROUTINE commit_state_copy(model, to_model, q, v, a, ve_dl_1, syrope_slow, syr model%viv_ms = viv_ms model%viv_phi_eval = viv_phi END IF + IF (model%has_viv_il .AND. PRESENT(vil_phi) .AND. PRESENT(vil_ms)) THEN + model%vil_phi = vil_phi + model%vil_ms = vil_ms + model%vil_phi_eval = vil_phi + END IF ELSE q = model%q v = model%v @@ -2386,6 +2413,10 @@ SUBROUTINE commit_state_copy(model, to_model, q, v, a, ve_dl_1, syrope_slow, syr viv_phi = model%viv_phi viv_ms = model%viv_ms END IF + IF (model%has_viv_il .AND. PRESENT(vil_phi) .AND. PRESENT(vil_ms)) THEN + vil_phi = model%vil_phi + vil_ms = model%vil_ms + END IF END IF END SUBROUTINE commit_state_copy @@ -2397,7 +2428,8 @@ SUBROUTINE sub_store(model, slot) model%sub_slot(slot)%ve_dl_1, model%sub_slot(slot)%syrope_slow, & model%sub_slot(slot)%syrope_tmax, model%sub_slot(slot)%fr_anchor, & model%sub_slot(slot)%l0_c, model%sub_slot(slot)%l0_dot_c, & - model%sub_slot(slot)%viv_phi, model%sub_slot(slot)%viv_ms) + model%sub_slot(slot)%viv_phi, model%sub_slot(slot)%viv_ms, & + model%sub_slot(slot)%vil_phi, model%sub_slot(slot)%vil_ms) END SUBROUTINE sub_store SUBROUTINE sub_load(model, slot) @@ -2408,7 +2440,8 @@ SUBROUTINE sub_load(model, slot) model%sub_slot(slot)%ve_dl_1, model%sub_slot(slot)%syrope_slow, & model%sub_slot(slot)%syrope_tmax, model%sub_slot(slot)%fr_anchor, & model%sub_slot(slot)%l0_c, model%sub_slot(slot)%l0_dot_c, & - model%sub_slot(slot)%viv_phi, model%sub_slot(slot)%viv_ms) + model%sub_slot(slot)%viv_phi, model%sub_slot(slot)%viv_ms, & + model%sub_slot(slot)%vil_phi, model%sub_slot(slot)%vil_ms) END SUBROUTINE sub_load SUBROUTINE sub_lengths_target(model) @@ -2736,6 +2769,7 @@ SUBROUTINE step_model_plain(model, dt, converged, stalled, n_iter, ErrStat, ErrM CALL viv_step_begin(model, dt, ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) THEN model%viv_phi_eval = model%viv_phi + IF (model%has_viv_il) model%vil_phi_eval = model%vil_phi RETURN END IF END IF @@ -2857,6 +2891,7 @@ SUBROUTINE step_model_plain(model, dt, converged, stalled, n_iter, ErrStat, ErrM IF (ALLOCATED(f_ext_new)) model%f_ext = f_ext_new model%ve_dt = CD_ZERO IF (model%has_viv) model%viv_phi_eval = model%viv_phi + IF (model%has_viv_il) model%vil_phi_eval = model%vil_phi CALL CD_Profile_Count_Line_Step(n_iter) IF (es /= CD_DYN_OK) THEN ErrStat = model_status_from_dyn(es) @@ -2993,6 +3028,11 @@ SUBROUTINE step_model_plain(model, dt, converged, stalled, n_iter, ErrStat, ErrM model%viv_phi = model%viv_phi_next model%viv_ms = model%viv_ms_next model%viv_phi_eval = model%viv_phi + IF (model%has_viv_il) THEN + model%vil_phi = model%vil_phi_next + model%vil_ms = model%vil_ms_next + model%vil_phi_eval = model%vil_phi + END IF END IF model%q = model%q_step model%v = model%v_step @@ -3376,7 +3416,8 @@ SUBROUTINE save_recovery_state(model) CALL commit_state_copy(model, .FALSE., model%recovery_q0, model%recovery_v0, model%recovery_a0, & model%recovery_ve_dl_1, model%recovery_syrope_slow, model%recovery_syrope_tmax, & model%recovery_fr_anchor, model%recovery_l0_c, model%recovery_l0_dot_c, & - model%recovery_viv_phi, model%recovery_viv_ms) + model%recovery_viv_phi, model%recovery_viv_ms, model%recovery_vil_phi, & + model%recovery_vil_ms) END SUBROUTINE save_recovery_state SUBROUTINE restore_recovery_state(model) @@ -3385,7 +3426,8 @@ SUBROUTINE restore_recovery_state(model) CALL commit_state_copy(model, .TRUE., model%recovery_q0, model%recovery_v0, model%recovery_a0, & model%recovery_ve_dl_1, model%recovery_syrope_slow, model%recovery_syrope_tmax, & model%recovery_fr_anchor, model%recovery_l0_c, model%recovery_l0_dot_c, & - model%recovery_viv_phi, model%recovery_viv_ms) + model%recovery_viv_phi, model%recovery_viv_ms, model%recovery_vil_phi, & + model%recovery_vil_ms) model%ve_dt = CD_ZERO END SUBROUTINE restore_recovery_state @@ -3883,7 +3925,7 @@ SUBROUTINE CD_Set_Model_Syrope_State(model, slow, tmax, ErrStat, ErrMsg) END SUBROUTINE CD_Set_Model_Syrope_State SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, ErrMsg, phase_seed, & - tangent_reversed) + tangent_reversed, clx, il_alpha) !! Install the cross-flow VIV model (CableDyn_VIV) on an initialised line. Per element: !! the lift coefficient cl (0 = no lift on that element), hydrodynamic diameter, and the !! synchronisation centre cf and half-range df of the non-dimensional shedding frequency; @@ -3899,6 +3941,10 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, !! An all-zero cl leaves the model without VIV. The mesh must be the single chain the !! line builder makes (element e joins nodes e and e+1). The caller recomputes the !! acceleration if the lift should enter the initial state (CD_Recompute_Model_Acceleration). + !! In-line VIV (Ulveseter et al. 2018; both or neither): clx, per element, the in-line shedding + !! coefficient (0: none; > 0 only where cl > 0, the in-line phase running at twice the + !! cross-flow one) and il_alpha its band (0 <= alpha < 1); the in-line phase of a node starts at + !! twice its cross-flow phase. TYPE(CD_ModelType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: rho, cl(:), diameter(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -3908,8 +3954,10 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, !! MoorDyn's, so a node at rest takes the cross-flow phase pi (CD_VIV_Phase_Rate phi_rest); !! .FALSE. on a line the reader turned around, whose tangent runs as MoorDyn's LOGICAL, INTENT(IN), OPTIONAL :: tangent_reversed + REAL(wp), INTENT(IN), OPTIONAL :: clx(:), il_alpha(:) INTEGER :: n_nodes, n_elem, e, nd, istat, k REAL(wp) :: wsum + LOGICAL :: want_il ErrStat = CD_MODEL_OK ErrMsg = '' @@ -3943,6 +3991,31 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, RETURN END IF END IF + IF (PRESENT(clx) .NEQV. PRESENT(il_alpha)) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV clx and il_alpha go together') + RETURN + END IF + want_il = .FALSE. + IF (PRESENT(clx)) THEN + IF (SIZE(clx) /= n_elem .OR. SIZE(il_alpha) /= n_elem) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV clx and il_alpha must each have shape (n_elem)') + RETURN + END IF + IF (.NOT. (CD_All_Finite(clx) .AND. CD_All_Finite(il_alpha))) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV clx and il_alpha must be finite') + RETURN + END IF + IF (ANY(clx < CD_ZERO) .OR. ANY(clx > CD_ZERO .AND. .NOT. (il_alpha >= CD_ZERO .AND. il_alpha < CD_ONE))) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV needs clx >= 0 and 0 <= il_alpha < 1 where clx > 0') + RETURN + END IF + IF (ANY(clx > CD_ZERO .AND. .NOT. (cl > CD_ZERO))) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV (clx > 0) needs the cross-flow lift (cl > 0) on the same '// & + 'element: its phase rate is twice the cross-flow one') + RETURN + END IF + want_il = ANY(clx > CD_ZERO) + END IF CALL clear_viv(model) IF (.NOT. ANY(cl > CD_ZERO)) RETURN IF (.NOT. (CD_Is_Finite(rho) .AND. rho > CD_ZERO)) THEN @@ -4020,6 +4093,43 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, model%viv_phi_rest = 0.5_wp*CD_VIV_TWO_PI IF (PRESENT(tangent_reversed)) model%viv_phi_rest = MERGE(0.5_wp*CD_VIV_TWO_PI, CD_ZERO, tangent_reversed) model%has_viv = .TRUE. + IF (.NOT. want_il) RETURN + ALLOCATE (model%vil_cx(n_elem), model%vil_alpha(n_nodes), model%vil_node(n_nodes), model%vil_phi(n_nodes), & + model%vil_ms(2, n_nodes), model%vil_phi_rollback(n_nodes), model%vil_ms_rollback(2, n_nodes), & + model%recovery_vil_phi(n_nodes), model%recovery_vil_ms(2, n_nodes), model%vil_phi_eval(n_nodes), & + model%vil_rate(n_nodes), model%vil_ms_next(2, n_nodes), model%vil_phi_next(n_nodes), STAT=istat) + IF (istat /= 0) THEN + CALL clear_viv(model) + CALL alloc_fail(ErrStat, ErrMsg, 'in-line VIV storage allocation failed') + RETURN + END IF + model%vil_cx = MERGE(clx, CD_ZERO, clx > CD_ZERO) + model%vil_alpha = CD_ZERO + model%vil_node = .FALSE. + model%vil_phi = CD_ZERO + model%vil_ms = CD_ZERO + DO nd = 2, n_nodes - 1 + IF (.NOT. model%viv_node(nd)) CYCLE + wsum = CD_ZERO + DO k = nd - 1, nd + IF (.NOT. (clx(k) > CD_ZERO)) CYCLE + wsum = wsum + model%l0(k) + model%vil_alpha(nd) = model%vil_alpha(nd) + model%l0(k)*il_alpha(k) + END DO + IF (.NOT. (wsum > CD_ZERO)) CYCLE + model%vil_node(nd) = .TRUE. + model%vil_alpha(nd) = model%vil_alpha(nd)/wsum + model%vil_phi(nd) = CD_VIV_Wrap_Phase(2.0_wp*model%viv_phi(nd)) + END DO + model%vil_phi_rollback = model%vil_phi + model%vil_ms_rollback = model%vil_ms + model%recovery_vil_phi = model%vil_phi + model%recovery_vil_ms = model%vil_ms + model%vil_phi_eval = model%vil_phi + model%vil_rate = CD_ZERO + model%vil_ms_next = model%vil_ms + model%vil_phi_next = model%vil_phi + model%has_viv_il = .TRUE. END SUBROUTINE CD_Set_Model_VIV SUBROUTINE CD_Latch_Model_VIV_Window(model, dt) @@ -4034,17 +4144,22 @@ SUBROUTINE CD_Latch_Model_VIV_Window(model, dt) model%viv_tw = REAL(CD_VIV_NM, wp)*dt END SUBROUTINE CD_Latch_Model_VIV_Window - SUBROUTINE CD_Get_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg) + SUBROUTINE CD_Get_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi_x, ms_x) !! Copy the committed VIV state for a checkpoint: the shedding phase per node (n_nodes), !! the running mean squares of the cross-flow velocity and acceleration (2, n_nodes), and - !! the averaging time (0 while unlatched). A model without VIV returns zeros. + !! the averaging time (0 while unlatched). A model without VIV returns zeros. phi_x and ms_x + !! (both or neither, same shapes) take the in-line phase and mean squares, zero without + !! in-line VIV. TYPE(CD_ModelType), INTENT(IN) :: model REAL(wp), INTENT(OUT) :: phi(:), ms(:, :), t_window INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg + REAL(wp), INTENT(OUT), OPTIONAL :: phi_x(:), ms_x(:, :) phi = CD_ZERO ms = CD_ZERO t_window = CD_ZERO + IF (PRESENT(phi_x)) phi_x = CD_ZERO + IF (PRESENT(ms_x)) ms_x = CD_ZERO ErrStat = CD_MODEL_OK ErrMsg = '' IF (.NOT. model%initialized) THEN @@ -4056,20 +4171,36 @@ SUBROUTINE CD_Get_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg) CALL fail(ErrStat, ErrMsg, 'VIV state outputs must have shapes (n_nodes) and (2, n_nodes)') RETURN END IF + IF (PRESENT(phi_x) .NEQV. PRESENT(ms_x)) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV state outputs phi_x and ms_x go together') + RETURN + END IF + IF (PRESENT(phi_x)) THEN + IF (SIZE(phi_x) /= model%n_dof/3 .OR. SIZE(ms_x, 1) /= 2 .OR. SIZE(ms_x, 2) /= model%n_dof/3) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV state outputs must have shapes (n_nodes) and (2, n_nodes)') + RETURN + END IF + END IF IF (.NOT. model%has_viv) RETURN phi = model%viv_phi ms = model%viv_ms t_window = model%viv_tw + IF (PRESENT(phi_x) .AND. model%has_viv_il) THEN + phi_x = model%vil_phi + ms_x = model%vil_ms + END IF END SUBROUTINE CD_Get_Model_VIV_State - SUBROUTINE CD_Set_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg) + SUBROUTINE CD_Set_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi_x, ms_x) !! Overwrite the committed VIV state from a checkpoint (see CD_Get_Model_VIV_State). !! Fails closed on a model without VIV, a shape mismatch, non-finite values, a negative - !! mean square or averaging time. + !! mean square or averaging time. A model with in-line VIV needs phi_x and ms_x, one without + !! refuses them. TYPE(CD_ModelType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: phi(:), ms(:, :), t_window INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg + REAL(wp), INTENT(IN), OPTIONAL :: phi_x(:), ms_x(:, :) ErrStat = CD_MODEL_OK ErrMsg = '' IF (.NOT. model%initialized) THEN @@ -4093,6 +4224,31 @@ SUBROUTINE CD_Set_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg) CALL fail(ErrStat, ErrMsg, 'VIV mean squares and averaging time must be non-negative') RETURN END IF + IF (((PRESENT(phi_x) .AND. PRESENT(ms_x)) .NEQV. model%has_viv_il) .OR. (PRESENT(phi_x) .NEQV. PRESENT(ms_x))) THEN + CALL fail(ErrStat, ErrMsg, 'the in-line VIV state (phi_x, ms_x) goes with a model with in-line VIV') + RETURN + END IF + IF (model%has_viv_il) THEN + IF (SIZE(phi_x) /= model%n_dof/3 .OR. SIZE(ms_x, 1) /= 2 .OR. SIZE(ms_x, 2) /= model%n_dof/3) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV state inputs must have shapes (n_nodes) and (2, n_nodes)') + RETURN + END IF + IF (.NOT. (CD_All_Finite(phi_x) .AND. CD_All_Finite(ms_x))) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV state mirror must be finite') + RETURN + END IF + IF (ANY(ms_x < CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV mean squares must be non-negative') + RETURN + END IF + model%vil_phi = phi_x + model%vil_ms = ms_x + model%vil_phi_rollback = phi_x + model%vil_ms_rollback = ms_x + model%recovery_vil_phi = phi_x + model%recovery_vil_ms = ms_x + model%vil_phi_eval = phi_x + END IF model%viv_phi = phi model%viv_ms = ms model%viv_tw = t_window @@ -4111,8 +4267,7 @@ SUBROUTINE CD_Get_Model_VIV_Lift(model, lift, ErrStat, ErrMsg) REAL(wp), INTENT(OUT) :: lift(:, :) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - INTEGER :: nd, ia - REAL(wp) :: coef, uu(3) + INTEGER :: nd LOGICAL :: ok lift = CD_ZERO ErrStat = CD_MODEL_OK @@ -4129,30 +4284,81 @@ SUBROUTINE CD_Get_Model_VIV_Lift(model, lift, ErrStat, ErrMsg) IF (.NOT. model%has_viv) RETURN DO nd = 2, model%n_dof/3 - 1 IF (.NOT. model%viv_node(nd)) CYCLE - CALL viv_node_coef(model, model%q, nd, coef, uu) - ia = 3*nd - 2 - CALL CD_VIV_Node_Lift(model%q(ia - 3:ia - 1), model%q(ia + 3:ia + 5), smoothed(model%v, ia), uu, coef, & - model%viv_phi(nd), lift(:, nd), ok) + CALL viv_node_load(model, model%q, model%v, nd, .FALSE., lift(:, nd), ok) END DO END SUBROUTINE CD_Get_Model_VIV_Lift + PURE LOGICAL FUNCTION CD_Model_Has_VIV_Inline(model) RESULT(has) + !! True if the model carries the in-line VIV phase state (as well as the cross-flow one). + TYPE(CD_ModelType), INTENT(IN) :: model + has = model%has_viv_il + END FUNCTION CD_Model_Has_VIV_Inline + + SUBROUTINE viv_node_load(model, q, v, nd, in_step, force, ok, jac_v, jac_prev, jac_next) + !! The VIV load on interior node nd at (q, v): the cross-flow lift (CD_VIV_Node_Lift) and, + !! with in-line VIV, the in-line force (CD_VIV_Node_Inline), at the step's evaluation phases + !! (in_step) or the committed ones, with the smoothed node velocity; the residual Jacobians + !! with respect to that velocity and the two neighbour positions (all three or none). + TYPE(CD_ModelType), INTENT(IN) :: model + REAL(wp), INTENT(IN) :: q(:), v(:) + INTEGER, INTENT(IN) :: nd + LOGICAL, INTENT(IN) :: in_step + REAL(wp), INTENT(OUT) :: force(3) + LOGICAL, INTENT(OUT) :: ok + REAL(wp), INTENT(OUT), OPTIONAL :: jac_v(3, 3), jac_prev(3, 3), jac_next(3, 3) + REAL(wp) :: coef, coefx, uu(3), phi, fx(3), jv(3, 3), jp(3, 3), jn(3, 3) + INTEGER :: ia + LOGICAL :: il + il = .FALSE. + IF (model%has_viv_il) il = model%vil_node(nd) + IF (il) THEN + CALL viv_node_coef(model, q, nd, coef, uu, coefx) + ELSE + CALL viv_node_coef(model, q, nd, coef, uu) + END IF + ia = 3*nd - 2 + phi = model%viv_phi(nd) + IF (in_step) phi = model%viv_phi_eval(nd) + IF (PRESENT(jac_v)) THEN + CALL CD_VIV_Node_Lift(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coef, phi, force, ok, & + jac_v, jac_prev, jac_next) + ELSE + CALL CD_VIV_Node_Lift(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coef, phi, force, ok) + END IF + IF (.NOT. (ok .AND. il)) RETURN + phi = model%vil_phi(nd) + IF (in_step) phi = model%vil_phi_eval(nd) + IF (PRESENT(jac_v)) THEN + CALL CD_VIV_Node_Inline(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coefx, phi, fx, ok, jv, jp, jn) + jac_v = jac_v + jv + jac_prev = jac_prev + jp + jac_next = jac_next + jn + ELSE + CALL CD_VIV_Node_Inline(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coefx, phi, fx, ok) + END IF + force = force + fx + END SUBROUTINE viv_node_load + PURE LOGICAL FUNCTION CD_Model_Has_VIV(model) RESULT(has) !! True if the model carries the cross-flow VIV phase state. TYPE(CD_ModelType), INTENT(IN) :: model has = model%has_viv END FUNCTION CD_Model_Has_VIV - SUBROUTINE viv_node_coef(model, q, nd, coef, uu) + SUBROUTINE viv_node_coef(model, q, nd, coef, uu, coefx) !! Lift scale of interior node nd at positions q, sum over its two elements of !! (1/2 l0_e w_e)(1/2 rho D_e Cl_e) with w_e the wetted fraction under the drag waterline - !! (as MoorDyn's 1/4 rho d Cl (F_i l_i + F_i+1 l_i+1)), and the ambient fluid velocity there. + !! (as MoorDyn's 1/4 rho d Cl (F_i l_i + F_i+1 l_i+1)), and the ambient fluid velocity there; + !! coefx (optional, in-line VIV) the same sum with the in-line coefficient C_x. TYPE(CD_ModelType), INTENT(IN) :: model REAL(wp), INTENT(IN) :: q(:) INTEGER, INTENT(IN) :: nd REAL(wp), INTENT(OUT) :: coef, uu(3) + REAL(wp), INTENT(OUT), OPTIONAL :: coefx INTEGER :: e REAL(wp) :: wla, wlb, frac coef = CD_ZERO + IF (PRESENT(coefx)) coefx = CD_ZERO DO e = nd - 1, nd IF (.NOT. (model%viv_cl(e) > CD_ZERO)) CYCLE wla = CD_ZERO @@ -4163,6 +4369,7 @@ SUBROUTINE viv_node_coef(model, q, nd, coef, uu) END IF CALL CD_Submerged_Fraction(q(3*e) - wla, q(3*e + 3) - wlb, frac) coef = coef + 0.25_wp*model%viv_rho*model%viv_d(e)*model%viv_cl(e)*model%l0(e)*frac + IF (PRESENT(coefx)) coefx = coefx + 0.25_wp*model%viv_rho*model%viv_d(e)*model%vil_cx(e)*model%l0(e)*frac END DO uu = CD_ZERO IF (ALLOCATED(model%fluid_velocity)) uu = model%fluid_velocity(:, nd) @@ -4180,7 +4387,7 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: nd, ia - REAL(wp) :: w, alpha_f, yd, ydd, un, coef, uu(3) + REAL(wp) :: w, alpha_f, yd, ydd, un, coef, uu(3), xd, xdd LOGICAL :: ok ErrStat = CD_MODEL_OK ErrMsg = '' @@ -4191,12 +4398,17 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) model%viv_rate = CD_ZERO model%viv_ms_next = model%viv_ms model%viv_phi_eval = model%viv_phi + IF (model%has_viv_il) THEN + model%vil_rate = CD_ZERO + model%vil_ms_next = model%vil_ms + model%vil_phi_eval = model%vil_phi + END IF DO nd = 2, model%n_dof/3 - 1 IF (.NOT. model%viv_node(nd)) CYCLE CALL viv_node_coef(model, model%q, nd, coef, uu) ia = 3*nd - 2 CALL CD_VIV_Crossflow_Motion(model%q(ia - 3:ia - 1), model%q(ia + 3:ia + 5), smoothed(model%v, ia), & - smoothed(model%a, ia), uu, yd, ydd, un, ok) + smoothed(model%a, ia), uu, yd, ydd, un, ok, xd, xdd) IF (.NOT. ok) THEN CALL fail(ErrStat, ErrMsg, 'VIV phase: the neighbours of a node coincide (no line tangent)') RETURN @@ -4207,6 +4419,13 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) model%viv_phi(nd), un, model%viv_dn(nd), model%viv_cf(nd), & model%viv_df(nd), phi_rest=model%viv_phi_rest) model%viv_phi_eval(nd) = model%viv_phi(nd) + (CD_ONE - alpha_f)*dt*model%viv_rate(nd) + IF (.NOT. model%has_viv_il) CYCLE + IF (.NOT. model%vil_node(nd)) CYCLE + model%vil_ms_next(1, nd) = CD_VIV_Mean_Square(model%vil_ms(1, nd), xd, w) + model%vil_ms_next(2, nd) = CD_VIV_Mean_Square(model%vil_ms(2, nd), xdd, w) + model%vil_rate(nd) = CD_VIV_Inline_Phase_Rate(xd, xdd, model%vil_ms_next(1, nd), model%vil_ms_next(2, nd), & + model%vil_phi(nd), model%viv_rate(nd), model%vil_alpha(nd)) + model%vil_phi_eval(nd) = model%vil_phi(nd) + (CD_ONE - alpha_f)*dt*model%vil_rate(nd) END DO END SUBROUTINE viv_step_begin @@ -4220,18 +4439,20 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: nd, ia - REAL(wp) :: w, yd, ydd, un, coef, uu(3), ms1, ms2, rate_end + REAL(wp) :: w, yd, ydd, un, coef, uu(3), ms1, ms2, rate_end, xd, xdd, rate_end_x LOGICAL :: ok ErrStat = CD_MODEL_OK ErrMsg = '' w = MIN(CD_ONE, dt/model%viv_tw) model%viv_phi_next = model%viv_phi + IF (model%has_viv_il) model%vil_phi_next = model%vil_phi DO nd = 2, model%n_dof/3 - 1 IF (.NOT. model%viv_node(nd)) CYCLE CALL viv_node_coef(model, model%q_step, nd, coef, uu) ia = 3*nd - 2 CALL CD_VIV_Crossflow_Motion(model%q_step(ia - 3:ia - 1), model%q_step(ia + 3:ia + 5), & - smoothed(model%v_step, ia), smoothed(model%a_step, ia), uu, yd, ydd, un, ok) + smoothed(model%v_step, ia), smoothed(model%a_step, ia), uu, yd, ydd, un, ok, & + xd, xdd) IF (.NOT. ok) THEN CALL fail(ErrStat, ErrMsg, 'VIV phase: the neighbours of a node coincide (no line tangent)') RETURN @@ -4241,10 +4462,23 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) rate_end = CD_VIV_Phase_Rate(yd, ydd, ms1, ms2, model%viv_phi(nd) + dt*model%viv_rate(nd), un, & model%viv_dn(nd), model%viv_cf(nd), model%viv_df(nd), phi_rest=model%viv_phi_rest) model%viv_phi_next(nd) = CD_VIV_Wrap_Phase(model%viv_phi(nd) + 0.5_wp*dt*(model%viv_rate(nd) + rate_end)) + IF (.NOT. model%has_viv_il) CYCLE + IF (.NOT. model%vil_node(nd)) CYCLE + ! the in-line rate at the end state is slaved to the end cross-flow rate (Eq. 6) + ms1 = CD_VIV_Mean_Square(model%vil_ms_next(1, nd), xd, w) + ms2 = CD_VIV_Mean_Square(model%vil_ms_next(2, nd), xdd, w) + rate_end_x = CD_VIV_Inline_Phase_Rate(xd, xdd, ms1, ms2, model%vil_phi(nd) + dt*model%vil_rate(nd), & + rate_end, model%vil_alpha(nd)) + model%vil_phi_next(nd) = CD_VIV_Wrap_Phase(model%vil_phi(nd) + 0.5_wp*dt*(model%vil_rate(nd) + rate_end_x)) END DO IF (.NOT. CD_All_Finite(model%viv_phi_next)) THEN CALL fail(ErrStat, ErrMsg, 'VIV phase update produced a non-finite phase') END IF + IF (model%has_viv_il) THEN + IF (.NOT. CD_All_Finite(model%vil_phi_next)) THEN + CALL fail(ErrStat, ErrMsg, 'in-line VIV phase update produced a non-finite phase') + END IF + END IF END SUBROUTINE viv_step_end PURE FUNCTION smoothed(x, ia) RESULT(xs) @@ -4282,6 +4516,20 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%viv_rate)) DEALLOCATE (model%viv_rate) IF (ALLOCATED(model%viv_ms_next)) DEALLOCATE (model%viv_ms_next) IF (ALLOCATED(model%viv_phi_next)) DEALLOCATE (model%viv_phi_next) + IF (ALLOCATED(model%vil_cx)) DEALLOCATE (model%vil_cx) + IF (ALLOCATED(model%vil_alpha)) DEALLOCATE (model%vil_alpha) + IF (ALLOCATED(model%vil_node)) DEALLOCATE (model%vil_node) + IF (ALLOCATED(model%vil_phi)) DEALLOCATE (model%vil_phi) + IF (ALLOCATED(model%vil_ms)) DEALLOCATE (model%vil_ms) + IF (ALLOCATED(model%vil_phi_rollback)) DEALLOCATE (model%vil_phi_rollback) + IF (ALLOCATED(model%vil_ms_rollback)) DEALLOCATE (model%vil_ms_rollback) + IF (ALLOCATED(model%recovery_vil_phi)) DEALLOCATE (model%recovery_vil_phi) + IF (ALLOCATED(model%recovery_vil_ms)) DEALLOCATE (model%recovery_vil_ms) + IF (ALLOCATED(model%vil_phi_eval)) DEALLOCATE (model%vil_phi_eval) + IF (ALLOCATED(model%vil_rate)) DEALLOCATE (model%vil_rate) + IF (ALLOCATED(model%vil_ms_next)) DEALLOCATE (model%vil_ms_next) + IF (ALLOCATED(model%vil_phi_next)) DEALLOCATE (model%vil_phi_next) + model%has_viv_il = .FALSE. model%has_viv = .FALSE. model%viv_rho = CD_ZERO model%viv_tw = CD_ZERO @@ -7040,6 +7288,33 @@ SUBROUTINE CD_Copy_Model(src, dst, ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN CALL copy_real1(src%viv_phi_next, work%viv_phi_next, 'viv_phi_next', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN + work%has_viv_il = src%has_viv_il + CALL copy_real1(src%vil_cx, work%vil_cx, 'vil_cx', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%vil_alpha, work%vil_alpha, 'vil_alpha', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_logical1(src%vil_node, work%vil_node, 'vil_node', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%vil_phi, work%vil_phi, 'vil_phi', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real2(src%vil_ms, work%vil_ms, 'vil_ms', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%vil_phi_rollback, work%vil_phi_rollback, 'vil_phi_rollback', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real2(src%vil_ms_rollback, work%vil_ms_rollback, 'vil_ms_rollback', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%recovery_vil_phi, work%recovery_vil_phi, 'recovery_vil_phi', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real2(src%recovery_vil_ms, work%recovery_vil_ms, 'recovery_vil_ms', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%vil_phi_eval, work%vil_phi_eval, 'vil_phi_eval', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%vil_rate, work%vil_rate, 'vil_rate', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real2(src%vil_ms_next, work%vil_ms_next, 'vil_ms_next', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%vil_phi_next, work%vil_phi_next, 'vil_phi_next', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN work%initialized = src%initialized ! Commit: release the caller's previous model, then move the fully-built copy in component by @@ -7196,6 +7471,20 @@ SUBROUTINE commit_model_copy(from, to) CALL MOVE_ALLOC(from%viv_rate, to%viv_rate) CALL MOVE_ALLOC(from%viv_ms_next, to%viv_ms_next) CALL MOVE_ALLOC(from%viv_phi_next, to%viv_phi_next) + to%has_viv_il = from%has_viv_il + CALL MOVE_ALLOC(from%vil_cx, to%vil_cx) + CALL MOVE_ALLOC(from%vil_alpha, to%vil_alpha) + CALL MOVE_ALLOC(from%vil_node, to%vil_node) + CALL MOVE_ALLOC(from%vil_phi, to%vil_phi) + CALL MOVE_ALLOC(from%vil_ms, to%vil_ms) + CALL MOVE_ALLOC(from%vil_phi_rollback, to%vil_phi_rollback) + CALL MOVE_ALLOC(from%vil_ms_rollback, to%vil_ms_rollback) + CALL MOVE_ALLOC(from%recovery_vil_phi, to%recovery_vil_phi) + CALL MOVE_ALLOC(from%recovery_vil_ms, to%recovery_vil_ms) + CALL MOVE_ALLOC(from%vil_phi_eval, to%vil_phi_eval) + CALL MOVE_ALLOC(from%vil_rate, to%vil_rate) + CALL MOVE_ALLOC(from%vil_ms_next, to%vil_ms_next) + CALL MOVE_ALLOC(from%vil_phi_next, to%vil_phi_next) IF (from%has_bathymetry) THEN to%bathymetry%nx = from%bathymetry%nx @@ -7842,16 +8131,14 @@ SUBROUTINE model_contributor_load(model, q, v, force, jac_q, jac_v, ErrStat, Err IF (model%has_viv) THEN BLOCK INTEGER :: nd, ia - REAL(wp) :: fl(3), jv3(3, 3), jp3(3, 3), jn3(3, 3), coef, uu(3) + REAL(wp) :: fl(3), jv3(3, 3), jp3(3, 3), jn3(3, 3) LOGICAL :: ok DO nd = 2, SIZE(q)/3 - 1 IF (.NOT. model%viv_node(nd)) CYCLE - CALL viv_node_coef(model, q, nd, coef, uu) ia = 3*nd - 2 - CALL CD_VIV_Node_Lift(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coef, & - model%viv_phi_eval(nd), fl, ok, jv3, jp3, jn3) + CALL viv_node_load(model, q, v, nd, .TRUE., fl, ok, jv3, jp3, jn3) IF (.NOT. ok) THEN - CALL fail(ErrStat, ErrMsg, 'VIV lift: the neighbours of a node coincide (no line tangent)') + CALL fail(ErrStat, ErrMsg, 'VIV load: the neighbours of a node coincide (no line tangent)') RETURN END IF force(ia:ia + 2) = force(ia:ia + 2) + fl @@ -8161,16 +8448,14 @@ SUBROUTINE model_contributor_load_banded(model, q, v, free, kl, ku, force, jac_q ! and the position Jacobian through the node tangent (the two neighbours) BLOCK INTEGER :: nd, ia, ra, cb - REAL(wp) :: fl(3), jv3(3, 3), jp3(3, 3), jn3(3, 3), coef, uu(3) + REAL(wp) :: fl(3), jv3(3, 3), jp3(3, 3), jn3(3, 3) LOGICAL :: ok DO nd = 2, n/3 - 1 IF (.NOT. model%viv_node(nd)) CYCLE - CALL viv_node_coef(model, q, nd, coef, uu) ia = 3*nd - 2 - CALL CD_VIV_Node_Lift(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coef, & - model%viv_phi_eval(nd), fl, ok, jv3, jp3, jn3) + CALL viv_node_load(model, q, v, nd, .TRUE., fl, ok, jv3, jp3, jn3) IF (.NOT. ok) THEN - CALL fail(ErrStat, ErrMsg, 'VIV lift: the neighbours of a node coincide (no line tangent)') + CALL fail(ErrStat, ErrMsg, 'VIV load: the neighbours of a node coincide (no line tangent)') RETURN END IF force(ia:ia + 2) = force(ia:ia + 2) + fl @@ -8413,16 +8698,14 @@ SUBROUTINE model_contributor_force(model, q, v, force, ErrStat, ErrMsg, end_node IF (model%has_viv .AND. .NOT. ends) THEN BLOCK INTEGER :: nd, ia - REAL(wp) :: fl(3), coef, uu(3) + REAL(wp) :: fl(3) LOGICAL :: ok DO nd = 2, nn - 1 IF (.NOT. model%viv_node(nd)) CYCLE - CALL viv_node_coef(model, q, nd, coef, uu) ia = 3*nd - 2 - CALL CD_VIV_Node_Lift(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coef, & - model%viv_phi_eval(nd), fl, ok) + CALL viv_node_load(model, q, v, nd, .TRUE., fl, ok) IF (.NOT. ok) THEN - CALL fail(ErrStat, ErrMsg, 'VIV lift: the neighbours of a node coincide (no line tangent)') + CALL fail(ErrStat, ErrMsg, 'VIV load: the neighbours of a node coincide (no line tangent)') RETURN END IF force(ia:ia + 2) = force(ia:ia + 2) + fl diff --git a/src/CableDyn_System.f90 b/src/CableDyn_System.f90 index 272563b8..0f1fd327 100644 --- a/src/CableDyn_System.f90 +++ b/src/CableDyn_System.f90 @@ -18,6 +18,7 @@ MODULE CableDyn_System CD_Model_Has_Viscoelastic, CD_Get_Model_VE_Dl1, CD_Set_Model_VE_Dl1, & CD_Model_Has_Syrope, CD_Get_Model_Syrope_State, CD_Set_Model_Syrope_State, & CD_Model_Has_VIV, CD_Get_Model_VIV_State, CD_Set_Model_VIV_State, CD_Get_Model_VIV_Lift, & + CD_Model_Has_VIV_Inline, & CD_Model_Has_Friction, CD_Get_Model_Friction_Anchors, CD_Set_Model_Friction_Anchors, & CD_Latch_Model_VIV_Window, & CD_Get_Model_EndNodeMassDiag, CD_Get_Model_EndNodeAddedMass, & @@ -236,6 +237,8 @@ MODULE CableDyn_System ! VIV shedding phase and cross-flow mean squares join the snapshot (phi then the two ! mean squares per node, 3 per node: sized like snap_q, line by line). REAL(wp), ALLOCATABLE :: snap_viv(:) + ! and the in-line phase and mean squares of a line with in-line VIV, laid out the same way + REAL(wp), ALLOCATABLE :: snap_vil(:) LOGICAL :: snap_valid = .FALSE. ! Adaptive-substep fallback tripwire: how many times CD_Step_System entered the ! subdivision retry of this system since its initialisation or the last @@ -478,6 +481,7 @@ SUBROUTINE CD_End_System(system, ErrStat, ErrMsg) IF (ALLOCATED(system%snap_fbase)) DEALLOCATE (system%snap_fbase) IF (ALLOCATED(system%snap_ve_dl_1)) DEALLOCATE (system%snap_ve_dl_1) IF (ALLOCATED(system%snap_viv)) DEALLOCATE (system%snap_viv) + IF (ALLOCATED(system%snap_vil)) DEALLOCATE (system%snap_vil) IF (ALLOCATED(system%snap_syrope_slow)) DEALLOCATE (system%snap_syrope_slow, system%snap_syrope_tmax) IF (ALLOCATED(system%snap_fr_anchor)) DEALLOCATE (system%snap_fr_anchor) IF (ALLOCATED(system%snap_sub)) DEALLOCATE (system%snap_sub) @@ -954,19 +958,22 @@ END SUBROUTINE CD_Get_System_Line_Syrope_State PURE INTEGER FUNCTION CD_System_Line_VIV_MirrorSize(system, line_index) RESULT(n) !! Reals of one contained line's VIV checkpoint block (CD_Get_System_Line_VIV_State): - !! 3 per node plus the averaging time, or 0 for a line without VIV. + !! 3 per node plus the averaging time, 3 per node more with in-line VIV, or 0 for a line + !! without VIV. TYPE(CD_SystemType), INTENT(IN) :: system INTEGER, INTENT(IN) :: line_index n = 0 IF (line_index < 1 .OR. line_index > system%n_lines) RETURN IF (.NOT. CD_Model_Has_VIV(system%lines(line_index))) RETURN n = 3*SIZE(system%lines(line_index)%viv_phi) + 1 + IF (CD_Model_Has_VIV_Inline(system%lines(line_index))) n = n + 3*SIZE(system%lines(line_index)%viv_phi) END FUNCTION CD_System_Line_VIV_MirrorSize SUBROUTINE CD_Get_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg) !! One contained line's committed VIV state as a flat checkpoint block: the shedding !! phases (n_nodes), the cross-flow velocity and acceleration mean squares interleaved - !! per node (2 n_nodes), then the averaging time. + !! per node (2 n_nodes), then the averaging time; with in-line VIV then the in-line phases + !! and mean squares the same way (3 n_nodes). TYPE(CD_SystemType), INTENT(IN) :: system INTEGER, INTENT(IN) :: line_index REAL(wp), INTENT(OUT) :: buf(:) @@ -974,7 +981,7 @@ SUBROUTINE CD_Get_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: nn, es CHARACTER(160) :: em - REAL(wp), ALLOCATABLE :: phi(:), ms(:, :) + REAL(wp), ALLOCATABLE :: phi(:), ms(:, :), phx(:), msx(:, :) buf = CD_ZERO CALL validate_line_index(system, line_index, ErrStat, ErrMsg) @@ -983,9 +990,9 @@ SUBROUTINE CD_Get_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg CALL fail(ErrStat, ErrMsg, 'line VIV state block has the wrong size') RETURN END IF - nn = (SIZE(buf) - 1)/3 - ALLOCATE (phi(nn), ms(2, nn)) - CALL CD_Get_Model_VIV_State(system%lines(line_index), phi, ms, buf(3*nn + 1), es, em) + nn = SIZE(system%lines(line_index)%viv_phi) + ALLOCATE (phi(nn), ms(2, nn), phx(nn), msx(2, nn)) + CALL CD_Get_Model_VIV_State(system%lines(line_index), phi, ms, buf(3*nn + 1), es, em, phi_x=phx, ms_x=msx) IF (es /= CD_MODEL_OK) THEN ErrStat = CD_SYSTEM_SOLVEFAIL ErrMsg = 'CableDyn_System: line VIV state query failed: '//TRIM(em) @@ -993,6 +1000,10 @@ SUBROUTINE CD_Get_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg END IF buf(1:nn) = phi buf(nn + 1:3*nn) = RESHAPE(ms, [2*nn]) + IF (CD_Model_Has_VIV_Inline(system%lines(line_index))) THEN + buf(3*nn + 2:4*nn + 1) = phx + buf(4*nn + 2:6*nn + 1) = RESHAPE(msx, [2*nn]) + END IF ErrStat = CD_SYSTEM_OK ErrMsg = '' END SUBROUTINE CD_Get_System_Line_VIV_State @@ -1014,9 +1025,15 @@ SUBROUTINE CD_Set_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg CALL fail(ErrStat, ErrMsg, 'line VIV state block has the wrong size') RETURN END IF - nn = (SIZE(buf) - 1)/3 - CALL CD_Set_Model_VIV_State(system%lines(line_index), buf(1:nn), RESHAPE(buf(nn + 1:3*nn), [2, nn]), & - buf(3*nn + 1), es, em) + nn = SIZE(system%lines(line_index)%viv_phi) + IF (CD_Model_Has_VIV_Inline(system%lines(line_index))) THEN + CALL CD_Set_Model_VIV_State(system%lines(line_index), buf(1:nn), RESHAPE(buf(nn + 1:3*nn), [2, nn]), & + buf(3*nn + 1), es, em, phi_x=buf(3*nn + 2:4*nn + 1), & + ms_x=RESHAPE(buf(4*nn + 2:6*nn + 1), [2, nn])) + ELSE + CALL CD_Set_Model_VIV_State(system%lines(line_index), buf(1:nn), RESHAPE(buf(nn + 1:3*nn), [2, nn]), & + buf(3*nn + 1), es, em) + END IF IF (es /= CD_MODEL_OK) THEN ErrStat = CD_SYSTEM_SOLVEFAIL ErrMsg = 'CableDyn_System: line VIV state reload failed: '//TRIM(em) @@ -1429,7 +1446,7 @@ RECURSIVE SUBROUTINE CD_Step_System(system, dt, q_coupled, v_coupled, a_coupled, LOGICAL :: conv2, stall2 CHARACTER(1024) :: em REAL(wp), ALLOCATABLE :: q0(:), v0(:), a0(:), qm(:), vm(:), am(:), qs(:), vs(:), as(:) - REAL(wp), ALLOCATABLE :: dl1s(:), slows(:), tmaxs(:), frs(:, :), hmaxs(:), l0cs(:), l0dcs(:), vivs(:) + REAL(wp), ALLOCATABLE :: dl1s(:), slows(:), tmaxs(:), frs(:, :), hmaxs(:), l0cs(:), l0dcs(:), vivs(:), vils(:) TYPE(CD_SubstepStats), ALLOCATABLE :: subs(:) converged = .FALSE. @@ -1571,8 +1588,9 @@ RECURSIVE SUBROUTINE CD_Step_System(system, dt, q_coupled, v_coupled, a_coupled, IF (CD_Model_Has_Friction(system%lines(i))) nfr = nfr + SIZE(system%lines(i)%fr_anchor, 2) END DO ALLOCATE (qs(ntot), vs(ntot), as(ntot), dl1s(nve), slows(nsy), tmaxs(nsy), frs(2, nfr), & - hmaxs(system%n_lines), subs(system%n_lines), l0cs(nel), l0dcs(nel), vivs(ntot)) + hmaxs(system%n_lines), subs(system%n_lines), l0cs(nel), l0dcs(nel), vivs(ntot), vils(ntot)) vivs = CD_ZERO + vils = CD_ZERO lo = 1 lo_ve = 1 lo_sy = 1 @@ -1588,6 +1606,7 @@ RECURSIVE SUBROUTINE CD_Step_System(system, dt, q_coupled, v_coupled, a_coupled, hmaxs(i) = system%lines(i)%audit_hmax subs(i) = system%lines(i)%sub_stats IF (system%lines(i)%has_viv) CALL pack_viv(system%lines(i), vivs(lo:hi)) + IF (system%lines(i)%has_viv_il) CALL pack_vil(system%lines(i), vils(lo:hi)) lo = hi + 1 ne = SIZE(system%lines(i)%l0_c) l0cs(lo_el:lo_el + ne - 1) = system%lines(i)%l0_c @@ -1638,6 +1657,7 @@ RECURSIVE SUBROUTINE CD_Step_System(system, dt, q_coupled, v_coupled, a_coupled, system%lines(i)%audit_hmax = hmaxs(i) system%lines(i)%sub_stats = subs(i) IF (system%lines(i)%has_viv) CALL unpack_viv(system%lines(i), vivs(lo:hi)) + IF (system%lines(i)%has_viv_il) CALL unpack_vil(system%lines(i), vils(lo:hi)) lo = hi + 1 ne = SIZE(system%lines(i)%l0_c) system%lines(i)%l0_c = l0cs(lo_el:lo_el + ne - 1) @@ -3353,6 +3373,10 @@ SUBROUTINE save_line_states(system, ErrStat, ErrMsg) system%lines(i)%viv_phi_rollback = system%lines(i)%viv_phi system%lines(i)%viv_ms_rollback = system%lines(i)%viv_ms END IF + IF (system%lines(i)%has_viv_il) THEN + system%lines(i)%vil_phi_rollback = system%lines(i)%vil_phi + system%lines(i)%vil_ms_rollback = system%lines(i)%vil_ms + END IF END DO END SUBROUTINE save_line_states @@ -3383,6 +3407,11 @@ SUBROUTINE restore_line_states(system) system%lines(i)%viv_ms = system%lines(i)%viv_ms_rollback system%lines(i)%viv_phi_eval = system%lines(i)%viv_phi END IF + IF (system%lines(i)%has_viv_il) THEN + system%lines(i)%vil_phi = system%lines(i)%vil_phi_rollback + system%lines(i)%vil_ms = system%lines(i)%vil_ms_rollback + system%lines(i)%vil_phi_eval = system%lines(i)%vil_phi + END IF END DO END SUBROUTINE restore_line_states @@ -3408,6 +3437,27 @@ PURE SUBROUTINE unpack_viv(line, buf) line%viv_phi_eval = line%viv_phi END SUBROUTINE unpack_viv + PURE SUBROUTINE pack_vil(line, buf) + !! A line's committed in-line VIV state as 3 reals per node (pack_viv's layout). + TYPE(CD_ModelType), INTENT(IN) :: line + REAL(wp), INTENT(OUT) :: buf(:) + INTEGER :: nn + nn = SIZE(line%vil_phi) + buf(1:nn) = line%vil_phi + buf(nn + 1:3*nn) = RESHAPE(line%vil_ms, [2*nn]) + END SUBROUTINE pack_vil + + PURE SUBROUTINE unpack_vil(line, buf) + !! Inverse of pack_vil; the in-step phase returns to the committed one. + TYPE(CD_ModelType), INTENT(INOUT) :: line + REAL(wp), INTENT(IN) :: buf(:) + INTEGER :: nn + nn = SIZE(line%vil_phi) + line%vil_phi = buf(1:nn) + line%vil_ms = RESHAPE(buf(nn + 1:3*nn), [2, nn]) + line%vil_phi_eval = line%vil_phi + END SUBROUTINE unpack_vil + SUBROUTINE restore_failed_step(system, failed_stat, msg, converged, stalled, n_iter, ErrStat, ErrMsg) TYPE(CD_SystemType), INTENT(INOUT) :: system INTEGER, INTENT(IN) :: failed_stat @@ -3507,7 +3557,8 @@ SUBROUTINE CD_System_Snapshot(system, ErrStat, ErrMsg) ALLOCATE (system%snap_l0(netot), system%snap_l0_dot(netot), system%snap_fbase(ntot), & system%snap_l0_c(netot), system%snap_l0_dot_c(netot), & system%snap_ve_dl_1(netot), system%snap_syrope_slow(netot), & - system%snap_syrope_tmax(netot), system%snap_fr_anchor(ntot), system%snap_viv(ntot)) + system%snap_syrope_tmax(netot), system%snap_fr_anchor(ntot), system%snap_viv(ntot), & + system%snap_vil(ntot)) END BLOCK END IF lo = 1 @@ -3522,6 +3573,7 @@ SUBROUTINE CD_System_Snapshot(system, ErrStat, ErrMsg) system%snap_fr_anchor(lo:lo + 2*SIZE(system%lines(i)%fr_anchor, 2) - 1) = & RESHAPE(system%lines(i)%fr_anchor, [2*SIZE(system%lines(i)%fr_anchor, 2)]) IF (system%lines(i)%has_viv) CALL pack_viv(system%lines(i), system%snap_viv(lo:hi)) + IF (system%lines(i)%has_viv_il) CALL pack_vil(system%lines(i), system%snap_vil(lo:hi)) lo = hi + 1 END DO IF (.NOT. ALLOCATED(system%snap_sub)) ALLOCATE (system%snap_sub(system%n_lines)) @@ -3592,6 +3644,7 @@ SUBROUTINE CD_System_Restore(system, ErrStat, ErrMsg) system%lines(i)%fr_anchor = RESHAPE(system%snap_fr_anchor(lo:lo + 2*SIZE(system%lines(i)%fr_anchor, 2) - 1), & [2, SIZE(system%lines(i)%fr_anchor, 2)]) IF (system%lines(i)%has_viv) CALL unpack_viv(system%lines(i), system%snap_viv(lo:hi)) + IF (system%lines(i)%has_viv_il) CALL unpack_vil(system%lines(i), system%snap_vil(lo:hi)) lo = hi + 1 END DO IF (ALLOCATED(system%snap_sub)) THEN diff --git a/tests/test_model.f90 b/tests/test_model.f90 index a16f32e5..35e48fe0 100644 --- a/tests/test_model.f90 +++ b/tests/test_model.f90 @@ -53,7 +53,8 @@ PROGRAM test_model CALL case_resolved_substeps() CALL case_substep_paths() CALL case_substep_snap_only() - CALL case_substeps_restore_viv_state() + CALL case_substeps_restore_viv_state(.FALSE.) + CALL case_substeps_restore_viv_state(.TRUE.) CALL case_coupled_load_sign() CALL case_coupled_motion_update() CALL case_external_load_update() @@ -1721,7 +1722,7 @@ SUBROUTINE case_damping_model_load() CALL require(es == CD_MODEL_OK, 'damping:end') END SUBROUTINE case_damping_model_load - SUBROUTINE case_substeps_restore_viv_state() + SUBROUTINE case_substeps_restore_viv_state(inline) !! The rotation-resolved sub-stepping of a line carrying VIV: a 10 m taut line in a 0.5 m/s !! cross current with Cl 0.8 on every element, End B heaved by 1 m over 2 s so that its !! chords turn by more than a degree per 0.02 s step. Solving the first sub-stepped pass @@ -1729,14 +1730,16 @@ SUBROUTINE case_substeps_restore_viv_state() !! nothing bit for bit, the shedding phases and running mean squares included; a failing !! sub-step (TEST-ONLY sub_test_fail) returns the plain step, and the run then equals the !! run with ei0_substeps off bit for bit. Without the VIV state in the sub-step slots the - !! sub-steps advanced the phase again from the plain step's phase. + !! sub-steps advanced the phase again from the plain step's phase. inline adds in-line VIV + !! (clx 0.85): its phase and mean squares follow the same rules, and a model copy carries them. + LOGICAL, INTENT(IN) :: inline INTEGER, PARAMETER :: NE = 10, NN = NE + 1, NSTEP = 60 REAL(wp), PARAMETER :: DT = 0.02_wp, AMP = 1.0_wp, PER = 2.0_wp TYPE(CD_ModelType) :: auto_m, rep_m, fb_m, off_m TYPE(GenAlphaConfig) :: cfg INTEGER :: conn(2, NE), fixed(6), es, k, n_iter REAL(wp) :: q0(3*NN), v0(3*NN), f_ext(3*NN), pq(3*NN), pv(3*NN), pa(3*NN), fluid(3, NN), wl(NN) - REAL(wp) :: l0(NE), ea(NE), rho_a(NE), cl(NE), dia(NE), cf(NE), df(NE), phi0(NN), w, t + REAL(wp) :: l0(NE), ea(NE), rho_a(NE), cl(NE), dia(NE), cf(NE), df(NE), phi0(NN), w, t, phx0(NN) LOGICAL :: conv, stalled, all_conv CHARACTER(200) :: em @@ -1766,10 +1769,17 @@ SUBROUTINE case_substeps_restore_viv_state() drag_diameter=0.1_wp, drag_cdn=1.2_wp, drag_cdt=0.0_wp) CALL require(es == CD_MODEL_OK, 'substep-viv:init: '//TRIM(em)) IF (es /= CD_MODEL_OK) RETURN - CALL CD_Set_Model_VIV(auto_m, 1025.0_wp, cl, dia, cf, df, 0.25_wp, es, em) + IF (inline) THEN + CALL CD_Set_Model_VIV(auto_m, 1025.0_wp, cl, dia, cf, df, 0.25_wp, es, em, clx=0.85_wp + 0.0_wp*cl, & + il_alpha=0.15_wp + 0.0_wp*cl) + ELSE + CALL CD_Set_Model_VIV(auto_m, 1025.0_wp, cl, dia, cf, df, 0.25_wp, es, em) + END IF CALL require(es == CD_MODEL_OK, 'substep-viv:viv: '//TRIM(em)) IF (es /= CD_MODEL_OK) RETURN + CALL require(auto_m%has_viv_il .EQV. inline, 'substep-viv:in-line installed as asked') phi0 = auto_m%viv_phi + IF (inline) phx0 = auto_m%vil_phi CALL CD_Copy_Model(auto_m, rep_m, es, em) rep_m%sub_test_repeat = .TRUE. CALL CD_Copy_Model(auto_m, fb_m, es, em) @@ -1807,6 +1817,14 @@ SUBROUTINE case_substeps_restore_viv_state() CALL require(fb_m%sub_stats%fallbacks > 0 .AND. ALL(fb_m%q == off_m%q) .AND. ALL(fb_m%v == off_m%v) .AND. & ALL(fb_m%a == off_m%a) .AND. ALL(fb_m%viv_phi == off_m%viv_phi) .AND. & ALL(fb_m%viv_ms == off_m%viv_ms), 'substep-viv:fallback-is-the-plain-step') + IF (inline) THEN + CALL require(rep_m%has_viv_il .AND. fb_m%has_viv_il .AND. off_m%has_viv_il, 'substep-viv:copies-carry-in-line') + CALL require(ANY(auto_m%vil_phi /= phx0) .AND. ANY(auto_m%vil_ms /= 0.0_wp), 'substep-viv:in-line-states-move') + CALL require(ALL(rep_m%vil_phi == auto_m%vil_phi) .AND. ALL(rep_m%vil_ms == auto_m%vil_ms), & + 'substep-viv:in-line-restore-is-complete') + CALL require(ALL(fb_m%vil_phi == off_m%vil_phi) .AND. ALL(fb_m%vil_ms == off_m%vil_ms), & + 'substep-viv:in-line-fallback-is-the-plain-step') + END IF CALL CD_End_Model(auto_m, es, em) CALL CD_End_Model(rep_m, es, em) CALL CD_End_Model(fb_m, es, em) diff --git a/tests/test_viv_coupled.f90 b/tests/test_viv_coupled.f90 index fd9aa2a6..53045117 100644 --- a/tests/test_viv_coupled.f90 +++ b/tests/test_viv_coupled.f90 @@ -23,7 +23,10 @@ PROGRAM test_viv_coupled !! step: 0.5 s), and over 500 coupling steps when the deck has no dtM (5 s); !! * phase seed: MoorDyn's 2 pi i/N with node i counted from the deck's End A, also on a deck !! written anchor first (which the reader turns around) and, through CD_Deck_VIV_Phase_Seed, - !! at the deck nodes of a refined mesh (added nodes interpolated in arc length). + !! at the deck nodes of a refined mesh (added nodes interpolated in arc length); + !! * in-line VIV (a VIV section, ClX 0.85, on both lines): the checkpoint blocks grow by the + !! in-line phase and mean squares (3 per node), the restarted run continues bit for bit with + !! both phases, a rebuild without the VIV state does not, and a rewound step repeats. USE CableDyn_Precision, ONLY: wp USE CableDyn_OpenFAST_Aggregate, ONLY: CD_AGG_ModuleType, CD_AGG_Init_From_Deck, CD_AGG_End, CD_AGG_OK, & CD_AGG_NMovingPoints, CD_AGG_GetMovingPointMesh, CD_AGG_Step_Moving, & @@ -41,15 +44,23 @@ PROGRAM test_viv_coupled REAL(wp), PARAMETER :: MD_AD = 0.662_wp, MD_F = 0.293_wp INTEGER, PARAMETER :: MID = 26 INTEGER :: nfail + ! the deck of the restart and rewind cases, and whether its lines carry in-line VIV + CHARACTER(32) :: deck_name = 'viv_coupled.dat' + LOGICAL :: il_case = .FALSE. nfail = 0 CALL write_deck('viv_coupled.dat', 0.8_wp) CALL write_deck('viv_coupled_nolift.dat', 0.0_wp) + CALL write_deck('viv_coupled_il.dat', 0.8_wp, inline=.TRUE.) CALL case_lockin() CALL case_restart() CALL case_rewind() CALL case_window() CALL case_seed() + deck_name = 'viv_coupled_il.dat' + il_case = .TRUE. + CALL case_restart() + CALL case_rewind() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' coupled VIV check(s) failed' ERROR STOP 1 @@ -96,7 +107,7 @@ SUBROUTINE case_restart() TYPE(CD_AGG_ModuleType) :: a, b, c INTEGER :: s LOGICAL :: same_b, same_c - IF (.NOT. start(a, 'viv_coupled.dat')) RETURN + IF (.NOT. start(a, TRIM(deck_name))) RETURN DO s = 1, NPRE IF (.NOT. advance(a)) RETURN END DO @@ -111,8 +122,8 @@ SUBROUTINE case_restart() same_b = same_b .AND. identical(a, b) same_c = same_c .AND. identical(a, c) END DO - CALL check(same_b, 'the restarted run continues bit for bit') - CALL check(.NOT. same_c, 'a restart without the VIV state does not') + CALL check(same_b, TRIM(deck_name)//': the restarted run continues bit for bit') + CALL check(.NOT. same_c, TRIM(deck_name)//': a restart without the VIV state does not') CALL finish(a) CALL finish(b) CALL finish(c) @@ -123,8 +134,8 @@ SUBROUTINE case_rewind() TYPE(CD_AGG_ModuleType) :: a, b INTEGER :: s, es CHARACTER(512) :: em - IF (.NOT. start(a, 'viv_coupled.dat')) RETURN - IF (.NOT. start(b, 'viv_coupled.dat')) RETURN + IF (.NOT. start(a, TRIM(deck_name))) RETURN + IF (.NOT. start(b, TRIM(deck_name))) RETURN DO s = 1, 500 IF (.NOT. advance(a)) RETURN IF (.NOT. advance(b)) RETURN @@ -138,7 +149,7 @@ SUBROUTINE case_rewind() IF (.NOT. advance(a)) RETURN IF (.NOT. advance(b)) RETURN END DO - CALL check(identical(a, b), 'a rewound step repeats bit for bit') + CALL check(identical(a, b), TRIM(deck_name)//': a rewound step repeats bit for bit') CALL CD_AGG_End(a, es, em) CALL CD_AGG_End(b, es, em) END SUBROUTINE case_rewind @@ -285,7 +296,7 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) fresh(:) INTEGER :: es, npt, il, ndof, nv, nvc CHARACTER(512) :: em - ok = start(b, 'viv_coupled.dat') + ok = start(b, TRIM(deck_name)) IF (.NOT. ok) RETURN npt = CD_AGG_NMovingPoints(a, es, em) ALLOCATE (pos(3, npt), vel(3, npt), acc(3, npt), load(3, npt)) @@ -300,7 +311,7 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) a_interior=aL(4:ndof - 3)) ok = ok .AND. es == CD_SYSTEM_OK nv = CD_System_Line_VIV_MirrorSize(a%sys%fast%system, il) - ok = ok .AND. nv == 3*(ndof/3) + 1 + ok = ok .AND. nv == MERGE(6, 3, il_case)*(ndof/3) + 1 IF (with_viv .AND. nv > 0) THEN ALLOCATE (buf(nv)) CALL CD_Get_System_Line_VIV_State(a%sys%fast%system, il, buf, es, em) @@ -313,7 +324,7 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) ALLOCATE (buf(CD_HFMF_MirrorSize(a%cables(1))), fresh(CD_HFMF_MirrorSize(b%cables(1)))) CALL CD_HFMF_PackMirror(a%cables(1), buf, es, em) nvc = CD_HFMF_VIVMirrorSize(a%cables(1)) - ok = ok .AND. nvc == 3*a%cables(1)%line%nn + 1 + ok = ok .AND. nvc == MERGE(6, 3, il_case)*a%cables(1)%line%nn + 1 IF (.NOT. with_viv) THEN ! the cable's VIV block as the fresh build has it (the torsion-free cable ends with it) CALL CD_HFMF_PackMirror(b%cables(1), fresh, es, em) @@ -325,12 +336,16 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) END FUNCTION rebuild LOGICAL FUNCTION identical(a, b) RESULT(same) - !! Both lines' state and shedding phases are the same bits. + !! Both lines' state and shedding phases (in-line too in the in-line case) are the same bits. TYPE(CD_AGG_ModuleType), INTENT(IN) :: a, b same = MAXVAL(ABS(a%sys%fast%system%lines(1)%q - b%sys%fast%system%lines(1)%q)) <= 0.0_wp .AND. & MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_phi - b%sys%fast%system%lines(1)%viv_phi)) <= 0.0_wp .AND. & MAXVAL(ABS(a%cables(1)%line%q - b%cables(1)%line%q)) <= 0.0_wp .AND. & MAXVAL(ABS(a%cables(1)%line%viv_phi - b%cables(1)%line%viv_phi)) <= 0.0_wp + IF (.NOT. (same .AND. il_case)) RETURN + same = a%sys%fast%system%lines(1)%has_viv_il .AND. a%cables(1)%line%has_viv_il .AND. & + MAXVAL(ABS(a%sys%fast%system%lines(1)%vil_phi - b%sys%fast%system%lines(1)%vil_phi)) <= 0.0_wp .AND. & + MAXVAL(ABS(a%cables(1)%line%vil_phi - b%cables(1)%line%vil_phi)) <= 0.0_wp END FUNCTION identical SUBROUTINE response(z, ad, f) @@ -355,13 +370,14 @@ SUBROUTINE response(z, ad, f) IF (n > 1) f = REAL(n - 1, wp)/(t1 - t0) END SUBROUTINE response - SUBROUTINE write_deck(path, cl, window, dtm, anchor_first) + SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline) !! The EI = 0 riser (line 1) and the finite-EI cable (line 2), 20 m apart across the current; - !! VIVrmsWindow 0.25 s unless window is given (0: none), and a deck dtM when dtm is given. + !! VIVrmsWindow 0.25 s unless window is given (0: none), and a deck dtM when dtm is given; + !! inline adds the in-line VIV of both types (a VIV section, ClX 0.85). CHARACTER(*), INTENT(IN) :: path REAL(wp), INTENT(IN) :: cl REAL(wp), INTENT(IN), OPTIONAL :: window, dtm - LOGICAL, INTENT(IN), OPTIONAL :: anchor_first + LOGICAL, INTENT(IN), OPTIONAL :: anchor_first, inline INTEGER :: u LOGICAL :: stock REAL(wp) :: tw @@ -396,6 +412,15 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first) WRITE (u, '(A)') '1 riser 1 2 '//TRIM(ADJUSTL(len_txt))//' 50 -' WRITE (u, '(A)') '2 cable 3 4 '//TRIM(ADJUSTL(len_txt))//' 50 -' END IF + IF (PRESENT(inline)) THEN + IF (inline) THEN + WRITE (u, '(A)') '--------------------- VIV ---' + WRITE (u, '(A)') 'TypeName ClX alpha' + WRITE (u, '(A)') '(name) (-) (-)' + WRITE (u, '(A)') 'riser 0.85 0.15' + WRITE (u, '(A)') 'cable 0.85 0.15' + END IF + END IF WRITE (u, '(A)') '--------------------- OPTIONS ---' WRITE (u, '(A)') '100.0 WtrDpth' WRITE (u, '(A)') '1025.0 rhoW' diff --git a/tests/test_viv_inline_deck.f90 b/tests/test_viv_inline_deck.f90 index a84c40c3..39162cfc 100644 --- a/tests/test_viv_inline_deck.f90 +++ b/tests/test_viv_inline_deck.f90 @@ -8,8 +8,11 @@ PROGRAM test_viv_inline_deck !! D1 with ClX 0.85 the quarter-span in-line (y) response oscillates at twice the mid-span !! cross-flow (z) frequency and is larger than without the VIV section; !! D2 a VIV row with ClX 0 is the deck without the section, to the printed digits; - !! D3 malformed rows, an unknown or repeated type, ClX on a type without the cross-flow lift, - !! alpha outside [0, 1) and in-line VIV on an EI = 0 line are refused by name. + !! D3 malformed rows, an unknown or repeated type, ClX on a type without the cross-flow lift + !! and alpha outside [0, 1) are refused by name; + !! D4 the same deck as an EI = 0 line (the lumped node force, neighbour-averaged kinematics) + !! matches the finite-EI cable: cross-flow and in-line amplitudes within 2 %, the same + !! frequencies within one 0.01 Hz bin. USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK IMPLICIT NONE @@ -222,6 +225,34 @@ SUBROUTINE check_runs() ay_cf/D CALL require(ABS(fy/fz - 2.0_wp) <= 0.15_wp, 'D1: the in-line response is at twice the cross-flow frequency') CALL require(ay_il > 2.0_wp*ay_cf, 'D1: the in-line force raises the in-line response') + ! D4: the EI = 0 line + BLOCK + REAL(wp), ALLOCATABLE :: te(:, :) + INTEGER :: ne0 + REAL(wp) :: az_f, az_0, ay_f, ay_0, fz_f, fy_f + CALL window(ti, ni, 50.0_wp, tt, z, y) + az_f = 0.5_wp*(MAXVAL(z) - MINVAL(z)) + ay_f = 0.5_wp*(MAXVAL(y) - MINVAL(y)) + fz_f = peak_frequency(tt, z) + fy_f = peak_frequency(tt, y) + CALL write_deck('vid_ei0.dat', 'riser 0.85 0.15', 100.0_wp, ei='0.0') + CALL run('vid_ei0.dat', 'vid_ei0', ok, msg) + CALL require(ok, 'D4: the EI = 0 in-line VIV deck runs: '//TRIM(msg)) + CALL read_out('vid_ei0.out', te, ne0) + CALL require(ne0 == ni, 'D4: the EI = 0 run wrote the same rows') + IF (ne0 /= ni) RETURN + CALL window(te, ne0, 50.0_wp, tt, z, y) + az_0 = 0.5_wp*(MAXVAL(z) - MINVAL(z)) + ay_0 = 0.5_wp*(MAXVAL(y) - MINVAL(y)) + WRITE (*, '(A,2F8.4,A,2F8.4)') 'D4: CF and IL amplitude/D, EI = 0 line ', az_0/D, ay_0/D, & + ', finite-EI cable ', az_f/D, ay_f/D + WRITE (*, '(A,2F8.4,A,2F8.4)') 'D4: CF and IL frequency [Hz], EI = 0 line ', peak_frequency(tt, z), & + peak_frequency(tt, y), ', finite-EI cable ', fz_f, fy_f + CALL require(ABS(az_0/az_f - 1.0_wp) <= 0.02_wp .AND. ABS(ay_0/ay_f - 1.0_wp) <= 0.02_wp, & + 'D4: the EI = 0 line matches the cable''s amplitudes within 2 %') + CALL require(ABS(peak_frequency(tt, z) - fz_f) <= 0.01_wp .AND. ABS(peak_frequency(tt, y) - fy_f) <= 0.01_wp, & + 'D4: and its frequencies within 0.01 Hz') + END BLOCK END SUBROUTINE check_runs SUBROUTINE check_refusals() @@ -232,7 +263,6 @@ SUBROUTINE check_refusals() CALL refused('riser 0.85 1.0', '0 <= alpha < 1', 'alpha = 1') CALL refused('riser 0.85 x', 'plain numbers', 'a non-numeric alpha') CALL refused('riser 0.85', 'cross-flow lift', 'ClX on a type without the cross-flow lift', cl='0.0') - CALL refused('riser 0.85', 'finite-EI lines', 'in-line VIV on an EI = 0 line', ei='0.0') END SUBROUTINE check_refusals SUBROUTINE refused(rows, needle, what, ei, cl) From a0e8c0434ae1f52067aaa8a3c1f6cbff7fd911a4 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Wed, 11 Nov 2026 22:00:04 +0900 Subject: [PATCH 04/47] feat: load power channels VIVPow, DragPow and DampPow (#147) A VIV study needs the energy ledger of the response: what the VIV loads put into a line against what the drag and the structural damping take out, along the line and over the run. The OUTPUTS channels VIVPow, DragPow and DampPow [W] report the power these loads deliver to line L at the committed state, and N [W/m] the same per unit unstretched length about node J. The power of a load on an element is its nodal (finite-EI: generalised) load times the element's velocities, the exact rate of work of the load the solver applies; a node load delivers f . v at its node. A node takes half of each of its elements' power, so the node values sum to the line total, and an element's damping power, hence a node's, is never positive. - VIV: the cross-flow lift and the in-line force of a VIV section row. - Drag: the Morison drag, and on a finite-EI line its ATTACHMENTS' drag. - Damping: the axial dashpot BA, and the bending dashpot Bb on a finite-EI line. The torsional Bt and the viscoelastic and Syrope laws' internal damping are not included (documented). They run on EI = 0 lines and finite-EI cables, on the single-line, point-system, multibody, coupled (OpenFAST, FAST.Farm) and C API routes; a static run reports 0. The residual-only Morison drag call of the finite-EI element, written out three times, is one helper now (element_drag_load), with the same arguments as before. Checks: - tests/test_hermite_load_power: the work of the three loads closes a weightless cable's energy balance within 0.04 % of the largest work in a bending-dashpot decay, an axial-dashpot decay, a still-water drag decay and a VIV run in a current; - tests/test_load_power_deck: on the locked-in in-line VIV line the means balance within 0.04 % of the VIV power as a finite-EI cable, an EI = 0 line and two EI = 0 lines joined at a free point; the per-length channels of all nodes sum to the line total; malformed channels are refused by name; - tests/test_viv_coupled: on the coupled route both lines balance within 0.01 %; - the Python deck reader and builder mirror the channels (native parity of 13 spellings); - full ctest 414/414 on the default and Prescott kernels, Debug -fcheck=all on the new and touched tests, pytest, the example fallback scan clean. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 6 + CMakeLists.txt | 10 + doc/capabilities.rst | 5 + doc/driver_format.md | 4 + doc/outputs.rst | 54 +++++ examples/viv_taut_cable_inline.dat | 7 +- python/cabledyn/builder.py | 1 + python/cabledyn/deck_file.py | 42 +++- python/tests/test_builder.py | 13 +- python/tests/test_deck_file.py | 2 + python/tests/test_deck_native_parity.py | 23 ++ src/CableDyn_DeckDriver.f90 | 144 +++++++++++- src/CableDyn_HermiteCableDynamic.f90 | 207 ++++++++++------ src/CableDyn_Model.f90 | 81 +++++++ src/CableDyn_System.f90 | 30 ++- tests/test_hermite_load_power.f90 | 180 ++++++++++++++ tests/test_load_power_deck.f90 | 300 ++++++++++++++++++++++++ tests/test_viv_coupled.f90 | 44 +++- 18 files changed, 1063 insertions(+), 90 deletions(-) create mode 100644 tests/test_hermite_load_power.f90 create mode 100644 tests/test_load_power_deck.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 75944cee..412b2964 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,12 @@ All notable changes to CableDyn are recorded in this file. The format follows finite-EI cables alike (within 1 % of each other). Exact Jacobians; the phase is in the step-recovery, snapshot and checkpoint state; the Python deck reader and builder take the section. +- Load power channels `VIVPow`, `DragPow` and `DampPow` [W], and `N` per + unit length about a node [W/m]: the power the VIV loads, the drag and the structural damping + (`BA`, `Bb`) deliver to a line at the committed state, on `EI = 0` lines and finite-EI cables, + standalone and coupled. Their work closes a cable's energy balance to 0.04 % in free decays + and VIV runs, and on the locked-in line of `examples/viv_taut_cable_inline.dat` their means + balance within 0.5 % of the VIV power. ## [0.4.2] - 2026-11-09 diff --git a/CMakeLists.txt b/CMakeLists.txt index cfd12517..a513c945 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1326,6 +1326,16 @@ target_link_libraries(test_hermite_viv_inline PRIVATE cabledyn_core) add_test(NAME hermite_viv_inline COMMAND test_hermite_viv_inline) set_tests_properties(hermite_viv_inline PROPERTIES LABELS "fortran;dynamic;viv") +add_executable(test_hermite_load_power tests/test_hermite_load_power.f90) +target_link_libraries(test_hermite_load_power PRIVATE cabledyn_core) +add_test(NAME hermite_load_power COMMAND test_hermite_load_power) +set_tests_properties(hermite_load_power PROPERTIES LABELS "fortran;dynamic;viv") + +add_executable(test_load_power_deck tests/test_load_power_deck.f90) +target_link_libraries(test_load_power_deck PRIVATE cabledyn_core) +add_test(NAME load_power_deck COMMAND test_load_power_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(load_power_deck PROPERTIES LABELS "fortran;integration;dynamic;viv;driver") + add_executable(test_viv_inline_deck tests/test_viv_inline_deck.f90) target_link_libraries(test_viv_inline_deck PRIVATE cabledyn_core) add_test(NAME viv_inline_deck COMMAND test_viv_inline_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/doc/capabilities.rst b/doc/capabilities.rst index 165be866..34720cb4 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -201,6 +201,11 @@ Loads and environment - Standalone only - a 6-DOF vessel record, or the RAO response to the deck waves, moves every ``Coupled``/``Vessel`` point of a line deck; see :doc:`options` + * - Load power channels (``VIVPow``, ``DragPow``, ``DampPow``) + - Standalone and coupled + - the power of the VIV loads, the drag and the structural damping on a line, in total and per + unit length about a node, at every output time: the energy ledger of a VIV response; see + :doc:`outputs` * - Range graphs (``r`` line output flag, ``RangeStart``) - Standalone and OpenFAST - minimum, maximum, and mean along each line over the run, from the committed steps; a run diff --git a/doc/driver_format.md b/doc/driver_format.md index 9c7d6382..70cc394b 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -1651,6 +1651,10 @@ bending moment. None of these channels is mandatory. | `TorqN` | line L torque at node J (uniform along the line in statics); positive for a right-handed twist of End B relative to End A about the End A → End B tangent. Only on a line solved in torsion (restrained at both ends, or at one end with the other free) | N·m | | `TwistN` | line L material twist accumulated from End A to node J, `M × Σ L/GJ` (less `(K/GJ)(l − L)` under coupling) over the elements in between; 0 at End A, without the end-spring windup. Only on a line solved in torsion | deg | | `Twist` | line L total twist `Phi − Theta = M C`, end-spring windup included; on a line free at one end the twist of its elements, the free end's turn. Only on a line solved in torsion | deg | +| `VIVPow` | line L power of the VIV loads (cross-flow lift, and the in-line force of a `VIV` section row) at the committed state, positive into the line ([Outputs](outputs.rst)); 0 in static runs | W | +| `DragPow` | line L power of the Morison drag (and, on a finite-EI line, its ATTACHMENTS' drag) | W | +| `DampPow` | line L power of the structural damping (`BA`, and `EI|Bb` on a finite-EI line); never positive | W | +| `VIVPowN`, `DragPowN`, `DampPowN` | the same per unit unstretched length about node J (node J's share: half of each of its elements' power and its own node loads', over half their unstretched length) | W/m | - ``/`

` are deck LINE/POINT **ids**, not array positions. A channel that matches no supported form, names an unknown id, or carries trailing text (for example `Point2px_raw`) is a diff --git a/doc/outputs.rst b/doc/outputs.rst index a9c7ffaa..1e8fb1aa 100644 --- a/doc/outputs.rst +++ b/doc/outputs.rst @@ -864,6 +864,60 @@ lowest value differs from the converged one by 0.6 m. Elements no longer than ab :math:`\sqrt{EI/T}` at touchdown keep the node tension there within about 1.5 % of the converged value through the motion, and a tenth within 0.5 %. +Load power channels +~~~~~~~~~~~~~~~~~~~ + +The power three loads deliver to a line at every output time, for an energy ledger of its +motion: the work the VIV loads put in against what the drag and the structural damping take out, +along the line and over the run. Each is the load times the velocity it acts through at the +committed state, positive when the load puts energy into the line: + +.. list-table:: + :header-rows: 1 + :widths: 24 56 20 + + * - Channel + - Meaning + - Unit + * - ``VIVPow`` + - power of the VIV loads on line ``L``: the cross-flow lift (:ref:`theory-viv`) and, on a + type with a ``VIV`` section row, the in-line force (:ref:`theory-viv-inline`); zero on a + line without VIV + - W + * - ``DragPow`` + - power of the Morison drag on the line (current, waves and a host's fluid field) and, on a + finite-EI line, of its ATTACHMENTS' drag; zero without drag + - W + * - ``DampPow`` + - power of the structural damping: the axial dashpot ``BA`` and, on a finite-EI line, the + bending dashpot (``EI|Bb``); never positive + - W + * - ``VIVPowN``, ``DragPowN``, ``DampPowN`` + - the same per unit unstretched length about node ``J`` + - W/m + +The power of a load on an element is :math:`\mathbf{f}_e\cdot\dot{\mathbf{q}}_e`, its nodal +(finite-EI: generalised) load on the element's degrees of freedom times their velocities, which +is the exact rate of work of the load the solver applies; a node load (the lift of an +``EI = 0`` line, an attachment's drag) delivers :math:`\mathbf{f}\cdot\mathbf{v}` at its node. +A node takes half the power of each of its elements and the power of its own node loads, so the +line total ```` is the sum over its nodes, and ``N`` is node ``J``'s share +over half the unstretched length of its elements (W per metre of unstretched line; on a refined +line, at the deck node's node of the final mesh). An element's damping power is never positive, +so neither is a node's. + +The three are the non-conservative loads of a VIV study, not all of them: the work of the end +supports and points, the seabed contact, damping and friction, the added mass and Froude-Krylov +loads, a body's or point's own drag, the torsional damping ``Bt`` and the internal damping of the +viscoelastic and Syrope laws is not in them. Where those do no net work, the energy the line holds +only oscillates in a steady response, so the means balance: +:math:`\overline{P}_\text{VIV} + \overline{P}_\text{drag} + \overline{P}_\text{damp} \approx 0`. +On the locked-in taut line of ``viv_taut_cable_inline.dat`` (pinned ends, steady current) the VIV +loads put in 8.52 W over 60-90 s, the drag takes out 8.56 W and the axial damping 0.002 W: the +three balance within 0.5 % of the VIV power, the line's loss of energy over the window as its +response settles, and as an ``EI = 0`` line the same. Integrating a channel over the output times gives the work of its +load, :math:`W = \int P\,dt`; a static run reports 0. + Point channels ~~~~~~~~~~~~~~ diff --git a/examples/viv_taut_cable_inline.dat b/examples/viv_taut_cable_inline.dat index f8c64b16..0f388d4d 100644 --- a/examples/viv_taut_cable_inline.dat +++ b/examples/viv_taut_cable_inline.dat @@ -9,7 +9,9 @@ CableDyn driver deck -- cross-flow and in-line VIV of a taut cable in a uniform -- about twice the cross-flow one. Over 60-90 s the quarter span (L1N13py) moves in line at A/D -- 0.19, at twice the 0.29 Hz cross-flow frequency of the mid span (L1N26pz, A/D 0.82); with the -- cross-flow lift alone (drop the VIV section) they are 0.03 and 0.66. The Outputs flag V writes --- the VIV force, lift and in-line, at every node to .Line1.V.out. +-- the VIV force, lift and in-line, at every node to .Line1.V.out. VIVPow1, DragPow1 and +-- DampPow1 are the power the VIV loads, the drag and the axial damping deliver to the line: over +-- 60-90 s the VIV loads put in 8.52 W and the drag and damping take out 8.56 W. --------------------- LINE TYPES --------------------------------------- TypeName Diam MassDenInAir EA BA/-zeta EI Cd_n Cd_t Ca_n Ca_t Cl dF cF (-) (m) (kg/m) (N) (N-s/-) (N-m^2) (-) (-) (-) (-) (-) (-) (-) @@ -57,4 +59,7 @@ none frictionMu - Seabed friction coefficient {none; value>=0} [defau "FairTen1" "L1N26pz" "L1N13py" +"VIVPow1" +"DragPow1" +"DampPow1" --------------------- need this line ----------------------------------- diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 1fd9b948..fe34ed6b 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -117,6 +117,7 @@ re.compile(r"(ten|curvx|curvy|curv|bendmom|stfmom|torq)([0-9]+)(n[0-9]+)", re.IGNORECASE), ), ("line", re.compile(r"(twist)([0-9]+)(n[0-9]+|)", re.IGNORECASE)), + ("line", re.compile(r"(vivpow|dragpow|damppow)([0-9]+)(n[0-9]+|)", re.IGNORECASE)), ("line", re.compile(r"(l)([0-9]+)(n[0-9]+(?:[pva][xyz]|dec|azi))", re.IGNORECASE)), ("point", re.compile(r"(point|con)([0-9]+)(p[xyz])", re.IGNORECASE)), ("point", re.compile(r"(point)([0-9]+)(f[xyzh])", re.IGNORECASE)), diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index c55ac019..fa595d92 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -740,6 +740,20 @@ def _parse_line_node_channel(lowered: str) -> tuple[int, int, int, int]: # Twist: the line's total twist (node 1) line_id = _native_positive_int(lowered, 6, last) return (line_id, 1, 11, 0) if line_id > 0 else (line_id, 0, 0, 0) + for keyword, code in (("vivpow", 15), ("dragpow", 17), ("damppow", 19)): + if not lowered.startswith(keyword): + continue + # the load power channels: the line total (node 1), N per length + prefix = len(keyword) + if last > prefix and "n" not in lowered[prefix:]: + line_id = _native_positive_int(lowered, prefix + 1, last) + return (line_id, 1, code, 0) if line_id > 0 else (line_id, 0, 0, 0) + separator = lowered.find("n", prefix) + if last <= prefix or separator < 0: + return 0, 0, 0, 0 + line_id = _native_positive_int(lowered, prefix + 1, separator) + node_id = _native_positive_int(lowered, separator + 2, last) + return line_id, node_id, code + 1 if line_id > 0 and node_id > 0 else 0, 0 for keyword, code in ( ("torq", 9), ("twist", 10), @@ -822,7 +836,9 @@ def _channel_identity_key(channel: str) -> str: if touchdown is not None and int(touchdown.group(1)) > 0: component = ("s", "x", "y", "z", "lay", "exc", "grd").index(touchdown.group(2)) + 1 return f"tdp:{int(touchdown.group(1))}:{component}" - if lowered.startswith(("ten", "curv", "bendmom", "stfmom", "l", "torq", "twist")): + if lowered.startswith( + ("ten", "curv", "bendmom", "stfmom", "l", "torq", "twist", "vivpow", "dragpow", "damppow") + ): line_id, node_id, kind, component = _parse_line_node_channel(lowered) if line_id > 0 and node_id > 0 and kind > 0: return f"node:{line_id}:{node_id}:{kind}:{component}" @@ -5407,6 +5423,30 @@ def is_body_kind(kind: str, pinned: bool) -> bool: "restrained (END CONNECTIONS TorsStiffness), so it carries no torque" ) continue + if lowered.startswith(("vivpow", "dragpow", "damppow")): + # native: VIVPow/DragPow/DampPow and N, the load power channels + line_number, node_id, kind, _ = _parse_line_node_channel(lowered) + line_id = str(line_number) + if ( + node_id == 0 + and line_id in line_ids + and re.search(r"[0-9]n0(?![0-9])", lowered) is not None + ): + raise DeckFormatError( + f"{self._label}: OUTPUT {channel!r}: node numbers start at 1 = End A " + "(MoorDyn numbers from N0)" + ) + if line_id not in line_ids or kind == 0 or node_id < 1: + raise DeckFormatError( + f"{self._label}: OUTPUT {channel!r}: bad load power channel (use " + "VIVPow, DragPow, DampPow, or N per unit length, " + "with a known line id)" + ) + if node_id > line_nelems[line_id] + 1: + raise DeckFormatError( + f"{self._label}: OUTPUT {channel!r} node exceeds the line node count" + ) + continue if lowered.startswith(("ten", "curv", "bendmom", "stfmom", "l")): # native parse_line_node_channel: Ten/Curv/BendMom/StfMomN, LN... line_number, node_id, kind, _ = _parse_line_node_channel(lowered) diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index 2e0abd73..dea9ad8c 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -267,7 +267,16 @@ def test_edit_fields_in_place_and_revalidate() -> None: def test_rename_propagates_to_rows_and_output_channels() -> None: model = _chain_model() model.outputs.add( - "Ten1N3", "L1N2px", "TDP1s", "TDP1Grd", "AnchFz1", "AnchFH1", "Point2FH", "Con1py" + "Ten1N3", + "L1N2px", + "TDP1s", + "TDP1Grd", + "AnchFz1", + "AnchFH1", + "Point2FH", + "Con1py", + "VIVPow1", + "DampPow1N3", ) model.rename(model.lines[1], 7) model.rename(model.points[1], 11) @@ -284,6 +293,8 @@ def test_rename_propagates_to_rows_and_output_channels() -> None: "AnchFH7", "Point2FH", "Con11py", + "VIVPow7", + "DampPow7N3", ] deck = model.to_deck_file() assert deck.lines[0].tokens == ("7", "11", "2", "-") diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index 09682893..6b69c46c 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -3862,6 +3862,8 @@ def unqueryable(first, second): ("TDP1Grd", "tdp01GRD"), ("AnchFz1", "anchfz01"), ("AnchFH1", "ANCHFH1"), + ("VIVPow1", "vivpow01"), + ("DragPow1N3", "dragpow01n03"), ], ) def test_duplicate_output_channels_fail_like_native(first, second): diff --git a/python/tests/test_deck_native_parity.py b/python/tests/test_deck_native_parity.py index 735d489b..e5fad9d5 100644 --- a/python/tests/test_deck_native_parity.py +++ b/python/tests/test_deck_native_parity.py @@ -1025,6 +1025,29 @@ def test_inline_viv_acts_on_an_ei0_line(row): DeckFile.from_text(_section(_example("viv_taut_line_crossflow.dat"), "VIV", row)) +@pytest.mark.parametrize( + ("channel", "message"), + [ + ("VIVPow1", None), + ("DragPow1", None), + ("DampPow1", None), + ("vivpow01n26", None), + ("DampPow1N51", None), + ("VIVPow0", "bad load power channel"), + ("DragPow7", "bad load power channel"), + ("DampPowx", "bad load power channel"), + ("VIVPow1N0", "node numbers start at 1 = End A"), + ("DragPow1N52", "node exceeds the line node count"), + ], +) +def test_load_power_channels_are_native(channel, message): + text = _example("viv_taut_line_crossflow.dat", ('"FairTen1"', f'"FairTen1"\n"{channel}"')) + if message is None: + DeckFile.from_text(text) + else: + _rejects(text, re.escape(message)) + + def test_stiffener_needs_a_finite_ei_line(): text = _section(_HELD, "STIFFENERS", "1 A 1.0 0.5 0.5 0.3 5.0e7 1150") _rejects(text, "STIFFENERS name line 1, which is not a finite-EI line") diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index ec1aa327..ed0c0ff2 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -59,11 +59,12 @@ MODULE CableDyn_DeckDriver CD_Get_Model_EndForces, & CD_Update_Model_CoupledMotion, CD_Update_Model_Hydro_Fields, & CD_Recompute_Model_Acceleration, CD_Step_Model, CD_Step_Model_Recovering, CD_MODEL_OK, & - CD_Audit_Model_Step, CD_Set_Model_VIV, CD_Get_Model_VIV_Lift + CD_Audit_Model_Step, CD_Set_Model_VIV, CD_Get_Model_VIV_Lift, CD_Get_Model_Load_Power USE CableDyn_System, ONLY: CD_SystemType, CD_SystemPointType, CD_LineEndpointBinding, & CD_Init_System_From_Points, CD_End_System, CD_System_Line_NDOF, & CD_System_Line_NElem, CD_Get_System_Point_State, CD_Get_System_Line_State, & CD_Get_System_Line_Tension, CD_Get_System_Line_VIV_Lift, & + CD_Get_System_Line_Load_Power, & CD_Update_System_Point_Fluid_Fields, & CD_Get_System_CoupledMotion, CD_Update_System_Point_States, & CD_Calc_System_CoupledLoads, CD_Step_System, CD_Step_System_DynamicPoints, & @@ -95,7 +96,7 @@ MODULE CableDyn_DeckDriver CD_HCSTAT_NOCONVERGE, CD_HC_COMPRESSION_OSCILLATION, & CD_HC_COMPRESSION_STRICT USE CableDyn_HermiteCableDynamic, ONLY: CD_HCDYN_OK, CD_HCDYN_TENSILE_OFF, CD_HCDYN_TENSILE_WARN, & - CD_HCDYN_TENSILE_ERROR, & + CD_HCDYN_TENSILE_ERROR, CD_HermiteCable_Dyn_Load_Power, & CD_HermiteCable_Axial_Damping_Resultant, & CD_HermiteCable_Axial_Damping_Element, CD_HermiteCable_Dyn_End_Force, & CD_HermiteCable_Dyn_Node_Values, CD_HermiteCable_Dyn_Node_Recovery, & @@ -18574,7 +18575,7 @@ FUNCTION channel_identity_key(ch) RESULT(key) IF (a > 0 .AND. b > 0) key = 'point:'//TRIM(int_to_str(a))//':'//TRIM(int_to_str(b)) ELSE IF (starts_with(lo, 'ten') .OR. starts_with(lo, 'curv') .OR. starts_with(lo, 'bendmom') .OR. & starts_with(lo, 'stfmom') .OR. starts_with(lo, 'l') .OR. starts_with(lo, 'torq') .OR. & - starts_with(lo, 'twist')) THEN + starts_with(lo, 'twist') .OR. is_load_power_channel(lo)) THEN CALL parse_line_node_channel(ch, a, b, c, d) IF (a > 0 .AND. b > 0 .AND. c > 0) key = 'node:'//TRIM(int_to_str(a))//':'//TRIM(int_to_str(b))// & ':'//TRIM(int_to_str(c))//':'//TRIM(int_to_str(d)) @@ -35033,6 +35034,7 @@ SUBROUTINE build_plan() END IF ELSE CALL parse_line_node_channel(channels(j), il, node, kind, comp) + IF (is_load_power_kind(kind)) CYCLE ! from the line model, channel-at-a-time (CH_LEGACY) il = find_line(lines, il) IF (il < 1) CYCLE CALL line_sizes(il, sized, tension_sized) @@ -35286,6 +35288,19 @@ SUBROUTINE system_channel_value(ch, lines, points, system, work, val, ErrStat, E RETURN END IF inode = deck_to_internal_node(node, nnode - 1) + IF (is_load_power_kind(kind)) THEN + BLOCK + REAL(wp) :: pv(nnode), pd(nnode), pm(nnode) + CALL CD_Get_System_Line_Load_Power(system, li, pv, pd, pm, es, em) + IF (es /= CD_SYSTEM_OK) THEN + ErrStat = CD_DECKDRV_SOLVEFAIL + ErrMsg = 'CableDyn_DeckDriver: system line load power recovery failed: '//TRIM(em) + RETURN + END IF + val = load_power_value(kind, inode, pv, pd, pm, system%lines(li)%l0) + END BLOCK + RETURN + END IF IF (kind == 3) THEN CALL ensure_model_output_workspace(work, 0, nnode - 1) CALL CD_Get_System_Line_Tension(system, li, work%tension(1:nnode - 1), es, em) @@ -35428,6 +35443,19 @@ SUBROUTINE model_channel_value(ch, lines, points, models, work, val, ErrStat, Er RETURN END IF inode = deck_to_internal_node(node, nnode - 1) + IF (is_load_power_kind(kind)) THEN + BLOCK + REAL(wp) :: pv(nnode), pd(nnode), pm(nnode) + CALL CD_Get_Model_Load_Power(models(li), pv, pd, pm, es, em) + IF (es /= CD_MODEL_OK) THEN + ErrStat = CD_DECKDRV_SOLVEFAIL + ErrMsg = 'CableDyn_DeckDriver: dynamic line load power recovery failed: '//TRIM(em) + RETURN + END IF + val = load_power_value(kind, inode, pv, pd, pm, models(li)%l0) + END BLOCK + RETURN + END IF IF (kind == 3) THEN CALL ensure_model_output_workspace(work, 0, nnode - 1) CALL CD_Get_Model_Tension(models(li), work%tension(1:nnode - 1), es, em) @@ -36870,6 +36898,21 @@ SUBROUTINE check_channel(ch, lines, points, sections, ErrStat, ErrMsg, bodies, r CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": line '//TRIM(int_to_str(line_id))//' is not '// & 'torsionally restrained (END CONNECTIONS TorsStiffness), so it carries no torque'); RETURN END IF + ELSE IF (is_load_power_channel(lo)) THEN + CALL parse_line_node_channel(ch, line_id, node, kind, comp) + li = find_line(lines, line_id) + IF (li /= 0 .AND. node == 0 .AND. names_node_zero(lo)) THEN + CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": node numbers start at 1 = End A (MoorDyn '// & + 'numbers from N0)'); RETURN + END IF + IF (li == 0 .OR. kind == 0 .OR. node < 1) THEN + CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": bad load power channel (use VIVPow, '// & + 'DragPow, DampPow, or N per unit length, with a known line id)'); RETURN + END IF + nelem = line_nelem_from_sections(lines(li)%id, sections) + IF (node > nelem + 1) THEN + CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": node index exceeds line node count'); RETURN + END IF ELSE IF (starts_with(lo, 'ten') .OR. starts_with(lo, 'curv') .OR. & starts_with(lo, 'bendmom') .OR. starts_with(lo, 'stfmom') .OR. starts_with(lo, 'l')) THEN CALL parse_line_node_channel(ch, line_id, node, kind, comp) @@ -36903,6 +36946,7 @@ SUBROUTINE check_channel(ch, lines, points, sections, ErrStat, ErrMsg, bodies, r 'Point

p{x,y,z} (alias Con

p{x,y,z}), Point

F{x,y,z,H}, '// & 'TenN, CurvN, CurvXN, CurvYN, BendMomN, StfMomN, '// & 'TorqN, TwistN, Twist, '// & + 'VIVPow, DragPow, DampPow (and N), '// & 'LNp{x,y,z}, LNv{x,y,z}, LNa{x,y,z}, LNDec, LNAzi, '// & 'TDP{s,x,y,z,Lay,Exc,Grd}, or the Body/Rod channels)'); RETURN END IF @@ -36911,11 +36955,12 @@ END SUBROUTINE check_channel LOGICAL FUNCTION CD_Is_Line_Node_Channel(ch) RESULT(yes) !! True for an OUTPUTS channel that names a node of a line (TenN, Curv, BendMom, StfMom, !! Torq, TwistN, LN...), whose node numbering differs from MoorDyn's - !! (CD_LINE_NODE_NUMBERING_NOTE); the line total Twist names no node. + !! (CD_LINE_NODE_NUMBERING_NOTE); the line totals Twist, VIVPow, DragPow and + !! DampPow name no node. CHARACTER(*), INTENT(IN) :: ch INTEGER :: line_id, node_id, kind, comp CALL parse_line_node_channel(ch, line_id, node_id, kind, comp) - yes = kind /= 0 .AND. kind /= 11 + yes = kind /= 0 .AND. kind /= 11 .AND. kind /= 15 .AND. kind /= 17 .AND. kind /= 19 END FUNCTION CD_Is_Line_Node_Channel PURE LOGICAL FUNCTION names_node_zero(lo) RESULT(yes) @@ -37158,11 +37203,17 @@ SUBROUTINE parse_line_node_channel(ch, line_id, node_id, kind, comp) !! TorqN -> kind=9, comp=0 line torque [N.m] !! TwistN -> kind=10, comp=0 twist from End A [deg] !! Twist -> kind=11, comp=0 total twist (node 1) [deg] + !! VIVPow -> kind=15, comp=0 power of the VIV loads on the line (node 1) [W] + !! VIVPowN -> kind=16, comp=0 the same per unit length about node J [W/m] + !! DragPow -> kind=17, comp=0 power of the hydrodynamic drag (node 1) [W] + !! DragPowN -> kind=18, comp=0 the same per unit length about node J [W/m] + !! DampPow -> kind=19, comp=0 power of the structural damping (node 1) [W] + !! DampPowN -> kind=20, comp=0 the same per unit length about node J [W/m] CHARACTER(*), INTENT(IN) :: ch INTEGER, INTENT(OUT) :: line_id, node_id, kind, comp CHARACTER(NAMELEN) :: lo - INTEGER :: npos, field_pos, last, sfx + INTEGER :: npos, field_pos, last, sfx, plen, pkind lo = to_lower(ch) line_id = 0 @@ -37210,6 +37261,24 @@ SUBROUTINE parse_line_node_channel(ch, line_id, node_id, kind, comp) CALL parse_keyword_line_node(lo, 6, last, line_id, node_id) IF (line_id > 0 .AND. node_id > 0) kind = 12 RETURN + ELSE IF (is_load_power_channel(lo)) THEN + ! the load power channels: the line total (node 1, as Twist), or the power per + ! unit length about a node N (the next kind) + plen = MERGE(6, 7, starts_with(lo, 'vivpow')) + pkind = MERGE(15, MERGE(17, 19, starts_with(lo, 'dragpow')), starts_with(lo, 'vivpow')) + IF (last > plen) THEN + IF (INDEX(lo(plen + 1:last), 'n') == 0) THEN + line_id = parse_positive_int(lo, plen + 1, last) + IF (line_id > 0) THEN + node_id = 1 + kind = pkind + END IF + RETURN + END IF + END IF + CALL parse_keyword_line_node(lo, plen, last, line_id, node_id) + IF (line_id > 0 .AND. node_id > 0) kind = pkind + 1 + RETURN END IF ! LN... channels: p/v/a{x,y,z} (component) or Dec/Azi (scalar). IF (.NOT. starts_with(lo, 'l')) RETURN @@ -37272,6 +37341,45 @@ SUBROUTINE parse_keyword_line_node(lo, prefix_len, last, line_id, node_id) node_id = parse_positive_int(lo, npos + 1, last) END SUBROUTINE parse_keyword_line_node + LOGICAL FUNCTION is_load_power_channel(lo) RESULT(yes) + !! The load power channels VIVPow, DragPow and DampPow (lower case), of a line or a node. + CHARACTER(*), INTENT(IN) :: lo + yes = starts_with(lo, 'vivpow') .OR. starts_with(lo, 'dragpow') .OR. starts_with(lo, 'damppow') + END FUNCTION is_load_power_channel + + PURE LOGICAL FUNCTION is_load_power_kind(kind) RESULT(yes) + !! The parse_line_node_channel kinds of the load power channels (15-20). + INTEGER, INTENT(IN) :: kind + yes = kind >= 15 .AND. kind <= 20 + END FUNCTION is_load_power_kind + + PURE REAL(wp) FUNCTION load_power_value(kind, inode, p_viv, p_drag, p_damp, l0) RESULT(val) + !! A load power channel from the node powers of its line (internal order, element e joining + !! nodes e and e+1 of unstretched length l0(e)): the line total [W] for the odd kinds (15, 17, + !! 19), and for the even ones the power per unit unstretched length about internal node inode + !! [W/m], the node's power over half the unstretched length of its elements. + INTEGER, INTENT(IN) :: kind, inode + REAL(wp), INTENT(IN) :: p_viv(:), p_drag(:), p_damp(:), l0(:) + REAL(wp) :: trib + val = CD_ZERO + SELECT CASE (kind) + CASE (15) + val = SUM(p_viv) + CASE (17) + val = SUM(p_drag) + CASE (19) + val = SUM(p_damp) + CASE (16, 18, 20) + trib = CD_ZERO + IF (inode > 1) trib = trib + 0.5_wp*l0(inode - 1) + IF (inode <= SIZE(l0)) trib = trib + 0.5_wp*l0(inode) + IF (.NOT. (trib > CD_ZERO)) RETURN + IF (kind == 16) val = p_viv(inode)/trib + IF (kind == 18) val = p_drag(inode)/trib + IF (kind == 20) val = p_damp(inode)/trib + END SELECT + END FUNCTION load_power_value + INTEGER FUNCTION parse_positive_int(s, first, last) RESULT(n) CHARACTER(*), INTENT(IN) :: s INTEGER, INTENT(IN) :: first, last @@ -39061,6 +39169,17 @@ SUBROUTINE eval_system_line_channel(system, li, ch, val, ErrStat, ErrMsg) CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": node index out of range'); RETURN END IF inode = deck_to_internal_node(node, nnode - 1) + IF (is_load_power_kind(kind)) THEN + BLOCK + REAL(wp) :: pv(nnode), pd(nnode), pm(nnode) + CALL CD_Get_System_Line_Load_Power(system, li, pv, pd, pm, es, em) + IF (es /= CD_SYSTEM_OK) THEN + CALL sys_solvefail(ch, em, ErrStat, ErrMsg); RETURN + END IF + val = load_power_value(kind, inode, pv, pd, pm, system%lines(li)%l0) + END BLOCK + RETURN + END IF IF (kind == 3) THEN BLOCK REAL(wp) :: tension(nnode - 1) @@ -39205,6 +39324,16 @@ SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node) END IF inode = deck_to_internal_node(node, nelem) SELECT CASE (kind) + CASE (15:20) ! load power: the line total, or per unit length about the node + BLOCK + REAL(wp) :: pv(nnode), pd(nnode), pm(nnode) + CALL CD_HermiteCable_Dyn_Load_Power(cable%line, pv, pd, pm, es, em) + IF (es /= CD_HCDYN_OK) THEN + CALL fail_solve(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": finite-EI load power recovery failed: '// & + TRIM(em)); RETURN + END IF + val = load_power_value(kind, inode, pv, pd, pm, cable%line%l0) + END BLOCK CASE (3, 5, 6) ! nodal tension, curvature, bend moment CALL cable_recovered_value(cable, kind, inode, ch, val, ErrStat, ErrMsg) CASE (1) ! position (cable-local state rotated to the deck's global frame) @@ -39677,6 +39806,7 @@ FUNCTION CD_Channel_Unit(ch) RESULT(unit) !! OrcaFlex-vocabulary output unit for a channel token, by kind: tension (FairTen/AnchTen/Ten) !! and anchor force (AnchFz/AnchFH) -> (N); curvature (Curv) -> (1/m); bend moment (BendMom) !! -> (N.m); endpoint orientation/Dec/Azi -> (deg); torque (Torq) -> (N.m); twist (Twist) -> (deg); position (Point/...p) -> (m); + !! load power (VIVPow/DragPow/DampPow) -> (W), per unit length about a node -> (W/m); !! velocity (...v) -> (m/s); !! acceleration (...a) -> (m/s2). CHARACTER(*), INTENT(IN) :: ch @@ -39715,6 +39845,8 @@ FUNCTION CD_Channel_Unit(ch) RESULT(unit) CASE (7, 8); unit = '(deg)' CASE (9); unit = '(N.m)' CASE (10, 11); unit = '(deg)' + CASE (15, 17, 19); unit = '(W)' + CASE (16, 18, 20); unit = '(W/m)' CASE (1); unit = '(m)' CASE (2); unit = '(m/s)' CASE (4); unit = '(m/s2)' diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index e1bef7bc..5fd11852 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -128,6 +128,7 @@ MODULE CableDyn_HermiteCableDynamic PUBLIC :: CD_HermiteCable_Dyn_Set_Irregular_Waves PUBLIC :: CD_HermiteCable_Drag_Element PUBLIC :: CD_HermiteCable_VIV_Lift_Element + PUBLIC :: CD_HermiteCable_Dyn_Load_Power PUBLIC :: CD_HermiteCable_Axial_Damping_Element PUBLIC :: CD_HermiteCable_Axial_Damping_Resultant PUBLIC :: CD_HermiteCable_AddedMass_Element @@ -1547,6 +1548,45 @@ SUBROUTINE viv_element_lift(model, q_cfg, v_cfg, e, flift, ErrStat, ErrMsg, djq, END IF END SUBROUTINE viv_element_lift + SUBROUTINE element_drag_load(model, e, qe, ve, l0, t_eval, fdrag, ErrStat, ErrMsg) + !! The Morison drag load of element e (generalised, 12) at element state (qe, ve) and + !! unstretched length l0, in the flow the drag configuration gives at time t_eval: the current + !! plus the regular or irregular wave kinematics, or plus the held field's element average. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + REAL(wp), INTENT(IN) :: qe(12), ve(12), l0, t_eval + REAL(wp), INTENT(OUT) :: fdrag(12) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + INTEGER :: es + IF (model%has_wave .AND. model%wv_ncomp > 0) THEN + CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & + model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + fdrag, ErrStat=es, ErrMsg=ErrMsg, & + wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval, & + wvc_amp=model%wv_ampc, wvc_om=model%wv_omc, & + wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & + wvc_e2kd=model%wv_e2kd) + ELSE IF (model%has_wave) THEN + CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & + model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + fdrag, ErrStat=es, ErrMsg=ErrMsg, & + wv_h=model%wv_h, wv_om=model%wv_om, wv_k=model%wv_k, & + wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval) + ELSE IF (model%has_held_field) THEN + CALL CD_HermiteCable_Drag_Element(qe, ve, l0, & + model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & + 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), & + model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + fdrag, ErrStat=es, ErrMsg=ErrMsg) + ELSE + CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & + model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + fdrag, ErrStat=es, ErrMsg=ErrMsg) + END IF + ErrStat = es + END SUBROUTINE element_drag_load + SUBROUTINE CD_HermiteCable_Dyn_VIV_Node_Lift(model, lift, ErrStat, ErrMsg) !! The VIV lift on every node at the committed state [N] (3, nn), in the model frame: the !! translational components of the elements' consistent lift loads, summed at the nodes @@ -1575,6 +1615,86 @@ SUBROUTINE CD_HermiteCable_Dyn_VIV_Node_Lift(model, lift, ErrStat, ErrMsg) END DO END SUBROUTINE CD_HermiteCable_Dyn_VIV_Node_Lift + SUBROUTINE CD_HermiteCable_Dyn_Load_Power(model, p_viv, p_drag, p_damp, ErrStat, ErrMsg) + !! The power [W] three loads deliver to the cable at the committed state, per node (nn): the + !! VIV loads (cross-flow lift, and the in-line force where it is on), the hydrodynamic drag + !! (the cable's Morison drag and the attachments' drag) and the structural damping (the axial + !! and bending dashpots, BA and Bb). An element's generalised load f (12) delivers f . v_e, + !! half to each of its two nodes, so the node values sum to the exact power of the load; an + !! attachment's drag delivers f . v at its node. The damping power of every element, and so of + !! every node, is never positive. The torsional damping Bt is not included. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + REAL(wp), INTENT(OUT) :: p_viv(:), p_drag(:), p_damp(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + REAL(wp) :: qe(12), ve(12), fe(12), rk(3), jrel(3, 3), jtan(3, 3), fd(3) + INTEGER :: e, k, base + LOGICAL :: has_jac + p_viv = CD_ZERO + p_drag = CD_ZERO + p_damp = CD_ZERO + ErrStat = CD_HCDYN_OK; ErrMsg = '' + IF (.NOT. model%initialized) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Load_Power: model not initialised'; RETURN + END IF + IF (SIZE(p_viv) /= model%nn .OR. SIZE(p_drag) /= model%nn .OR. SIZE(p_damp) /= model%nn) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Load_Power: the powers must have one entry per node' + RETURN + END IF + DO e = 1, model%ne + qe(1:6) = model%q(6*(e - 1) + 1:6*e); qe(7:12) = model%q(6*e + 1:6*(e + 1)) + ve(1:6) = model%v(6*(e - 1) + 1:6*e); ve(7:12) = model%v(6*e + 1:6*(e + 1)) + IF (model%has_axial_damping .OR. model%has_bend_damping) THEN + ! an internal force: the load on the nodes is -fe + CALL structural_damping_element(model, e, qe, ve, fe, ErrStat, ErrMsg) + IF (ErrStat /= CD_HCDYN_OK) THEN + ErrMsg = 'CD_HermiteCable_Dyn_Load_Power: '//TRIM(ErrMsg); RETURN + END IF + CALL add_shares(p_damp, -fe) + END IF + IF (model%has_drag) THEN + CALL element_drag_load(model, e, qe, ve, model%l0(e), model%t, fe, ErrStat, ErrMsg) + IF (ErrStat /= CD_HCDYN_OK) THEN + ErrMsg = 'CD_HermiteCable_Dyn_Load_Power: '//TRIM(ErrMsg); RETURN + END IF + CALL add_shares(p_drag, fe) + END IF + IF (model%has_viv) THEN + CALL viv_element_lift(model, model%q, model%v, e, fe, ErrStat, ErrMsg) + IF (ErrStat /= CD_HCDYN_OK) THEN + ErrMsg = 'CD_HermiteCable_Dyn_Load_Power: '//TRIM(ErrMsg); RETURN + END IF + CALL add_shares(p_viv, fe) + END IF + END DO + IF (ALLOCATED(model%att_node)) THEN + DO k = 1, SIZE(model%att_node) + CALL attachment_residual(model, k, model%q, model%v, .FALSE., rk, has_jac, jrel, jtan, ErrStat, ErrMsg, & + f_drag=fd) + IF (ErrStat /= CD_HCDYN_OK) THEN + ErrMsg = 'CD_HermiteCable_Dyn_Load_Power: '//TRIM(ErrMsg); RETURN + END IF + base = 6*(model%att_node(k) - 1) + p_drag(model%att_node(k)) = p_drag(model%att_node(k)) + DOT_PRODUCT(fd, model%v(base + 1:base + 3)) + END DO + END IF + IF (.NOT. (CD_All_Finite(p_viv) .AND. CD_All_Finite(p_drag) .AND. CD_All_Finite(p_damp))) THEN + ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'CD_HermiteCable_Dyn_Load_Power: non-finite load power' + END IF + + CONTAINS + + SUBROUTINE add_shares(p, f) + !! Element e's load f (on the nodes) times its generalised velocity, half to each node. + REAL(wp), INTENT(INOUT) :: p(:) + REAL(wp), INTENT(IN) :: f(12) + REAL(wp) :: pe + pe = 0.5_wp*DOT_PRODUCT(f, ve) + p(e) = p(e) + pe + p(e + 1) = p(e + 1) + pe + END SUBROUTINE add_shares + END SUBROUTINE CD_HermiteCable_Dyn_Load_Power + SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Anchors(model, anchors, ErrStat, ErrMsg) !! Switch the seabed friction of a contact model with mu > 0 to elastic-plastic friction !! springs anchored at anchors(1:2, node) (x, y in the solve frame). The spring stiffness @@ -1793,10 +1913,12 @@ SUBROUTINE assemble_attachments(model, q_cfg, v_cfg, want_residual, want_tangent END DO END SUBROUTINE assemble_attachments - SUBROUTINE attachment_residual(model, k, q_cfg, v_cfg, want_jac, rk, has_jac, jrel, jtan, ErrStat, ErrMsg) + SUBROUTINE attachment_residual(model, k, q_cfg, v_cfg, want_jac, rk, has_jac, jrel, jtan, ErrStat, ErrMsg, & + f_drag) !! Contribution rk of attachment k to R = f_int - f_ext at the translations of its node: !! weight, buoyancy, Froude-Krylov force and drag (inertia excluded). With want_jac, the - !! drag Jacobians d f/d w and d f/d tangent are returned when has_jac is set. + !! drag Jacobians d f/d w and d f/d tangent are returned when has_jac is set. f_drag + !! (optional) returns the drag force on the node alone (zero above the free surface). TYPE(CD_HermiteCableDynType), INTENT(IN) :: model INTEGER, INTENT(IN) :: k REAL(wp), INTENT(IN) :: q_cfg(:), v_cfg(:) @@ -1805,10 +1927,12 @@ SUBROUTINE attachment_residual(model, k, q_cfg, v_cfg, want_jac, rk, has_jac, jr LOGICAL, INTENT(OUT) :: has_jac INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg + REAL(wp), INTENT(OUT), OPTIONAL :: f_drag(3) INTEGER :: j, base REAL(wp) :: u(3), ud(3), wrel(3), wl, f(3) ErrStat = CD_HCDYN_OK; ErrMsg = '' rk = CD_ZERO; jrel = CD_ZERO; jtan = CD_ZERO; has_jac = .FALSE. + IF (PRESENT(f_drag)) f_drag = CD_ZERO j = model%att_node(k) base = 6*(j - 1) u = CD_ZERO; ud = CD_ZERO; wl = CD_ZERO @@ -1840,6 +1964,7 @@ SUBROUTINE attachment_residual(model, k, q_cfg, v_cfg, want_jac, rk, has_jac, jr END IF IF (ErrStat /= CD_HCDYN_OK) RETURN rk = rk - f + IF (PRESENT(f_drag)) f_drag = f END SUBROUTINE attachment_residual SUBROUTINE CD_HermiteCable_Dyn_Recompute_Acceleration(model, ErrStat, ErrMsg, pres_dofs, pres_a) @@ -6899,31 +7024,7 @@ SUBROUTINE CD_HermiteCable_Dyn_End_Force(model, node, force, ErrStat, ErrMsg) IF (gap > CD_ZERO) r3(3) = r3(3) - model%kn*gap*model%trib(node) END IF IF (model%has_drag) THEN - IF (model%has_wave .AND. model%wv_ncomp > 0) THEN - CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fdrag, ErrStat=es, ErrMsg=em2, & - wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=model%t, & - wvc_amp=model%wv_ampc, wvc_om=model%wv_omc, & - wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & - wvc_e2kd=model%wv_e2kd) - ELSE IF (model%has_wave) THEN - CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fdrag, ErrStat=es, ErrMsg=em2, & - wv_h=model%wv_h, wv_om=model%wv_om, wv_k=model%wv_k, & - wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=model%t) - ELSE IF (model%has_held_field) THEN - CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), & - model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & - 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fdrag, ErrStat=es, ErrMsg=em2) - ELSE - CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fdrag, ErrStat=es, ErrMsg=em2) - END IF + CALL element_drag_load(model, e, qe, ve, model%l0(e), model%t, fdrag, es, em2) IF (es /= CD_HCDYN_OK) THEN ErrStat = es; ErrMsg = 'CD_HermiteCable_Dyn_End_Force: '//TRIM(em2); RETURN END IF @@ -7802,31 +7903,7 @@ SUBROUTINE element_end_residual(model, e, g, ErrStat, ErrMsg) IF (dry) g(ZS) = g(ZS) + fdry END IF IF (model%has_drag) THEN - IF (model%has_wave .AND. model%wv_ncomp > 0) THEN - CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fx, ErrStat=es, ErrMsg=em2, & - wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=model%t, & - wvc_amp=model%wv_ampc, wvc_om=model%wv_omc, & - wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & - wvc_e2kd=model%wv_e2kd) - ELSE IF (model%has_wave) THEN - CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fx, ErrStat=es, ErrMsg=em2, & - wv_h=model%wv_h, wv_om=model%wv_om, wv_k=model%wv_k, & - wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=model%t) - ELSE IF (model%has_held_field) THEN - CALL CD_HermiteCable_Drag_Element(qe, ve, l0, & - model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & - 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fx, ErrStat=es, ErrMsg=em2) - ELSE - CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fx, ErrStat=es, ErrMsg=em2) - END IF + CALL element_drag_load(model, e, qe, ve, l0, model%t, fx, es, em2) IF (es /= CD_HCDYN_OK) GOTO 900 g = g - fx END IF @@ -9244,31 +9321,7 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta fdrag, djq, djv, es, em_e) END IF ELSE - IF (model%has_wave .AND. model%wv_ncomp > 0) THEN - CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fdrag, ErrStat=es, ErrMsg=em_e, & - wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval, & - wvc_amp=model%wv_ampc, wvc_om=model%wv_omc, & - wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & - wvc_e2kd=model%wv_e2kd) - ELSE IF (model%has_wave) THEN - CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fdrag, ErrStat=es, ErrMsg=em_e, & - wv_h=model%wv_h, wv_om=model%wv_om, wv_k=model%wv_k, & - wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval) - ELSE IF (model%has_held_field) THEN - CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), & - model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & - 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fdrag, ErrStat=es, ErrMsg=em_e) - ELSE - CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & - fdrag, ErrStat=es, ErrMsg=em_e) - END IF + CALL element_drag_load(model, e, qe, ve, model%l0(e), t_eval, fdrag, es, em_e) END IF IF (es /= CD_HCDYN_OK) THEN ErrStat = es; ErrMsg = TRIM(em_e); RETURN diff --git a/src/CableDyn_Model.f90 b/src/CableDyn_Model.f90 index 06960125..90fde800 100644 --- a/src/CableDyn_Model.f90 +++ b/src/CableDyn_Model.f90 @@ -99,6 +99,7 @@ MODULE CableDyn_Model PUBLIC :: CD_Latch_Model_VIV_Window PUBLIC :: CD_Get_Model_VIV_State, CD_Set_Model_VIV_State, CD_Model_Has_VIV, CD_Get_Model_VIV_Lift PUBLIC :: CD_Model_Has_VIV_Inline + PUBLIC :: CD_Get_Model_Load_Power PUBLIC :: CD_Get_Model_Tension PUBLIC :: CD_Get_Model_Internal_Rates PUBLIC :: CD_Get_Model_EndForces @@ -4288,6 +4289,86 @@ SUBROUTINE CD_Get_Model_VIV_Lift(model, lift, ErrStat, ErrMsg) END DO END SUBROUTINE CD_Get_Model_VIV_Lift + SUBROUTINE CD_Get_Model_Load_Power(model, p_viv, p_drag, p_damp, ErrStat, ErrMsg) + !! The power [W] three loads deliver to the line at the committed state, per node (n_nodes): + !! the VIV loads (cross-flow lift, and the in-line force where it is on) at the committed + !! phases, the Morison drag and the axial structural damping (BA). An element's force on its + !! two nodes delivers f_a . v_a + f_b . v_b, half to each node, and a node load f . v to its + !! node, so the node values sum to the exact power of the load. The damping power of every + !! element, and so of every node, is never positive; the viscoelastic and Syrope laws' own + !! damping is not included. + TYPE(CD_ModelType), INTENT(IN) :: model + REAL(wp), INTENT(OUT) :: p_viv(:), p_drag(:), p_damp(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + INTEGER :: e, nd, nn, idx(6), lk + REAL(wp) :: q2(6), v2(6), f2(6), fluid2(3, 2), wl2(2), fl(3) + LOGICAL :: ok + p_viv = CD_ZERO + p_drag = CD_ZERO + p_damp = CD_ZERO + ErrStat = CD_MODEL_OK + ErrMsg = '' + IF (.NOT. model%initialized) THEN + CALL fail(ErrStat, ErrMsg, 'load power: the model is not initialised') + RETURN + END IF + nn = model%n_dof/3 + IF (SIZE(p_viv) /= nn .OR. SIZE(p_drag) /= nn .OR. SIZE(p_damp) /= nn) THEN + CALL fail(ErrStat, ErrMsg, 'load power: the powers must have one entry per node') + RETURN + END IF + lk = MIN(LEN(ErrMsg), KERNEL_MSG_LEN) + DO e = 1, model%n_elem + CALL extract_element_state(model, e, model%q, model%v, idx, q2, v2) + IF (model%has_damping) THEN + CALL CD_Axial_Damping_Element_Force(q2(1:3), q2(4:6), v2(1:3), v2(4:6), model%l0(e), & + model%ba_dyn(e), f2, ErrStat, ErrMsg(1:lk), & + l0_dot=model%l0_dot(e), inputs_validated=.TRUE.) + IF (ErrStat /= 0) RETURN + CALL add_shares(p_damp) + END IF + IF (model%has_morison_drag) THEN + CALL extract_nodal_vector(model%fluid_velocity, model, e, fluid2) + CALL extract_nodal_scalar(model%drag_waterline_z, model, e, wl2) + CALL CD_Morison_Drag_Element_Force(q2(1:3), q2(4:6), v2(1:3), v2(4:6), model%l0(e), & + fluid2(:, 1), fluid2(:, 2), wl2(1), wl2(2), model%drag_rho, & + model%drag_diameter_elem(e), model%drag_cdn_elem(e), & + model%drag_cdt_elem(e), f2, ErrStat, ErrMsg(1:lk), inputs_validated=.TRUE.) + IF (ErrStat /= 0) RETURN + CALL add_shares(p_drag) + END IF + END DO + IF (model%has_viv) THEN + DO nd = 2, nn - 1 + IF (.NOT. model%viv_node(nd)) CYCLE + CALL viv_node_load(model, model%q, model%v, nd, .FALSE., fl, ok) + IF (.NOT. ok) THEN + CALL fail(ErrStat, ErrMsg, 'load power: the neighbours of a VIV node coincide (no line tangent)') + RETURN + END IF + p_viv(nd) = DOT_PRODUCT(fl, model%v(3*nd - 2:3*nd)) + END DO + END IF + IF (.NOT. (CD_All_Finite(p_viv) .AND. CD_All_Finite(p_drag) .AND. CD_All_Finite(p_damp))) THEN + CALL fail(ErrStat, ErrMsg, 'load power: non-finite load power') + END IF + + CONTAINS + + SUBROUTINE add_shares(p) + !! The element force f2 on its two nodes times their velocities, half to each node. + REAL(wp), INTENT(INOUT) :: p(:) + INTEGER :: a, b + REAL(wp) :: pe + a = (idx(1) + 2)/3 + b = (idx(4) + 2)/3 + pe = 0.5_wp*DOT_PRODUCT(f2, v2) + p(a) = p(a) + pe + p(b) = p(b) + pe + END SUBROUTINE add_shares + END SUBROUTINE CD_Get_Model_Load_Power + PURE LOGICAL FUNCTION CD_Model_Has_VIV_Inline(model) RESULT(has) !! True if the model carries the in-line VIV phase state (as well as the cross-flow one). TYPE(CD_ModelType), INTENT(IN) :: model diff --git a/src/CableDyn_System.f90 b/src/CableDyn_System.f90 index 0f1fd327..bb58dd14 100644 --- a/src/CableDyn_System.f90 +++ b/src/CableDyn_System.f90 @@ -18,7 +18,7 @@ MODULE CableDyn_System CD_Model_Has_Viscoelastic, CD_Get_Model_VE_Dl1, CD_Set_Model_VE_Dl1, & CD_Model_Has_Syrope, CD_Get_Model_Syrope_State, CD_Set_Model_Syrope_State, & CD_Model_Has_VIV, CD_Get_Model_VIV_State, CD_Set_Model_VIV_State, CD_Get_Model_VIV_Lift, & - CD_Model_Has_VIV_Inline, & + CD_Model_Has_VIV_Inline, CD_Get_Model_Load_Power, & CD_Model_Has_Friction, CD_Get_Model_Friction_Anchors, CD_Set_Model_Friction_Anchors, & CD_Latch_Model_VIV_Window, & CD_Get_Model_EndNodeMassDiag, CD_Get_Model_EndNodeAddedMass, & @@ -80,7 +80,7 @@ MODULE CableDyn_System PUBLIC :: CD_Set_System_Line_Friction_Anchors PUBLIC :: CD_Get_System_Line_Syrope_State PUBLIC :: CD_System_Line_VIV_MirrorSize, CD_Get_System_Line_VIV_State, CD_Set_System_Line_VIV_State, & - CD_Get_System_Line_VIV_Lift + CD_Get_System_Line_VIV_Lift, CD_Get_System_Line_Load_Power PUBLIC :: CD_Set_System_Line_Syrope_State PUBLIC :: CD_Get_System_PointBlocks PUBLIC :: CD_Get_System_Point_State @@ -1043,6 +1043,32 @@ SUBROUTINE CD_Set_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg ErrMsg = '' END SUBROUTINE CD_Set_System_Line_VIV_State + SUBROUTINE CD_Get_System_Line_Load_Power(system, line_index, p_viv, p_drag, p_damp, ErrStat, ErrMsg) + !! The VIV, drag and structural damping power [W] on every node of one contained line at the + !! committed state (n_nodes each; CD_Get_Model_Load_Power). + TYPE(CD_SystemType), INTENT(IN) :: system + INTEGER, INTENT(IN) :: line_index + REAL(wp), INTENT(OUT) :: p_viv(:), p_drag(:), p_damp(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + INTEGER :: es + CHARACTER(160) :: em + + p_viv = CD_ZERO + p_drag = CD_ZERO + p_damp = CD_ZERO + CALL validate_line_index(system, line_index, ErrStat, ErrMsg) + IF (ErrStat /= CD_SYSTEM_OK) RETURN + CALL CD_Get_Model_Load_Power(system%lines(line_index), p_viv, p_drag, p_damp, es, em) + IF (es /= CD_MODEL_OK) THEN + ErrStat = CD_SYSTEM_SOLVEFAIL + ErrMsg = 'CableDyn_System: line load power query failed: '//TRIM(em) + RETURN + END IF + ErrStat = CD_SYSTEM_OK + ErrMsg = '' + END SUBROUTINE CD_Get_System_Line_Load_Power + SUBROUTINE CD_Get_System_Line_VIV_Lift(system, line_index, lift, ErrStat, ErrMsg) !! VIV lift force on every node of one contained line at the committed state (3, n_nodes). TYPE(CD_SystemType), INTENT(IN) :: system diff --git a/tests/test_hermite_load_power.f90 b/tests/test_hermite_load_power.f90 new file mode 100644 index 00000000..1f0305a8 --- /dev/null +++ b/tests/test_hermite_load_power.f90 @@ -0,0 +1,180 @@ +! File: tests/test_hermite_load_power.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_hermite_load_power + !! The load powers of a finite-EI cable (CD_HermiteCable_Dyn_Load_Power) close its energy + !! balance: on a weightless, pinned-pinned, tensioned cable with no added mass the kinetic plus + !! elastic energy changes by the work of the VIV loads, the drag and the structural damping, + !! E(t) - E(0) = int (P_viv + P_drag + P_damp) dt, + !! integrated by the trapezoidal rule over generalised-alpha steps with rho_inf = 1 (no numerical + !! damping) of 1/200 of the period of the motion the case resolves, so the two sides agree to + !! the steps' second-order error. + !! L1 the free decay of the first bending mode with the bending dashpot Bb; + !! L2 the free decay of the first axial mode with the axial dashpot BA (its own time step); + !! L3 the bending decay in still water with Morison drag and no dashpots; + !! L4 a cable starting straight in a 0.5 m/s current with the cross-flow and in-line VIV loads, + !! the drag and the bending dashpot; + !! each within 0.5 % of the largest work; the damping power is never positive at any node, and + !! the VIV and drag powers are zero without those loads. L5 power arrays of the wrong size are + !! refused. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & + CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Set_Bending_Damping, & + CD_HermiteCable_Dyn_Set_Axial_Damping, CD_HermiteCable_Dyn_Set_Drag, & + CD_HermiteCable_Dyn_Set_VIV, CD_HermiteCable_Dyn_Energy, & + CD_HermiteCable_Dyn_Load_Power, CD_HCDYN_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp + REAL(wp), PARAMETER :: LL = 20.0_wp, EA = 1.0e8_wp, EI = 1.0e5_wp, RHOA = 10.0_wp, TENS = 1.0e4_wp + REAL(wp), PARAMETER :: DIAM = 0.1_wp, RHOW = 1025.0_wp + INTEGER, PARAMETER :: NE = 40, NN = NE + 1, NDOF = 6*NN + INTEGER, PARAMETER :: BENDING = 1, AXIAL = 2, DRAG = 3, VIV = 4 + INTEGER :: nfail = 0 + + CALL balance_case('L1 bending dashpot decay', BENDING) + CALL balance_case('L2 axial dashpot decay', AXIAL) + CALL balance_case('L3 still-water drag decay', DRAG) + CALL balance_case('L4 VIV in a current', VIV) + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: Hermite load power energy balance' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE setup(model, a0, u0, ok) + !! The tensioned cable along x, pinned at both ends, at rest in its first bending mode of + !! amplitude a0 (z) and its first axial mode of amplitude u0 (x), rho_inf = 1. + TYPE(CD_HermiteCableDynType), INTENT(OUT) :: model + REAL(wp), INTENT(IN) :: a0, u0 + LOGICAL, INTENT(OUT) :: ok + REAL(wp) :: l0(NE), ea_(NE), ei_(NE), rho(NE), w(NE), q(NDOF), eps, lt, x, s, c + INTEGER :: k, es + CHARACTER(512) :: em + eps = TENS/EA; lt = (1.0_wp + eps)*LL + l0 = LL/REAL(NE, wp); ea_ = EA; ei_ = EI; rho = RHOA; w = 0.0_wp + DO k = 1, NN + x = lt*REAL(k - 1, wp)/REAL(NE, wp) + s = SIN(PI*x/lt) + c = COS(PI*x/lt) + q(6*k - 5:6*k) = [x + u0*s, 0.0_wp, a0*s, (1.0_wp + eps) + (1.0_wp + eps)*u0*PI/lt*c, 0.0_wp, & + (1.0_wp + eps)*a0*PI/lt*c] + END DO + CALL CD_HermiteCable_Dyn_Init(model, l0, ea_, ei_, rho, w, q, [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3], & + -1.0e4_wp, 0.0_wp, 1.0_wp, es, em) + ok = es == CD_HCDYN_OK + CALL require(ok, 'init: '//TRIM(em)) + END SUBROUTINE setup + + SUBROUTINE balance_case(label, what) + CHARACTER(*), INTENT(IN) :: label + INTEGER, INTENT(IN) :: what + TYPE(CD_HermiteCableDynType) :: model + REAL(wp) :: kk, period, dt, ek, es0, e0, e1, p_prev(3), p_now(3), work(3), res, scale, pm_max + REAL(wp) :: cl(NE), cf(NE), df(NE), clx(NE), alx(NE) + INTEGER :: n, k, es, it + CHARACTER(512) :: em + LOGICAL :: zero_viv, zero_drag, ok + kk = PI/LL + IF (what == AXIAL) THEN + period = 2.0_wp*LL/SQRT(EA/RHOA) + CALL setup(model, 0.0_wp, 1.0e-4_wp, ok) + ELSE + period = 2.0_wp*PI/SQRT((EI*kk**4 + TENS*kk**2)/RHOA) + CALL setup(model, MERGE(0.0_wp, 0.05_wp, what == VIV), 0.0_wp, ok) + END IF + IF (.NOT. ok) RETURN + dt = period/200.0_wp + IF (what == AXIAL) THEN + CALL CD_HermiteCable_Dyn_Set_Axial_Damping(model, [(2.0e4_wp, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK, label//': axial damping: '//TRIM(em)) + END IF + IF (what == BENDING .OR. what == VIV) THEN + CALL CD_HermiteCable_Dyn_Set_Bending_Damping(model, [(2.0e2_wp, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK, label//': bending damping: '//TRIM(em)) + END IF + IF (what == DRAG .OR. what == VIV) THEN + CALL CD_HermiteCable_Dyn_Set_Drag(model, RHOW, [(DIAM, k=1, NE)], [(1.2_wp, k=1, NE)], [(0.0_wp, k=1, NE)], & + 1.0e3_wp, [0.0_wp, MERGE(0.5_wp, 0.0_wp, what == VIV), 0.0_wp], es, em) + CALL require(es == CD_HCDYN_OK, label//': drag: '//TRIM(em)) + END IF + IF (what == VIV) THEN + cl = 0.8_wp; cf = 0.18_wp; df = 0.08_wp; clx = 0.85_wp; alx = 0.15_wp + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=alx) + CALL require(es == CD_HCDYN_OK, label//': VIV: '//TRIM(em)) + END IF + IF (es /= CD_HCDYN_OK) RETURN + CALL CD_HermiteCable_Dyn_Energy(model, ek, es0, es, em) + e0 = ek + es0 + work = 0.0_wp + pm_max = -HUGE(1.0_wp) + zero_viv = .TRUE. + zero_drag = .TRUE. + CALL powers(model, label, p_prev, pm_max, zero_viv, zero_drag) + DO n = 1, 2400 + CALL CD_HermiteCable_Dyn_Step(model, dt, 50, 1.0e-10_wp, es, em, it, res) + IF (es /= CD_HCDYN_OK) THEN + CALL require(.FALSE., label//': step failed: '//TRIM(em)); RETURN + END IF + CALL powers(model, label, p_now, pm_max, zero_viv, zero_drag) + work = work + 0.5_wp*dt*(p_prev + p_now) + p_prev = p_now + END DO + CALL CD_HermiteCable_Dyn_Energy(model, ek, es0, es, em) + e1 = ek + es0 + scale = MAXVAL(ABS(work)) + WRITE (*, '(2A,ES12.4,A,3ES12.4,A,ES10.2)') label, ': dE ', e1 - e0, ', work VIV/drag/damp ', work, & + ', mismatch/largest ', ABS(e1 - e0 - SUM(work))/MAX(scale, TINY(1.0_wp)) + CALL require(scale > 0.0_wp, label//': the loads did work') + IF (.NOT. (scale > 0.0_wp)) RETURN + CALL require(ABS(e1 - e0 - SUM(work)) <= 5.0e-3_wp*scale, label//': the load work closes the energy balance') + CALL require(pm_max <= 0.0_wp, label//': the damping power is never positive at a node') + CALL require(zero_viv .EQV. what /= VIV, label//': VIV power only with VIV') + CALL require(zero_drag .EQV. (what /= DRAG .AND. what /= VIV), label//': drag power only with drag') + IF (what == BENDING .OR. what == AXIAL) CALL require(work(3) < 0.0_wp, label//': the dashpot dissipates') + IF (what == DRAG) CALL require(work(2) < 0.0_wp, label//': still-water drag dissipates') + IF (what == VIV) CALL require(work(1) > 0.0_wp, label//': the VIV loads put energy in') + END SUBROUTINE balance_case + + SUBROUTINE powers(model, label, p, pm_max, zero_viv, zero_drag) + !! The line totals of the three load powers, with the running checks: the largest node + !! damping power, and whether the VIV and drag powers stayed zero at every node. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + CHARACTER(*), INTENT(IN) :: label + REAL(wp), INTENT(OUT) :: p(3) + REAL(wp), INTENT(INOUT) :: pm_max + LOGICAL, INTENT(INOUT) :: zero_viv, zero_drag + REAL(wp) :: pv(NN), pd(NN), pm(NN) + INTEGER :: esp + CHARACTER(512) :: emp + CALL CD_HermiteCable_Dyn_Load_Power(model, pv, pd, pm, esp, emp) + CALL require(esp == CD_HCDYN_OK, label//': load power: '//TRIM(emp)) + p = [SUM(pv), SUM(pd), SUM(pm)] + pm_max = MAX(pm_max, MAXVAL(pm)) + zero_viv = zero_viv .AND. ALL(pv == 0.0_wp) + zero_drag = zero_drag .AND. ALL(pd == 0.0_wp) + END SUBROUTINE powers + + SUBROUTINE check_refusals() + TYPE(CD_HermiteCableDynType) :: model + REAL(wp) :: pv(NN), pd(NN), pm(NN - 1) + INTEGER :: es + LOGICAL :: ok + CHARACTER(512) :: em + CALL setup(model, 0.0_wp, 0.0_wp, ok) + IF (.NOT. ok) RETURN + CALL CD_HermiteCable_Dyn_Load_Power(model, pv, pd, pm, es, em) + CALL require(es /= CD_HCDYN_OK .AND. INDEX(em, 'one entry per node') > 0, 'L5: a wrong-size power array is refused') + END SUBROUTINE check_refusals + +END PROGRAM test_hermite_load_power diff --git a/tests/test_load_power_deck.f90 b/tests/test_load_power_deck.f90 new file mode 100644 index 00000000..b98930da --- /dev/null +++ b/tests/test_load_power_deck.f90 @@ -0,0 +1,300 @@ +! File: tests/test_load_power_deck.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_load_power_deck + !! The load power channels VIVPow, DragPow and DampPow ( the line total in W, N per unit + !! length about node J in W/m) on the in-line VIV deck of tests/test_viv_inline_deck.f90: a taut + !! line, 100 m pinned at 50 m depth in a uniform 0.15 m/s current along y, Cl 0.8, ClX 0.85. + !! Locked in, the energy the line holds only oscillates, so over 50-100 s + !! mean(VIVPow + DragPow + DampPow) = 0 + !! to the window's change of energy. + !! P1 the finite-EI cable: the VIV loads put power in, the drag takes it out, the damping power + !! is never positive, and the three balance within 1 % of the VIV power; + !! P2 the per-length channels of all 51 nodes, times their half-element lengths, sum to the + !! line total; + !! P3 the same line as an EI = 0 line (the single-line march) balances within 1 % and puts in + !! the cable's VIV power within 2 %; + !! P4 the EI = 0 line split at a free point into two lines (the multi-line system) balances + !! within 1 % over both lines; + !! P5 malformed channels, an unknown line, node 0 and a node past the end are refused. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + INTEGER, PARAMETER :: NSEG = 50 + REAL(wp), PARAMETER :: LEN0 = 99.9001_wp + INTEGER :: nfail = 0 + + CALL write_current('lpd_current.dat') + CALL check_cable() + CALL check_ei0() + CALL check_system() + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: load power channel gates' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE write_current(path) + CHARACTER(*), INTENT(IN) :: path + INTEGER :: u + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') 'MoorDyn v2 water kinematics file' + WRITE (u, '(A)') 'uniform current along y for the load power deck gate' + WRITE (u, '(A)') '--------------------------- WAVES -------------------------------------' + WRITE (u, '(A)') '0 WaveKinMod - type of wave input' + WRITE (u, '(A)') '"" WaveKinFile - file containing wave elevation time series' + WRITE (u, '(A)') '0.000000E+00 dtWave - time step to use in setting up wave kinematics grid (s)' + WRITE (u, '(A)') '0 WaveDir - wave heading (deg)' + WRITE (u, '(A)') '2 - X wave input type' + WRITE (u, '(A)') '-10, 110, 2 - X wave grid point data' + WRITE (u, '(A)') '2 - Y wave input type' + WRITE (u, '(A)') '-10, 10, 2 - Y wave grid point data' + WRITE (u, '(A)') '2 - Z wave input type' + WRITE (u, '(A)') '-100, 0, 2 - Z wave grid point data' + WRITE (u, '(A)') '--------------------------- CURRENT -------------------------------------' + WRITE (u, '(A)') '1 CurrentMod - type of current input' + WRITE (u, '(A)') 'z-depth x-current y-current' + WRITE (u, '(A)') '(m) (m/s) (m/s)' + WRITE (u, '(A)') '0.0 0.0 0.15' + WRITE (u, '(A)') '-100.0 0.0 0.15' + WRITE (u, '(A)') '--------------------- need this line ------------------' + CLOSE (u) + END SUBROUTINE write_current + + SUBROUTINE write_deck(path, ei, channels, split, tmax) + !! channels: the OUTPUTS rows, ';'-separated; split: the EI = 0 line as two lines joined at + !! a free point at mid-span. + CHARACTER(*), INTENT(IN) :: path, ei, channels + LOGICAL, INTENT(IN) :: split + REAL(wp), INTENT(IN) :: tmax + INTEGER :: u, i0, i1 + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' + WRITE (u, '(A)') 'load power deck gate: taut line with in-line VIV in a uniform current' + WRITE (u, '(A)') '----------------------- LINE TYPES ------------------------------------------' + WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' + WRITE (u, '(A)') '(name) (m) (kg/m) (N) (N-s/-) (-) (-) (-) (-) (-) (-) (-) (-)' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//ei//' 1.2 1.0 0.0 0.0 0.8 0.08 0.18' + WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' + WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' + WRITE (u, '(A)') '(#) (-) (m) (m) (m) (kg) (m^3) (m^2) (-)' + WRITE (u, '(A)') '1 Coupled 0.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '2 Fixed 100.0 0.0 -50.0 0 0 0 0' + IF (split) WRITE (u, '(A)') '3 Free 50.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '----------------------- LINES -----------------------------------------------' + WRITE (u, '(A)') 'ID LineType AttachA AttachB UnstrLen NumSegs Outputs' + WRITE (u, '(A)') '(#) (name) (#) (#) (m) (-) (-)' + IF (split) THEN + WRITE (u, '(A)') '1 riser 1 3 49.95005 25 -' + WRITE (u, '(A)') '2 riser 3 2 49.95005 25 -' + ELSE + WRITE (u, '(A)') '1 riser 1 2 99.900100 50 -' + END IF + WRITE (u, '(A)') '----------------------- VIV -------------------------------------------------' + WRITE (u, '(A)') 'TypeName ClX alpha' + WRITE (u, '(A)') '(name) (-) (-)' + WRITE (u, '(A)') 'riser 0.85 0.15' + WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' + WRITE (u, '(A)') '0.01 dtM' + WRITE (u, '(A)') '100.0 WtrDpth' + WRITE (u, '(A)') '1025.0 rhoW' + WRITE (u, '(A)') '9.80665 g' + WRITE (u, '(A)') 'lpd_current.dat WaterKin' + WRITE (u, '(A)') '0.25 VIVrmsWindow' + WRITE (u, '(A,F8.3,A)') ' ', tmax, ' TMax' + WRITE (u, '(A)') '---------------------- OUTPUTS -----------------------------------------------' + i0 = 1 + DO + i1 = INDEX(channels(i0:), ';') + IF (i1 == 0) THEN + WRITE (u, '(A)') TRIM(channels(i0:)) + EXIT + END IF + WRITE (u, '(A)') channels(i0:i0 + i1 - 2) + i0 = i0 + i1 + END DO + WRITE (u, '(A)') 'END' + WRITE (u, '(A)') '------------------------- need this line --------------------------------------' + CLOSE (u) + END SUBROUTINE write_deck + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK .AND. conv + END SUBROUTINE run + + SUBROUTINE read_out(path, ncol, tab, n) + !! The rows of a deck's main output file (time and ncol channels) from 50 s on. + CHARACTER(*), INTENT(IN) :: path + INTEGER, INTENT(IN) :: ncol + REAL(wp), ALLOCATABLE, INTENT(OUT) :: tab(:, :) + INTEGER, INTENT(OUT) :: n + CHARACTER(8192) :: rec + REAL(wp) :: row(ncol + 1) + INTEGER :: u, ios + ALLOCATE (tab(ncol + 1, 20000)) + n = 0 + OPEN (NEWUNIT=u, FILE=path, STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (u, '(A)') rec + READ (u, '(A)') rec + DO + READ (u, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + READ (rec, *) row + IF (row(1) < 50.0_wp - 1.0e-9_wp) CYCLE + IF (n == SIZE(tab, 2)) EXIT + n = n + 1 + tab(:, n) = row + END DO + CLOSE (u) + END SUBROUTINE read_out + + SUBROUTINE balance(label, tab, n, lines, p_viv) + !! The mean of the three powers over the window (columns 2-4 of a line, lines in a row) and + !! the balance check; p_viv returns the mean VIV power. + CHARACTER(*), INTENT(IN) :: label + REAL(wp), INTENT(IN) :: tab(:, :) + INTEGER, INTENT(IN) :: n, lines + REAL(wp), INTENT(OUT) :: p_viv + REAL(wp) :: m(3) + INTEGER :: k, j + m = 0.0_wp + DO j = 1, lines + DO k = 1, 3 + m(k) = m(k) + SUM(tab(1 + 3*(j - 1) + k, 1:n))/REAL(n, wp) + END DO + END DO + p_viv = m(1) + WRITE (*, '(2A,3F10.4,A,ES10.2)') label, ': mean VIVPow, DragPow, DampPow [W] ', m, & + ', balance/VIV ', SUM(m)/m(1) + CALL require(m(1) > 0.0_wp .AND. m(2) < 0.0_wp, label//': the VIV loads put power in, the drag takes it out') + CALL require(ABS(SUM(m)) <= 0.01_wp*m(1), label//': the powers balance within 1 % of the VIV power') + DO j = 1, lines + CALL require(ALL(tab(1 + 3*j, 1:n) <= 0.0_wp), label//': the damping power is never positive') + END DO + END SUBROUTINE balance + + SUBROUTINE check_cable() + REAL(wp), ALLOCATABLE :: tab(:, :) + REAL(wp) :: pv, trib, s, sabs + INTEGER :: n, j, k + LOGICAL :: ok + CHARACTER(1024) :: msg + CHARACTER(4096) :: chans + CALL write_deck('lpd_cab.dat', '1.0', 'VIVPow1;DragPow1;DampPow1;DampPow1N26', .FALSE., 100.0_wp) + CALL run('lpd_cab.dat', 'lpd_cab', ok, msg) + CALL require(ok, 'P1: the finite-EI deck runs: '//TRIM(msg)) + IF (.NOT. ok) RETURN + CALL read_out('lpd_cab.out', 4, tab, n) + CALL require(n > 1000, 'P1: the run wrote its rows') + IF (n <= 1000) RETURN + CALL balance('P1 finite-EI cable', tab, n, 1, pv) + CALL require(ALL(tab(5, 1:n) <= 0.0_wp), 'P1: the damping power per length is never positive') + ! P2: every node's power per length, times its half elements, sums to the line total + chans = 'VIVPow1' + DO j = 1, NSEG + 1 + chans = TRIM(chans)//';VIVPow1N'//TRIM(int_text(j)) + END DO + CALL write_deck('lpd_nodes.dat', '1.0', TRIM(chans), .FALSE., 52.0_wp) + CALL run('lpd_nodes.dat', 'lpd_nodes', ok, msg) + CALL require(ok, 'P2: the all-node deck runs: '//TRIM(msg)) + IF (.NOT. ok) RETURN + CALL read_out('lpd_nodes.out', NSEG + 2, tab, n) + CALL require(n > 100, 'P2: the run wrote its rows') + IF (n <= 100) RETURN + DO k = 1, n + s = 0.0_wp + sabs = 0.0_wp + DO j = 1, NSEG + 1 + trib = LEN0/REAL(NSEG, wp) + IF (j == 1 .OR. j == NSEG + 1) trib = 0.5_wp*trib + s = s + tab(2 + j, k)*trib + sabs = sabs + ABS(tab(2 + j, k))*trib + END DO + IF (ABS(s - tab(2, k)) > 1.0e-5_wp*MAX(sabs, 1.0e-12_wp)) THEN + CALL require(.FALSE., 'P2: the per-length powers sum to the line total') + EXIT + END IF + END DO + END SUBROUTINE check_cable + + SUBROUTINE check_ei0() + REAL(wp), ALLOCATABLE :: tab(:, :) + REAL(wp) :: pv0, pvf + INTEGER :: n + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('lpd_ei0.dat', '0.0', 'VIVPow1;DragPow1;DampPow1', .FALSE., 100.0_wp) + CALL run('lpd_ei0.dat', 'lpd_ei0', ok, msg) + CALL require(ok, 'P3: the EI = 0 deck runs: '//TRIM(msg)) + IF (.NOT. ok) RETURN + CALL read_out('lpd_ei0.out', 3, tab, n) + CALL require(n > 1000, 'P3: the run wrote its rows') + IF (n <= 1000) RETURN + CALL balance('P3 EI = 0 line', tab, n, 1, pv0) + CALL read_out('lpd_cab.out', 4, tab, n) + IF (n <= 1000) RETURN + pvf = SUM(tab(2, 1:n))/REAL(n, wp) + CALL require(ABS(pv0/pvf - 1.0_wp) <= 0.02_wp, 'P3: the EI = 0 line takes the cable''s VIV power within 2 %') + END SUBROUTINE check_ei0 + + SUBROUTINE check_system() + REAL(wp), ALLOCATABLE :: tab(:, :) + REAL(wp) :: pv + INTEGER :: n + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('lpd_sys.dat', '0.0', 'VIVPow1;DragPow1;DampPow1;VIVPow2;DragPow2;DampPow2', .TRUE., 100.0_wp) + CALL run('lpd_sys.dat', 'lpd_sys', ok, msg) + CALL require(ok, 'P4: the two-line deck runs: '//TRIM(msg)) + IF (.NOT. ok) RETURN + CALL read_out('lpd_sys.out', 6, tab, n) + CALL require(n > 1000, 'P4: the run wrote its rows') + IF (n <= 1000) RETURN + CALL balance('P4 two EI = 0 lines and a free point', tab, n, 2, pv) + END SUBROUTINE check_system + + SUBROUTINE check_refusals() + CALL refused('VIVPow0', 'bad load power channel', 'line 0') + CALL refused('DragPow7', 'bad load power channel', 'an unknown line') + CALL refused('DampPowx', 'bad load power channel', 'a channel without a line id') + CALL refused('VIVPow1N0', 'node numbers start at 1', 'node 0') + CALL refused('DragPow1N52', 'exceeds line node count', 'a node past End B') + END SUBROUTINE check_refusals + + SUBROUTINE refused(channel, needle, what) + CHARACTER(*), INTENT(IN) :: channel, needle, what + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('lpd_bad.dat', '1.0', channel, .FALSE., 1.0_wp) + CALL run('lpd_bad.dat', 'lpd_bad', ok, msg) + CALL require(.NOT. ok .AND. INDEX(msg, needle) > 0, 'P5: '//what//' is refused: '//TRIM(msg)) + END SUBROUTINE refused + + FUNCTION int_text(i) RESULT(s) + INTEGER, INTENT(IN) :: i + CHARACTER(:), ALLOCATABLE :: s + CHARACTER(16) :: b + WRITE (b, '(I0)') i + s = TRIM(b) + END FUNCTION int_text + +END PROGRAM test_load_power_deck diff --git a/tests/test_viv_coupled.f90 b/tests/test_viv_coupled.f90 index 53045117..1514c5fe 100644 --- a/tests/test_viv_coupled.f90 +++ b/tests/test_viv_coupled.f90 @@ -12,6 +12,9 @@ PROGRAM test_viv_coupled !! * lock-in: over 60-120 s the mid-span cross-flow amplitude of both lines is MoorDyn-F's !! A/D 0.662 within 0.03 and the response frequency its 0.293 Hz within 0.01 Hz; with Cl = 0 !! the lines stay still (A/D below 0.01); + !! * load power (the VIVPow, DragPow and DampPow channels of each line): over the lock-in window + !! the VIV loads put power in, the drag takes it out, the damping power is never positive, and + !! their means balance within 1 % of the VIV power; !! * checkpoint restart (the shell's rebuild recipe: a fresh instance takes the coupled !! kinematics, each EI = 0 line's interior [v; q; a] and VIV block and each cable's mirror, !! then the host field): the restarted run continues bit for bit, and a rebuild that skips the @@ -34,7 +37,7 @@ PROGRAM test_viv_coupled CD_AGG_SetFluidFields, CD_AGG_Snapshot, CD_AGG_Restore USE CableDyn_OpenFAST_HermiteFMF, ONLY: CD_HFMF_MirrorSize, CD_HFMF_VIVMirrorSize, CD_HFMF_PackMirror, & CD_HFMF_UnpackMirror, CD_HFMF_OK - USE CableDyn_DeckDriver, ONLY: CD_Deck_VIV_Phase_Seed + USE CableDyn_DeckDriver, ONLY: CD_Deck_VIV_Phase_Seed, CD_Eval_Aggregate_Channel, CD_DECKDRV_OK USE CableDyn_System, ONLY: CD_System_NLines, CD_System_Line_NDOF, CD_Get_System_Line_State, & CD_Update_System_Line_Interior_State, CD_System_Line_VIV_MirrorSize, & CD_Get_System_Line_VIV_State, CD_Set_System_Line_VIV_State, CD_SYSTEM_OK @@ -73,20 +76,44 @@ SUBROUTINE case_lockin() !! 120 s in the host current; the response statistics over 60-120 s. INTEGER, PARAMETER :: NSTEP = 12000, NSKIP = 6000 TYPE(CD_AGG_ModuleType) :: agg - REAL(wp) :: zs(NSTEP - NSKIP, 2), ad(2), f(2) + REAL(wp) :: zs(NSTEP - NSKIP, 2), ad(2), f(2), pw(3, 2), pmax(2) INTEGER :: pass, s, k + CHARACTER(8) :: pname(3) = ['VIVPow ', 'DragPow ', 'DampPow '] CHARACTER(16) :: what(2) = ['EI = 0 riser ', 'finite-EI cable '] DO pass = 1, 2 IF (.NOT. start(agg, MERGE('viv_coupled.dat ', 'viv_coupled_nolift.dat', pass == 1))) RETURN DO s = 1, NSKIP IF (.NOT. advance(agg)) RETURN END DO + pw = 0.0_wp + pmax = -HUGE(1.0_wp) DO s = 1, NSTEP - NSKIP IF (.NOT. advance(agg)) RETURN zs(s, 1) = agg%sys%fast%system%lines(1)%q(3*MID) zs(s, 2) = agg%cables(1)%line%q(6*(MID - 1) + 3) + IF (pass == 2) CYCLE + DO k = 1, 2 + BLOCK + REAL(wp) :: val + INTEGER :: j + DO j = 1, 3 + IF (.NOT. channel(agg, TRIM(pname(j))//MERGE('1', '2', k == 1), val)) RETURN + pw(j, k) = pw(j, k) + val/REAL(NSTEP - NSKIP, wp) + IF (j == 3) pmax(k) = MAX(pmax(k), val) + END DO + END BLOCK + END DO END DO CALL finish(agg) + IF (pass == 1) THEN + DO k = 1, 2 + WRITE (*, '(2A,3F9.4,A,ES10.2)') ' ', what(k), pw(:, k), ' W mean VIV/drag/damping power, balance/VIV ', & + SUM(pw(:, k))/pw(1, k) + CALL check(pw(1, k) > 0.0_wp .AND. pw(2, k) < 0.0_wp, TRIM(what(k))//': VIV power in, drag power out') + CALL check(pmax(k) <= 0.0_wp, TRIM(what(k))//': the damping power is never positive') + CALL check(ABS(SUM(pw(:, k))) <= 0.01_wp*pw(1, k), TRIM(what(k))//': the load powers balance within 1 %') + END DO + END IF DO k = 1, 2 CALL response(zs(:, k), ad(k), f(k)) IF (pass == 1) THEN @@ -101,6 +128,19 @@ SUBROUTINE case_lockin() END DO END SUBROUTINE case_lockin + LOGICAL FUNCTION channel(agg, name, val) RESULT(ok) + !! One deck channel of the aggregate at its committed state (the shells' evaluator). + TYPE(CD_AGG_ModuleType), INTENT(INOUT) :: agg + CHARACTER(*), INTENT(IN) :: name + REAL(wp), INTENT(OUT) :: val + INTEGER :: es + CHARACTER(512) :: em + CALL CD_Eval_Aggregate_Channel(name, agg%has_sys, agg%sys%fast%system, agg%cables, agg%line_is_cable, & + agg%line_obj_index, val, es, em, cable_points=agg%cable_points) + ok = es == CD_DECKDRV_OK + CALL check(ok, name//': '//TRIM(em)) + END FUNCTION channel + SUBROUTINE case_restart() !! Checkpoint after 10 s, while the lock-in builds up; 50 steps on. INTEGER, PARAMETER :: NPRE = 1000, NPOST = 50 From 9bd50e40601e71296f3b4fba66d50d69516cc321 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Thu, 12 Nov 2026 08:28:19 +0900 Subject: [PATCH 05/47] feat: cabledyn.viv_response, the VIV response of a line (#148) A VIV study describes a response by its cross-flow and in-line amplitude along the span, the response frequencies against the flow, the excited modes, how far it is a travelling wave and its orbits. viv_response computes them from a line's node positions (a per-line .p.out file, a MoorDyn-F line file, or the LNp channels of a main output) over a window. Each node's motion about its mean position is resolved into its local flow frame: the mean tangent t from End A towards End B, the in-line axis along the flow normal to t, and the cross-flow axis t x in-line; a node whose tangent lies along the flow has no frame (nan). The VIVResponse gives: - RMS and half peak-to-peak displacement over D, for either direction; - each node's and the line's dominant frequency (Hann periodogram, parabolic peak) and f D/U_n against the synchronisation band; - modal weights at every sample, on the sines of a taut line with fixed ends or on given shapes, with the dominant mode and the unexplained share; - the complex Fourier shape at a frequency and its travelling-wave index (the travelling index of Feeny's complex orthogonal decomposition, J. Sound Vib. 310, 2008, 77-90); - orbits and the in-line/cross-flow phase difference; - a CSV export and envelope and orbit plots. Review fixes: - the default sines need the whole line (a main output with only some nodes takes given shapes); a response with no dominant frequency has a nan travelling-wave index; - the nodes of a main output keep their source numbers (export, node lookup); - a modal fit on shapes that are not independent at the nodes is refused with the rank; - a node or component that does not move (range at round-off of its position) has no frequency, no Fourier shape and no orbit phase. Checks: synthetic standing and travelling waves with known amplitudes, frequencies, modes, phases and index (python/tests/test_viv.py); the end-to-end run of examples/viv_taut_cable_inline.dat reproduces the deck's A/D 0.82 cross-flow and 0.19 in-line at twice the frequency, modes 1 and 2, f D/U_n inside the band, a standing wave. Full pytest, ruff, mypy strict, Sphinx -W. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 5 + doc/api_python.rst | 8 + doc/python_postprocessing.rst | 58 +++- doc/references.rst | 5 + python/cabledyn/__init__.py | 4 + python/cabledyn/viv.py | 598 ++++++++++++++++++++++++++++++++ python/tests/test_end_to_end.py | 26 ++ python/tests/test_viv.py | 274 +++++++++++++++ 8 files changed, 977 insertions(+), 1 deletion(-) create mode 100644 python/cabledyn/viv.py create mode 100644 python/tests/test_viv.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 412b2964..51d7bb9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,11 @@ All notable changes to CableDyn are recorded in this file. The format follows standalone and coupled. Their work closes a cable's energy balance to 0.04 % in free decays and VIV runs, and on the locked-in line of `examples/viv_taut_cable_inline.dat` their means balance within 0.5 % of the VIV power. +- `cabledyn.viv_response`: the VIV response of a line from its node positions, in the local flow + frame of every node: cross-flow and in-line amplitude along the span, the response + frequencies and `f D/U_n`, modal weights (taut-line sines or given shapes), the complex shape + and its travelling-wave index (Feeny 2008), orbits and the in-line/cross-flow phase + difference, with a CSV export and plots. ## [0.4.2] - 2026-11-09 diff --git a/doc/api_python.rst b/doc/api_python.rst index ec38d944..4ea33930 100644 --- a/doc/api_python.rst +++ b/doc/api_python.rst @@ -336,6 +336,14 @@ the solver's own curvature, tension, and angle channels, where written, are auth .. autoclass:: cabledyn.TouchdownHistory :members: +.. autofunction:: cabledyn.viv_response + +.. autoclass:: cabledyn.VIVResponse + :members: + +.. autoclass:: cabledyn.ModalAmplitudes + :members: + Deck editing and case generation -------------------------------- diff --git a/doc/python_postprocessing.rst b/doc/python_postprocessing.rst index 862b731f..4548a784 100644 --- a/doc/python_postprocessing.rst +++ b/doc/python_postprocessing.rst @@ -7,7 +7,7 @@ The ``cabledyn`` package reads the output of the tools a CableDyn study is usual against, and applies the same typed tables, statistics, fatigue, spectra, plots, and exports to them (:doc:`python`). This page covers the readers, run-to-run comparison, resampling and filtering, extreme-value statistics, line geometry, fatigue damage, range graphs, design checks, -touchdown histories, and parameter grids. All of them need NumPy only; plots need matplotlib. +touchdown histories, VIV responses, and parameter grids. All of them need NumPy only; plots need matplotlib. Reading OpenFAST, MoorDyn, and coupled runs ------------------------------------------- @@ -421,6 +421,62 @@ that node, for the anchor uplift check. tdp.plot("arc_length") tdp.export("results/line1_tdp.csv") +VIV response +------------ + +:func:`cabledyn.viv_response` resolves the motion of a line's nodes about their mean positions +over a window into the local flow frame of each node, from a CableDyn ``.Line.p.out`` file, a +MoorDyn-F line file with node positions, or the ``LNpx``/``py``/``pz`` channels of a main +output. The frame follows the mean shape: the tangent ``t`` from End A towards End B, the in-line +axis along the part of the given flow velocity normal to the tangent, and the cross-flow axis +``t x`` in-line, so that (in-line, cross-flow, ``t``) is right-handed. A node whose tangent lies +along the flow has no frame and reports ``nan``. The :class:`~cabledyn.VIVResponse` holds the +in-line and cross-flow displacement of every node at every sample and gives: + +* ``rms_over_diameter`` and ``amplitude_over_diameter`` (half the peak-to-peak displacement) along + the line, for either direction; +* ``frequencies`` (each node's) and ``frequency`` (the line's), the peak of the Hann-windowed + periodogram refined by a parabola through its neighbours, and ``nondimensional_frequency`` + ``f D/U_n`` with ``U_n`` the flow speed normal to the tangent, the quantity the synchronisation + band ``cF +/- dF`` of :ref:`theory-viv` bounds (its reciprocal is the reduced velocity); +* ``modal_amplitudes``, the least-squares weights at every sample of the shapes + ``sin(n pi s/S)`` of a taut line with fixed ends (``s`` the mean chord length from End A, ``S`` + the line's), or of shapes you give (for example a component of the run's mode shapes, + :doc:`outputs`), with their RMS, the dominant mode and the share of the motion they leave + unexplained. The sines need the whole line, so they take a per-line file; on the nodes a main + output holds, give the shapes; +* ``complex_shape``, the node Fourier coefficients at one frequency, and from it + ``travelling_wave_index``, the ratio of the smaller to the larger singular value of its real and + imaginary parts (the travelling index of the complex orthogonal decomposition of + :ref:`Feeny 2008 `): 0 for a standing wave, 1 for a wave of constant amplitude + travelling over whole wavelengths; +* ``orbit`` (a node's in-line and cross-flow displacement) and ``phase_difference``, the in-line + phase at twice the cross-flow frequency less twice the cross-flow phase, which sets the shape + and direction of a figure-of-eight orbit. + +A node is named by its CableDyn number (1 = End A; ``node_numbers``): the ``J`` of the +``LNp`` channels of a main output, which may hold only some nodes, and ``1 .. N`` for a +per-line file. The CSV export writes the same numbers. + +The frequency measures need uniform sampling. On the in-line VIV example +``viv_taut_cable_inline.dat``, run with the line output flag ``p``, over 60-90 s the mid-span cross-flow amplitude is A/D 0.82 at +0.295 Hz (``f D/U_n`` 0.20), the quarter-span in-line amplitude 0.19 at 0.57 Hz, the cross-flow +response is mode 1 and the in-line mode 2, and the travelling-wave index of the cross-flow motion +is 0.05, a standing wave between the pinned ends. + +.. code-block:: python + + from cabledyn import viv_response + + viv = viv_response(result.read_line_positions(1), flow=(0.0, 0.15, 0.0), diameter=0.1, + start=60.0) + print(viv.frequency("cross_flow"), viv.nondimensional_frequency()[25]) + print(viv.modal_amplitudes("cross_flow").dominant_mode) + print(viv.travelling_wave_index("cross_flow")) + viv.plot_envelope() + viv.plot_orbit(13) + viv.export("results/line1_viv.csv") + Parameter grids --------------- diff --git a/doc/references.rst b/doc/references.rst index a4a4db4f..9e68e891 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -95,6 +95,11 @@ Hydrodynamics and ocean environment simulation of riser VIV in current and irregular waves. *Marine Structures* **60**, 241–260. https://doi.org/10.1016/j.marstruc.2018.04.001 +.. _ref-feeny2008: + +- **Feeny, B. F. (2008).** A complex orthogonal decomposition for wave motion analysis. + *Journal of Sound and Vibration* **310**, 77–90. https://doi.org/10.1016/j.jsv.2007.07.047 + .. _ref-morison1950: - **Morison, J. R., O'Brien, M. P., Johnson, J. W. & Schaaf, S. A. (1950).** The force diff --git a/python/cabledyn/__init__.py b/python/cabledyn/__init__.py index 90ecc52b..d238085d 100644 --- a/python/cabledyn/__init__.py +++ b/python/cabledyn/__init__.py @@ -149,6 +149,7 @@ ) from cabledyn.sweep import parameter_grid from cabledyn.touchdown import TouchdownHistory, touchdown_history +from cabledyn.viv import ModalAmplitudes, VIVResponse, viv_response if TYPE_CHECKING: from cabledyn._lib import abi_minor as abi_minor @@ -198,6 +199,7 @@ "LinePositions", "LineSegmentHistory", "LineSummary", + "ModalAmplitudes", "ModeShapes", "MoorDynLineHistory", "NaturalModes", @@ -226,6 +228,7 @@ "TimeHistory", "Touchdown", "TouchdownHistory", + "VIVResponse", "WaterSurface", "WeibullFit", "animate", @@ -284,6 +287,7 @@ "tension_check", "touchdown_history", "upcrossing_maxima", + "viv_response", ] __version__ = "0.4.2" diff --git a/python/cabledyn/viv.py b/python/cabledyn/viv.py new file mode 100644 index 00000000..d24d3cec --- /dev/null +++ b/python/cabledyn/viv.py @@ -0,0 +1,598 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Vortex-induced vibration (VIV) response of a line from its node positions. + +:func:`viv_response` resolves the motion of every node of a line about its mean +position into the local flow frame of the node and reports the quantities a VIV +study describes a response by: the cross-flow and in-line amplitude along the +span, the response frequencies and the non-dimensional frequency they give +against the flow, the modal content, how far the response is a travelling wave, +and the in-line/cross-flow orbits. + +The local frame of a node follows the mean shape over the analysed window: the +tangent ``t`` from End A towards End B (central differences of the mean node +positions), the in-line direction ``e_x`` along the part of the flow velocity +normal to the tangent, and the cross-flow direction ``e_y = t x e_x``, so that +``(e_x, e_y, t)`` is right-handed. A node whose tangent is parallel to the flow +has no normal flow and no frame; its values are ``nan``. + +The positions come from a CableDyn per-line position file +(``.Line.p.out``, a :class:`~cabledyn.LineNodeHistory`), a MoorDyn +per-line file with node positions (a :class:`~cabledyn.MoorDynLineHistory`), or +the ``LNpx``/``py``/``pz`` channels of a main output for the nodes the +deck lists. The frequency analysis needs uniform sampling. +""" + +from __future__ import annotations + +import math +import os +from dataclasses import dataclass +from pathlib import Path +from typing import Any + +import numpy as np +import numpy.typing as npt + +from cabledyn._csv import number, write_csv +from cabledyn._optional import pyplot +from cabledyn.formats import MoorDynLineHistory +from cabledyn.ranges import node_position_channels +from cabledyn.results import LineNodeHistory, TimeHistory +from cabledyn.spectra import _sampling +from cabledyn.touchdown import _positions + +__all__ = ["ModalAmplitudes", "VIVResponse", "viv_response"] + +_DIRECTIONS = ("cross_flow", "in_line") + + +def _readonly(values: npt.ArrayLike, dtype: npt.DTypeLike = np.float64) -> npt.NDArray[Any]: + array = np.array(values, dtype=dtype, copy=True) + array.setflags(write=False) + return array + + +def _direction(direction: str) -> str: + if direction not in _DIRECTIONS: + raise ValueError(f"direction must be one of {_DIRECTIONS}, not {direction!r}") + return direction + + +def _peak_frequency(frequency: npt.NDArray[Any], power: npt.NDArray[Any]) -> float: + """Frequency of the largest power above zero, refined by a parabola through its neighbours.""" + if power.size < 3 or not np.any(power[1:] > 0.0): + return math.nan + k = int(np.argmax(power[1:])) + 1 + if 1 <= k < power.size - 1: + left, middle, right = power[k - 1], power[k], power[k + 1] + curvature = left - 2.0 * middle + right + if curvature < 0.0: + shift = 0.5 * (left - right) / curvature + return float(frequency[k] + shift * (frequency[1] - frequency[0])) + return float(frequency[k]) + + +@dataclass(frozen=True) +class ModalAmplitudes: + """The modal content of one direction of a VIV response. + + Attributes + ---------- + direction : str + ``"cross_flow"`` or ``"in_line"``. + mode_numbers : tuple[int, ...] + One-based numbers of the shapes fitted. + coefficients : numpy.ndarray + Read-only ``(n_samples, n_modes)`` least-squares weights of the shapes + in the displacement at every sample, in metres per unit shape. + rms_over_diameter : numpy.ndarray + Read-only ``(n_modes,)`` RMS of each weight over the window, divided by + the diameter. + residual : float + RMS of the displacement the shapes leave unexplained, over the RMS of + the displacement (0 when the shapes reproduce it). + """ + + direction: str + mode_numbers: tuple[int, ...] + coefficients: npt.NDArray[Any] + rms_over_diameter: npt.NDArray[Any] + residual: float + + @property + def dominant_mode(self) -> int: + """Number of the shape with the largest RMS weight.""" + return self.mode_numbers[int(np.argmax(self.rms_over_diameter))] + + +@dataclass(frozen=True) +class VIVResponse: + """The VIV response of one line over an analysis window. + + Created by :func:`viv_response`. Nodes are in End-A-to-End-B order of the + source; node arrays have one entry per node, time arrays one per sample. + + Attributes + ---------- + time : numpy.ndarray + Read-only ``(n_samples,)`` sample times of the window, in seconds. + arc_length : numpy.ndarray + Read-only ``(n_nodes,)`` chord length of the mean shape from End A, m. + mean_position : numpy.ndarray + Read-only ``(n_nodes, 3)`` mean node positions over the window, m. + tangent, in_line_axis, cross_flow_axis : numpy.ndarray + Read-only ``(n_nodes, 3)`` unit vectors of each node's local frame + (``nan`` rows where the flow is along the tangent). + normal_speed : numpy.ndarray + Read-only ``(n_nodes,)`` speed of the flow normal to the mean tangent, + m/s. + in_line, cross_flow : numpy.ndarray + Read-only ``(n_samples, n_nodes)`` displacement about the mean position + along the node's in-line and cross-flow axes, m. + diameter : float + Diameter the amplitudes are divided by, m. + flow : numpy.ndarray + Read-only ``(3,)`` flow velocity the frame is taken against, m/s. + whole_line : bool + Whether the nodes are the whole line, End A to End B (a per-line + file), so that ``arc_length`` spans it; a main output may hold only + some of its nodes. + node_numbers : tuple of int + The CableDyn number of each node (1 = End A): ``1 .. n_nodes`` for a + per-line file (MoorDyn's node ``J`` is ``J + 1``), the ``J`` of the + ``LNp`` channels for a main output. The methods that take a + node take this number. Empty means ``1 .. n_nodes``. + """ + + time: npt.NDArray[Any] + arc_length: npt.NDArray[Any] + mean_position: npt.NDArray[Any] + tangent: npt.NDArray[Any] + in_line_axis: npt.NDArray[Any] + cross_flow_axis: npt.NDArray[Any] + normal_speed: npt.NDArray[Any] + in_line: npt.NDArray[Any] + cross_flow: npt.NDArray[Any] + diameter: float + flow: npt.NDArray[Any] + whole_line: bool = True + node_numbers: tuple[int, ...] = () + + @property + def node_count(self) -> int: + """Number of nodes.""" + return int(self.arc_length.size) + + @property + def sampling_interval(self) -> float: + """Uniform sampling interval of the window, s.""" + return float(self.time[1] - self.time[0]) + + def displacement(self, direction: str) -> npt.NDArray[Any]: + """Return the ``(n_samples, n_nodes)`` displacement of ``"cross_flow"`` or ``"in_line"``.""" + return self.cross_flow if _direction(direction) == "cross_flow" else self.in_line + + def rms_over_diameter(self, direction: str = "cross_flow") -> npt.NDArray[Any]: + """Return the ``(n_nodes,)`` RMS displacement over the diameter. + + For a harmonic response the amplitude is ``sqrt(2)`` times the RMS. + """ + values = self.displacement(direction) + return _readonly(np.sqrt(np.mean(values * values, axis=0)) / self.diameter) + + def amplitude_over_diameter(self, direction: str = "cross_flow") -> npt.NDArray[Any]: + """Return the ``(n_nodes,)`` half peak-to-peak displacement over the diameter.""" + values = self.displacement(direction) + return _readonly(0.5 * (values.max(axis=0) - values.min(axis=0)) / self.diameter) + + def _moving_displacement(self, direction: str) -> npt.NDArray[Any]: + """The displacement of a direction with still nodes set to exactly zero. + + A node whose displacement stays within round-off of its coordinates (a range below + 1e-12 of its distance from the origin plus the diameter) is still: its round-off + offset from the mean, windowed or transformed, would otherwise read as motion at + every frequency, with an arbitrary phase. + """ + values = np.array(self.displacement(direction), dtype=np.float64) + scale = np.linalg.norm(self.mean_position, axis=1) + self.diameter + with np.errstate(invalid="ignore"): + still = (values.max(axis=0) - values.min(axis=0)) <= 1.0e-12 * scale + values[:, still] = 0.0 + return values + + def _power(self, direction: str) -> tuple[npt.NDArray[Any], npt.NDArray[Any]]: + """Frequencies and the ``(n_freq, n_nodes)`` Hann-windowed periodogram of a direction. + + Still nodes (:meth:`_moving_displacement`) have no power. + """ + values = self._moving_displacement(direction) + window = np.hanning(self.time.size) + spectrum = np.fft.rfft(values * window[:, None], axis=0) + frequency = np.fft.rfftfreq(self.time.size, self.sampling_interval) + return frequency, np.abs(spectrum) ** 2 + + def frequencies(self, direction: str = "cross_flow") -> npt.NDArray[Any]: + """Return the ``(n_nodes,)`` dominant response frequency of each node, Hz. + + The peak of the node's Hann-windowed periodogram above zero frequency, + refined by a parabola through the bins beside it; ``nan`` for a node + without a frame or without motion. + """ + frequency, power = self._power(direction) + result = np.full(self.node_count, math.nan) + for node in range(self.node_count): + if np.all(np.isfinite(power[:, node])): + result[node] = _peak_frequency(frequency, power[:, node]) + return _readonly(result) + + def frequency(self, direction: str = "cross_flow") -> float: + """Return the dominant response frequency of the line, Hz. + + The peak of the sum of the nodes' periodograms (``nan`` without motion). + """ + frequency, power = self._power(direction) + finite = np.all(np.isfinite(power), axis=0) + if not np.any(finite): + return math.nan + return _peak_frequency(frequency, power[:, finite].sum(axis=1)) + + def nondimensional_frequency(self, direction: str = "cross_flow") -> npt.NDArray[Any]: + """Return ``f D / U_n`` at every node, with ``f`` the line's dominant frequency. + + For the cross-flow response this is the quantity a synchronisation + model's band ``cF +/- dF`` bounds, and its reciprocal the reduced + velocity ``U_n/(f D)``. + """ + with np.errstate(divide="ignore", invalid="ignore"): + result = self.frequency(direction) * self.diameter / self.normal_speed + return _readonly(np.where(self.normal_speed > 0.0, result, math.nan)) + + def modal_amplitudes( + self, + direction: str = "cross_flow", + *, + n_modes: int = 10, + shapes: npt.ArrayLike | None = None, + ) -> ModalAmplitudes: + """Fit mode shapes to the displacement of a direction at every sample. + + Parameters + ---------- + direction : str + ``"cross_flow"`` or ``"in_line"``. + n_modes : int + Number of the default shapes ``sin(n pi s / S)``, ``n = 1 .. + n_modes``, of arc length ``s`` from End A over the mean chord + length ``S`` (the modes of a taut string with fixed ends). Ignored + when ``shapes`` is given. + shapes : array_like, optional + ``(n_modes, n_nodes)`` scalar shapes of the direction at the nodes + to fit instead, for example a component of the run's mode shapes. + + Returns + ------- + ModalAmplitudes + The weights of the shapes at every sample (least squares over the + nodes with a frame), their RMS over the diameter and the share of + the displacement they leave unexplained. + + Raises + ------ + ValueError + If the shapes are not finite, have the wrong number of nodes, or + fewer nodes with a frame than shapes remain; if the shapes are not + independent at those nodes (a sine that vanishes at every node, or + two that alias each other on a coarse output); or if the default + shapes are asked of a response that does not hold the whole line. + """ + values = self.displacement(direction) + if shapes is None: + if isinstance(n_modes, bool) or int(n_modes) != n_modes or n_modes < 1: + raise ValueError("n_modes must be a positive integer") + if not self.whole_line: + # the sines vanish at the line's ends, which the nodes of a main output may + # not include: fitted over the span of the nodes it holds, they would be wrong + raise ValueError( + "the default shapes need the whole line, End A to End B: analyse the " + "per-line .p.out file, or give shapes at the nodes held" + ) + span = float(self.arc_length[-1]) + if not span > 0.0: + raise ValueError("the mean shape has no length") + numbers = np.arange(1, int(n_modes) + 1) + basis = np.sin(np.pi * numbers[:, None] * self.arc_length[None, :] / span) + else: + basis = np.array(shapes, dtype=np.float64) + if basis.ndim != 2 or basis.shape[1] != self.node_count or basis.shape[0] < 1: + raise ValueError(f"shapes must have shape (n_modes, {self.node_count})") + if not np.all(np.isfinite(basis)): + raise ValueError("shapes must be finite") + numbers = np.arange(1, basis.shape[0] + 1) + framed = np.all(np.isfinite(values), axis=0) + if int(np.count_nonzero(framed)) < basis.shape[0]: + raise ValueError("fewer nodes with a flow frame than shapes to fit") + design = basis[:, framed].T + target = values[:, framed].T + coefficients, _, rank, _ = np.linalg.lstsq(design, target, rcond=None) + if int(rank) < basis.shape[0]: + # dependent shapes at the nodes held (a mode that vanishes at every node, or two + # that alias each other): their weights are not determined by the motion + raise ValueError( + f"the {basis.shape[0]} shapes are not independent at the nodes with a flow frame " + f"(rank {int(rank)}): fit fewer modes, or use a finer output" + ) + left = target - design @ coefficients + total = float(np.sqrt(np.mean(target * target))) + residual = float(np.sqrt(np.mean(left * left))) / total if total > 0.0 else 0.0 + rms = np.sqrt(np.mean(coefficients * coefficients, axis=1)) / self.diameter + return ModalAmplitudes( + direction=_direction(direction), + mode_numbers=tuple(int(n) for n in numbers), + coefficients=_readonly(coefficients.T), + rms_over_diameter=_readonly(rms), + residual=residual, + ) + + def complex_shape( + self, direction: str = "cross_flow", frequency: float | None = None + ) -> npt.NDArray[Any]: + """Return the ``(n_nodes,)`` complex Fourier shape of a direction at one frequency. + + ``c_j = (2/W) sum_k w_k u_j(t_k) exp(-2 pi i f t_k)`` with the Hann + window ``w`` of sum ``W``, so that a node moving as ``a cos(2 pi f t + + phase)`` has ``c_j = a exp(i phase)``; ``frequency`` defaults to the + line's dominant frequency of the direction. A still node has ``c_j = 0``. + """ + f = self.frequency(direction) if frequency is None else float(frequency) + if not (math.isfinite(f) and f >= 0.0): + raise ValueError("the frequency must be finite and non-negative") + window = np.hanning(self.time.size) + phasor = window * np.exp(-2j * np.pi * f * self.time) + shape: npt.NDArray[Any] = np.asarray( + 2.0 * (phasor @ self._moving_displacement(direction)) / window.sum(), + dtype=np.complex128, + ) + shape.setflags(write=False) + return shape + + def travelling_wave_index( + self, direction: str = "cross_flow", frequency: float | None = None + ) -> float: + """Return how far the response of a direction is a travelling wave, from 0 to 1. + + The ratio of the smaller to the larger singular value of the real and + imaginary parts of :meth:`complex_shape` (the travelling index of the + complex orthogonal decomposition, Feeny 2008): 0 for a standing wave, + whose nodes move in or out of phase, and 1 for a wave of constant + amplitude travelling over whole wavelengths. ``nan`` without motion. + """ + if frequency is None and not math.isfinite(self.frequency(direction)): + return math.nan # no motion, or no node with a flow frame + shape = self.complex_shape(direction, frequency) + framed = np.isfinite(shape) + parts = np.vstack((shape[framed].real, shape[framed].imag)) + if parts.shape[1] < 2: + return math.nan + singular = np.linalg.svd(parts, compute_uv=False) + return float(singular[1] / singular[0]) if singular[0] > 0.0 else math.nan + + def orbit(self, node: int) -> tuple[npt.NDArray[Any], npt.NDArray[Any]]: + """Return the in-line and cross-flow displacement of a node over the window. + + ``node`` is the node's number (:attr:`node_numbers`). + """ + index = self._node_index(node) + return self.in_line[:, index], self.cross_flow[:, index] + + def phase_difference(self, node: int, frequency: float | None = None) -> float: + """Return the in-line phase less twice the cross-flow phase at a node, in degrees. + + ``theta = arg(c_x(2 f)) - 2 arg(c_y(f))`` in ``[0, 360)``, with ``c`` + the node's complex Fourier coefficients (:meth:`complex_shape`) and + ``f`` the cross-flow frequency (default: the line's dominant one): the + phase that sets the shape and direction of a figure-of-eight orbit. + ``nan`` for a node without a frame or without motion at those + frequencies. + """ + index = self._node_index(node) + f = self.frequency("cross_flow") if frequency is None else float(frequency) + if not math.isfinite(f): + return math.nan + cy = self.complex_shape("cross_flow", f)[index] + cx = self.complex_shape("in_line", 2.0 * f)[index] + if not (np.isfinite(cx) and np.isfinite(cy)) or abs(cx) == 0.0 or abs(cy) == 0.0: + return math.nan + return float(np.degrees(np.angle(cx) - 2.0 * np.angle(cy)) % 360.0) + + def _numbers(self) -> tuple[int, ...]: + """The node numbers, ``1 .. n_nodes`` when none were recorded.""" + return self.node_numbers or tuple(range(1, self.node_count + 1)) + + def _node_index(self, node: int) -> int: + numbers = self._numbers() + if isinstance(node, bool) or int(node) != node or int(node) not in numbers: + if numbers == tuple(range(1, self.node_count + 1)): + raise ValueError(f"node must be an integer from 1 to {self.node_count}") + raise ValueError(f"node must be one of the nodes held, {list(numbers)}") + return numbers.index(int(node)) + + def export(self, path: str | os.PathLike[str], *, overwrite: bool = False) -> Path: + """Atomically write the node values as a unit-labelled CSV, one row per node. + + Columns: node number (:attr:`node_numbers`), arc length, normal flow speed, + cross-flow and in-line RMS + and half peak-to-peak displacement over the diameter, the nodes' + dominant frequencies and the non-dimensional cross-flow frequency. + Fields of a node without a frame are empty. + + Raises + ------ + FileExistsError + If ``path`` exists and ``overwrite`` is false. + """ + columns = ( + self.arc_length, + self.normal_speed, + self.rms_over_diameter("cross_flow"), + self.rms_over_diameter("in_line"), + self.amplitude_over_diameter("cross_flow"), + self.amplitude_over_diameter("in_line"), + self.frequencies("cross_flow"), + self.frequencies("in_line"), + self.nondimensional_frequency("cross_flow"), + ) + + numbers = self._numbers() + + def row(index: int) -> tuple[str, ...]: + fields = tuple( + number(column[index]) if math.isfinite(float(column[index])) else "" + for column in columns + ) + return (str(numbers[index]), *fields) + + return write_csv( + path, + ( + "Node", + "ArcLength_[m]", + "NormalSpeed_[m/s]", + "CrossFlowRMSOverD_[-]", + "InLineRMSOverD_[-]", + "CrossFlowAmplitudeOverD_[-]", + "InLineAmplitudeOverD_[-]", + "CrossFlowFrequency_[Hz]", + "InLineFrequency_[Hz]", + "CrossFlowNondimensionalFrequency_[-]", + ), + (row(index) for index in range(self.node_count)), + overwrite=overwrite, + ) + + def plot_envelope(self, *, ax: Any = None) -> Any: + """Plot the cross-flow and in-line RMS displacement over the diameter along the line.""" + plt = pyplot() + if ax is None: + _, ax = plt.subplots() + ax.plot(self.arc_length, self.rms_over_diameter("cross_flow"), label="cross-flow") + ax.plot(self.arc_length, self.rms_over_diameter("in_line"), label="in-line") + ax.set_xlabel("Arc length from End A (m)") + ax.set_ylabel("RMS displacement / D (-)") + ax.legend() + return ax + + def plot_orbit(self, node: int, *, ax: Any = None) -> Any: + """Plot a node's cross-flow displacement against its in-line displacement, over D.""" + plt = pyplot() + if ax is None: + _, ax = plt.subplots() + x, y = self.orbit(node) + ax.plot(x / self.diameter, y / self.diameter) + ax.set_xlabel("In-line displacement / D (-)") + ax.set_ylabel("Cross-flow displacement / D (-)") + ax.set_aspect("equal", adjustable="datalim") + return ax + + +def viv_response( + history: TimeHistory, + *, + flow: npt.ArrayLike, + diameter: float, + start: float | None = None, + stop: float | None = None, + line_id: int | None = None, + uniform_rtol: float = 1.0e-6, +) -> VIVResponse: + """Resolve a line's node motion into its VIV response. + + Parameters + ---------- + history : TimeHistory + A :class:`~cabledyn.LineNodeHistory`, a :class:`~cabledyn.MoorDynLineHistory` + with node positions, or a main output with the line's + ``LNp{x,y,z}`` channels. + flow : array_like + ``(3,)`` flow velocity the local frames are taken against, m/s: the + current at the line (a uniform one, or a representative velocity of a + sheared one). + diameter : float + Diameter the amplitudes are divided by, m. + start, stop : float, optional + The window to analyse, s (default: the whole record); a lock-in study + leaves out the build-up. + line_id : int, optional + The line of a main output (required there, refused for a per-line file). + uniform_rtol : float + Relative tolerance of the uniform-sampling check. + + Returns + ------- + VIVResponse + The displacement in the local flow frames and the response measures. + + Raises + ------ + ValueError + If the flow is not a finite non-zero 3-vector, the diameter is not + positive, the window holds fewer than eight samples, the sampling is + not uniform, or the mean shape has coincident nodes. + """ + velocity = np.array(flow, dtype=np.float64) + if velocity.shape != (3,) or not np.all(np.isfinite(velocity)) or not np.any(velocity): + raise ValueError("flow must be a finite, non-zero 3-vector") + if not (math.isfinite(float(diameter)) and float(diameter) > 0.0): + raise ValueError("diameter must be finite and positive") + time, positions = _positions(history, line_id) + whole_line = isinstance(history, (LineNodeHistory, MoorDynLineHistory)) + if whole_line or line_id is None: + numbers = tuple(range(1, positions.shape[1] + 1)) + else: + # the LNp nodes _positions took, in the same (ascending) order + numbers = tuple(node_position_channels(history, line_id)) + keep = np.ones(time.size, dtype=bool) + if start is not None: + keep &= time >= float(start) + if stop is not None: + keep &= time <= float(stop) + time = time[keep] + positions = positions[keep] + if time.size < 8: + raise ValueError("the window must hold at least eight samples") + _sampling(time, rtol=float(uniform_rtol), atol=0.0) + if positions.shape[1] < 2: + raise ValueError("the line must have at least two nodes") + mean = positions.mean(axis=0) + chords = np.diff(mean, axis=0) + lengths = np.linalg.norm(chords, axis=1) + if np.any(lengths <= 0.0): + raise ValueError("the mean shape has coincident nodes") + tangent = np.empty_like(mean) + tangent[0] = chords[0] + tangent[-1] = chords[-1] + tangent[1:-1] = mean[2:] - mean[:-2] + tangent /= np.linalg.norm(tangent, axis=1)[:, None] + normal = velocity[None, :] - (tangent @ velocity)[:, None] * tangent + speed = np.linalg.norm(normal, axis=1) + framed = speed > 1.0e-9 * float(np.linalg.norm(velocity)) + in_axis = np.full_like(mean, math.nan) + in_axis[framed] = normal[framed] / speed[framed, None] + cross_axis = np.cross(tangent, in_axis) + motion = positions - mean[None, :, :] + in_line = np.einsum("tnk,nk->tn", motion, in_axis) + cross_flow = np.einsum("tnk,nk->tn", motion, cross_axis) + return VIVResponse( + time=_readonly(time), + arc_length=_readonly(np.concatenate(([0.0], np.cumsum(lengths)))), + mean_position=_readonly(mean), + tangent=_readonly(tangent), + in_line_axis=_readonly(in_axis), + cross_flow_axis=_readonly(cross_axis), + normal_speed=_readonly(np.where(framed, speed, 0.0)), + in_line=_readonly(in_line), + cross_flow=_readonly(cross_flow), + diameter=float(diameter), + flow=_readonly(velocity), + whole_line=whole_line, + node_numbers=numbers, + ) diff --git a/python/tests/test_end_to_end.py b/python/tests/test_end_to_end.py index ac271af1..9abe4870 100644 --- a/python/tests/test_end_to_end.py +++ b/python/tests/test_end_to_end.py @@ -29,6 +29,7 @@ parameter_grid, resample, run_study, + viv_response, ) from cabledyn import cli as run_cli from cabledyn.post_cli import main as post_main @@ -279,3 +280,28 @@ def test_deck_validator_agrees_with_the_native_reader( assert exc.returncode == 1, exc.stderr # a deck error, not a solve failure native_accepts = False assert python_accepts == native_accepts == accepted + + +def test_viv_response_of_the_inline_example(driver, tmp_path): + # the line positions of examples/viv_taut_cable_inline.dat (Outputs p for its V flag) + text = (EXAMPLES / "viv_taut_cable_inline.dat").read_text(encoding="utf-8") + deck = tmp_path / "viv_inline.dat" + deck.write_text( + text.replace("1 1 2 V", "1 1 2 p"), encoding="utf-8" + ) + result = driver.run(deck, "out/viv", timeout=600) + history = result.read_line_positions(1) + response = viv_response(history, flow=(0.0, 0.15, 0.0), diameter=0.1, start=60.0) + mid, quarter = 25, 12 + # the deck's own statement: mid-span cross-flow A/D 0.82 at 0.29 Hz, quarter-span in-line + # A/D 0.19 at twice the frequency + assert response.amplitude_over_diameter("cross_flow")[mid] == pytest.approx(0.82, abs=0.02) + assert response.amplitude_over_diameter("in_line")[quarter] == pytest.approx(0.19, abs=0.02) + f_cf = response.frequency("cross_flow") + assert f_cf == pytest.approx(0.29, abs=0.01) + assert response.frequency("in_line") / f_cf == pytest.approx(2.0, abs=0.15) + # inside the synchronisation band cF +/- dF = 0.18 +/- 0.08 + assert 0.10 < response.nondimensional_frequency()[mid] < 0.26 + assert response.modal_amplitudes("cross_flow").dominant_mode == 1 + assert response.modal_amplitudes("in_line").dominant_mode == 2 + assert response.travelling_wave_index("cross_flow") < 0.2 diff --git a/python/tests/test_viv.py b/python/tests/test_viv.py new file mode 100644 index 00000000..cb8057e8 --- /dev/null +++ b/python/tests/test_viv.py @@ -0,0 +1,274 @@ +# SPDX-License-Identifier: Apache-2.0 +"""VIV response diagnostics (cabledyn.viv) on synthetic line motions with known answers.""" + +from __future__ import annotations + +import csv +import math +from pathlib import Path + +import numpy as np +import pytest + +from cabledyn import LineNodeHistory, VIVResponse, viv_response +from cabledyn.results import TimeHistory + +L = 100.0 +D = 0.1 +N_NODES = 41 +F = 0.5 # cross-flow frequency [Hz] +DT = 0.01 +T = 40.0 # 20 cross-flow periods +FLOW = (0.0, 0.5, 0.0) + + +def _history(displacement, *, time=None, depth=-50.0, lateral=0.0) -> LineNodeHistory: + """A straight line along +x at y = lateral, z = depth with displacement(t, s) -> (dy, dz).""" + t = np.arange(0.0, T, DT) if time is None else time + s = np.linspace(0.0, L, N_NODES) + dy, dz = displacement(t[:, None], s[None, :]) + x = np.broadcast_to(s, dy.shape) + xyz = np.stack((x, lateral + dy, depth + dz), axis=2).reshape(t.size, -1) + channels = ["Time(s)"] + [f"Node{n}{a}(m)" for n in range(1, N_NODES + 1) for a in "XYZ"] + return LineNodeHistory( + Path("synthetic.Line1.p.out"), "", tuple(channels), None, np.column_stack((t, xyz)) + ) + + +def _standing(t, s, a_cf=0.08, a_il=0.02, phase_cf=0.3, phase_il=1.0): + """Cross-flow (z) mode 1 at F, in-line (y) mode 2 at 2 F.""" + dz = a_cf * np.sin(np.pi * s / L) * np.cos(2.0 * np.pi * F * t + phase_cf) + dy = a_il * np.sin(2.0 * np.pi * s / L) * np.cos(4.0 * np.pi * F * t + phase_il) + return dy, dz + + +def test_local_frame_follows_the_tangent_and_the_flow(): + response = viv_response(_history(_standing), flow=FLOW, diameter=D) + assert isinstance(response, VIVResponse) + assert np.allclose(response.tangent, [1.0, 0.0, 0.0]) + assert np.allclose(response.in_line_axis, [0.0, 1.0, 0.0]) + # (e_x, e_y, t) right-handed: cross-flow = t x in-line = +z + assert np.allclose(response.cross_flow_axis, [0.0, 0.0, 1.0]) + assert np.allclose(response.normal_speed, 0.5) + assert response.arc_length[-1] == pytest.approx(L) + + +def test_amplitudes_frequencies_and_the_nondimensional_frequency(): + response = viv_response(_history(_standing), flow=FLOW, diameter=D) + mid, quarter = N_NODES // 2, N_NODES // 4 + assert response.rms_over_diameter("cross_flow")[mid] == pytest.approx(0.08 / math.sqrt(2) / D) + assert response.amplitude_over_diameter("cross_flow")[mid] == pytest.approx(0.8, rel=1e-3) + assert response.amplitude_over_diameter("in_line")[quarter] == pytest.approx(0.2, rel=1e-3) + assert response.frequency("cross_flow") == pytest.approx(F, abs=1e-3) + assert response.frequency("in_line") == pytest.approx(2.0 * F, abs=1e-3) + assert response.frequencies("cross_flow")[mid] == pytest.approx(F, abs=1e-3) + # the pinned end nodes do not move + assert math.isnan(response.frequencies("cross_flow")[0]) + assert np.allclose(response.nondimensional_frequency(), F * D / 0.5, rtol=1e-3) + + +def test_modal_amplitudes_find_the_modes(): + response = viv_response(_history(_standing), flow=FLOW, diameter=D) + cross = response.modal_amplitudes("cross_flow", n_modes=6) + assert cross.dominant_mode == 1 + assert cross.rms_over_diameter[0] == pytest.approx(0.08 / math.sqrt(2) / D, rel=1e-9) + assert np.all(cross.rms_over_diameter[1:] < 1e-9) + assert cross.residual < 1e-9 + assert cross.coefficients.shape == (response.time.size, 6) + inline = response.modal_amplitudes("in_line") + assert inline.dominant_mode == 2 + s = response.arc_length + custom = response.modal_amplitudes("cross_flow", shapes=[np.sin(2 * np.pi * s / L)]) + assert custom.mode_numbers == (1,) and custom.residual == pytest.approx(1.0, rel=1e-6) + + +def _main_output(displacement, nodes) -> TimeHistory: + """The L1Np[xyz] channels of some nodes of the _history line, as a main output.""" + whole = _history(displacement) + channels = ["Time(s)"] + columns = [whole.time] + for node in nodes: + for axis in "XYZ": + channels.append(f"L1N{node}p{axis.lower()}") + columns.append(whole.column(f"Node{node}{axis}(m)")) + return TimeHistory(Path("run.out"), "", tuple(channels), None, np.column_stack(columns)) + + +def test_default_shapes_need_the_whole_line(): + interior = viv_response(_main_output(_standing, range(5, 38)), flow=FLOW, diameter=D, line_id=1) + assert not interior.whole_line + # the sines would vanish at nodes 5 and 37 instead of the line's ends: refused + with pytest.raises(ValueError, match="the default shapes need the whole line"): + interior.modal_amplitudes("cross_flow") + # shapes at the nodes held are fitted as given + s = np.linspace(0.0, L, N_NODES)[4:37] + fit = interior.modal_amplitudes("cross_flow", shapes=[np.sin(np.pi * s / L)]) + assert fit.rms_over_diameter[0] == pytest.approx(0.08 / math.sqrt(2) / D, rel=1e-9) + assert fit.residual < 1e-9 + assert viv_response(_history(_standing), flow=FLOW, diameter=D).whole_line + + +def test_dependent_shapes_are_refused(): + # ten uniform nodes: sin(9 pi s/S) vanishes at every node, sin(10 pi s/S) = -sin(8 pi s/S) + n = 10 + t = np.arange(0.0, T, DT) + s = np.linspace(0.0, L, n) + dz = 0.05 * np.sin(8.0 * np.pi * s / L)[None, :] * np.cos(2.0 * np.pi * F * t)[:, None] + xyz = np.stack((np.broadcast_to(s, dz.shape), 0.0 * dz, -50.0 + dz), axis=2) + channels = ["Time(s)"] + [f"Node{k}{a}(m)" for k in range(1, n + 1) for a in "XYZ"] + history = LineNodeHistory( + Path("coarse.Line1.p.out"), + "", + tuple(channels), + None, + np.column_stack((t, xyz.reshape(t.size, -1))), + ) + response = viv_response(history, flow=FLOW, diameter=D) + with pytest.raises(ValueError, match=r"10 shapes are not independent .*\(rank 8\)"): + response.modal_amplitudes("cross_flow", n_modes=10) + eight = response.modal_amplitudes("cross_flow", n_modes=8) + assert eight.dominant_mode == 8 + assert eight.rms_over_diameter[7] == pytest.approx(0.05 / math.sqrt(2) / D, rel=1e-9) + assert eight.residual < 1e-9 + + +def test_travelling_wave_index_is_nan_without_motion(): + still = viv_response(_history(lambda t, s: (0.0 * t * s, 0.0 * t * s)), flow=FLOW, diameter=D) + assert math.isnan(still.frequency("cross_flow")) + assert math.isnan(still.travelling_wave_index("cross_flow")) + assert math.isnan(still.travelling_wave_index("in_line")) + along = viv_response(_history(_standing), flow=(1.0, 0.0, 0.0), diameter=D) + assert math.isnan(along.travelling_wave_index("cross_flow")) + # still nodes at coordinates with no exact binary form keep a round-off offset from their + # mean: they have no frequency, on a still line and at the pinned ends of a moving one + for depth in (-50.1, -0.3, -1234.567): + calm = viv_response( + _history(lambda t, s: (0.0 * t * s, 0.0 * t * s), depth=depth), + flow=FLOW, + diameter=D, + ) + assert math.isnan(calm.frequency("cross_flow")) + assert np.all(np.isnan(calm.frequencies("cross_flow"))) + assert math.isnan(calm.travelling_wave_index("cross_flow")) + moving = viv_response(_history(_standing, depth=depth), flow=FLOW, diameter=D) + ends = moving.frequencies("cross_flow")[[0, -1]] + assert np.all(np.isnan(ends)) + assert moving.frequency("cross_flow") == pytest.approx(F, abs=1e-3) + # cross-flow motion only, at a lateral coordinate with no exact binary form: no in-line + # motion, so no orbit phase + flat = viv_response( + _history( + lambda t, s: ( + 0.0 * t * s, + 0.08 * np.sin(np.pi * s / L) * np.cos(2 * np.pi * F * t), + ), + depth=depth, + lateral=-0.3, + ), + flow=FLOW, + diameter=D, + ) + assert math.isnan(flat.phase_difference(N_NODES // 2 + 1)) + assert np.all(flat.complex_shape("in_line", 2.0 * F) == 0.0) + + +def test_main_output_nodes_keep_their_numbers(tmp_path): + whole = viv_response(_history(_standing), flow=FLOW, diameter=D) + held = (5, 10, 21, 37) + some = viv_response(_main_output(_standing, held), flow=FLOW, diameter=D, line_id=1) + assert some.node_numbers == held + assert whole.node_numbers == tuple(range(1, N_NODES + 1)) + # a node is taken by its number: node 21 is the mid-span node of the whole line + for a, b in zip(some.orbit(21), whole.orbit(21), strict=True): + assert np.array_equal(a, b) + assert some.phase_difference(10) == pytest.approx(whole.phase_difference(10), abs=1e-9) + with pytest.raises(ValueError, match=r"one of the nodes held, \[5, 10, 21, 37\]"): + some.orbit(1) + with pytest.raises(ValueError, match="from 1 to 41"): + whole.orbit(42) + with (some.export(tmp_path / "some.csv")).open(encoding="utf-8") as stream: + rows = list(csv.reader(stream)) + assert [row[0] for row in rows[1:]] == [str(node) for node in held] + + +def test_travelling_wave_index_separates_standing_and_travelling_waves(): + standing = viv_response(_history(_standing), flow=FLOW, diameter=D) + assert standing.travelling_wave_index("cross_flow") < 1e-6 + + def travelling(t, s): + dz = 0.05 * np.cos(2.0 * np.pi * F * t - 2.0 * np.pi * 4.0 * s / L) + return np.zeros_like(dz), dz + + wave = viv_response(_history(travelling), flow=FLOW, diameter=D) + assert wave.travelling_wave_index("cross_flow") > 0.95 + + +def test_complex_shape_and_phase_difference(): + response = viv_response(_history(_standing), flow=FLOW, diameter=D) + mid, quarter = N_NODES // 2, N_NODES // 4 + shape = response.complex_shape("cross_flow") + assert abs(shape[mid]) == pytest.approx(0.08, rel=1e-3) + assert np.angle(shape[mid]) == pytest.approx(0.3, abs=1e-3) + # theta = phi_x - 2 phi_y = 1.0 - 0.6 rad + assert response.phase_difference(quarter + 1) == pytest.approx(math.degrees(0.4), abs=0.1) + x, y = response.orbit(quarter + 1) + assert x.shape == y.shape == response.time.shape + assert math.isnan(response.phase_difference(1)) + + +def test_flow_along_the_line_leaves_no_frame(): + response = viv_response(_history(_standing), flow=(0.4, 0.0, 0.0), diameter=D) + assert np.all(np.isnan(response.in_line_axis)) and np.all(response.normal_speed == 0.0) + assert np.all(np.isnan(response.frequencies("cross_flow"))) + assert math.isnan(response.frequency("cross_flow")) + assert np.all(np.isnan(response.nondimensional_frequency())) + with pytest.raises(ValueError, match="fewer nodes with a flow frame"): + response.modal_amplitudes() + + +def test_window_and_export(tmp_path): + response = viv_response(_history(_standing), flow=FLOW, diameter=D, start=10.0, stop=30.0) + assert response.time[0] == pytest.approx(10.0) and response.time[-1] <= 30.0 + target = response.export(tmp_path / "viv.csv") + with target.open(encoding="utf-8") as stream: + rows = list(csv.reader(stream)) + assert rows[0][:3] == ["Node", "ArcLength_[m]", "NormalSpeed_[m/s]"] + assert len(rows) == N_NODES + 1 + assert rows[1][7] == "" # the pinned End A node has no frequency + with pytest.raises(FileExistsError): + response.export(target) + + +@pytest.mark.parametrize( + ("kwargs", "message"), + [ + ({"flow": (0.0, 0.0)}, "finite, non-zero 3-vector"), + ({"flow": (0.0, 0.0, 0.0)}, "finite, non-zero 3-vector"), + ({"diameter": 0.0}, "diameter must be finite and positive"), + ({"start": 39.97}, "at least eight samples"), + ({"line_id": 1}, "line_id does not apply"), + ], +) +def test_arguments_are_validated(kwargs, message): + arguments = {"flow": FLOW, "diameter": D, **kwargs} + with pytest.raises(ValueError, match=message): + viv_response(_history(_standing), **arguments) + + +def test_non_uniform_sampling_is_refused(): + time = np.cumsum(np.full(100, DT)) + time[50:] += 0.003 + with pytest.raises(ValueError, match="uniform sampling"): + viv_response(_history(_standing, time=time), flow=FLOW, diameter=D) + + +def test_methods_validate_direction_and_node(): + response = viv_response(_history(_standing), flow=FLOW, diameter=D) + with pytest.raises(ValueError, match="direction must be one of"): + response.rms_over_diameter("axial") + with pytest.raises(ValueError, match="node must be an integer from 1 to 41"): + response.orbit(0) + with pytest.raises(ValueError, match="n_modes must be a positive integer"): + response.modal_amplitudes(n_modes=0) + with pytest.raises(ValueError, match="shapes must have shape"): + response.modal_amplitudes(shapes=np.ones((2, 3))) From 07c91bbedb5f8162081ba646bbae15690439eec5 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Thu, 12 Nov 2026 11:05:56 +0900 Subject: [PATCH 06/47] feat: section-point stress and fatigue of biaxial bending (#149) The stress recovery for fatigue took the curvature magnitude at the two extreme fibres, T/A +/- E kappa r, so it did not follow the bending plane. Under combined cross-flow and in-line VIV the plane turns, and a whirling section, whose curvature magnitude stays constant, showed no cycles and no damage, although every point around it reverses once a revolution. section_stress takes the curvature vector on the section axes, the CurvX/CurvY channels of a finite-EI line (bending strain -(kx x + ky y)), and returns the stress at points around the section, sigma(theta) = T/A - E r (kappa_x cos theta + kappa_y sin theta). damage_along_arc(..., quantity="section", points=16) counts each point, keeps the largest damage and reports its angle (critical_angle on DamageProfile, None for the other quantities). The node-channel reader now knows the CurvX and CurvY prefixes. Checks: the stress of a known curvature vector point by point; in a fixed bending plane the extreme points are cable_stress's two fibres; a whirling section has no damage under "stress" and its point-by-point damage under "section"; missing or mismatched channels and a T-N curve are refused. pytest, ruff, mypy strict, Sphinx -W. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 5 ++ doc/api_python.rst | 2 + doc/python_postprocessing.rst | 18 +++++ python/cabledyn/__init__.py | 2 + python/cabledyn/damage.py | 132 ++++++++++++++++++++++++++++++++-- python/cabledyn/ranges.py | 4 +- python/tests/test_damage.py | 80 +++++++++++++++++++++ 7 files changed, 236 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51d7bb9e..4b854b84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,11 @@ All notable changes to CableDyn are recorded in this file. The format follows frequencies and `f D/U_n`, modal weights (taut-line sines or given shapes), the complex shape and its travelling-wave index (Feeny 2008), orbits and the in-line/cross-flow phase difference, with a CSV export and plots. +- `cabledyn.section_stress` and `damage_along_arc(..., quantity="section")`: the axial stress at + points around the section from the tension and the curvature vector on the section axes + (`CurvX`/`CurvY`), `T/A - E r (kappa_x cos theta + kappa_y sin theta)`, counted point by point + for the fatigue of biaxial bending; a whirling section, which the two-fibre recovery from the + curvature magnitude sees as constant, now accumulates its damage. ## [0.4.2] - 2026-11-09 diff --git a/doc/api_python.rst b/doc/api_python.rst index 4ea33930..19b11387 100644 --- a/doc/api_python.rst +++ b/doc/api_python.rst @@ -204,6 +204,8 @@ in each docstring and in :attr:`FatigueCurve.source`. :func:`channel_damage` and .. autofunction:: cabledyn.cable_stress +.. autofunction:: cabledyn.section_stress + .. autofunction:: cabledyn.damage_along_arc .. autoclass:: cabledyn.DamageProfile diff --git a/doc/python_postprocessing.rst b/doc/python_postprocessing.rst index 4548a784..e2358f8d 100644 --- a/doc/python_postprocessing.rst +++ b/doc/python_postprocessing.rst @@ -289,6 +289,24 @@ not follow the rotation of the bending plane. print(profile.critical_node, profile.maximum_damage) profile.plot() +On a finite-EI line, ``quantity="section"`` follows the bending plane. It recovers the stress at +``points`` points around the section (16 by default) with :func:`cabledyn.section_stress`, from +``TenN`` and the curvature vector on the section axes, ``CurvXN`` and +``CurvYN`` (:doc:`outputs`): ``T/A - E r (kappa_x cos theta + kappa_y sin theta)`` at the +angle ``theta`` from the section's x axis. It counts each point and keeps the largest damage, with +its angle in ``critical_angle``. This is the recovery for biaxial bending, combined cross-flow and +in-line VIV among them: a section whose curvature vector turns at a constant magnitude (a +whirling orbit) has no cycles in ``Curv`` and so no damage under ``"stress"``, while each point +around it passes through ``+/- E kappa r`` once a revolution. + +.. code-block:: python + + profile = damage_along_arc( + history, 1, armour, quantity="section", points=16, + area=2.4e-3, modulus=2.07e11, radius=0.09, arc_length=result.read_static(), + ) + print(profile.critical_node, profile.critical_angle[profile.node_ids.index(profile.critical_node)]) + Lifetime damage over sea states ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/python/cabledyn/__init__.py b/python/cabledyn/__init__.py index d238085d..d23b3cfb 100644 --- a/python/cabledyn/__init__.py +++ b/python/cabledyn/__init__.py @@ -54,6 +54,7 @@ damage_along_arc, lifetime_fatigue, miner_damage, + section_stress, study_sea_state_damage, ) from cabledyn.deck import DeckWriter @@ -281,6 +282,7 @@ "resample", "run_study", "seabed_clearance", + "section_stress", "segment_distance", "static_range_graph", "study_sea_state_damage", diff --git a/python/cabledyn/damage.py b/python/cabledyn/damage.py index 918e0f5f..e79e52f8 100644 --- a/python/cabledyn/damage.py +++ b/python/cabledyn/damage.py @@ -7,6 +7,10 @@ * :func:`channel_damage` does the same for one channel of a time history. * :func:`cable_stress` recovers the axial stress at the two extreme fibres of a cable, ``sigma = T/A +/- E kappa r``. +* :func:`section_stress` recovers it at points around the section from the + curvature vector on the section axes (the ``CurvX``/``CurvY`` channels), + ``sigma = T/A - E r (kappa_x cos theta + kappa_y sin theta)``, for biaxial + bending such as combined cross-flow and in-line VIV. * :func:`damage_along_arc` evaluates the damage at every output node of a line, from tension or from recovered stress. * :func:`study_sea_state_damage` and :func:`lifetime_fatigue` weight the @@ -50,6 +54,7 @@ "damage_along_arc", "lifetime_fatigue", "miner_damage", + "section_stress", "study_sea_state_damage", ] @@ -288,6 +293,78 @@ def cable_stress( return _readonly(axial + bending), _readonly(axial - bending) +def section_stress( + tension: npt.ArrayLike, + curvature_x: npt.ArrayLike, + curvature_y: npt.ArrayLike, + *, + area: float, + modulus: float, + radius: float, + points: int = 16, +) -> tuple[npt.NDArray[Any], npt.NDArray[Any]]: + """Return the axial stress at points around a section from its curvature vector. + + The point at angle ``theta`` from the section's x axis towards its y + axis, at distance ``radius`` from the neutral axis, has the bending strain + ``-(kappa_x x + kappa_y y)`` of the ``CurvX``/``CurvY`` channels (the + curvature vector on the section axes, pointing to the centre of + curvature), so + + ``sigma(theta) = T/A - E r (kappa_x cos theta + kappa_y sin theta)``. + + Unlike :func:`cable_stress` it follows the bending plane as it turns, so a + point sees the stress cycles of biaxial bending (cross-flow and in-line + VIV, a whirling orbit) that the two extreme fibres of a curvature + magnitude miss. + + Parameters + ---------- + tension : array_like + Effective tension, in newtons. + curvature_x, curvature_y : array_like + Curvature components on the section axes, in 1/m, broadcastable + against ``tension``. + area : float + Positive area that carries the tension, in m^2. + modulus : float + Positive Young's modulus of the component, in Pa. + radius : float + Non-negative distance of the points from the neutral axis, in metres. + points : int + Number of points, at ``theta = 360 k / points`` degrees. + + Returns + ------- + tuple[numpy.ndarray, numpy.ndarray] + Read-only stress with a last axis of length ``points``, in Pa, and the + ``(points,)`` angles in degrees. + + Raises + ------ + ValueError + If a section property or ``points`` is invalid or a value is not finite. + """ + section = _positive(area, "area") + elastic = _positive(modulus, "modulus") + if isinstance(radius, bool) or not math.isfinite(float(radius)) or float(radius) < 0.0: + raise ValueError("radius must be finite and non-negative") + if isinstance(points, bool) or int(points) != points or points < 1: + raise ValueError("points must be a positive integer") + axial, kx, ky = np.broadcast_arrays( + np.asarray(tension, dtype=np.float64) / section, + np.asarray(curvature_x, dtype=np.float64), + np.asarray(curvature_y, dtype=np.float64), + ) + if not (np.all(np.isfinite(axial)) and np.all(np.isfinite(kx)) and np.all(np.isfinite(ky))): + raise ValueError("tension and curvature must be finite") + angles = 2.0 * np.pi * np.arange(int(points)) / int(points) + bending = ( + elastic * float(radius) * (kx[..., None] * np.cos(angles) + ky[..., None] * np.sin(angles)) + ) + return _readonly(axial[..., None] - bending), _readonly(np.degrees(angles)) + + @dataclass(frozen=True) class DamageProfile: """Palmgren-Miner damage at every output node of one line. @@ -297,7 +374,7 @@ class DamageProfile: line_id : int Deck line identifier. quantity : str - ``"tension"`` or ``"stress"``. + ``"tension"``, ``"stress"`` or ``"section"``. curve : FatigueCurve Curve used. node_ids : tuple[int, ...] @@ -308,11 +385,15 @@ class DamageProfile: ``(n,)`` arc length in metres, or node number. damage : numpy.ndarray ``(n,)`` damage over the record; for ``"stress"`` the larger of the - two fibres. + two fibres, for ``"section"`` the largest of the points around the + section. duration : float Length of the analysed record, in seconds. source : pathlib.Path Result file. + critical_angle : numpy.ndarray | None + ``(n,)`` angle of the most damaged point from the section's x axis, in + degrees, for ``"section"``; ``None`` otherwise. """ line_id: int @@ -324,10 +405,13 @@ class DamageProfile: damage: npt.NDArray[Any] duration: float source: Path + critical_angle: npt.NDArray[Any] | None = None def __post_init__(self) -> None: object.__setattr__(self, "location", _readonly(self.location)) object.__setattr__(self, "damage", _readonly(self.damage)) + if self.critical_angle is not None: + object.__setattr__(self, "critical_angle", _readonly(self.critical_angle)) @property def critical_node(self) -> int: @@ -376,6 +460,7 @@ def damage_along_arc( arc_length: ArcSource = None, start: float | None = None, stop: float | None = None, + points: int = 16, ) -> DamageProfile: """Return the Miner damage at every output node of a line. @@ -389,6 +474,14 @@ def damage_along_arc( S-N); each fibre is counted separately and the larger damage is kept. Both channels must be written for the same nodes. + With ``quantity="section"`` the stress at ``points`` points around the + section is recovered from ``TenN``, ``CurvXN`` and + ``CurvYN`` by :func:`section_stress` (finite-EI lines; the same + section properties as ``"stress"``); each point is counted separately and + the largest damage is kept, with its angle in + :attr:`DamageProfile.critical_angle`. All three channels must be written + for the same nodes. + Parameters ---------- history : TimeHistory @@ -398,7 +491,7 @@ def damage_along_arc( curve : FatigueCurve S-N or T-N curve. quantity : str - ``"tension"`` or ``"stress"``. + ``"tension"``, ``"stress"`` or ``"section"``. area, breaking_strength, modulus, radius : float | None Section properties, in SI units, as described above. ultimate_strength : float | None @@ -407,6 +500,8 @@ def damage_along_arc( Node positions along the line (see :func:`cabledyn.node_range_graph`). start, stop : float | None Optional analysis window, in seconds. + points : int + Number of points around the section for ``"section"``. Returns ------- @@ -421,6 +516,7 @@ def damage_along_arc( If ``quantity`` is unknown, a section property is missing or invalid, or the tension and curvature channels cover different nodes. """ + angles: npt.NDArray[Any] | None = None view = _window(history, start, stop) tensions = node_channels(view, line_id, "Ten") data = node_matrix(view, tensions) @@ -440,10 +536,31 @@ def damage_along_arc( ) scale = 1.0e-6 histories = [outer, inner] + elif quantity == "section": + if curve.kind != "S-N": + raise ValueError("section-stress damage needs an S-N curve") + if area is None or modulus is None or radius is None or breaking_strength is not None: + raise ValueError("section-stress damage needs area, modulus, and radius only") + curvatures_x = node_channels(view, line_id, "CurvX") + curvatures_y = node_channels(view, line_id, "CurvY") + if tuple(curvatures_x) != tuple(tensions) or tuple(curvatures_y) != tuple(tensions): + raise ValueError("Ten, CurvX and CurvY channels must be written for the same nodes") + stresses, angles = section_stress( + data, + node_matrix(view, curvatures_x), + node_matrix(view, curvatures_y), + area=area, + modulus=modulus, + radius=radius, + points=points, + ) + scale = 1.0e-6 + histories = [stresses[:, :, k] for k in range(stresses.shape[2])] else: - raise ValueError("quantity must be 'tension' or 'stress'") + raise ValueError("quantity must be 'tension', 'stress' or 'section'") damage = np.zeros(data.shape[1]) - for series in histories: + worst = np.zeros(data.shape[1], dtype=np.int64) + for k, series in enumerate(histories): for index in range(data.shape[1]): value = miner_damage( rainflow_cycles(series[:, index]), @@ -451,7 +568,9 @@ def damage_along_arc( scale=scale, ultimate_strength=ultimate_strength, ) - damage[index] = max(damage[index], value) + if value > damage[index]: + damage[index] = value + worst[index] = k node_ids = tuple(tensions) kind, location = node_locations(int(line_id), node_ids, arc_length) return DamageProfile( @@ -464,6 +583,7 @@ def damage_along_arc( damage=damage, duration=float(view.time[-1] - view.time[0]), source=view.path, + critical_angle=None if angles is None else angles[worst], ) diff --git a/python/cabledyn/ranges.py b/python/cabledyn/ranges.py index be641e19..13dde176 100644 --- a/python/cabledyn/ranges.py +++ b/python/cabledyn/ranges.py @@ -57,7 +57,9 @@ "curvature": ("Curv", "Curvature", "1/m"), "bend_moment": ("BendMom", "BendMoment", "N-m"), } -_NODE_QUANTITY = re.compile(r"(Ten|Curv|BendMom)0*([1-9][0-9]{0,8})N0*([1-9][0-9]{0,8})", re.I) +_NODE_QUANTITY = re.compile( + r"(Ten|CurvX|CurvY|Curv|BendMom)0*([1-9][0-9]{0,8})N0*([1-9][0-9]{0,8})", re.I +) _NODE_POSITION = re.compile(r"L0*([1-9][0-9]{0,8})N0*([1-9][0-9]{0,8})p([xyz])", re.I) ArcSource = StaticProfile | Mapping[int, float] | None diff --git a/python/tests/test_damage.py b/python/tests/test_damage.py index 10c6978d..dccccb48 100644 --- a/python/tests/test_damage.py +++ b/python/tests/test_damage.py @@ -25,6 +25,7 @@ lifetime_fatigue, miner_damage, read_output, + section_stress, study_sea_state_damage, ) from cabledyn.damage import SECONDS_PER_YEAR @@ -323,3 +324,82 @@ def test_study_sea_state_damage_needs_a_time_history(tmp_path): study = _study(tmp_path, [_case(tmp_path, "s", static)]) with pytest.raises(StudyOutputError, match="not a time history"): study_sea_state_damage(study, {"s": 1.0}, lambda history: 0.0) + + +def test_section_stress_follows_the_curvature_vector(): + stress, angles = section_stress( + 1.0e5, 0.01, 0.0, area=0.01, modulus=2.0e11, radius=0.05, points=4 + ) + np.testing.assert_allclose(angles, [0.0, 90.0, 180.0, 270.0]) + # the strain at (x, y) is -(kx x + ky y): compression towards the centre of curvature (+x) + np.testing.assert_allclose(stress, [1.0e7 - 1.0e8, 1.0e7, 1.0e7 + 1.0e8, 1.0e7], atol=1.0) + assert not stress.flags.writeable + # in a fixed bending plane the extreme points are the two fibres of cable_stress + kx, ky = 0.006, -0.008 + many, _ = section_stress( + [2.0e5], [kx], [ky], area=0.01, modulus=2.0e11, radius=0.05, points=360 + ) + outer, inner = cable_stress(2.0e5, math.hypot(kx, ky), area=0.01, modulus=2.0e11, radius=0.05) + assert many.max() == pytest.approx(float(outer), rel=1.0e-4) + assert many.min() == pytest.approx(float(inner), rel=1.0e-4) + with pytest.raises(ValueError, match="points"): + section_stress(1.0, 0.0, 0.0, area=1.0, modulus=1.0, radius=1.0, points=0) + with pytest.raises(ValueError, match="points"): + section_stress(1.0, 0.0, 0.0, area=1.0, modulus=1.0, radius=1.0, points=True) # type: ignore[arg-type] + with pytest.raises(ValueError, match="finite"): + section_stress(1.0, math.nan, 0.0, area=1.0, modulus=1.0, radius=1.0) + + +def _whirl_columns(kappa: float = 0.01) -> dict[str, np.ndarray]: + """A section whose curvature vector turns at a constant magnitude (0.5 Hz).""" + omega = 2.0 * math.pi * 0.5 + columns: dict[str, np.ndarray] = {} + for node in (1, 3, 5): + columns[f"Ten1N{node}"] = np.full(TIME.shape, 1.0e6) + columns[f"Curv1N{node}"] = np.full(TIME.shape, kappa) + columns[f"CurvX1N{node}"] = kappa * np.cos(omega * TIME + 0.3 * node) + columns[f"CurvY1N{node}"] = kappa * np.sin(omega * TIME + 0.3 * node) + return columns + + +def test_section_damage_sees_a_whirl_the_two_fibres_miss(tmp_path): + history = read_output(write_main(tmp_path / "whirl.out", _whirl_columns())) + curve = dnv_rp_c203_curve("D") + section = {"area": 0.01, "modulus": 2.0e11, "radius": 0.05} + fibres = damage_along_arc(history, 1, curve, quantity="stress", **section) + assert np.all(fibres.damage == 0.0) and fibres.critical_angle is None + profile = damage_along_arc(history, 1, curve, quantity="section", points=8, **section) + assert profile.quantity == "section" + assert np.all(profile.damage > 0.0) + columns = _whirl_columns() + stress, angles = section_stress( + columns["Ten1N3"], columns["CurvX1N3"], columns["CurvY1N3"], points=8, **section + ) + damages = [ + channel_damage(_table(tmp_path, stress[:, k]), "S", curve, scale=1.0e-6).damage + for k in range(8) + ] + assert profile.damage[1] == _close(max(damages)) + assert profile.critical_angle is not None + # the critical angle is a point of the largest damage (opposite points of a whirl tie) + chosen = int(np.flatnonzero(angles == profile.critical_angle[1])[0]) + assert damages[chosen] == _close(max(damages)) + + +def test_section_damage_errors(tmp_path): + history = read_output(write_main(tmp_path / "whirl.out", _whirl_columns())) + curve = dnv_rp_c203_curve("D") + tn = FatigueCurve("tn", "T-N", 3.0, 3.0) + section = {"area": 0.01, "modulus": 2.0e11, "radius": 0.05} + with pytest.raises(ValueError, match="S-N curve"): + damage_along_arc(history, 1, tn, quantity="section", **section) + with pytest.raises(ValueError, match="area, modulus, and radius"): + damage_along_arc(history, 1, curve, quantity="section", area=1.0) + columns = _whirl_columns() + del columns["CurvY1N5"] + sparse = read_output(write_main(tmp_path / "sparse.out", columns)) + with pytest.raises(ValueError, match="same nodes"): + damage_along_arc(sparse, 1, curve, quantity="section", **section) + plain = read_output(write_main(tmp_path / "plain.out")) + with pytest.raises(KeyError, match="CurvX1N"): + damage_along_arc(plain, 1, curve, quantity="section", **section) From 42aeab3c316d2a8cbc42eb48f2f63b79187c9a94 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Thu, 12 Nov 2026 16:03:59 +0900 Subject: [PATCH 07/47] feat: cabledyn.current_steps, stepped-current VIV studies in one run (#150) A stepped-current study holds the current at a sequence of speeds and lets each step start from the state the previous one left, so the response follows its branch up and back down; separate runs would each start from rest. The standalone driver has no restart file, but its MoorDyn-C Currents 2 table (a depth profile in time) carries the whole sweep in one run. current_steps(speeds, hold=, ramp=, direction=) returns a CurrentSteps schedule: each speed held, then ramped linearly to the next. Its write() puts current_profile_dynamic.txt in the deck folder (uniform over two depths), duration is the TMax to give, windows(settle) the analysis window of every hold, and responses() the viv_response of each. The table is resampled at its smallest interval, the ramp, so a hold must be a whole number of ramps (refused otherwise). Checks: the schedule, the file rows and the refusals (python/tests/test_viv.py); end to end, the in-line VIV example under 0.10 -> 0.18 -> 0.10 m/s: the lock-in frequency rises with the current and returns with it. Full pytest, ruff, mypy strict, Sphinx -W. Review fix: the file holds the last speed two ramps past TMax, since the resampled table takes its first sample over its last interval (and a rounded step can drop the last sample), which had returned the run to the first speed within the last hold. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 3 + doc/api_python.rst | 5 + doc/python_postprocessing.rst | 26 +++++ python/cabledyn/__init__.py | 10 +- python/cabledyn/viv.py | 170 +++++++++++++++++++++++++++++++- python/tests/test_end_to_end.py | 27 +++++ python/tests/test_viv.py | 79 ++++++++++++++- 7 files changed, 317 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b854b84..1179d057 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,9 @@ All notable changes to CableDyn are recorded in this file. The format follows (`CurvX`/`CurvY`), `T/A - E r (kappa_x cos theta + kappa_y sin theta)`, counted point by point for the fatigue of biaxial bending; a whirling section, which the two-fibre recovery from the curvature magnitude sees as constant, now accumulates its damage. +- `cabledyn.current_steps`: a stepped-current schedule for a VIV study in one run (each speed + held, then ramped to the next), written as the deck's MoorDyn-C `Currents 2` file, with the + VIV response of every hold. ## [0.4.2] - 2026-11-09 diff --git a/doc/api_python.rst b/doc/api_python.rst index 19b11387..b4e67c97 100644 --- a/doc/api_python.rst +++ b/doc/api_python.rst @@ -346,6 +346,11 @@ the solver's own curvature, tension, and angle channels, where written, are auth .. autoclass:: cabledyn.ModalAmplitudes :members: +.. autofunction:: cabledyn.current_steps + +.. autoclass:: cabledyn.CurrentSteps + :members: + Deck editing and case generation -------------------------------- diff --git a/doc/python_postprocessing.rst b/doc/python_postprocessing.rst index e2358f8d..dc2763e1 100644 --- a/doc/python_postprocessing.rst +++ b/doc/python_postprocessing.rst @@ -495,6 +495,32 @@ is 0.05, a standing wave between the pinned ends. viv.plot_orbit(13) viv.export("results/line1_viv.csv") +A stepped-current study holds the current at a sequence of speeds in one run, so each step +starts from the state the previous one left: the response follows a branch as the current goes +up and comes back down, where separate runs would each start from rest. +:func:`cabledyn.current_steps` builds the schedule (each speed held ``hold`` seconds, ramped +linearly over ``ramp`` seconds to the next, along one direction); its ``write`` puts the deck's +MoorDyn-C ``Currents 2`` file ``current_profile_dynamic.txt`` (:doc:`options`) in the deck +folder, its ``duration`` is the ``TMax`` to give, and its ``responses`` returns the +:func:`~cabledyn.viv_response` of every hold from ``settle`` seconds into it. The file's +smallest time interval is the ramp, the step the current table is resampled to, so a hold must +be a whole number of ramps; the static start takes the first speed. The file holds the last +speed for two ramps past ``duration``, because the resampled table returns to its first sample +over its last interval; the run therefore keeps the last speed up to ``TMax``. + +.. code-block:: python + + from cabledyn import current_steps + + speeds = [0.10, 0.14, 0.18, 0.22, 0.26, 0.22, 0.18, 0.14, 0.10] + steps = current_steps(speeds, hold=60.0, ramp=5.0, direction=(0.0, 1.0, 0.0)) + steps.write("cases/stepped") # next to the deck, which sets "2 Currents" and TMax + print(steps.duration) + # ... run the deck, then: + for speed, viv in zip(steps.speeds, steps.responses( + result.read_line_positions(1), diameter=0.1, settle=30.0)): + print(speed, viv.amplitude_over_diameter("cross_flow").max(), viv.frequency("cross_flow")) + Parameter grids --------------- diff --git a/python/cabledyn/__init__.py b/python/cabledyn/__init__.py index d23b3cfb..d13fdac0 100644 --- a/python/cabledyn/__init__.py +++ b/python/cabledyn/__init__.py @@ -150,7 +150,13 @@ ) from cabledyn.sweep import parameter_grid from cabledyn.touchdown import TouchdownHistory, touchdown_history -from cabledyn.viv import ModalAmplitudes, VIVResponse, viv_response +from cabledyn.viv import ( + CurrentSteps, + ModalAmplitudes, + VIVResponse, + current_steps, + viv_response, +) if TYPE_CHECKING: from cabledyn._lib import abi_minor as abi_minor @@ -177,6 +183,7 @@ "CoherenceResult", "ConvergenceError", "CoupledRun", + "CurrentSteps", "DamageProfile", "DeckFile", "DeckFormatError", @@ -243,6 +250,7 @@ "channel_summary", "clearance_matrix", "compare_histories", + "current_steps", "cycle_histogram", "damage_along_arc", "damage_equivalent_range", diff --git a/python/cabledyn/viv.py b/python/cabledyn/viv.py index d24d3cec..414d86e2 100644 --- a/python/cabledyn/viv.py +++ b/python/cabledyn/viv.py @@ -41,7 +41,7 @@ from cabledyn.spectra import _sampling from cabledyn.touchdown import _positions -__all__ = ["ModalAmplitudes", "VIVResponse", "viv_response"] +__all__ = ["CurrentSteps", "ModalAmplitudes", "VIVResponse", "current_steps", "viv_response"] _DIRECTIONS = ("cross_flow", "in_line") @@ -596,3 +596,171 @@ def viv_response( whole_line=whole_line, node_numbers=numbers, ) + + +@dataclass(frozen=True) +class CurrentSteps: + """A uniform current held at a sequence of speeds, for a stepped-current VIV study. + + Created by :func:`current_steps`. The current is held at ``speeds[k]`` for + ``hold`` seconds, then ramps linearly over ``ramp`` seconds to the next + speed, so one run continues each step from the state the previous one + left (the response branch an up-and-down sweep follows). :meth:`write` + gives the deck its MoorDyn-C ``Currents 2`` file. + + Attributes + ---------- + speeds : numpy.ndarray + Read-only ``(n_steps,)`` current speeds, m/s. + hold, ramp : float + Hold time of each speed and ramp time between speeds, s. + direction : numpy.ndarray + Read-only ``(3,)`` unit direction of the current. + """ + + speeds: npt.NDArray[Any] + hold: float + ramp: float + direction: npt.NDArray[Any] + + @property + def starts(self) -> npt.NDArray[Any]: + """Read-only ``(n_steps,)`` start time of each hold, s.""" + return _readonly(np.arange(self.speeds.size) * (self.hold + self.ramp)) + + @property + def duration(self) -> float: + """End of the last hold, s: the deck's ``TMax``. + + The file holds the last speed for two ramps beyond it (:meth:`write`); a + longer run then repeats the record. + """ + return float(self.starts[-1] + self.hold) + + def windows(self, settle: float) -> tuple[tuple[float, float], ...]: + """Return the analysis window of every hold, from ``settle`` seconds into it to its end.""" + if not (math.isfinite(float(settle)) and 0.0 <= float(settle) < self.hold): + raise ValueError("settle must be finite, non-negative and shorter than the hold") + return tuple((float(t) + float(settle), float(t) + self.hold) for t in self.starts) + + def write( + self, + folder: str | os.PathLike[str], + *, + depths: tuple[float, float] = (-1.0e4, 0.0), + overwrite: bool = False, + ) -> Path: + """Write ``current_profile_dynamic.txt``, the deck's ``Currents 2`` file, into ``folder``. + + The current is uniform between the two ``depths`` (z, m, increasing) and + held beyond them. The file's smallest time interval is the ramp, the time + step MoorDyn-C and CableDyn resample it to, so the holds stay exact. + + The resampled table has ``floor(t_last/dt) + 1`` samples and takes its + first sample over its last interval (where a longer run starts to repeat + it), and a rounded ``dt`` can drop the last sample by one step. The file + therefore ends two ramps after :attr:`duration`, still at the last speed, + so the run up to ``TMax`` never returns to the first speed. + + Raises + ------ + FileExistsError + If the file exists and ``overwrite`` is false. + ValueError + If the depths are not two finite, increasing elevations. + """ + low, high = (float(z) for z in depths) + if not (math.isfinite(low) and math.isfinite(high) and low < high): + raise ValueError("depths must be two finite, increasing elevations") + target = Path(folder).expanduser().resolve() / "current_profile_dynamic.txt" + if target.exists() and not overwrite: + raise FileExistsError(f"output already exists: {target}") + rows: list[str] = [] + for k, (start, speed) in enumerate(zip(self.starts, self.speeds, strict=True)): + velocity = float(speed) * self.direction + values = " ".join(f"{number(v)} {number(v)}" for v in velocity) + times = (float(start), float(start) + self.hold) if k else (0.0, self.hold) + rows.extend(f"{number(t)} {values}" for t in times) + # the guard: the last speed held two ramps past TMax (see above) + rows.append(f"{number(self.duration + 2.0 * self.ramp)} {values}") + lines = [ + "--------------------- MoorDyn dynamic currents File -------------------------", + "a uniform current held at a sequence of speeds (cabledyn.current_steps)", + "line 5 lists the depths (m); each later row is t ux(z1 z2) uy(z1 z2) uz(z1 z2)", + "------------------------------------------------------------------------------", + f"{number(low)} {number(high)}", + "time ux... uy... uz...", + *rows, + ] + target.parent.mkdir(parents=True, exist_ok=True) + target.write_text("\n".join(lines) + "\n", encoding="ascii") + return target + + def responses( + self, + history: TimeHistory, + *, + diameter: float, + settle: float, + line_id: int | None = None, + ) -> tuple[VIVResponse, ...]: + """Return the :func:`viv_response` of every hold, from ``settle`` seconds into it.""" + return tuple( + viv_response( + history, + flow=float(speed) * self.direction, + diameter=diameter, + start=start, + stop=stop, + line_id=line_id, + ) + for speed, (start, stop) in zip(self.speeds, self.windows(settle), strict=True) + ) + + +def current_steps( + speeds: npt.ArrayLike, + *, + hold: float, + ramp: float, + direction: npt.ArrayLike = (0.0, 1.0, 0.0), +) -> CurrentSteps: + """Return a stepped current schedule. + + Parameters + ---------- + speeds : array_like + Positive current speeds, m/s, in the order they are held; an + up-and-down sweep lists them up and back. + hold : float + Hold time of each speed, s; a whole number of ramps. + ramp : float + Positive ramp time between speeds, s. + direction : array_like + ``(3,)`` direction of the current (normalised), default ``+y``. + + Raises + ------ + ValueError + If a speed is not finite and positive, the times are invalid, the hold + is not a whole number of ramps, or the direction is not a finite, + non-zero 3-vector. + """ + values = np.array(speeds, dtype=np.float64).reshape(-1) + if values.size < 1 or not np.all(np.isfinite(values)) or np.any(values <= 0.0): + raise ValueError("speeds must be one or more finite, positive values") + hold_s, ramp_s = float(hold), float(ramp) + if not (math.isfinite(hold_s) and hold_s > 0.0 and math.isfinite(ramp_s) and ramp_s > 0.0): + raise ValueError("hold and ramp must be finite and positive") + ratio = hold_s / ramp_s + if abs(ratio - round(ratio)) > 1.0e-9 * ratio: + raise ValueError("hold must be a whole number of ramps (the file's resampling step)") + unit = np.array(direction, dtype=np.float64) + if unit.shape != (3,) or not np.all(np.isfinite(unit)) or not np.any(unit): + raise ValueError("direction must be a finite, non-zero 3-vector") + return CurrentSteps( + speeds=_readonly(values), + hold=hold_s, + ramp=ramp_s, + direction=_readonly(unit / np.linalg.norm(unit)), + ) diff --git a/python/tests/test_end_to_end.py b/python/tests/test_end_to_end.py index 9abe4870..02cd1ef3 100644 --- a/python/tests/test_end_to_end.py +++ b/python/tests/test_end_to_end.py @@ -23,6 +23,7 @@ DriverExecutionError, StaticProfile, compare_histories, + current_steps, fft_filter, generate_deck_cases, line_geometry, @@ -305,3 +306,29 @@ def test_viv_response_of_the_inline_example(driver, tmp_path): assert response.modal_amplitudes("cross_flow").dominant_mode == 1 assert response.modal_amplitudes("in_line").dominant_mode == 2 assert response.travelling_wave_index("cross_flow") < 0.2 + + +def test_stepped_current_continues_the_response(driver, tmp_path): + # the in-line VIV example under a current stepped 0.10 -> 0.18 -> 0.10 m/s in one run + steps = current_steps([0.10, 0.18, 0.10], hold=60.0, ramp=5.0) + text = (EXAMPLES / "viv_taut_cable_inline.dat").read_text(encoding="utf-8") + text = text.replace("1 1 2 V", "1 1 2 p") + lines = [] + for line in text.splitlines(): + if line.startswith("uniform 0.0 0.15 0.0 current"): + line = "2 Currents" + elif line.startswith("90.0 TMax"): + line = f"{steps.duration} TMax" + lines.append(line) + deck = tmp_path / "stepped.dat" + deck.write_text("\n".join(lines) + "\n", encoding="utf-8") + steps.write(tmp_path) + result = driver.run(deck, "out/stepped", timeout=600) + first, middle, last = steps.responses(result.read_line_positions(1), diameter=0.1, settle=30.0) + # the lock-in frequency follows the current up and comes back with it + assert middle.frequency("cross_flow") > first.frequency("cross_flow") + 0.03 + assert last.frequency("cross_flow") == pytest.approx(first.frequency("cross_flow"), abs=0.01) + assert ( + middle.amplitude_over_diameter("cross_flow").max() + > first.amplitude_over_diameter("cross_flow").max() + ) diff --git a/python/tests/test_viv.py b/python/tests/test_viv.py index cb8057e8..c7ffa1e6 100644 --- a/python/tests/test_viv.py +++ b/python/tests/test_viv.py @@ -10,7 +10,7 @@ import numpy as np import pytest -from cabledyn import LineNodeHistory, VIVResponse, viv_response +from cabledyn import LineNodeHistory, VIVResponse, current_steps, viv_response from cabledyn.results import TimeHistory L = 100.0 @@ -272,3 +272,80 @@ def test_methods_validate_direction_and_node(): response.modal_amplitudes(n_modes=0) with pytest.raises(ValueError, match="shapes must have shape"): response.modal_amplitudes(shapes=np.ones((2, 3))) + + +def test_current_steps_schedule_and_file(tmp_path): + steps = current_steps([0.1, 0.2, 0.1], hold=20.0, ramp=5.0, direction=(0.0, 2.0, 0.0)) + np.testing.assert_allclose(steps.starts, [0.0, 25.0, 50.0]) + assert steps.duration == pytest.approx(70.0) + np.testing.assert_allclose(steps.direction, [0.0, 1.0, 0.0]) + assert steps.windows(15.0) == ((15.0, 20.0), (40.0, 45.0), (65.0, 70.0)) + path = steps.write(tmp_path, depths=(-100.0, 0.0)) + assert path.name == "current_profile_dynamic.txt" + lines = path.read_text(encoding="ascii").splitlines() + assert lines[4].split() == ["-100", "0"] + rows = np.array([[float(v) for v in line.split()] for line in lines[6:]]) + # t ux(z1 z2) uy(z1 z2) uz(z1 z2): held, ramped over 5 s, held, and the last speed two + # ramps past TMax + np.testing.assert_allclose(rows[:, 0], [0.0, 20.0, 25.0, 45.0, 50.0, 70.0, 80.0]) + np.testing.assert_allclose(rows[:, 3], [0.1, 0.1, 0.2, 0.2, 0.1, 0.1, 0.1]) + assert np.all(rows[:, [1, 2, 5, 6]] == 0.0) and np.all(rows[:, 3] == rows[:, 4]) + with pytest.raises(FileExistsError): + steps.write(tmp_path) + with pytest.raises(ValueError, match="settle"): + steps.windows(20.0) + + +@pytest.mark.parametrize( + ("kwargs", "message"), + [ + ({"speeds": []}, "speeds must be"), + ({"speeds": [0.1, 0.0]}, "speeds must be"), + ({"ramp": 0.0}, "hold and ramp"), + ({"hold": 22.0}, "whole number of ramps"), + ({"direction": (0.0, 0.0, 0.0)}, "direction must be"), + ], +) +def test_current_steps_validation(kwargs, message): + arguments = {"speeds": [0.1, 0.2], "hold": 20.0, "ramp": 5.0, **kwargs} + with pytest.raises(ValueError, match=message): + current_steps(**arguments) + + +def _resampled_speed(times, speeds, t): + # the native rule (CD_Current_Grid_Resample, CD_Current_Grid_Velocity): dt the smallest + # interval, floor(t_last/dt) + 1 samples at k dt, the upper index modulo the sample count + # and both indices the first sample over the last interval + dt = np.diff(times).min() + samples = np.interp(np.arange(int(np.floor(times[-1] / dt)) + 1) * dt, times, speeds) + q = t / dt + n = np.floor(q).astype(int) + upper = (n + 1) % samples.size + lower = np.maximum(upper - 1, 0) + return samples[lower] * (1.0 - (q - n)) + samples[upper] * (q - n) + + +@pytest.mark.parametrize( + ("speeds", "hold", "ramp"), + [([0.5, 1.0], 0.3, 0.1), ([0.1, 0.2, 0.3], 20.0, 5.0), ([0.4], 1.2, 0.4)], +) +def test_current_steps_file_holds_the_last_speed_to_tmax(tmp_path, speeds, hold, ramp): + steps = current_steps(speeds, hold=hold, ramp=ramp) + lines = steps.write(tmp_path).read_text(encoding="ascii").splitlines() + rows = np.array([[float(v) for v in line.split()] for line in lines[6:]]) + t = np.linspace(steps.windows(0.0)[-1][0], steps.duration, 401) + np.testing.assert_allclose(_resampled_speed(rows[:, 0], rows[:, 3], t), speeds[-1]) + if speeds[0] != speeds[-1]: + # without the guard row the table would return to the first speed within the last hold + old = _resampled_speed(rows[:-1, 0], rows[:-1, 3], t) + assert old[-1] == pytest.approx(speeds[0]) + + +def test_current_steps_responses_take_each_hold(): + steps = current_steps([0.5, 0.25], hold=15.0, ramp=5.0) + responses = steps.responses(_history(_standing), diameter=D, settle=5.0) + assert len(responses) == 2 + assert responses[1].time[0] == pytest.approx(25.0) + assert np.allclose(responses[0].normal_speed, 0.5) and np.allclose( + responses[1].normal_speed, 0.25 + ) From b5feeac116b1fd206b0aca1d5aaa83c4614f2cc0 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Thu, 12 Nov 2026 18:42:30 +0900 Subject: [PATCH 08/47] feat: higher-harmonic VIV force (VIV section column Chh) (#151) The synchronisation model with in-line VIV resolves the cross-flow response at the shedding frequency and the in-line one at twice it. Riser measurements show cross-flow components at three times the frequency as well, and they dominate curvature fatigue at high modes. Ulveseter, Thorsen, Saevik and Larsen (Appl. Ocean Res. 90, 2019, 101856, Eq. 6) add a higher-harmonic force of the lift's form at the sum of the two phases, f_hh = 1/2 rho D C_hh cos(phi + phi_x) U (t x v_n), which acts across the flow at 3 omega (and at omega and 5 omega through the turn of the relative flow), and along it at 2 and 4 omega. A fourth VIV section column Chh (default 0; Chh > 0 needs ClX > 0) adds it on EI = 0 lines and finite-EI cables: - the cable adds k_hh cos(phi + phi_x) to the node values of the lift scale its elements integrate; - the EI = 0 line adds a second node lift at the phase sum. It needs no state of its own, and its derivatives enter the tangent with the lift's. The Python deck reader and builder take the column. Checks: - tests/test_viv_inline_deck D5: Chh 1.0 raises the quarter-span in-line response at four times the cross-flow frequency from A/D 0.0017 to 0.0070, the EI = 0 line within 2 % of the cable; Chh 0 is the row without the column to the printed digits; Chh without in-line VIV, a negative Chh and five columns are refused; - tests/test_hermite_load_power L4 now carries Chh 1: the load work still closes the cable's energy balance (3e-5); - native/Python parity of nine row forms; - full ctest on the default and Prescott kernels, Debug -fcheck=all on the VIV, model and system tests, pytest, Sphinx -W. A second commit documents the published coefficient sets as deck columns: Ulveseter et al. (2018) Table 3 and (2019) Table 1 with the C_hh of their Section 4, mapped onto the LINE TYPES and VIV columns (cF = f0, dF = df, Ca = C_M - 1), checked against the papers. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 5 ++ doc/capabilities.rst | 3 +- doc/driver_format.md | 30 ++++++++--- doc/references.rst | 6 +++ doc/theory.rst | 18 +++++++ python/cabledyn/builder.py | 20 +++++-- python/cabledyn/deck_file.py | 34 ++++++++---- python/tests/test_builder.py | 30 +++++++++++ python/tests/test_deck_native_parity.py | 17 ++++-- src/CableDyn_DeckDriver.f90 | 72 ++++++++++++++++--------- src/CableDyn_HermiteCableDynamic.f90 | 47 +++++++++++++--- src/CableDyn_Model.f90 | 63 ++++++++++++++++++---- tests/test_hermite_load_power.f90 | 9 ++-- tests/test_viv_inline_deck.f90 | 59 +++++++++++++++++++- 14 files changed, 344 insertions(+), 69 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1179d057..a729c122 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,11 @@ All notable changes to CableDyn are recorded in this file. The format follows finite-EI cables alike (within 1 % of each other). Exact Jacobians; the phase is in the step-recovery, snapshot and checkpoint state; the Python deck reader and builder take the section. +- The higher-harmonic VIV force of Ulveseter et al. (2019): a fourth `VIV` section column `Chh` + adds `1/2 rho D Chh cos(phi + phi_x) U (t x v_n)`, the lift's form at the sum of the cross-flow + and in-line phases, on `EI = 0` lines and finite-EI cables. On the in-line example `Chh` 1.0 + raises the quarter-span in-line response at four times the cross-flow frequency fourfold. The + Python deck reader and builder take the column. - Load power channels `VIVPow`, `DragPow` and `DampPow` [W], and `N` per unit length about a node [W/m]: the power the VIV loads, the drag and the structural damping (`BA`, `Bb`) deliver to a line at the committed state, on `EI = 0` lines and finite-EI cables, diff --git a/doc/capabilities.rst b/doc/capabilities.rst index 34720cb4..2d954125 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -146,7 +146,8 @@ Line and constitutive capability host's fluid field on the coupled routes and its state in the checkpoint * - In-line VIV (``VIV`` section ``ClX``, ``alpha``) - Standalone and coupled - - the in-line shedding force of Ulveseter et al. (2018) at twice the cross-flow frequency, on + - the in-line shedding force of Ulveseter et al. (2018) at twice the cross-flow frequency, and + the optional higher-harmonic force of Ulveseter et al. (2019) (``Chh``), on ``EI = 0`` lines and finite-EI cables wherever the cross-flow lift runs (:ref:`theory-viv-inline`), its state in the checkpoint diff --git a/doc/driver_format.md b/doc/driver_format.md index 70cc394b..ee2cb911 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -1154,9 +1154,9 @@ relative flow, the direction of the drag, at twice the cross-flow frequency (Ulv ```text --------------------- VIV ---------------------------------------------- -TypeName ClX alpha -(-) (-) (-) -cable 0.85 0.15 +TypeName ClX alpha Chh +(-) (-) (-) (-) +cable 0.85 0.15 0.5 ``` | Column | Meaning | @@ -1164,6 +1164,7 @@ cable 0.85 0.15 | `TypeName` | an existing LINE TYPES name (case-insensitive), at most one row each | | `ClX` | in-line shedding coefficient `C_x` >= 0, at most 1e15; `0` is no in-line VIV | | `alpha` | optional frequency band of the in-line phase about twice the cross-flow one, `0 <= alpha < 1` (default 0.15) | +| `Chh` | optional higher-harmonic coefficient `C_hh` >= 0, at most 1e15 (default 0, none); `Chh > 0` needs `ClX > 0` | Behaviour: @@ -1171,16 +1172,33 @@ Behaviour: flow and `U` its speed; its phase follows `dphi_x/dt = 2 (dphi/dt) [1 + alpha sin(phi_xd - phi_x)]`, `phi` the cross-flow phase and `phi_xd` the phase of the in-line motion. Ulveseter et al. take `ClX = 0.85` and `alpha = 0.15` with `Cl = 0.65`. +- `Chh` adds the higher-harmonic force of Ulveseter et al. (2019), the lift's form + `1/2 rho D Chh cos(phi + phi_x) U (t x v_n)` at the sum of the two phases: across the flow at + three times the cross-flow frequency (and once and five times, through the in-line motion), + along it at twice and four times. It needs no state of its own. Ulveseter et al. use `Chh` + from 0 to 1.5. - The Outputs flag `V` file carries the in-line force with the lift, and the phase is part of the step-recovery, snapshot and checkpoint state. A row with `ClX = 0` leaves the run exactly as without it. - It acts wherever the cross-flow lift does: on `EI = 0` lines (a node force over the node's half elements, as the lift) and on finite-EI cables (integrated with the lift), standalone and - coupled. A row fails if it is not `TypeName ClX [alpha]`, - names an undefined or already named type, or holds a value out of range, and `ClX > 0` fails - on a type without the cross-flow lift. + coupled. A row fails if it is not `TypeName ClX [alpha [Chh]]`, + names an undefined or already named type, or holds a value out of range; `ClX > 0` fails + on a type without the cross-flow lift, and `Chh > 0` with `ClX = 0`. - See `examples/viv_taut_cable_inline.dat`. +**Published coefficient sets.** The synchronisation band of the LINE TYPES columns is the +`f0 +/- df` of the papers (`cF` = `f0`, `dF` = `df`), and their Morison inertia coefficient +`C_M` is `1 + Ca`. Two published sets, as LINE TYPES and VIV columns: + +| Source | `Cd` | `Ca` | `Cl` | `dF` | `cF` | `ClX` | `alpha` | `Chh` | +|--------|------|------|------|------|------|-------|---------|-------| +| Ulveseter et al. (2018), Table 3: a 10 m riser model in current and in current and waves | 1.2 | 1.0 | 0.65 | 0.08 | 0.18 | 0.85 | 0.15 | 0 | +| Ulveseter et al. (2019), Table 1 and Section 4: the NDP high-mode riser in uniform current | 1.2 | 1.0 | 0.85 | 0.064 | 0.144 | 0.75 | 0.15 | 1.5 | + +Each was fitted to its experiments by the authors and is a starting point, not a universal set; +MoorDyn's band defaults (`dF` 0.08, `cF` 0.18) are those of the first. + ### FAILURE (optional, EI = 0 decks) A FAILURE row detaches line ends from a point during a dynamic run, with MoorDyn's trigger rules. diff --git a/doc/references.rst b/doc/references.rst index 9e68e891..594b5dad 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -95,6 +95,12 @@ Hydrodynamics and ocean environment simulation of riser VIV in current and irregular waves. *Marine Structures* **60**, 241–260. https://doi.org/10.1016/j.marstruc.2018.04.001 +.. _ref-ulveseter2019: + +- **Ulveseter, J. V., Thorsen, M. J., Sævik, S. & Larsen, C. M. (2019).** Simulating fundamental + and higher harmonic VIV of slender structures. *Applied Ocean Research* **90**, 101856. + https://doi.org/10.1016/j.apor.2019.101856 + .. _ref-feeny2008: - **Feeny, B. F. (2008).** A complex orthogonal decomposition for wave motion analysis. diff --git a/doc/theory.rst b/doc/theory.rst index a35635fa..2f23ec52 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1214,6 +1214,24 @@ run exactly as without the row. On the taut line of ``viv_taut_cable_inline.dat` span moves in line at twice the cross-flow frequency, A/D 0.19 against 0.03 with the cross-flow lift alone, and the same line as an ``EI = 0`` line gives the cable's amplitudes within 1 %. +A fourth column ``Chh`` adds the higher-harmonic force of +:ref:`Ulveseter et al. (2019) `, the lift's form at the sum of the two phases, + +.. math:: + + \mathbf{f}_{hh} = \tfrac{1}{2}\rho\,d\,C_{hh}\cos(\phi + \phi_x)\;U\, + (\mathbf{t}\times\mathbf{v}_n) . + +With the cross-flow phase at the frequency :math:`\omega` and the in-line one at :math:`2\omega` +it acts across the flow at :math:`3\omega`, and, through the turn of the relative flow by the +motion, at :math:`\omega` and :math:`5\omega` across and :math:`2\omega` and :math:`4\omega` along the flow. It takes no +state of its own: on a finite-EI cable it adds :math:`k_{hh}\cos(\phi + \phi_x)` to the node +values of the lift scale the element integrates, on an ``EI = 0`` line it is a second node lift +at the phase sum, and its derivatives enter the tangent with the lift's. Ulveseter et al. use +:math:`C_{hh}` from 0 to 1.5 (with :math:`C_{v,y}` 0.85 and :math:`C_{v,x}` 0.75). On the +in-line example with ``Chh`` 1.0 the quarter-span in-line response at four times the cross-flow +frequency grows from A/D 0.002 to 0.007, the same on an ``EI = 0`` line. + .. _theory-dry-buoyancy: Buoyancy and wetting diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index fe34ed6b..7612a0a3 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -214,6 +214,10 @@ class LineType: the in-line phase running at twice the cross-flow one) and the frequency band of that phase, ``0 <= il_alpha < 1``; ``None`` leaves alpha out of the row (the solver takes 0.15). + chh : float | None + Optional higher-harmonic coefficient of the ``VIV`` row (``Name ClX alpha + Chh``, Ulveseter et al. 2019; it needs ``clx``); ``None`` leaves it out + (0). With ``chh`` set and ``il_alpha`` ``None`` the row writes alpha 0.15. """ name: str @@ -235,6 +239,7 @@ class LineType: cf: float | None = None clx: float | None = None il_alpha: float | None = None + chh: float | None = None @dataclass(eq=False) @@ -1653,6 +1658,7 @@ def add_line_type( cf: float | None = None, clx: float | None = None, il_alpha: float | None = None, + chh: float | None = None, ) -> LineType: """Add a ``LINE TYPES`` row; see :class:`LineType` for the fields. @@ -1688,6 +1694,7 @@ def add_line_type( cf, clx, il_alpha, + chh, ) self._line_types.append(item) return item @@ -2949,12 +2956,16 @@ def _viv_table(self) -> tuple[str, str, list[list[str]]]: if item.clx is None: if item.il_alpha is not None: raise ValueError(f"{what}: il_alpha needs the in-line VIV coefficient clx") + if item.chh is not None: + raise ValueError(f"{what}: chh needs the in-line VIV coefficient clx") continue row = [_text(item.name, what), _num(item.clx, what)] - if item.il_alpha is not None: - row.append(_num(item.il_alpha, what)) + if item.il_alpha is not None or item.chh is not None: + row.append(_num(0.15 if item.il_alpha is None else item.il_alpha, what)) + if item.chh is not None: + row.append(_num(item.chh, what)) rows.append(row) - return "Name ClX alpha", "(-) (-) (-)", rows + return "Name ClX alpha Chh", "(-) (-) (-) (-)", rows def _syrope_table(self) -> tuple[str, str, list[list[str]]]: rows = [ @@ -3158,7 +3169,8 @@ def load(self) -> None: t = row.tokens item = model.line_types[t[0]] item.clx = _f(t[1]) - item.il_alpha = _f(t[2]) if len(t) == 3 else None + item.il_alpha = _f(t[2]) if len(t) >= 3 else None + item.chh = _f(t[3]) if len(t) == 4 else None for row in self.rows("ATTACHMENTS"): t = row.tokens arc: float | tuple[float, float, float] diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index fa595d92..c2dc68f2 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -3201,16 +3201,17 @@ def _check_viv_section( ) -> None: """Native ``apply_type_viv`` for the VIV section. - A row ``TypeName ClX [alpha]`` gives a line type in-line VIV: the in-line shedding - coefficient ``ClX >= 0`` (0 = off) and the band ``0 <= alpha < 1`` (default 0.15) of - its phase about twice the cross-flow one, so ``ClX > 0`` needs the type's LINE TYPES - lift ``Cl > 0``. A type takes one row. + A row ``TypeName ClX [alpha [Chh]]`` gives a line type in-line VIV: the in-line + shedding coefficient ``ClX >= 0`` (0 = off) and the band ``0 <= alpha < 1`` (default + 0.15) of its phase about twice the cross-flow one, so ``ClX > 0`` needs the type's LINE + TYPES lift ``Cl > 0``; and the higher-harmonic coefficient ``Chh >= 0`` (default 0), + which needs ``ClX > 0``. A type takes one row. """ named: set[str] = set() for row in self._rows("VIV"): where = self._at(row) - if len(row.tokens) not in (2, 3): - raise DeckFormatError(f"{where}: VIV rows must be: TypeName ClX [alpha]") + if len(row.tokens) not in (2, 3, 4): + raise DeckFormatError(f"{where}: VIV rows must be: TypeName ClX [alpha [Chh]]") name = row.tokens[0].lower() if name not in line_type_meta: raise DeckFormatError( @@ -3221,11 +3222,14 @@ def _check_viv_section( named.add(name) try: clx = _native_float(row.tokens[1]) - alpha = _native_float(row.tokens[2]) if len(row.tokens) == 3 else 0.15 + alpha = _native_float(row.tokens[2]) if len(row.tokens) >= 3 else 0.15 + chh = _native_float(row.tokens[3]) if len(row.tokens) == 4 else 0.0 except ValueError as exc: - raise DeckFormatError(f"{where}: VIV ClX and alpha must be plain numbers") from exc - if not (math.isfinite(clx) and math.isfinite(alpha)): - raise DeckFormatError(f"{where}: VIV ClX and alpha must be finite") + raise DeckFormatError( + f"{where}: VIV ClX, alpha and Chh must be plain numbers" + ) from exc + if not (math.isfinite(clx) and math.isfinite(alpha) and math.isfinite(chh)): + raise DeckFormatError(f"{where}: VIV ClX, alpha and Chh must be finite") if clx < 0.0 or clx > _NATIVE_MAX_COEFFICIENT: raise DeckFormatError( f"{where}: VIV in-line coefficient ClX must be non-negative (0 = in-line VIV " @@ -3235,6 +3239,16 @@ def _check_viv_section( raise DeckFormatError( f"{where}: VIV in-line frequency band alpha must satisfy 0 <= alpha < 1" ) + if chh < 0.0 or chh > _NATIVE_MAX_COEFFICIENT: + raise DeckFormatError( + f"{where}: VIV higher-harmonic coefficient Chh must be non-negative (0 = off) " + "and at most 1e15" + ) + if chh > 0.0 and not clx > 0.0: + raise DeckFormatError( + f'{where}: VIV higher-harmonic force of LINE TYPE "{row.tokens[0]}" needs its ' + "in-line VIV (ClX > 0): it runs at the cross-flow plus in-line phase" + ) if clx > 0.0 and name not in lift_type_names: raise DeckFormatError( f'{where}: VIV in-line VIV of LINE TYPE "{row.tokens[0]}" needs its ' diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index dea9ad8c..7d0e8518 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -1037,6 +1037,36 @@ def test_inline_viv_round_trips_in_the_viv_section( assert (loaded.clx, loaded.il_alpha) == (clx, il_alpha) +@pytest.mark.parametrize(("il_alpha", "written_alpha"), [(0.2, 0.2), (None, 0.15)]) +def test_higher_harmonic_viv_round_trips( + tmp_path: Path, il_alpha: float | None, written_alpha: float +) -> None: + model = _chain_model(tmp_path) + model.add_line_type( + "cable", + diam=0.2, + mass=40.0, + ea=5.0e8, + ei=1.0e4, + cl=0.8, + clx=0.85, + il_alpha=il_alpha, + chh=1.2, + ) + target = model.save(tmp_path / "higher_harmonic.dat") + row = next(r for r in DeckFile.read(target)._rows("VIV") if r.tokens[0] == "cable") + assert [float(v) for v in row.tokens[1:]] == [0.85, written_alpha, 1.2] + loaded = next(t for t in DeckModel.load(target).line_types if t.name == "cable") + assert (loaded.clx, loaded.il_alpha, loaded.chh) == (0.85, written_alpha, 1.2) + + +def test_higher_harmonic_needs_the_inline_coefficient(tmp_path: Path) -> None: + model = _chain_model(tmp_path) + model.add_line_type("cable", diam=0.2, mass=40.0, ea=5.0e8, ei=1.0e4, cl=0.8, chh=1.0) + with pytest.raises(ValueError, match="chh needs the in-line VIV coefficient clx"): + model.to_text() + + def test_inline_viv_alpha_needs_the_coefficient(tmp_path: Path) -> None: model = _chain_model(tmp_path) model.add_line_type("cable", diam=0.2, mass=40.0, ea=5.0e8, ei=1.0e4, cl=0.8, il_alpha=0.15) diff --git a/python/tests/test_deck_native_parity.py b/python/tests/test_deck_native_parity.py index e5fad9d5..8cd87439 100644 --- a/python/tests/test_deck_native_parity.py +++ b/python/tests/test_deck_native_parity.py @@ -989,7 +989,15 @@ def test_bending_damping_rows_are_native(ei, message): @pytest.mark.parametrize( - "rows", [("riser 0.85 0.15",), ("riser 0.85",), ("riser 0",), ("RISER 0.5 0.0",)] + "rows", + [ + ("riser 0.85 0.15",), + ("riser 0.85",), + ("riser 0",), + ("RISER 0.5 0.0",), + ("riser 0.85 0.15 1.0",), + ("riser 0 0.15 0",), + ], ) def test_inline_viv_rows_are_accepted(rows): DeckFile.from_text(_section(_VIV_CABLE, "VIV", "TypeName ClX alpha", "(-) (-) (-)", *rows)) @@ -998,10 +1006,13 @@ def test_inline_viv_rows_are_accepted(rows): @pytest.mark.parametrize( ("rows", "message"), [ - (("riser 0.85 0.15 7",), "VIV rows must be: TypeName ClX [alpha]"), + (("riser 0.85 0.15 7 1",), "VIV rows must be: TypeName ClX [alpha [Chh]]"), (("cable 0.85",), 'VIV row names undefined LINE TYPE "cable"'), (("riser 0.85", "riser 0.5"), 'VIV names LINE TYPE "riser" twice'), - (("riser 0.85 x",), "VIV ClX and alpha must be plain numbers"), + (("riser 0.85 x",), "VIV ClX, alpha and Chh must be plain numbers"), + (("riser 0.85 0.15 y",), "VIV ClX, alpha and Chh must be plain numbers"), + (("riser 0.85 0.15 -1",), "Chh must be non-negative"), + (("riser 0 0.15 1",), "needs its in-line VIV (ClX > 0)"), (("riser -0.1",), "ClX must be non-negative"), (("riser 2.0e15",), "ClX must be non-negative"), (("riser 0.85 1.0",), "alpha must satisfy 0 <= alpha < 1"), diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index ed0c0ff2..c5fa434a 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -450,7 +450,7 @@ MODULE CableDyn_DeckDriver ! al., Mar. Struct. 60, 2018): the in-line shedding coefficient C_vx (0 = off) and the ! frequency band alpha of its phase about twice the cross-flow one; has_viv_row marks a type ! the section names. - REAL(wp) :: clx = CD_ZERO, il_alpha = CD_VIV_DEFAULT_IL_ALPHA + REAL(wp) :: clx = CD_ZERO, il_alpha = CD_VIV_DEFAULT_IL_ALPHA, chh = CD_ZERO LOGICAL :: has_viv_row = .FALSE. ! Deck file line of the row (0 when not read from a file), for error messages. INTEGER :: deck_line = 0 @@ -1884,7 +1884,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(wp), ALLOCATABLE :: gas(:), gj(:), rho_a(:), i_rt(:), i_rn(:), w(:), nodes_ref(:, :), q0(:), q_static(:) REAL(wp), ALLOCATABLE :: q_sequence(:) REAL(wp), ALLOCATABLE :: curv(:), cdn(:), cdt(:), can(:), cat(:), catenary_pos(:) - REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:) + REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:), viv_hh(:) REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:) REAL(wp) :: mode1_omega REAL(wp), ALLOCATABLE :: contact_kn(:), contact_cn(:) @@ -3280,14 +3280,16 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, ! property of the original element containing its reference-arc midpoint. ALLOCATE (cdn(SIZE(l0)), cdt(SIZE(l0)), can(SIZE(l0)), cat(SIZE(l0))) CALL finite_hydro_arrays(ln, sections, types, diam, cdn, cdt, can, cat) - ALLOCATE (viv_cl(SIZE(l0)), viv_cf(SIZE(l0)), viv_df(SIZE(l0)), viv_clx(SIZE(l0)), viv_al(SIZE(l0))) - CALL finite_viv_arrays(ln, sections, types, viv_cl, viv_cf, viv_df, viv_clx, viv_al) + ALLOCATE (viv_cl(SIZE(l0)), viv_cf(SIZE(l0)), viv_df(SIZE(l0)), viv_clx(SIZE(l0)), viv_al(SIZE(l0)), & + viv_hh(SIZE(l0))) + CALL finite_viv_arrays(ln, sections, types, viv_cl, viv_cf, viv_df, viv_clx, viv_al, viv_hh) IF (SIZE(l0_am) /= SIZE(l0)) THEN CALL remap_elem_by_reference_arc(viv_cl, l0, l0_am) CALL remap_elem_by_reference_arc(viv_cf, l0, l0_am) CALL remap_elem_by_reference_arc(viv_df, l0, l0_am) CALL remap_elem_by_reference_arc(viv_clx, l0, l0_am) CALL remap_elem_by_reference_arc(viv_al, l0, l0_am) + CALL remap_elem_by_reference_arc(viv_hh, l0, l0_am) CALL remap_elem_by_reference_arc(rho_a, l0, l0_am) CALL remap_elem_by_reference_arc(diam, l0, l0_am) CALL remap_elem_by_reference_arc(cdn, l0, l0_am) @@ -3606,7 +3608,8 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, 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, & - tangent_reversed=.NOT. ln%ends_swapped, clx=viv_clx, il_alpha=viv_al) + tangent_reversed=.NOT. ln%ends_swapped, clx=viv_clx, il_alpha=viv_al, & + chh=viv_hh) ELSE CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, viv_cl, viv_cf, viv_df, & MERGE(opts%viv_rms_window, & @@ -10368,7 +10371,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er REAL(wp), ALLOCATABLE :: ba(:), fluid_velocity(:, :), fluid_acceleration(:, :), drag_waterline(:) REAL(wp), ALLOCATABLE :: hydro_diam(:), hydro_cdn(:), hydro_cdt(:), hydro_can(:), hydro_cat(:) 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(:) + REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:), viv_hh(:) LOGICAL, ALLOCATABLE :: syr_el(:) REAL(wp) :: anchor(3), fairlead(3), mode1_omega REAL(wp), PARAMETER :: factors(4) = [0.25_wp, 0.5_wp, 0.75_wp, CD_ONE] @@ -10407,12 +10410,13 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er ALLOCATE (ba(SIZE(l0)), hydro_diam(SIZE(l0)), hydro_cdn(SIZE(l0)), hydro_cdt(SIZE(l0)), & 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_df(SIZE(l0)), syr_el(SIZE(l0)), viv_clx(SIZE(l0)), viv_al(SIZE(l0)), viv_hh(SIZE(l0))) viv_cl = CD_ZERO viv_cf = CD_ZERO viv_df = CD_ZERO viv_clx = CD_ZERO viv_al = CD_ZERO + viv_hh = CD_ZERO ve_ead = CD_ZERO ve_bas = CD_ZERO ve_bad = CD_ZERO @@ -10473,6 +10477,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er viv_df(e) = types(line_section_type(sections, ln%id, i))%viv_df viv_clx(e) = types(line_section_type(sections, ln%id, i))%clx viv_al(e) = types(line_section_type(sections, ln%id, i))%il_alpha + viv_hh(e) = types(line_section_type(sections, ln%id, i))%chh syr_el(e) = types(line_section_type(sections, ln%id, i))%is_syrope END DO END DO @@ -10482,6 +10487,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er viv_df = viv_df(SIZE(viv_df):1:-1) viv_clx = viv_clx(SIZE(viv_clx):1:-1) viv_al = viv_al(SIZE(viv_al):1:-1) + viv_hh = viv_hh(SIZE(viv_hh):1:-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) @@ -10775,7 +10781,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er IF (ANY(viv_clx > CD_ZERO)) THEN CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em, & phase_seed=seed, tangent_reversed=.NOT. ln%ends_swapped, clx=viv_clx, & - il_alpha=viv_al) + il_alpha=viv_al, chh=viv_hh) ELSE CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em, & phase_seed=seed, tangent_reversed=.NOT. ln%ends_swapped) @@ -11587,13 +11593,13 @@ SUBROUTINE finite_hydro_arrays(ln, sections, types, diam, cdn, cdt, can, cat) cat = cat(SIZE(cat):1:-1) END SUBROUTINE finite_hydro_arrays - SUBROUTINE finite_viv_arrays(ln, sections, types, cl, cf, df, clx, il_alpha) - !! Expand the section VIV columns (Cl dF cF) and the VIV section's in-line ClX and alpha to - !! finite-EI element arrays, in the element order of finite_hydro_arrays. + SUBROUTINE finite_viv_arrays(ln, sections, types, cl, cf, df, clx, il_alpha, chh) + !! Expand the section VIV columns (Cl dF cF) and the VIV section's in-line ClX and alpha and + !! higher-harmonic Chh to finite-EI element arrays, in the element order of finite_hydro_arrays. TYPE(DeckLine), INTENT(IN) :: ln TYPE(DeckSection), INTENT(IN) :: sections(:) TYPE(DeckLineType), INTENT(IN) :: types(:) - REAL(wp), INTENT(OUT) :: cl(:), cf(:), df(:), clx(:), il_alpha(:) + REAL(wp), INTENT(OUT) :: cl(:), cf(:), df(:), clx(:), il_alpha(:), chh(:) INTEGER :: i, j, e, tidx e = 0 @@ -11607,6 +11613,7 @@ SUBROUTINE finite_viv_arrays(ln, sections, types, cl, cf, df, clx, il_alpha) df(e) = types(tidx)%viv_df clx(e) = types(tidx)%clx il_alpha(e) = types(tidx)%il_alpha + chh(e) = types(tidx)%chh END DO END DO cl = cl(SIZE(cl):1:-1) @@ -11614,6 +11621,7 @@ SUBROUTINE finite_viv_arrays(ln, sections, types, cl, cf, df, clx, il_alpha) df = df(SIZE(df):1:-1) clx = clx(SIZE(clx):1:-1) il_alpha = il_alpha(SIZE(il_alpha):1:-1) + chh = chh(SIZE(chh):1:-1) END SUBROUTINE finite_viv_arrays LOGICAL FUNCTION line_has_viv(ln, types, sections) RESULT(has) @@ -17194,24 +17202,26 @@ SUBROUTINE append_line_attachment(row, lines, ErrStat, ErrMsg) END SUBROUTINE append_line_attachment SUBROUTINE apply_type_viv(row, types, ErrStat, ErrMsg) - !! One VIV row: TypeName ClX [alpha] -- the in-line VIV of a line type (Ulveseter et al. 2018): - !! the in-line shedding coefficient C_vx >= 0 (0 = off) and the frequency band 0 <= alpha < 1 - !! of its phase about twice the cross-flow one (default 0.15). The in-line phase rate is - !! slaved to the cross-flow one, so ClX > 0 needs the type's LINE TYPES lift Cl > 0. A type - !! takes one row. + !! One VIV row: TypeName ClX [alpha [Chh]] -- the in-line VIV of a line type (Ulveseter et al. + !! 2018): the in-line shedding coefficient C_vx >= 0 (0 = off) and the frequency band + !! 0 <= alpha < 1 of its phase about twice the cross-flow one (default 0.15); and the + !! higher-harmonic coefficient C_hh >= 0 (Ulveseter et al. 2019; default 0), a force of the + !! lift's form at the cross-flow plus in-line phase. The in-line phase rate is slaved to the + !! cross-flow one, so ClX > 0 needs the type's LINE TYPES lift Cl > 0, and Chh > 0 needs + !! ClX > 0. A type takes one row. CHARACTER(*), INTENT(IN) :: row TYPE(DeckLineType), INTENT(INOUT) :: types(:) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg CHARACTER(DECK_RECLEN) :: tok INTEGER :: it, ntok - REAL(wp) :: clx, alpha + REAL(wp) :: clx, alpha, chh LOGICAL :: found, ok ErrStat = 0; ErrMsg = '' ntok = count_tokens(row) - IF (ntok /= 2 .AND. ntok /= 3) THEN - CALL fail(ErrStat, ErrMsg, 'VIV rows must be: TypeName ClX [alpha]'); RETURN + IF (ntok < 2 .OR. ntok > 4) THEN + CALL fail(ErrStat, ErrMsg, 'VIV rows must be: TypeName ClX [alpha [Chh]]'); RETURN END IF CALL get_token(row, 1, tok, found) it = find_type(types, TRIM(tok)) @@ -17224,15 +17234,20 @@ SUBROUTINE apply_type_viv(row, types, ErrStat, ErrMsg) CALL get_token(row, 2, tok, found) CALL parse_real_token(tok, clx, ok) alpha = CD_VIV_DEFAULT_IL_ALPHA - IF (ok .AND. ntok == 3) THEN + chh = CD_ZERO + IF (ok .AND. ntok >= 3) THEN CALL get_token(row, 3, tok, found) CALL parse_real_token(tok, alpha, ok) END IF + IF (ok .AND. ntok == 4) THEN + CALL get_token(row, 4, tok, found) + CALL parse_real_token(tok, chh, ok) + END IF IF (.NOT. ok) THEN - CALL fail(ErrStat, ErrMsg, 'VIV ClX and alpha must be plain numbers'); RETURN + CALL fail(ErrStat, ErrMsg, 'VIV ClX, alpha and Chh must be plain numbers'); RETURN END IF - IF (.NOT. (IEEE_IS_FINITE(clx) .AND. IEEE_IS_FINITE(alpha))) THEN - CALL fail(ErrStat, ErrMsg, 'VIV ClX and alpha must be finite'); RETURN + IF (.NOT. (IEEE_IS_FINITE(clx) .AND. IEEE_IS_FINITE(alpha) .AND. IEEE_IS_FINITE(chh))) THEN + CALL fail(ErrStat, ErrMsg, 'VIV ClX, alpha and Chh must be finite'); RETURN END IF IF (clx < CD_ZERO .OR. clx > MAX_COEFFICIENT) THEN CALL fail(ErrStat, ErrMsg, 'VIV in-line coefficient ClX must be non-negative (0 = in-line VIV off) and at '// & @@ -17241,12 +17256,21 @@ SUBROUTINE apply_type_viv(row, types, ErrStat, ErrMsg) IF (.NOT. (alpha >= CD_ZERO .AND. alpha < CD_ONE)) THEN CALL fail(ErrStat, ErrMsg, 'VIV in-line frequency band alpha must satisfy 0 <= alpha < 1'); RETURN END IF + IF (chh < CD_ZERO .OR. chh > MAX_COEFFICIENT) THEN + CALL fail(ErrStat, ErrMsg, 'VIV higher-harmonic coefficient Chh must be non-negative (0 = off) and at '// & + 'most 1e15'); RETURN + END IF + IF (chh > CD_ZERO .AND. .NOT. (clx > CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV higher-harmonic force of LINE TYPE "'//TRIM(types(it)%name)//'" needs its '// & + 'in-line VIV (ClX > 0): it runs at the cross-flow plus in-line phase'); RETURN + END IF IF (clx > CD_ZERO .AND. .NOT. (types(it)%cl > CD_ZERO)) THEN CALL fail(ErrStat, ErrMsg, 'VIV in-line VIV of LINE TYPE "'//TRIM(types(it)%name)//'" needs its '// & 'cross-flow lift (LINE TYPES Cl > 0): the in-line phase runs at twice the cross-flow one'); RETURN END IF types(it)%clx = clx types(it)%il_alpha = alpha + types(it)%chh = chh types(it)%has_viv_row = .TRUE. END SUBROUTINE apply_type_viv diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 5fd11852..6f40c37e 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -336,6 +336,9 @@ MODULE CableDyn_HermiteCableDynamic ! the cross-flow state's eval, rate, next, recovery and snapshot twins. Its phase rate is ! twice the cross-flow one, so it lives on cross-flow (viv_node) nodes only. LOGICAL :: has_viv_il = .FALSE. + ! the higher-harmonic force of Ulveseter et al. (2019): per element its coefficient vhh_cx + ! (0 = none) and scale vhh_k = 1/2 rho D C_hh, allocated with the in-line VIV + REAL(wp), ALLOCATABLE :: vhh_cx(:), vhh_k(:) REAL(wp), ALLOCATABLE :: vil_cx(:), vil_k(:), vil_alpha(:), vil_phi(:), vil_phi_eval(:), vil_rate(:) REAL(wp), ALLOCATABLE :: vil_ms(:, :), vil_ms_next(:, :), ws_recovery_vil_phi(:), ws_recovery_vil_ms(:, :) REAL(wp), ALLOCATABLE :: snap_vil_phi(:), snap_vil_ms(:, :) @@ -1098,7 +1101,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial(model, mu_axial, ErrStat, ErrM END SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg, phase_seed, tangent_reversed, & - clx, il_alpha) + clx, il_alpha, chh) !! 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 @@ -1117,7 +1120,9 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! In-line VIV (Ulveseter et al. 2018; both or neither): clx, per element, the in-line shedding !! coefficient C_vx (0: none; > 0 only where cl > 0, the in-line phase rate being twice the !! cross-flow one) and il_alpha its frequency band (0 <= alpha < 1). The in-line phase of a - !! node starts at twice its cross-flow phase. + !! node starts at twice its cross-flow phase. chh (optional, with clx), per element, the + !! coefficient C_hh >= 0 of the higher-harmonic force of Ulveseter et al. (2019), the lift's + !! form at the phase sum phi_y + phi_x (0: none; > 0 only where clx > 0). TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: cl(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -1127,7 +1132,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! MoorDyn's node tangent, so a node at rest takes the cross-flow phase pi !! (CD_VIV_Phase_Rate phi_rest); .FALSE. on a line the reader turned around LOGICAL, INTENT(IN), OPTIONAL :: tangent_reversed - REAL(wp), INTENT(IN), OPTIONAL :: clx(:), il_alpha(:) + REAL(wp), INTENT(IN), OPTIONAL :: clx(:), il_alpha(:), chh(:) INTEGER :: e, k, ne, nn, es REAL(wp) :: wsum, tw_old, rest_old LOGICAL :: had_viv, had_il, want_il @@ -1136,7 +1141,8 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err o_rate(:), o_ms(:, :), o_ms_next(:, :), o_rec_phi(:), o_rec_ms(:, :), & o_snap_phi(:), o_snap_ms(:, :) REAL(wp), ALLOCATABLE :: x_cx(:), x_k(:), x_al(:), x_phi(:), x_phi_eval(:), x_rate(:), x_ms(:, :), & - x_ms_next(:, :), x_rec_phi(:), x_rec_ms(:, :), x_snap_phi(:), x_snap_ms(:, :) + x_ms_next(:, :), x_rec_phi(:), x_rec_ms(:, :), x_snap_phi(:), x_snap_ms(:, :), & + x_hcx(:), x_hk(:) LOGICAL, ALLOCATABLE :: o_node(:), x_node(:) ErrStat = CD_HCDYN_OK; ErrMsg = '' @@ -1198,6 +1204,24 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err END IF want_il = ANY(clx > CD_ZERO) END IF + IF (PRESENT(chh)) THEN + IF (.NOT. PRESENT(clx)) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the higher-harmonic chh needs the in-line clx'; RETURN + END IF + IF (SIZE(chh) /= ne) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: chh must have one value per element'; RETURN + END IF + IF (.NOT. CD_All_Finite(chh)) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: chh must be finite'; RETURN + END IF + IF (ANY(chh < CD_ZERO) .OR. ANY(chh > CD_ZERO .AND. .NOT. (clx > CD_ZERO))) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: need chh >= 0, and chh > 0 only where clx > 0 (the '// & + 'higher-harmonic force runs at the cross-flow plus in-line phase)'; RETURN + END IF + END IF ! the previous configuration and state, kept for a rollback had_viv = model%has_viv had_il = model%has_viv_il @@ -1245,8 +1269,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err ALLOCATE (model%vil_cx(ne), model%vil_k(ne), model%vil_alpha(nn), model%vil_phi(nn), model%vil_phi_eval(nn), & model%vil_rate(nn), model%vil_ms(2, nn), model%vil_ms_next(2, nn), model%ws_recovery_vil_phi(nn), & model%ws_recovery_vil_ms(2, nn), model%snap_vil_phi(nn), model%snap_vil_ms(2, nn), & - model%vil_node(nn)) + model%vil_node(nn), model%vhh_cx(ne), model%vhh_k(ne)) model%vil_cx = clx + model%vhh_cx = CD_ZERO + IF (PRESENT(chh)) model%vhh_cx = chh model%vil_alpha = CD_ZERO model%vil_node = .FALSE. model%vil_phi = CD_ZERO @@ -1322,6 +1348,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(x_rec_phi, model%ws_recovery_vil_phi); CALL MOVE_ALLOC(x_rec_ms, model%ws_recovery_vil_ms) CALL MOVE_ALLOC(x_snap_phi, model%snap_vil_phi); CALL MOVE_ALLOC(x_snap_ms, model%snap_vil_ms) CALL MOVE_ALLOC(x_node, model%vil_node) + CALL MOVE_ALLOC(x_hcx, model%vhh_cx); CALL MOVE_ALLOC(x_hk, model%vhh_k) ELSE CALL MOVE_ALLOC(model%viv_cl, o_cl); CALL MOVE_ALLOC(model%viv_k, o_k) CALL MOVE_ALLOC(model%viv_cf, o_cf); CALL MOVE_ALLOC(model%viv_df, o_df) @@ -1338,6 +1365,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(model%ws_recovery_vil_phi, x_rec_phi); CALL MOVE_ALLOC(model%ws_recovery_vil_ms, x_rec_ms) CALL MOVE_ALLOC(model%snap_vil_phi, x_snap_phi); CALL MOVE_ALLOC(model%snap_vil_ms, x_snap_ms) CALL MOVE_ALLOC(model%vil_node, x_node) + CALL MOVE_ALLOC(model%vhh_cx, x_hcx); CALL MOVE_ALLOC(model%vhh_k, x_hk) END IF END SUBROUTINE move_viv END SUBROUTINE CD_HermiteCable_Dyn_Set_VIV @@ -1355,6 +1383,7 @@ SUBROUTINE clear_viv(model) model%vil_phi_eval, model%vil_rate, model%vil_ms, model%vil_ms_next, & model%ws_recovery_vil_phi, model%ws_recovery_vil_ms, & model%snap_vil_phi, model%snap_vil_ms, model%vil_node) + IF (ALLOCATED(model%vhh_k)) DEALLOCATE (model%vhh_cx, model%vhh_k) model%has_viv = .FALSE. model%has_viv_il = .FALSE. model%viv_tw = CD_ZERO @@ -1370,6 +1399,7 @@ SUBROUTINE viv_drag_terms(model) REAL(wp) :: wsum model%viv_k = 0.5_wp*model%rho_w*model%diam*model%viv_cl IF (model%has_viv_il) model%vil_k = 0.5_wp*model%rho_w*model%diam*model%vil_cx + IF (model%has_viv_il) model%vhh_k = 0.5_wp*model%rho_w*model%diam*model%vhh_cx model%viv_dn = CD_ZERO DO k = 1, model%nn IF (.NOT. model%viv_node(k)) CYCLE @@ -1504,7 +1534,8 @@ END SUBROUTINE viv_step_end SUBROUTINE viv_element_lift(model, q_cfg, v_cfg, e, flift, ErrStat, ErrMsg, djq, djv) !! The VIV lift load of element e at the phase viv_phi_eval in the flow the drag sees (current, !! held field), with its Jacobians djq, djv (both or neither); with in-line VIV it includes the - !! in-line shedding force at the phase vil_phi_eval. + !! in-line shedding force at the phase vil_phi_eval, and the higher-harmonic force of + !! Ulveseter et al. (2019), the lift's form at the phase sum viv_phi_eval + vil_phi_eval. TYPE(CD_HermiteCableDynType), INTENT(IN) :: model REAL(wp), INTENT(IN) :: q_cfg(:), v_cfg(:) INTEGER, INTENT(IN) :: e @@ -1532,6 +1563,10 @@ SUBROUTINE viv_element_lift(model, q_cfg, v_cfg, e, flift, ErrStat, ErrMsg, djq, il = .FALSE. IF (model%has_viv_il) il = model%vil_k(e) > CD_ZERO IF (il) THEN + IF (model%vhh_k(e) > CD_ZERO) THEN + kn = kn + model%vhh_k(e)*[COS(model%viv_phi_eval(e) + model%vil_phi_eval(e)), & + COS(model%viv_phi_eval(e + 1) + model%vil_phi_eval(e + 1))] + END IF knx = model%vil_k(e)*[COS(model%vil_phi_eval(e)), COS(model%vil_phi_eval(e + 1))] IF (PRESENT(djq)) THEN CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, model%l0(e), uu, wl, kn, flift, djq, djv, ErrStat, ErrMsg, & diff --git a/src/CableDyn_Model.f90 b/src/CableDyn_Model.f90 index 90fde800..c90536de 100644 --- a/src/CableDyn_Model.f90 +++ b/src/CableDyn_Model.f90 @@ -420,6 +420,8 @@ MODULE CableDyn_Model ! cross-flow node next to a vil_cx > 0 element. LOGICAL :: has_viv_il = .FALSE. REAL(wp), ALLOCATABLE :: vil_cx(:), vil_alpha(:) + ! the higher-harmonic coefficient C_hh per element (Ulveseter et al. 2019), with in-line VIV + REAL(wp), ALLOCATABLE :: vhh_cx(:) LOGICAL, ALLOCATABLE :: vil_node(:) REAL(wp), ALLOCATABLE :: vil_phi(:), vil_ms(:, :), vil_phi_rollback(:), vil_ms_rollback(:, :) REAL(wp), ALLOCATABLE :: recovery_vil_phi(:), recovery_vil_ms(:, :) @@ -3926,7 +3928,7 @@ SUBROUTINE CD_Set_Model_Syrope_State(model, slow, tmax, ErrStat, ErrMsg) END SUBROUTINE CD_Set_Model_Syrope_State SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, ErrMsg, phase_seed, & - tangent_reversed, clx, il_alpha) + tangent_reversed, clx, il_alpha, chh) !! Install the cross-flow VIV model (CableDyn_VIV) on an initialised line. Per element: !! the lift coefficient cl (0 = no lift on that element), hydrodynamic diameter, and the !! synchronisation centre cf and half-range df of the non-dimensional shedding frequency; @@ -3945,7 +3947,9 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, !! In-line VIV (Ulveseter et al. 2018; both or neither): clx, per element, the in-line shedding !! coefficient (0: none; > 0 only where cl > 0, the in-line phase running at twice the !! cross-flow one) and il_alpha its band (0 <= alpha < 1); the in-line phase of a node starts at - !! twice its cross-flow phase. + !! twice its cross-flow phase. chh (optional, with clx), per element, the coefficient C_hh >= 0 + !! of the higher-harmonic force of Ulveseter et al. (2019), the lift's form at the phase sum + !! phi_y + phi_x (0: none; > 0 only where clx > 0). TYPE(CD_ModelType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: rho, cl(:), diameter(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -3955,7 +3959,7 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, !! MoorDyn's, so a node at rest takes the cross-flow phase pi (CD_VIV_Phase_Rate phi_rest); !! .FALSE. on a line the reader turned around, whose tangent runs as MoorDyn's LOGICAL, INTENT(IN), OPTIONAL :: tangent_reversed - REAL(wp), INTENT(IN), OPTIONAL :: clx(:), il_alpha(:) + REAL(wp), INTENT(IN), OPTIONAL :: clx(:), il_alpha(:), chh(:) INTEGER :: n_nodes, n_elem, e, nd, istat, k REAL(wp) :: wsum LOGICAL :: want_il @@ -4017,6 +4021,21 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, END IF want_il = ANY(clx > CD_ZERO) END IF + IF (PRESENT(chh)) THEN + IF (.NOT. PRESENT(clx)) THEN + CALL fail(ErrStat, ErrMsg, 'the higher-harmonic VIV chh needs the in-line clx') + RETURN + END IF + IF (SIZE(chh) /= n_elem .OR. .NOT. CD_All_Finite(chh)) THEN + CALL fail(ErrStat, ErrMsg, 'the higher-harmonic VIV chh must be finite with shape (n_elem)') + RETURN + END IF + IF (ANY(chh < CD_ZERO) .OR. ANY(chh > CD_ZERO .AND. .NOT. (clx > CD_ZERO))) THEN + CALL fail(ErrStat, ErrMsg, 'the higher-harmonic VIV needs chh >= 0, and chh > 0 only where clx > 0 '// & + '(it runs at the cross-flow plus in-line phase)') + RETURN + END IF + END IF CALL clear_viv(model) IF (.NOT. ANY(cl > CD_ZERO)) RETURN IF (.NOT. (CD_Is_Finite(rho) .AND. rho > CD_ZERO)) THEN @@ -4098,13 +4117,16 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, ALLOCATE (model%vil_cx(n_elem), model%vil_alpha(n_nodes), model%vil_node(n_nodes), model%vil_phi(n_nodes), & model%vil_ms(2, n_nodes), model%vil_phi_rollback(n_nodes), model%vil_ms_rollback(2, n_nodes), & model%recovery_vil_phi(n_nodes), model%recovery_vil_ms(2, n_nodes), model%vil_phi_eval(n_nodes), & - model%vil_rate(n_nodes), model%vil_ms_next(2, n_nodes), model%vil_phi_next(n_nodes), STAT=istat) + model%vil_rate(n_nodes), model%vil_ms_next(2, n_nodes), model%vil_phi_next(n_nodes), & + model%vhh_cx(n_elem), STAT=istat) IF (istat /= 0) THEN CALL clear_viv(model) CALL alloc_fail(ErrStat, ErrMsg, 'in-line VIV storage allocation failed') RETURN END IF model%vil_cx = MERGE(clx, CD_ZERO, clx > CD_ZERO) + model%vhh_cx = CD_ZERO + IF (PRESENT(chh)) model%vhh_cx = MERGE(chh, CD_ZERO, chh > CD_ZERO) model%vil_alpha = CD_ZERO model%vil_node = .FALSE. model%vil_phi = CD_ZERO @@ -4387,13 +4409,13 @@ SUBROUTINE viv_node_load(model, q, v, nd, in_step, force, ok, jac_v, jac_prev, j REAL(wp), INTENT(OUT) :: force(3) LOGICAL, INTENT(OUT) :: ok REAL(wp), INTENT(OUT), OPTIONAL :: jac_v(3, 3), jac_prev(3, 3), jac_next(3, 3) - REAL(wp) :: coef, coefx, uu(3), phi, fx(3), jv(3, 3), jp(3, 3), jn(3, 3) + REAL(wp) :: coef, coefx, coefh, uu(3), phi, fx(3), jv(3, 3), jp(3, 3), jn(3, 3) INTEGER :: ia LOGICAL :: il il = .FALSE. IF (model%has_viv_il) il = model%vil_node(nd) IF (il) THEN - CALL viv_node_coef(model, q, nd, coef, uu, coefx) + CALL viv_node_coef(model, q, nd, coef, uu, coefx, coefh) ELSE CALL viv_node_coef(model, q, nd, coef, uu) END IF @@ -4418,6 +4440,22 @@ SUBROUTINE viv_node_load(model, q, v, nd, in_step, force, ok, jac_v, jac_prev, j CALL CD_VIV_Node_Inline(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coefx, phi, fx, ok) END IF force = force + fx + IF (.NOT. (ok .AND. coefh > CD_ZERO)) RETURN + ! the higher-harmonic force: the lift's form at the phase sum (Ulveseter et al. 2019, Eq. 6) + IF (in_step) THEN + phi = model%viv_phi_eval(nd) + model%vil_phi_eval(nd) + ELSE + phi = model%viv_phi(nd) + model%vil_phi(nd) + END IF + IF (PRESENT(jac_v)) THEN + CALL CD_VIV_Node_Lift(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coefh, phi, fx, ok, jv, jp, jn) + jac_v = jac_v + jv + jac_prev = jac_prev + jp + jac_next = jac_next + jn + ELSE + CALL CD_VIV_Node_Lift(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coefh, phi, fx, ok) + END IF + force = force + fx END SUBROUTINE viv_node_load PURE LOGICAL FUNCTION CD_Model_Has_VIV(model) RESULT(has) @@ -4426,20 +4464,22 @@ PURE LOGICAL FUNCTION CD_Model_Has_VIV(model) RESULT(has) has = model%has_viv END FUNCTION CD_Model_Has_VIV - SUBROUTINE viv_node_coef(model, q, nd, coef, uu, coefx) + SUBROUTINE viv_node_coef(model, q, nd, coef, uu, coefx, coefh) !! Lift scale of interior node nd at positions q, sum over its two elements of !! (1/2 l0_e w_e)(1/2 rho D_e Cl_e) with w_e the wetted fraction under the drag waterline !! (as MoorDyn's 1/4 rho d Cl (F_i l_i + F_i+1 l_i+1)), and the ambient fluid velocity there; - !! coefx (optional, in-line VIV) the same sum with the in-line coefficient C_x. + !! coefx (optional, in-line VIV) the same sum with the in-line coefficient C_x, and coefh + !! (optional, with coefx) with the higher-harmonic coefficient C_hh. TYPE(CD_ModelType), INTENT(IN) :: model REAL(wp), INTENT(IN) :: q(:) INTEGER, INTENT(IN) :: nd REAL(wp), INTENT(OUT) :: coef, uu(3) - REAL(wp), INTENT(OUT), OPTIONAL :: coefx + REAL(wp), INTENT(OUT), OPTIONAL :: coefx, coefh INTEGER :: e REAL(wp) :: wla, wlb, frac coef = CD_ZERO IF (PRESENT(coefx)) coefx = CD_ZERO + IF (PRESENT(coefh)) coefh = CD_ZERO DO e = nd - 1, nd IF (.NOT. (model%viv_cl(e) > CD_ZERO)) CYCLE wla = CD_ZERO @@ -4451,6 +4491,7 @@ SUBROUTINE viv_node_coef(model, q, nd, coef, uu, coefx) CALL CD_Submerged_Fraction(q(3*e) - wla, q(3*e + 3) - wlb, frac) coef = coef + 0.25_wp*model%viv_rho*model%viv_d(e)*model%viv_cl(e)*model%l0(e)*frac IF (PRESENT(coefx)) coefx = coefx + 0.25_wp*model%viv_rho*model%viv_d(e)*model%vil_cx(e)*model%l0(e)*frac + IF (PRESENT(coefh)) coefh = coefh + 0.25_wp*model%viv_rho*model%viv_d(e)*model%vhh_cx(e)*model%l0(e)*frac END DO uu = CD_ZERO IF (ALLOCATED(model%fluid_velocity)) uu = model%fluid_velocity(:, nd) @@ -4598,6 +4639,7 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%viv_ms_next)) DEALLOCATE (model%viv_ms_next) IF (ALLOCATED(model%viv_phi_next)) DEALLOCATE (model%viv_phi_next) IF (ALLOCATED(model%vil_cx)) DEALLOCATE (model%vil_cx) + IF (ALLOCATED(model%vhh_cx)) DEALLOCATE (model%vhh_cx) IF (ALLOCATED(model%vil_alpha)) DEALLOCATE (model%vil_alpha) IF (ALLOCATED(model%vil_node)) DEALLOCATE (model%vil_node) IF (ALLOCATED(model%vil_phi)) DEALLOCATE (model%vil_phi) @@ -7372,6 +7414,8 @@ SUBROUTINE CD_Copy_Model(src, dst, ErrStat, ErrMsg) work%has_viv_il = src%has_viv_il CALL copy_real1(src%vil_cx, work%vil_cx, 'vil_cx', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%vhh_cx, work%vhh_cx, 'vhh_cx', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN CALL copy_real1(src%vil_alpha, work%vil_alpha, 'vil_alpha', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN CALL copy_logical1(src%vil_node, work%vil_node, 'vil_node', ErrStat, ErrMsg) @@ -7554,6 +7598,7 @@ SUBROUTINE commit_model_copy(from, to) CALL MOVE_ALLOC(from%viv_phi_next, to%viv_phi_next) to%has_viv_il = from%has_viv_il CALL MOVE_ALLOC(from%vil_cx, to%vil_cx) + CALL MOVE_ALLOC(from%vhh_cx, to%vhh_cx) CALL MOVE_ALLOC(from%vil_alpha, to%vil_alpha) CALL MOVE_ALLOC(from%vil_node, to%vil_node) CALL MOVE_ALLOC(from%vil_phi, to%vil_phi) diff --git a/tests/test_hermite_load_power.f90 b/tests/test_hermite_load_power.f90 index 1f0305a8..e97efcdd 100644 --- a/tests/test_hermite_load_power.f90 +++ b/tests/test_hermite_load_power.f90 @@ -12,7 +12,8 @@ PROGRAM test_hermite_load_power !! L1 the free decay of the first bending mode with the bending dashpot Bb; !! L2 the free decay of the first axial mode with the axial dashpot BA (its own time step); !! L3 the bending decay in still water with Morison drag and no dashpots; - !! L4 a cable starting straight in a 0.5 m/s current with the cross-flow and in-line VIV loads, + !! L4 a cable starting straight in a 0.5 m/s current with the cross-flow, in-line and + !! higher-harmonic (Chh 1) VIV loads, !! the drag and the bending dashpot; !! each within 0.5 % of the largest work; the damping power is never positive at any node, and !! the VIV and drag powers are zero without those loads. L5 power arrays of the wrong size are @@ -81,7 +82,7 @@ SUBROUTINE balance_case(label, what) INTEGER, INTENT(IN) :: what TYPE(CD_HermiteCableDynType) :: model REAL(wp) :: kk, period, dt, ek, es0, e0, e1, p_prev(3), p_now(3), work(3), res, scale, pm_max - REAL(wp) :: cl(NE), cf(NE), df(NE), clx(NE), alx(NE) + REAL(wp) :: cl(NE), cf(NE), df(NE), clx(NE), alx(NE), chh(NE) INTEGER :: n, k, es, it CHARACTER(512) :: em LOGICAL :: zero_viv, zero_drag, ok @@ -109,8 +110,8 @@ SUBROUTINE balance_case(label, what) CALL require(es == CD_HCDYN_OK, label//': drag: '//TRIM(em)) END IF IF (what == VIV) THEN - cl = 0.8_wp; cf = 0.18_wp; df = 0.08_wp; clx = 0.85_wp; alx = 0.15_wp - CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=alx) + cl = 0.8_wp; cf = 0.18_wp; df = 0.08_wp; clx = 0.85_wp; alx = 0.15_wp; chh = 1.0_wp + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=alx, chh=chh) CALL require(es == CD_HCDYN_OK, label//': VIV: '//TRIM(em)) END IF IF (es /= CD_HCDYN_OK) RETURN diff --git a/tests/test_viv_inline_deck.f90 b/tests/test_viv_inline_deck.f90 index 39162cfc..25e06757 100644 --- a/tests/test_viv_inline_deck.f90 +++ b/tests/test_viv_inline_deck.f90 @@ -12,7 +12,12 @@ PROGRAM test_viv_inline_deck !! and alpha outside [0, 1) are refused by name; !! D4 the same deck as an EI = 0 line (the lumped node force, neighbour-averaged kinematics) !! matches the finite-EI cable: cross-flow and in-line amplitudes within 2 %, the same - !! frequencies within one 0.01 Hz bin. + !! frequencies within one 0.01 Hz bin; + !! D5 a higher-harmonic coefficient Chh 1.0 (Ulveseter et al. 2019, the fourth column) at + !! least triples the quarter-span in-line response at four times the cross-flow frequency + !! (the in-line share of the force at the cross-flow plus in-line phase), on the cable and + !! the EI = 0 line alike (within 5 %); Chh 0 is the row without it, to the printed digits; + !! Chh on a type without in-line VIV and a negative Chh are refused. USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK IMPLICIT NONE @@ -253,16 +258,66 @@ SUBROUTINE check_runs() CALL require(ABS(peak_frequency(tt, z) - fz_f) <= 0.01_wp .AND. ABS(peak_frequency(tt, y) - fy_f) <= 0.01_wp, & 'D4: and its frequencies within 0.01 Hz') END BLOCK + ! D5: the higher-harmonic force + BLOCK + REAL(wp), ALLOCATABLE :: th(:, :), t0h(:, :), te(:, :) + INTEGER :: nh, n0h, neh + REAL(wp) :: f1, a4_il, a4_hh, a4_e + CALL write_deck('vid_hh.dat', 'riser 0.85 0.15 1.0', 100.0_wp) + CALL run('vid_hh.dat', 'vid_hh', ok, msg) + CALL require(ok, 'D5: the Chh deck runs: '//TRIM(msg)) + CALL write_deck('vid_hh0.dat', 'riser 0.85 0.15 0.0', 100.0_wp) + CALL run('vid_hh0.dat', 'vid_hh0', ok, msg) + CALL require(ok, 'D5: the Chh 0 deck runs: '//TRIM(msg)) + CALL write_deck('vid_hhe.dat', 'riser 0.85 0.15 1.0', 100.0_wp, ei='0.0') + CALL run('vid_hhe.dat', 'vid_hhe', ok, msg) + CALL require(ok, 'D5: the EI = 0 Chh deck runs: '//TRIM(msg)) + CALL read_out('vid_hh.out', th, nh) + CALL read_out('vid_hh0.out', t0h, n0h) + CALL read_out('vid_hhe.out', te, neh) + CALL require(nh == ni .AND. n0h == ni .AND. neh == ni, 'D5: the runs wrote the same rows') + IF (.NOT. (nh == ni .AND. n0h == ni .AND. neh == ni)) RETURN + CALL require(ALL(t0h(:, 1:n0h) == ti(:, 1:ni)), 'D5: a VIV row with Chh 0 is the row without it') + CALL window(ti, ni, 50.0_wp, tt, z, y) + f1 = peak_frequency(tt, z) + a4_il = fourier_amplitude(tt, y, 4.0_wp*f1) + CALL window(th, nh, 50.0_wp, tt, z, y) + f1 = peak_frequency(tt, z) + a4_hh = fourier_amplitude(tt, y, 4.0_wp*f1) + CALL window(te, neh, 50.0_wp, tt, z, y) + a4_e = fourier_amplitude(tt, y, 4.0_wp*peak_frequency(tt, z)) + WRITE (*, '(A,3F8.4)') 'D5: quarter-span in-line amplitude/D at 4 f, Chh 0, Chh 1, Chh 1 EI = 0: ', & + a4_il/D, a4_hh/D, a4_e/D + CALL require(a4_hh >= 3.0_wp*a4_il, 'D5: Chh raises the fourth in-line harmonic at least threefold') + CALL require(ABS(a4_e/a4_hh - 1.0_wp) <= 0.05_wp, 'D5: the EI = 0 line takes it within 5 %') + END BLOCK END SUBROUTINE check_runs + REAL(wp) FUNCTION fourier_amplitude(tt, x, f) RESULT(a) + !! The amplitude of x - mean(x) at frequency f (Hann window, so a sine of amplitude A gives A). + REAL(wp), INTENT(IN) :: tt(:), x(:), f + REAL(wp) :: w(SIZE(x)), xm(SIZE(x)), re, im + INTEGER :: i, n + n = SIZE(x) + DO i = 1, n + w(i) = 0.5_wp - 0.5_wp*COS(2.0_wp*PI*REAL(i - 1, wp)/REAL(n - 1, wp)) + END DO + xm = x - SUM(x)/REAL(n, wp) + re = SUM(w*xm*COS(2.0_wp*PI*f*tt)) + im = SUM(w*xm*SIN(2.0_wp*PI*f*tt)) + a = 2.0_wp*SQRT(re*re + im*im)/SUM(w) + END FUNCTION fourier_amplitude + SUBROUTINE check_refusals() - CALL refused('riser 0.85 0.15 7', 'TypeName ClX [alpha]', 'a row of four columns') + CALL refused('riser 0.85 0.15 7 1', 'TypeName ClX [alpha [Chh]]', 'a row of five columns') CALL refused('cable 0.85', 'undefined LINE TYPE', 'an unknown type') CALL refused('riser 0.85;riser 0.5', 'twice', 'a repeated type') CALL refused('riser -0.1', 'non-negative', 'a negative ClX') CALL refused('riser 0.85 1.0', '0 <= alpha < 1', 'alpha = 1') CALL refused('riser 0.85 x', 'plain numbers', 'a non-numeric alpha') CALL refused('riser 0.85', 'cross-flow lift', 'ClX on a type without the cross-flow lift', cl='0.0') + CALL refused('riser 0.0 0.15 1.0', 'needs its in-line VIV', 'Chh without in-line VIV') + CALL refused('riser 0.85 0.15 -1.0', 'Chh must be non-negative', 'a negative Chh') END SUBROUTINE check_refusals SUBROUTINE refused(rows, needle, what, ei, cl) From df0324fe2cfd0f3e4e6583a78d5232946b45a96f Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Thu, 12 Nov 2026 21:20:29 +0900 Subject: [PATCH 09/47] feat: VIV columns after the 14-column finite-EI LINE TYPES row (#152) A line restrained in torsion takes GJ and Irn from the 14-column LINE TYPES row (GAs GJ Irt Irn), and that row could not carry MoorDyn's cross-flow VIV columns: a torsion-restrained power cable had no way to get VIV. The row now takes Cl, or Cl dF cF, after its fourteen columns (15 or 17 columns), with MoorDyn's dF = 0.08 and cF = 0.18 where only Cl is given and the checks of the 11- and 13-column rows. The VIV wiring does not depend on the row width or on the nodal twist, so nothing else changes. The Python deck reader takes the widths, reads Cl dF cF after the fourteenth column and names them cl, df, cf in the field paths; the builder writes them after the wide row instead of refusing the combination. Checks (tests/test_viv_inline_deck.f90, D6): a 17-column row free in torsion is the 13-column deck to the printed digits; a 15-column row is the 17-column one with 0.08 and 0.18; on the line rigid in torsion at both ends (nodal twist solved) the lift locks the cable in at A/D 0.66 and 0.292 Hz, the amplitude and frequency of the line free in torsion, as it must be with no torque-tension coupling. Python: read, kept and refused like the native reader (test_deck_file.py), builder round trip (test_builder.py). Full ctest under both BLAS kernels, pytest, ruff, mypy, Sphinx -W, pre-commit. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 3 ++ doc/cli.rst | 4 +- doc/driver_format.md | 7 +-- python/cabledyn/builder.py | 11 +++-- python/cabledyn/deck_file.py | 41 +++++++++------- python/tests/test_builder.py | 18 +++++-- python/tests/test_deck_file.py | 46 +++++++++++++++++- src/CableDyn_DeckDriver.f90 | 30 ++++++++---- tests/test_viv_inline_deck.f90 | 87 ++++++++++++++++++++++++++++++---- 9 files changed, 197 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a729c122..4a24cd28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,9 @@ All notable changes to CableDyn are recorded in this file. The format follows and in-line phases, on `EI = 0` lines and finite-EI cables. On the in-line example `Chh` 1.0 raises the quarter-span in-line response at four times the cross-flow frequency fourfold. The Python deck reader and builder take the column. +- The cross-flow VIV columns `Cl [dF cF]` may follow the 14-column finite-EI `LINE TYPES` row + (15 or 17 columns), so a line restrained in torsion can carry VIV; such a row free in torsion + runs as the 13-column one. The Python deck reader and builder take it. - Load power channels `VIVPow`, `DragPow` and `DampPow` [W], and `N` per unit length about a node [W/m]: the power the VIV loads, the drag and the structural damping (`BA`, `Bb`) deliver to a line at the committed state, on `EI = 0` lines and finite-EI cables, diff --git a/doc/cli.rst b/doc/cli.rst index 9abd9670..675af904 100644 --- a/doc/cli.rst +++ b/doc/cli.rst @@ -1016,8 +1016,8 @@ native reader's rules. - ``LINE TYPES`` row ``NAME``; fields ``name``, ``diam``, ``mass``, ``ea``, ``ba``, ``ei`` followed by ``cdn``, ``cdt``, ``can``, ``cat`` (CableDyn columns), ``cd``, ``ca``, ``cdax``, ``caax`` (MoorDyn-style columns), or ``gas``, ``gj``, ``irt``, - ``irn``, ``cdn``, ``cdt``, ``can``, ``cat`` (14-column rows); an 11- or 13-column row - adds ``cl`` or ``cl``, ``df``, ``cf`` (VIV). + ``irn``, ``cdn``, ``cdt``, ``can``, ``cat`` (14-column rows); an 11- or 13-column row, or + a 15- or 17-column one, adds ``cl`` or ``cl``, ``df``, ``cf`` (VIV). * - ``section.LINE.OCCURRENCE.FIELD`` - The ``OCCURRENCE``-th section (1-based, End A to End B) of line ``LINE``; fields ``lineid``, ``linetype``, ``length``, ``numsegs``. A 7-column ``LINES`` row counts as a diff --git a/doc/driver_format.md b/doc/driver_format.md index ee2cb911..956f7b9b 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -291,12 +291,13 @@ frequency `f` [Hz], `Bb = ζ EI/(π f)`, set once per line type (it does not dep rates). **Cross-flow VIV columns (MoorDyn v2).** A 10-column row may end with `Cl` (11 columns) or -`Cl dF cF` (13 columns): the lift coefficient of the vortex-shedding synchronisation model and +`Cl dF cF` (13 columns), and a 14-column row likewise (15 or 17 columns, so a line restrained in +torsion can carry VIV): the lift coefficient of the vortex-shedding synchronisation model and the half-range and centre of its band in non-dimensional frequency (MoorDyn's `dF = 0.08` and `cF = 0.18` when only `Cl` is given). `Cl = 0` is no VIV; `Cl > 0` needs `cF > 0` and `0 <= dF < cF`, and the line's drag in water. It acts in the dynamics on `EI = 0` lines and -finite-EI cables (see [Cross-flow VIV](theory.rst)); the 14-column row has no VIV columns. The -in-line force of a type is a [VIV](#viv-optional) section row. +finite-EI cables (see [Cross-flow VIV](theory.rst)). The in-line force of a type is a +[VIV](#viv-optional) section row. **Viscoelastic axial stiffness (MoorDyn `ElasticMod`).** The EA and BA columns accept bar-separated parts: diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 7612a0a3..32d9aabb 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -206,8 +206,9 @@ class LineType: cl, df, cf : float | None Optional cross-flow VIV columns of a type (MoorDyn's lift coefficient and the half-range and centre of the synchronisation band - in non-dimensional frequency). ``cl`` set writes the 13-column row, with - MoorDyn's ``df = 0.08`` and ``cf = 0.18`` where they are ``None``. + in non-dimensional frequency). ``cl`` set writes them after the ten or + fourteen columns (the 13- or 17-column row), with MoorDyn's + ``df = 0.08`` and ``cf = 0.18`` where they are ``None``. clx, il_alpha : float | None Optional in-line VIV of a type, a ``VIV`` section row ``Name ClX [alpha]``: the in-line shedding coefficient (it needs ``cl``, @@ -2717,9 +2718,6 @@ def _line_type_table(self) -> tuple[str, str, list[list[str]]]: raise ValueError(f"{what}: give all of gas, gj, irt, irn or none") row += [_num(v, what) for v in (item.cdn, item.cdt, item.can, item.cat)] if item.cl is not None: - if all(value is not None for value in extra): - # a LINE TYPES row has 10, 11, 13 or 14 columns: no VIV on the wide row - raise ValueError(f"{what}: cl, df and cf do not combine with gas, gj, irt, irn") viv = True df = 0.08 if item.df is None else item.df cf = 0.18 if item.cf is None else item.cf @@ -2730,6 +2728,9 @@ def _line_type_table(self) -> tuple[str, str, list[list[str]]]: if wide: header = "Name Diam Mass EA BA EI GAs GJ Irt Irn Cd_n Cd_t Ca_n Ca_t" units = "(-) (m) (kg/m) (N) (N-s) (N-m^2) (N) (N-m^2) (kg-m) (kg-m) (-) (-) (-) (-)" + if viv: + header += " Cl dF cF" + units += " (-) (-) (-)" elif viv: header = "Name Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t Cl dF cF" units = "(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) (-) (-) (-)" diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index c2dc68f2..13f62393 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -3780,7 +3780,11 @@ def effective(key: str, default: float) -> float: raise DeckFormatError( f"{self._label}: standalone OPTION frictionMu requires dtM and TMax" ) - allowed_widths = {"LINE TYPES": {10, 11, 13, 14}, "POINTS": {5, 9}, "LINES": {3, 4, 7}} + allowed_widths = { + "LINE TYPES": {10, 11, 13, 14, 15, 17}, + "POINTS": {5, 9}, + "LINES": {3, 4, 7}, + } # Every row present is checked, also in a line-free deck of bodies and rods: the # native reader parses each table row whether or not a line uses it. for name in sorted(allowed_widths): @@ -3808,7 +3812,7 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: viv_type_names: set[str] = set() for row in self.line_types: for index in (1, 2, *range(5, len(row.tokens))): - if len(row.tokens) == 14 and index == 7: + if len(row.tokens) >= 14 and index == 7: continue # the GJ column, GJ, GJ|K or GJ|K|Bt, is read below if index == 5: continue # the EI column, EI, EI|Bb or EI|-zeta|f, is read below @@ -3861,9 +3865,9 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: f"{self._at(row)}: Syrope BA_s and BA_d must be non-negative " "with a positive sum" ) - # Native append_type: drag and added-mass coefficients (columns 7-10, the last - # four of a 14-column row, in either column order) must be non-negative. - hydro_start = len(row.tokens) - 4 if len(row.tokens) == 14 else 6 + # Native append_type: drag and added-mass coefficients (columns 7-10, or 11-14 of + # a 14-column row, in either column order) must be non-negative. + hydro_start = 10 if len(row.tokens) >= 14 else 6 hydro = [ numeric(row.tokens[index], row, f"LINE TYPES column {index + 1}") for index in range(hydro_start, hydro_start + 4) @@ -3910,12 +3914,14 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: f"{self._at(row)}: LINE TYPES {row.tokens[0]}: bending damping (EI|Bb) needs " "a finite-EI cable (EI > 0)" ) - if len(row.tokens) in (11, 13): - # Native check_viv_columns: MoorDyn's cross-flow VIV columns Cl [dF cF] - cl = numeric(row.tokens[10], row, "Cl") + if len(row.tokens) in (11, 13, 15, 17): + # Native check_viv_columns: MoorDyn's cross-flow VIV columns Cl [dF cF], after + # the ten standard columns or the fourteen of a finite-EI row + at = 10 if len(row.tokens) in (11, 13) else 14 + cl = numeric(row.tokens[at], row, "Cl") d_f, c_f = ( - (numeric(row.tokens[11], row, "dF"), numeric(row.tokens[12], row, "cF")) - if len(row.tokens) == 13 + (numeric(row.tokens[at + 1], row, "dF"), numeric(row.tokens[at + 2], row, "cF")) + if len(row.tokens) in (13, 17) else (0.08, 0.18) ) if cl < 0.0: @@ -3934,7 +3940,7 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: model = "Syrope" if is_syrope else "viscoelastic stiffness" raise DeckFormatError(f"{self._at(row)}: {model} is not supported with EI > 0") gj_value = 0.0 - if len(row.tokens) == 14: + if len(row.tokens) >= 14: # the GJ column is GJ, GJ|K or GJ|K|Bt (K the torque-tension coupling, N m; # Bt the torsional damping, N m^2 s, negative: -zeta) gj_parts = row.tokens[7].split("|") @@ -4091,7 +4097,7 @@ def unique(records: tuple[DeckRecord, ...], label: str, numeric: bool) -> set[st type_names = unique(self.line_types, "line type", False) if any( - len(row.tokens) == 14 and self._stock_line_type_columns(row) for row in self.line_types + len(row.tokens) >= 14 and self._stock_line_type_columns(row) for row in self.line_types ): raise DeckFormatError( f"{self._label}: 14-column LINE TYPES rows require CableDyn hydro-column order" @@ -6185,10 +6191,13 @@ def _check_torsion_lines( def _line_type_fields(self, record: DeckRecord) -> tuple[str, ...]: fields = _FIELDS["line_type"] - if len(record.tokens) == 14: - return (*fields[:6], "gas", "gj", "irt", "irn", "cdn", "cdt", "can", "cat") - # MoorDyn's optional cross-flow VIV columns follow the ten standard ones - viv = {11: ("cl",), 13: ("cl", "df", "cf")}.get(len(record.tokens), ()) + # MoorDyn's optional cross-flow VIV columns follow the ten standard ones, or the + # fourteen of a finite-EI row + viv = {11: ("cl",), 13: ("cl", "df", "cf"), 15: ("cl",), 17: ("cl", "df", "cf")}.get( + len(record.tokens), () + ) + if len(record.tokens) >= 14: + return (*fields[:6], "gas", "gj", "irt", "irn", "cdn", "cdt", "can", "cat", *viv) if self._stock_line_type_columns(record): return (*fields[:6], "cd", "ca", "cdax", "caax", *viv) return (*fields, *viv) diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index 7d0e8518..8569fdf8 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -185,7 +185,7 @@ def test_build_single_catenary_validates_and_saves(tmp_path: Path) -> None: assert model.save(target, overwrite=True) == target -def test_viv_columns_do_not_combine_with_the_wide_finite_ei_row(tmp_path: Path) -> None: +def test_viv_columns_follow_the_wide_finite_ei_row(tmp_path: Path) -> None: model = _chain_model(tmp_path) model.add_line_type( "cable", @@ -197,10 +197,20 @@ def test_viv_columns_do_not_combine_with_the_wide_finite_ei_row(tmp_path: Path) gj=1.0e3, irt=0.1, irn=0.05, - cl=0.0, + cl=0.8, + cf=0.17, ) - with pytest.raises(ValueError, match="do not combine with gas, gj, irt, irn"): - model.to_text(validate=False) + text = model.to_text() + deck = DeckFile.from_text(text, path=tmp_path / "deck.dat") + rows = {row.tokens[0].upper(): row.tokens for row in deck.line_types} + # the 14 finite-EI columns, then Cl dF cF (MoorDyn's dF = 0.08 where df is None) + assert len(rows["CABLE"]) == 17 + assert [float(value) for value in rows["CABLE"][14:]] == [0.8, 0.08, 0.17] + assert len(rows["CHAIN"]) == 10 + loaded = DeckModel.from_text(text, path=tmp_path / "deck.dat") + cable = loaded.line_types["CABLE"] + assert (cable.gj, cable.irn, cable.cl, cable.df, cable.cf) == (1.0e3, 0.05, 0.8, 0.08, 0.17) + assert loaded.to_text() == text def test_build_spread_mooring_with_multi_section_lines() -> None: diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index 6b69c46c..c304a81d 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -4614,7 +4614,7 @@ def test_line_free_object_deck_checks_line_type_rows_without_crashing(): ("1 2 1 -\n", ""), ("1 chain 410.0 41\n", ""), ) - with pytest.raises(DeckFormatError, match="LINE TYPES row needs 10, 11, 13, 14 fields"): + with pytest.raises(DeckFormatError, match="LINE TYPES row needs 10, 11, 13, 14, 15, 17 fields"): DeckFile.from_text(_with_section(no_lines, "BODIES", *body_rows)) # a header-only LINES section does not make the deck a line deck (the rule counts rows) with pytest.raises(DeckFormatError) as caught: @@ -4791,7 +4791,7 @@ def test_line_type_viv_columns_are_read_and_kept(tmp_path, columns, expected): (" -0.1", "Cl must be non-negative"), (" 0.8 0.2 0.18", "needs cF > 0 and 0 <= dF < cF"), (" 0.8 0.05 0.0", "needs cF > 0 and 0 <= dF < cF"), - (" 0.8 0.08", "LINE TYPES row needs 10, 11, 13, 14 fields"), + (" 0.8 0.08", "LINE TYPES row needs 10, 11, 13, 14, 15, 17 fields"), ], ) def test_line_type_viv_columns_follow_the_native_checks(columns, message): @@ -4811,6 +4811,48 @@ def test_line_type_viv_is_accepted_on_a_finite_ei_line_type(tmp_path): assert (line_type.ei, line_type.cl) == (1.0e4, 0.8) +# the 14-column finite-EI row (GAs GJ Irt Irn) takes the same VIV columns after its last +_WIDE_VIV_ROW = ( + "chain 0.252 390.0 1.674e9 -1.0 1.0e4 1.0e8 1.0e3|0|-0.01 0.1 0.05 1.37 0.64 1.0 0.0" +) + + +@pytest.mark.parametrize( + "columns, expected", + [ + (" 0.8", (0.8, None, None)), + (" 0.8 0.05 0.2", (0.8, 0.05, 0.2)), + ], +) +def test_line_type_viv_columns_follow_the_finite_ei_row(tmp_path, columns, expected): + from cabledyn import DeckModel + + row = "chain 0.252 390.0 1.674e9 -1.0 1.0e4 1.37 0.64 1.0 0.0" + text = _edit(_DYNAMIC, (row, _WIDE_VIV_ROW + columns)) + record = DeckFile.from_text(text).line_types[0] + assert len(record.tokens) == 14 + len(columns.split()) + path = tmp_path / "viv_wide.dat" + path.write_text(text, encoding="utf-8") + line_type = DeckModel.load(path).line_types["chain"] + assert (line_type.gj, line_type.irn) == ((1.0e3, 0.0, -0.01), 0.05) + assert (line_type.cl, line_type.df, line_type.cf) == expected + assert (line_type.cdn, line_type.cdt, line_type.can, line_type.cat) == (1.37, 0.64, 1.0, 0.0) + + +@pytest.mark.parametrize( + "columns, message", + [ + (" -0.1", "Cl must be non-negative"), + (" 0.8 0.2 0.18", "needs cF > 0 and 0 <= dF < cF"), + (" 0.8 0.08", "LINE TYPES row needs 10, 11, 13, 14, 15, 17 fields"), + ], +) +def test_finite_ei_row_viv_columns_follow_the_native_checks(columns, message): + row = "chain 0.252 390.0 1.674e9 -1.0 1.0e4 1.37 0.64 1.0 0.0" + with pytest.raises(DeckFormatError, match=re.escape(message)): + DeckFile.from_text(_edit(_DYNAMIC, (row, _WIDE_VIV_ROW + columns))) + + def test_viv_is_accepted_on_the_coupled_route(): text = _edit(_STATIC, (_VIV_ROW, _VIV_ROW + " 0.8")) DeckFile.from_text(text) diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index c5fa434a..7dbb3813 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -15833,11 +15833,11 @@ SUBROUTINE append_type(line, types, nt, stock_cols, ErrStat, ErrMsg) INTEGER :: ios, ntok ErrStat = 0; ErrMsg = '' ntok = count_tokens(line) - IF (ntok /= 10 .AND. ntok /= 11 .AND. ntok /= 13 .AND. ntok /= 14) THEN + IF (ntok /= 10 .AND. ntok /= 11 .AND. ntok /= 13 .AND. ntok /= 14 .AND. ntok /= 15 .AND. ntok /= 17) THEN CALL fail(ErrStat, ErrMsg, 'LINE TYPES row needs 10 cols '// & - '(Name Diam MassDenInAir EA BA/-zeta EI Cd_n Cd_t Ca_n Ca_t), 11 or 13 cols (the same '// & - 'followed by MoorDyn''s VIV columns Cl [dF cF]) or 14 cols '// & - '(Name Diam MassDenInAir EA BA/-zeta EI GAs GJ Irt Irn Cd_n Cd_t Ca_n Ca_t)'); RETURN + '(Name Diam MassDenInAir EA BA/-zeta EI Cd_n Cd_t Ca_n Ca_t) or 14 cols '// & + '(Name Diam MassDenInAir EA BA/-zeta EI GAs GJ Irt Irn Cd_n Cd_t Ca_n Ca_t), either '// & + 'followed by MoorDyn''s VIV columns Cl [dF cF] (11, 13, 15 or 17 cols)'); RETURN END IF ! EA and BA read as STRINGS: MoorDyn's viscoelastic syntax carries ! bar-separated parts (Es|Ed[|alpha], Bs|Bd) that a numeric read cannot see. @@ -15868,18 +15868,28 @@ SUBROUTINE append_type(line, types, nt, stock_cols, ErrStat, ErrMsg) END IF ELSE IF (stock_cols) THEN - CALL fail(ErrStat, ErrMsg, 'the 14-column LINE TYPES row is a CableDyn form (... Cd_n Cd_t '// & - 'Ca_n Ca_t); it does not combine with a stock-order header (Cd Ca CdAx CaAx)'); RETURN + CALL fail(ErrStat, ErrMsg, 'the 14-column LINE TYPES row (15 or 17 with VIV) is a CableDyn form '// & + '(... Cd_n Cd_t Ca_n Ca_t); it does not combine with a stock-order header (Cd Ca CdAx CaAx)') + RETURN + END IF + ! the CableDyn finite-EI row, with MoorDyn's VIV columns Cl or Cl dF cF after it + IF (ntok == 14) THEN + READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%gas, gj_str, t%i_rt, t%i_rn, & + t%cdn, t%cdt, t%can, t%cat + ELSE IF (ntok == 15) THEN + READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%gas, gj_str, t%i_rt, t%i_rn, & + t%cdn, t%cdt, t%can, t%cat, t%cl + ELSE + READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%gas, gj_str, t%i_rt, t%i_rn, & + t%cdn, t%cdt, t%can, t%cat, t%cl, t%viv_df, t%viv_cf END IF - READ (line, *, IOSTAT=ios) t%name, t%diam, t%mass, ea_str, ba_str, ei_str, t%gas, gj_str, t%i_rt, t%i_rn, & - t%cdn, t%cdt, t%can, t%cat END IF IF (ios /= 0) THEN CALL fail(ErrStat, ErrMsg, 'malformed LINE TYPES row'); RETURN END IF CALL parse_ei_column(ei_str, t, ErrStat, ErrMsg) IF (ErrStat /= 0) RETURN - IF (ntok == 14) THEN + IF (ntok >= 14) THEN CALL parse_gj_column(gj_str, t, ErrStat, ErrMsg) IF (ErrStat /= 0) RETURN END IF @@ -15891,7 +15901,7 @@ SUBROUTINE append_type(line, types, nt, stock_cols, ErrStat, ErrMsg) END IF CALL parse_stiffness_columns(ea_str, ba_str, t, ErrStat, ErrMsg) IF (ErrStat /= 0) RETURN - IF (ntok == 11 .OR. ntok == 13) THEN + IF (ntok == 11 .OR. ntok == 13 .OR. ntok == 15 .OR. ntok == 17) THEN CALL check_viv_columns(t, ErrStat, ErrMsg) IF (ErrStat /= 0) RETURN END IF diff --git a/tests/test_viv_inline_deck.f90 b/tests/test_viv_inline_deck.f90 index 25e06757..fe433751 100644 --- a/tests/test_viv_inline_deck.f90 +++ b/tests/test_viv_inline_deck.f90 @@ -17,7 +17,12 @@ PROGRAM test_viv_inline_deck !! least triples the quarter-span in-line response at four times the cross-flow frequency !! (the in-line share of the force at the cross-flow plus in-line phase), on the cable and !! the EI = 0 line alike (within 5 %); Chh 0 is the row without it, to the printed digits; - !! Chh on a type without in-line VIV and a negative Chh are refused. + !! Chh on a type without in-line VIV and a negative Chh are refused; + !! D6 the cross-flow columns after the 14-column finite-EI row (GAs GJ Irt Irn): a 17-column row + !! free in torsion is the 13-column deck, to the printed digits; a 15-column row (Cl alone) is + !! the 17-column one with MoorDyn's dF 0.08 and cF 0.18; and on the line restrained in + !! torsion at both ends (nodal twist) the lift still locks the cable in, with the cross-flow + !! amplitude and frequency of the line free in torsion. USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK IMPLICIT NONE @@ -70,11 +75,14 @@ SUBROUTINE write_current(path) CLOSE (u) END SUBROUTINE write_current - SUBROUTINE write_deck(path, viv_rows, tmax, ei, cl) - !! viv_rows: the VIV section's data rows, ';'-separated ('' for no section). + SUBROUTINE write_deck(path, viv_rows, tmax, ei, cl, wide, ends) + !! viv_rows: the VIV section's data rows, ';'-separated ('' for no section). wide: the VIV + !! columns written after the 14-column finite-EI row (GAs GJ Irt Irn in the CableDyn hydro + !! order) instead of the 10 stock-order ones; ends: restrain both ends in torsion. CHARACTER(*), INTENT(IN) :: path, viv_rows REAL(wp), INTENT(IN) :: tmax - CHARACTER(*), INTENT(IN), OPTIONAL :: ei, cl + CHARACTER(*), INTENT(IN), OPTIONAL :: ei, cl, wide + LOGICAL, INTENT(IN), OPTIONAL :: ends CHARACTER(32) :: ei_col, cl_col INTEGER :: u, i0, i1 ei_col = '1.0' @@ -85,10 +93,17 @@ SUBROUTINE write_deck(path, viv_rows, tmax, ei, cl) WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' WRITE (u, '(A)') 'in-line VIV deck gate: taut cable in a uniform current' WRITE (u, '(A)') '----------------------- LINE TYPES ------------------------------------------' - WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' - WRITE (u, '(A)') '(name) (m) (kg/m) (N) (N-s/-) (-) (-) (-) (-) (-) (-) (-) (-)' - WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//TRIM(ei_col)//' 1.2 1.0 0.0 0.0 '// & - TRIM(cl_col)//' 0.08 0.18' + IF (PRESENT(wide)) THEN + ! GJ = EI/1.3, Irn = m D^2/8, Irt = m D^2/16, GAs = EA/2.6: the circular-section closure + WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI GAs GJ Irt Irn Cd_n Cd_t Ca_n Ca_t Cl [dF cF]' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//TRIM(ei_col)//' 1.9230769e7 0.76923077 0.00625 0.0125 '// & + '1.2 0.0 1.0 0.0 '//wide + ELSE + WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' + WRITE (u, '(A)') '(name) (m) (kg/m) (N) (N-s/-) (-) (-) (-) (-) (-) (-) (-) (-)' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//TRIM(ei_col)//' 1.2 1.0 0.0 0.0 '// & + TRIM(cl_col)//' 0.08 0.18' + END IF WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' WRITE (u, '(A)') '(#) (-) (m) (m) (m) (kg) (m^3) (m^2) (-)' @@ -98,6 +113,15 @@ SUBROUTINE write_deck(path, viv_rows, tmax, ei, cl) WRITE (u, '(A)') 'ID LineType AttachA AttachB UnstrLen NumSegs Outputs' WRITE (u, '(A)') '(#) (name) (#) (#) (m) (-) (-)' WRITE (u, '(A)') '1 riser 1 2 99.900100 50 -' + IF (PRESENT(ends)) THEN + IF (ends) THEN + ! pinned in bending, rigid in torsion, the zero-twist normal along z + WRITE (u, '(A)') '----------------------- END CONNECTIONS ---------------------------------------' + WRITE (u, '(A)') 'LineID End Stiffness EzX EzY EzZ TorsStiffness NxX NxY NxZ Pretwist' + WRITE (u, '(A)') '1 A 0 1.0 0.0 0.0 Rigid 0.0 0.0 1.0 0.0' + WRITE (u, '(A)') '1 B 0 1.0 0.0 0.0 Rigid 0.0 0.0 1.0 0.0' + END IF + END IF IF (LEN_TRIM(viv_rows) > 0) THEN WRITE (u, '(A)') '----------------------- VIV -------------------------------------------------' WRITE (u, '(A)') 'TypeName ClX alpha' @@ -291,8 +315,55 @@ SUBROUTINE check_runs() CALL require(a4_hh >= 3.0_wp*a4_il, 'D5: Chh raises the fourth in-line harmonic at least threefold') CALL require(ABS(a4_e/a4_hh - 1.0_wp) <= 0.05_wp, 'D5: the EI = 0 line takes it within 5 %') END BLOCK + CALL check_wide_rows(tc, nc) END SUBROUTINE check_runs + SUBROUTINE check_wide_rows(tc, nc) + !! D6 against the cross-flow-only deck tc (the 13-column row, no VIV section). + REAL(wp), INTENT(IN) :: tc(:, :) + INTEGER, INTENT(IN) :: nc + REAL(wp), ALLOCATABLE :: tw(:, :), t15(:, :), t17(:, :), tr(:, :), tt(:), z(:), y(:) + INTEGER :: nw, n15, n17, nr + REAL(wp) :: az_c, fz_c, az_r, fz_r + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('vid_w13.dat', '', 100.0_wp, wide='0.8 0.08 0.18') + CALL run('vid_w13.dat', 'vid_w13', ok, msg) + CALL require(ok, 'D6: the 17-column deck runs: '//TRIM(msg)) + CALL read_out('vid_w13.out', tw, nw) + CALL require(nw == nc, 'D6: the 17-column run wrote the rows of the 13-column one') + IF (nw /= nc) RETURN + CALL require(ALL(tw(:, 1:nw) == tc(:, 1:nc)), 'D6: a 17-column row free in torsion is the 13-column row') + CALL write_deck('vid_w15.dat', '', 30.0_wp, wide='0.8', ends=.TRUE.) + CALL run('vid_w15.dat', 'vid_w15', ok, msg) + CALL require(ok, 'D6: the 15-column deck restrained in torsion runs: '//TRIM(msg)) + CALL write_deck('vid_w17.dat', '', 30.0_wp, wide='0.8 0.08 0.18', ends=.TRUE.) + CALL run('vid_w17.dat', 'vid_w17', ok, msg) + CALL require(ok, 'D6: the 17-column deck restrained in torsion runs: '//TRIM(msg)) + CALL read_out('vid_w15.out', t15, n15) + CALL read_out('vid_w17.out', t17, n17) + CALL require(n15 > 100 .AND. n15 == n17, 'D6: the 15- and 17-column runs wrote matching rows') + IF (.NOT. (n15 > 100 .AND. n15 == n17)) RETURN + CALL require(ALL(t15(:, 1:n15) == t17(:, 1:n17)), 'D6: a 15-column row takes dF 0.08 and cF 0.18') + CALL write_deck('vid_wr.dat', '', 100.0_wp, wide='0.8 0.08 0.18', ends=.TRUE.) + CALL run('vid_wr.dat', 'vid_wr', ok, msg) + CALL require(ok, 'D6: the VIV deck restrained in torsion runs: '//TRIM(msg)) + CALL read_out('vid_wr.out', tr, nr) + CALL require(nr == nc, 'D6: the run restrained in torsion wrote the same rows') + IF (nr /= nc) RETURN + CALL window(tc, nc, 50.0_wp, tt, z, y) + az_c = 0.5_wp*(MAXVAL(z) - MINVAL(z)) + fz_c = peak_frequency(tt, z) + CALL window(tr, nr, 50.0_wp, tt, z, y) + az_r = 0.5_wp*(MAXVAL(z) - MINVAL(z)) + fz_r = peak_frequency(tt, z) + WRITE (*, '(A,2F8.4,A,2F8.4)') 'D6: mid-span CF amplitude/D and frequency [Hz], restrained in torsion ', & + az_r/D, fz_r, ', free ', az_c/D, fz_c + CALL require(az_r > 0.3_wp*D, 'D6: the lift locks in the cable restrained in torsion') + CALL require(ABS(az_r/az_c - 1.0_wp) <= 0.02_wp .AND. ABS(fz_r - fz_c) <= 0.01_wp, & + 'D6: with the amplitude (2 %) and frequency (0.01 Hz) of the cable free in torsion') + END SUBROUTINE check_wide_rows + REAL(wp) FUNCTION fourier_amplitude(tt, x, f) RESULT(a) !! The amplitude of x - mean(x) at frequency f (Hann window, so a sine of amplitude A gives A). REAL(wp), INTENT(IN) :: tt(:), x(:), f From a2b552d1f5c18a23af658bf0f49cbb1f13903f24 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Thu, 12 Nov 2026 23:14:28 +0900 Subject: [PATCH 10/47] validation: Delta Flume riser natural frequencies (L3-C) (#153) The Delta Flume tests of Chaplin et al. (2005, J. Fluids Struct. 21, 3-24) are the stepped-current VIV benchmark of a 13.12 m vertical tension riser. Before any VIV comparison the riser model itself has to be right: its mass, added mass, bending stiffness and the tension that falls with the submerged weight down the line. Table 2 of the paper gives the first seven still-water natural frequencies at five top tensions, so CableDyn's modal analysis can be checked against 35 measured values with no fitted parameter. validation/experiments/chaplin/chaplin_natural_frequencies.py writes a deck per series (EI 29.9 N m^2, mass ratio 3.0 with the internal water, which reproduces the paper's 12.1 N/m submerged weight, pinned ends, the unstretched length that gives the Table 2 top tension), runs the modal analysis about the static state and compares. Assumed: fresh water, Ca 1, and EA 5.5e6 N, which the paper does not give. Result: 1.87 % high on average over 34 values, mean absolute error 2.28 %, largest 4.88 % (series A mode 1). The 35th, series C mode 2, is measured at 1.423 Hz against 1.619 Hz; its ratio to the first mode (1.82) departs from every other series (1.97-2.16), so it is reported apart and kept in the all-35 statistic (2.61 %). Ca 1.1 would bring the mean to +0.62 %; the default stays 1. 128 elements and ten times EA change no frequency by more than 3e-6 and 1.2e-4. Added to VALIDATION.md as L3-C, to the experiments index and the references; the reference is checked against Crossref. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 4 + VALIDATION.md | 13 +- doc/references.rst | 7 + validation/README.md | 2 +- validation/experiments/README.md | 5 +- validation/experiments/chaplin/README.md | 58 +++++ .../chaplin/chaplin_natural_frequencies.py | 231 ++++++++++++++++++ .../chaplin/natural_frequencies.csv | 36 +++ .../chaplin/natural_frequencies_summary.json | 19 ++ .../experiments/chaplin/provenance.json | 20 ++ 10 files changed, 391 insertions(+), 4 deletions(-) create mode 100644 validation/experiments/chaplin/README.md create mode 100644 validation/experiments/chaplin/chaplin_natural_frequencies.py create mode 100644 validation/experiments/chaplin/natural_frequencies.csv create mode 100644 validation/experiments/chaplin/natural_frequencies_summary.json create mode 100644 validation/experiments/chaplin/provenance.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a24cd28..baed491c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,10 @@ All notable changes to CableDyn are recorded in this file. The format follows - `cabledyn.current_steps`: a stepped-current schedule for a VIV study in one run (each speed held, then ramped to the next), written as the deck's MoorDyn-C `Currents 2` file, with the VIV response of every hold. +- Validation case L3-C (`validation/experiments/chaplin`): the still-water natural frequencies of + the Delta Flume vertical riser of Chaplin et al. (2005), modes 1-7 at five top tensions, from + CableDyn's modal analysis with no fitted parameter: 1.87 % high on average over 34 of the 35 + measured values (largest 4.88 %), the 35th, an outlier in the measurements, reported apart. ## [0.4.2] - 2026-11-09 diff --git a/VALIDATION.md b/VALIDATION.md index f5d2257b..00255e72 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -81,6 +81,7 @@ article's methods, are compared in | **L3-8** | Bend stiffener at a clamped hang-off (5 m tapered polyurethane) | OrcaFlex 11.6d (stiffener attachment) / planar elastica | curvature 0.45% of root; cable moment 0.01%, section moment 0.01%, deflection angle 0.0001°; local curvature 0.27% (0.1 m elements) | <1.5% / <2%, 0.05°, <0.5% | Pass | | **L3-H** | Holcombe static lazy-wave experiment | measured marker geometry | position RMSE 1.07–1.89% of suspended length; peak marker-curvature error 0.34–5.54% | end-restraint bracket | Pass | | **L3-B** | Bergdahl chain experiment, 30 orbit conditions | measured upper-end force | RMSE 1.58 N; MAPE 3.11%; Pearson 0.993; Lin concordance 0.989 | full published matrix | Pass | +| **L3-C** | Chaplin Delta Flume riser, still-water natural frequencies | measured modes 1–7 at five tensions | mean error +1.87%, mean absolute 2.28%, largest 4.88% (34 of 35; one outlier reported) | full published table, no fitted parameter | Pass | | **L-fig** | Along-arc curvature overlay (CableDyn / OrcaFlex / MoorDyn-F ±4×) | 3-code committed record | CableDyn peak 0.11% from OrcaFlex | <0.5% | Pass | | **L4-1** | Coupled platform + mooring | synthetic reference | bit-for-bit | — | Pass | | **L4-1b** | VolturnUS-S coupled platform + power cable | OpenFAST v5.0.0 (CompMooring 5 vs 3) | platform DOFs <0.6% (3-seed DLC-1.1); fairlead and anchor <0.001% static | <3% platform | Pass | @@ -300,7 +301,7 @@ initialisation. ### Physical experiments -No line or load parameter is fitted to either experiment. Inputs, reduction +No line or load parameter is fitted to any of the experiments. Inputs, reduction scripts, results, and source provenance are in [`validation/experiments`](https://github.com/SMI-Lab-Inha/CableDyn/tree/main/validation/experiments). @@ -326,6 +327,16 @@ scripts, results, and source provenance are in the run taken as given bit for bit); at 0.625 ms the T = 1.25 s maxima are 1.2% higher (with 0.3.0, 6.5% with every step taken as given), and with 0.3.0 at 1.25 ms they were 2–15% higher and varied from cycle to cycle. +- **L3-C Delta Flume riser, still-water natural frequencies** + ([Chaplin et al., 2005](https://cabledyn.readthedocs.io/en/latest/references.html#ref-chaplin2005)): + the modal analysis of the 13.12 m pinned riser about its static state, at the five top + tensions of the paper's Table 2, gives the first seven frequencies 1.87% high on average + (mean absolute error 2.28%, largest 4.88%, the first mode of the lowest tension) over 34 of + the 35 measured values; the added-mass coefficient 1 is kept (1.1 would bring the mean to +0.62%). + The 35th, the second mode of series C, is measured at 1.423 Hz against CableDyn's 1.619 Hz; + its ratio to the first mode departs from that of every other series, and it is reported + separately. 128 elements and ten times the unpublished axial stiffness change no frequency by + more than 3e-6 and 1.2e-4. ## L4 coupled OpenFAST diff --git a/doc/references.rst b/doc/references.rst index 594b5dad..ad3fda86 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -235,6 +235,13 @@ Verification and validation references experiment of a mooring cable. *Journal of Marine Science and Engineering* **4**\ (1), 5. https://doi.org/10.3390/jmse4010005 +.. _ref-chaplin2005: + +- **Chaplin, J. R., Bearman, P. W., Huera Huarte, F. J. & Pattenden, R. J. (2005).** Laboratory + measurements of vortex-induced vibrations of a vertical tension riser in a stepped current. + *Journal of Fluids and Structures* **21**\ (1), 3–24. + https://doi.org/10.1016/j.jfluidstructs.2005.04.010 + Comparison codes ---------------- diff --git a/validation/README.md b/validation/README.md index 95d2c185..46fe90ef 100644 --- a/validation/README.md +++ b/validation/README.md @@ -16,7 +16,7 @@ redistributed. | [`RELEASE_0_1_1.md`](RELEASE_0_1_1.md) | The same for v0.1.1 | | [`RELEASE_0_1_0.md`](RELEASE_0_1_0.md) | The same for v0.1.0 | | [`bodies/`](bodies/README.md) | Rigid-body, rod and shared-anchor cases with MoorDyn-C twins, stored references and pass limits | -| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave and Bergdahl et al. (2016) dynamic-chain comparisons | +| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain and Chaplin et al. (2005) riser natural-frequency comparisons | | [`PERFORMANCE_0_1_0.md`](PERFORMANCE_0_1_0.md) | Wall time of CableDyn 0.1.0, MoorDyn-C and MoorDyn-F at equal accuracy on five mooring, cable, buoy and coupled cases | | [`performance/`](performance/README.md) | Same-host wall-clock records of the L5 cases: the resolved lazy-wave spans, the one-hour VolturnUS-S mooring and the tension-only chain | | [`PAPER_REPRODUCTION.md`](PAPER_REPRODUCTION.md) | Every CableDyn result in the journal article, re-run with the release defaults and in paper mode | diff --git a/validation/experiments/README.md b/validation/experiments/README.md index 35b65de4..eca23357 100644 --- a/validation/experiments/README.md +++ b/validation/experiments/README.md @@ -2,7 +2,7 @@ # Experimental comparisons -This directory lets reviewers reproduce CableDyn's comparisons with two published physical +This directory lets reviewers reproduce CableDyn's comparisons with three published physical experiments. Each subdirectory gives the data source, the translation of the published parameters into a CableDyn model, the assessed quantity, the reproduction commands and the committed results. @@ -11,5 +11,6 @@ committed results. | --- | --- | --- | | [`holcombe/`](holcombe/README.md) | Holcombe et al. (2025), 1:70 static lazy-wave cable | Finite-EI power cable | | [`bergdahl/`](bergdahl/README.md) | Bergdahl et al. (2016), 33 m dynamically scaled chain | Tension-only mooring chain | +| [`chaplin/`](chaplin/README.md) | Chaplin et al. (2005), 13.12 m vertical tension riser, still-water natural frequencies | Finite-EI riser, modal analysis | -The results are summarised as cases L3-H and L3-B in [`VALIDATION.md`](../../VALIDATION.md). +The results are summarised as cases L3-H, L3-B and L3-C in [`VALIDATION.md`](../../VALIDATION.md). diff --git a/validation/experiments/chaplin/README.md b/validation/experiments/chaplin/README.md new file mode 100644 index 00000000..20052e91 --- /dev/null +++ b/validation/experiments/chaplin/README.md @@ -0,0 +1,58 @@ + + +# Delta Flume vertical riser: still-water natural frequencies + +This directory compares CableDyn's modal analysis with the still-water natural frequencies of the +13.12 m vertical tension riser that Chaplin et al. (2005) tested in the Delta Flume, +. The riser is the subject of the paper's +stepped-current VIV measurements. Its frequencies at five top tensions (Table 2) check the riser +model, the mass, added mass and tension along the line, which a VIV comparison then builds on. No +model parameter is fitted to the measurements. + +## Model and data + +- From Section 2 of the paper: length 13.12 m, diameter 28 mm, bending stiffness 29.9 N m², mass + ratio 3.0 with the internal water (so 1.847 kg/m in fresh water, whose submerged weight + 12.08 N/m matches the paper's 12.1 N/m), universal joints at both ends (pinned in bending). The + riser was submerged over its whole length, the upper part in the water-filled tank. +- `natural_frequencies.csv` holds the top tensions and the first seven measured frequencies of + Table 2, typed from the article, next to CableDyn's. +- Assumed: fresh water (1000 kg/m³), the normal added-mass coefficient 1, and an axial stiffness + of 5.5e6 N, which the paper does not give. The unstretched length of each series gives its + Table 2 top tension, with the tension falling by the submerged weight down the riser. +- CableDyn: a finite-EI line between two stationary points, 64 elements, `nModes` about the + static state (TMax 0). The two transverse planes of the straight riser give each frequency + twice; the script checks that they agree and keeps one. + +## Reproduce + +From the repository root, with `path/to/cabledyn.exe` the release executable or a local build: + +```powershell +python validation/experiments/chaplin/chaplin_natural_frequencies.py ` + path/to/cabledyn.exe validation/experiments/chaplin/work ` + --summary validation/experiments/chaplin +``` + +`--segments`, `--ca` and `--ea` change the mesh, the added-mass coefficient and the axial +stiffness. + +## Results + +| Statistic (34 frequencies, series C mode 2 left out) | Value | +| --- | ---: | +| Mean error | +1.87 % | +| Mean absolute error | 2.28 % | +| Largest absolute error | 4.88 % (series A, mode 1) | + +- CableDyn is 2–3 % high in most modes. The difference corresponds to a slightly larger added + mass: with `--ca 1.1` the mean error is +0.62 % and with `--ca 1.2` it is −0.59 %. The default + keeps the potential-flow value 1. +- Series C mode 2 is measured at 1.423 Hz, where CableDyn gives 1.619 Hz (+13.8 %). Its ratio + to the first mode, 1.82, departs from the near-harmonic ratios of the other four series + (1.97–2.16), while the neighbouring C modes agree with CableDyn within 3.3 %. It is reported + in the CSV and counted in the all-35 statistic (mean absolute error 2.61 %). +- 128 elements change no frequency by more than 3e-6, and ten times the axial stiffness by more + than 1.2e-4 (relative). + +`natural_frequencies_summary.json` records the statistics and the SHA-256 of the executable. diff --git a/validation/experiments/chaplin/chaplin_natural_frequencies.py b/validation/experiments/chaplin/chaplin_natural_frequencies.py new file mode 100644 index 00000000..1304848c --- /dev/null +++ b/validation/experiments/chaplin/chaplin_natural_frequencies.py @@ -0,0 +1,231 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Still-water natural frequencies of the Delta Flume riser of Chaplin et al. (2005). + +Writes a CableDyn deck for each of the five test series (Table 2 top tensions), runs the modal +analysis about the static state, and compares the first seven frequencies with Table 2. + + python chaplin_natural_frequencies.py path/to/cabledyn.exe WORKDIR [--segments 64] + [--ca 1.0] [--ea 5.5e6] [--summary DIR] + +Source: J.R. Chaplin, P.W. Bearman, F.J. Huera Huarte, R.J. Pattenden (2005), Laboratory +measurements of vortex-induced vibrations of a vertical tension riser in a stepped current, +Journal of Fluids and Structures 21(1), 3-24, https://doi.org/10.1016/j.jfluidstructs.2005.04.010 +""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import json +import math +import os +import subprocess +from pathlib import Path + +# Section 2 of the paper: length, diameter, bending stiffness, mass ratio including the internal +# water, submerged weight (12.1 N/m, reproduced by the mass ratio below), universal joints at +# both ends. The tank was filled with water, so the whole riser is submerged. +LENGTH = 13.12 # m +DIAMETER = 0.028 # m +EI = 29.9 # N m^2 +MASS_RATIO = 3.0 # mass / displaced mass, internal water included +RHO_W = 1000.0 # kg/m^3, fresh water (assumed) +GRAVITY = 9.80665 # m/s^2 +AREA = math.pi * DIAMETER**2 / 4.0 +MASS = MASS_RATIO * RHO_W * AREA # kg/m +SUBMERGED_WEIGHT = (MASS - RHO_W * AREA) * GRAVITY # N/m +Z_BOTTOM = -14.0 # m; any depth that keeps the riser submerged +WATER_DEPTH = 20.0 # m + +# Table 2: still-water top tension [N] and the first seven natural frequencies [Hz] of each series +TABLE2: dict[str, tuple[float, tuple[float, ...]]] = { + "A": (389.0, (0.405, 0.873, 1.326, 1.804, 2.278, 2.797, 3.389)), + "B": (813.0, (0.633, 1.329, 1.954, 2.625, 3.312, 4.028, 4.753)), + "C": (1185.0, (0.782, 1.423, 2.394, 3.203, 4.024, 4.875, 5.704)), + "D": (1546.0, (0.899, 1.815, 2.741, 3.614, 4.561, 5.525, 6.439)), + "E": (1925.0, (1.037, 2.046, 3.084, 4.099, 5.127, 6.222, 7.298)), +} +N_MODES = 7 + + +def unstretched_length(top_tension: float, ea: float) -> float: + """Unstretched length that gives ``top_tension`` on the vertical riser of length LENGTH. + + The effective tension falls linearly with the submerged weight from the top joint down, + and an element ds of the stretched riser has the unstretched length ds / (1 + T/EA). + """ + t_bottom = top_tension - SUBMERGED_WEIGHT * LENGTH + # exact integral of ds / (1 + T(s)/EA) with T linear in s + return ea / SUBMERGED_WEIGHT * math.log((ea + top_tension) / (ea + t_bottom)) + + +def deck_text( + series: str, top_tension: float, segments: int, ca: float, ea: float +) -> str: + l0 = unstretched_length(top_tension, ea) + return f"""--------------------- CableDyn Input File --------------------------------- +Delta Flume riser of Chaplin et al. (2005), series {series}: still-water top tension {top_tension:g} N +----------------------- LINE TYPES ------------------------------------------ +TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t +(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) +riser {DIAMETER} {MASS:.6f} {ea:.6e} 0.0 {EI} 1.2 0.0 {ca} 0.0 +----------------------- POINTS ---------------------------------------------- +ID Attachment X Y Z M V CdA CA +(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) +1 Coupled 0.0 0.0 {Z_BOTTOM + LENGTH:.6f} 0 0 0 0 +2 Fixed 0.0 0.0 {Z_BOTTOM:.6f} 0 0 0 0 +----------------------- LINES ----------------------------------------------- +ID LineType AttachA AttachB UnstrLen NumSegs Outputs +(-) (-) (-) (-) (m) (-) (-) +1 riser 1 2 {l0:.9f} {segments} - +---------------------- OPTIONS ---------------------------------------------- +{RHO_W} rhoW +{GRAVITY} g +{WATER_DEPTH} WtrDpth +{2 * (N_MODES + 1)} nModes +0.01 dtM +0.0 TMax +---------------------- OUTPUTS ----------------------------------------------- +FairTen1 +AnchTen1 +END +------------------------- need this line -------------------------------------- +""" + + +def frequencies(path: Path) -> list[float]: + """The distinct frequencies of a straight line's .modes.out (each in both planes).""" + lines = path.read_text(encoding="utf-8").splitlines() + start = lines.index("# Natural frequencies") + 3 + values = [] + for line in lines[start:]: + if not line.strip() or line.startswith("#"): + break + values.append(float(line.split()[2])) + pairs = values[0::2] + for a, b in zip(values[0::2], values[1::2]): + if not math.isclose(a, b, rel_tol=1e-6): + raise SystemExit(f"{path.name}: the two planes differ ({a} and {b} Hz)") + return pairs + + +def top_tension(path: Path) -> float: + rows = [line.split() for line in path.read_text(encoding="utf-8").splitlines()[2:]] + return float(rows[0][1]) + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + parser.add_argument("executable", type=Path) + parser.add_argument("workdir", type=Path) + parser.add_argument("--segments", type=int, default=64) + parser.add_argument( + "--ca", type=float, default=1.0, help="normal added-mass coefficient" + ) + parser.add_argument( + "--ea", type=float, default=5.5e6, help="axial stiffness [N] (not given)" + ) + parser.add_argument( + "--summary", type=Path, help="write the committed summary files here" + ) + args = parser.parse_args() + + work = args.workdir.resolve() + work.mkdir(parents=True, exist_ok=True) + env = os.environ.copy() + env.setdefault("OMP_NUM_THREADS", "1") + rows = [] + for series, (tension, measured) in TABLE2.items(): + stem = f"chaplin_{series}" + (work / f"{stem}.dat").write_text( + deck_text(series, tension, args.segments, args.ca, args.ea), + encoding="utf-8", + ) + run = subprocess.run( + [str(args.executable.resolve()), f"{stem}.dat", stem], + cwd=work, + env=env, + capture_output=True, + text=True, + encoding="utf-8", + errors="replace", + check=False, + ) + (work / f"{stem}.console.txt").write_text( + run.stdout + run.stderr, encoding="utf-8" + ) + if run.returncode != 0: + raise SystemExit(f"{stem}: CableDyn exited with {run.returncode}") + computed = frequencies(work / f"{stem}.modes.out")[:N_MODES] + t_top = top_tension(work / f"{stem}.out") + for mode, (f_c, f_m) in enumerate(zip(computed, measured), start=1): + rows.append( + { + "series": series, + "top_tension_N": tension, + "computed_top_tension_N": round(t_top, 3), + "mode": mode, + "measured_Hz": f_m, + "cabledyn_Hz": round(f_c, 5), + "error_percent": round(100.0 * (f_c / f_m - 1.0), 2), + } + ) + + errors = [abs(float(r["error_percent"])) for r in rows] + # Series C mode 2 (Table 2: 1.423 Hz) breaks the near-harmonic pattern of every other series + # (f2/f1 of 1.82 against 1.97-2.16): reported, and also left out of a second statistic + regular = [ + abs(float(r["error_percent"])) + for r in rows + if (r["series"], r["mode"]) != ("C", 2) + ] + signed = [ + float(r["error_percent"]) for r in rows if (r["series"], r["mode"]) != ("C", 2) + ] + summary = { + "source": "Chaplin et al. (2005), J. Fluids Struct. 21, 3-24, Table 2", + "doi": "10.1016/j.jfluidstructs.2005.04.010", + "segments": args.segments, + "added_mass_coefficient": args.ca, + "axial_stiffness_N": args.ea, + "mass_kg_per_m": round(MASS, 5), + "submerged_weight_N_per_m": round(SUBMERGED_WEIGHT, 3), + "frequencies_compared": len(rows), + "mean_abs_error_percent": round(sum(errors) / len(errors), 2), + "max_abs_error_percent": round(max(errors), 2), + "without_C2": { + "frequencies_compared": len(regular), + "mean_error_percent": round(sum(signed) / len(signed), 2), + "mean_abs_error_percent": round(sum(regular) / len(regular), 2), + "max_abs_error_percent": round(max(regular), 2), + }, + "executable_sha256": hashlib.sha256(args.executable.read_bytes()).hexdigest(), + } + for row in rows: + print( + f"{row['series']} mode {row['mode']}: measured {row['measured_Hz']:.3f} Hz, " + f"CableDyn {row['cabledyn_Hz']:.3f} Hz, {row['error_percent']:+.1f} %" + ) + print( + json.dumps( + {k: v for k, v in summary.items() if k != "executable_sha256"}, indent=2 + ) + ) + if args.summary is not None: + args.summary.mkdir(parents=True, exist_ok=True) + with (args.summary / "natural_frequencies.csv").open( + "w", newline="", encoding="utf-8" + ) as f: + writer = csv.DictWriter(f, fieldnames=list(rows[0]), lineterminator="\n") + writer.writeheader() + writer.writerows(rows) + (args.summary / "natural_frequencies_summary.json").write_text( + json.dumps(summary, indent=2) + "\n", encoding="utf-8", newline="\n" + ) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/chaplin/natural_frequencies.csv b/validation/experiments/chaplin/natural_frequencies.csv new file mode 100644 index 00000000..2dd84818 --- /dev/null +++ b/validation/experiments/chaplin/natural_frequencies.csv @@ -0,0 +1,36 @@ +series,top_tension_N,computed_top_tension_N,mode,measured_Hz,cabledyn_Hz,error_percent +A,389.0,388.995,1,0.405,0.42478,4.88 +A,389.0,388.995,2,0.873,0.85758,-1.77 +A,389.0,388.995,3,1.326,1.30488,-1.59 +A,389.0,388.995,4,1.804,1.77337,-1.7 +A,389.0,388.995,5,2.278,2.26904,-0.39 +A,389.0,388.995,6,2.797,2.79716,0.01 +A,389.0,388.995,7,3.389,3.36239,-0.79 +B,813.0,812.989,1,0.633,0.65754,3.88 +B,813.0,812.989,2,1.329,1.31988,-0.69 +B,813.0,812.989,3,1.954,1.99141,1.91 +B,813.0,812.989,4,2.625,2.67665,1.97 +B,813.0,812.989,5,3.312,3.37989,2.05 +B,813.0,812.989,6,4.028,4.10525,1.92 +B,813.0,812.989,7,4.753,4.85662,2.18 +C,1185.0,1184.984,1,0.782,0.80761,3.27 +C,1185.0,1184.984,2,1.423,1.61906,13.78 +C,1185.0,1184.984,3,2.394,2.438,1.84 +C,1185.0,1184.984,4,3.203,3.26811,2.03 +C,1185.0,1184.984,5,4.024,4.11299,2.21 +C,1185.0,1184.984,6,4.875,4.97611,2.07 +C,1185.0,1184.984,7,5.704,5.86083,2.75 +D,1546.0,1545.978,1,0.899,0.93027,3.48 +D,1546.0,1545.978,2,1.815,1.86386,2.69 +D,1546.0,1545.978,3,2.741,2.80394,2.3 +D,1546.0,1545.978,4,3.614,3.75374,3.87 +D,1546.0,1545.978,5,4.561,4.7164,3.41 +D,1546.0,1545.978,6,5.525,5.69501,3.08 +D,1546.0,1545.978,7,6.439,6.69255,3.94 +E,1925.0,1924.973,1,1.037,1.04361,0.64 +E,1925.0,1924.973,2,2.046,2.09017,2.16 +E,1925.0,1924.973,3,3.084,3.14252,1.9 +E,1925.0,1924.973,4,4.099,4.20354,2.55 +E,1925.0,1924.973,5,5.127,5.27606,2.91 +E,1925.0,1924.973,6,6.222,6.36284,2.26 +E,1925.0,1924.973,7,7.298,7.46662,2.31 diff --git a/validation/experiments/chaplin/natural_frequencies_summary.json b/validation/experiments/chaplin/natural_frequencies_summary.json new file mode 100644 index 00000000..c8ab7007 --- /dev/null +++ b/validation/experiments/chaplin/natural_frequencies_summary.json @@ -0,0 +1,19 @@ +{ + "source": "Chaplin et al. (2005), J. Fluids Struct. 21, 3-24, Table 2", + "doi": "10.1016/j.jfluidstructs.2005.04.010", + "segments": 64, + "added_mass_coefficient": 1.0, + "axial_stiffness_N": 5500000.0, + "mass_kg_per_m": 1.84726, + "submerged_weight_N_per_m": 12.077, + "frequencies_compared": 35, + "mean_abs_error_percent": 2.61, + "max_abs_error_percent": 13.78, + "without_C2": { + "frequencies_compared": 34, + "mean_error_percent": 1.87, + "mean_abs_error_percent": 2.28, + "max_abs_error_percent": 4.88 + }, + "executable_sha256": "ddf7dc1be365f0d67987bb718859362982147467c78a7a28a7df743345cc767a" +} diff --git a/validation/experiments/chaplin/provenance.json b/validation/experiments/chaplin/provenance.json new file mode 100644 index 00000000..5958c499 --- /dev/null +++ b/validation/experiments/chaplin/provenance.json @@ -0,0 +1,20 @@ +{ + "source": "Chaplin, Bearman, Huera Huarte & Pattenden (2005), Journal of Fluids and Structures 21(1), 3-24", + "doi": "10.1016/j.jfluidstructs.2005.04.010", + "data_used": "Section 2 riser properties; Table 2 still-water top tensions and natural frequencies of modes 1-7, series A-E", + "CableDyn_commit": "a0e8c04 (dev, after 0.4.2)", + "validation_date": "2026-11-11", + "executable_name": "cabledyn.exe", + "executable_sha256": "see natural_frequencies_summary.json", + "compiler": "GNU Fortran 16.2.0", + "build_type": "Release", + "platform": "Windows 11 x86-64", + "cases": 5, + "segments": 64, + "sensitivity": { + "segments_128_max_relative_change": 3.0e-6, + "axial_stiffness_x10_max_relative_change": 1.2e-4, + "added_mass_1p1_mean_error_percent": 0.62, + "added_mass_1p2_mean_error_percent": -0.59 + } +} From 0c73735d390c766c6f7f67a25264397d86e880d7 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 13 Nov 2026 13:44:17 +0900 Subject: [PATCH 11/47] feat: wake-oscillator VIV on finite-EI cables (WAKE OSCILLATOR section) (#154) CableDyn's VIV follows the synchronisation model of Thorsen et al. The other model class in common use is the wake oscillator: a van der Pol oscillator stands for the near wake and drives the lift. A model-form comparison needs both on the same line. An optional WAKE OSCILLATOR section row TypeName CL0 [St [eps [A]]] gives a line type the wake oscillator of Facchinetti, de Langre and Biolley (J. Fluids Struct. 19, 2004), distributed along the line as in Violette et al. (2010): q'' + eps om (q^2 - 1) q' + om^2 q = (A/D) y'', om = 2 pi St U_a/D, lift per unit length 1/4 rho D CL0 q U^2 across the relative flow, with y'' the node's cross-flow acceleration (their acceleration coupling), U_a the ambient flow speed normal to the line (their free stream, so the cable's own cross-flow velocity does not modulate the wake frequency), U the relative normal flow speed of the lift (as the synchronisation lift), and the defaults St 0.2, eps 0.3, A 12 they fix from forced-wake data (checked in the PDF). Their fluid damping gamma om rho D^2 y', gamma = Cd/(4 pi St), is the linearised Morison drag CableDyn applies in full, so the wake adds the lift only. It replaces the synchronisation lift of the type, which keeps Cl 0; a line takes one VIV model. It is a mode of the cable's VIV configuration: Set_VIV takes the per-element (St, eps, A), the lift scale is 1/4 rho D CL0, and the element lift takes q at its end nodes in place of cos(phi), with the exact Jacobians at fixed q. The state (q, q') per node is advanced beside the cable like the phase: a predictor under the step-start acceleration for the step's lift, then from the committed state with the acceleration linear to the converged end one, at the step-start wake frequency (classical Runge-Kutta in sub-steps with om max(1, eps q^2) dt <= 0.1, so a stiff eps stays stable, redone with twice the sub-steps should the rate grow on the way, CD_VIV_Wake_Advance). q starts on its limit cycle at the VIV phase seed, q = 2 cos(phi_0). The state is in the step-recovery, snapshot and checkpoint state and the OpenFAST mirror (2 nn values after the in-line block). Finite-EI cables only for now; an EI = 0 line with the wake oscillator is refused by name, as is a line mixing the models. The Python deck reader takes the section with the native checks, the builder writes it (LineType.wake_cl0, wake_st, wake_eps, wake_a). Checks: - tests/test_viv_wake_kernel.f90: the free oscillator settles on q = 2 at its period (the van der Pol shift eps^2/16); forced at its own frequency it follows the lift magnification of Facchinetti's Eq. 17 within 0.2 % at y0 = 0.05 and 1.9 % at 0.5 (the third harmonic their one-harmonic balance leaves out; halving the step changes K by 2e-5), the sub-stepped advance converges at fourth order, and with eps 20 from (2, 0) 0.1 s calls stay finite and match 1 ms calls within 1e-13; - tests/test_viv_wake_deck.f90: on the taut cable of the in-line VIV gate with Cl 0 and CL0 0.3 the wake locks the cable in at 0.282 Hz, below its own 0.300 Hz, at a steady A/D 0.585; uncoupled (A 0) it drives the cable at 0.298 Hz at A/D 0.099; over the lock-in the drag and damping take out the wake lift's 2.84 W within 0.21 %; CL0 0 is the deck without the section to the printed digits; eleven refusals; - tests/test_viv_coupled.f90: on the coupled route the cable's checkpoint block grows by 2 nn, the restarted run continues bit for bit, a rebuild without the VIV state does not, and a rewound step repeats; - Python: rows read, kept and refused as natively; the builder writes the values given; five native/Python parity decks agree. Full ctest under both BLAS kernels, Debug -fcheck=all on the new tests, pytest, ruff, mypy, Sphinx -W, pre-commit. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 8 + CMakeLists.txt | 14 ++ doc/capabilities.rst | 5 + doc/driver_format.md | 41 +++- doc/references.rst | 12 ++ doc/theory.rst | 60 ++++++ python/cabledyn/builder.py | 47 +++++ python/cabledyn/deck_file.py | 84 +++++++- python/tests/test_builder.py | 26 +++ python/tests/test_deck_file.py | 55 +++++ python/tests/test_end_to_end.py | 54 +++++ src/CableDyn_DeckDriver.f90 | 156 +++++++++++++- src/CableDyn_HermiteCableDynamic.f90 | 185 ++++++++++++++++- src/CableDyn_OpenFAST_HermiteFMF.f90 | 14 +- src/CableDyn_VIV.f90 | 66 ++++++ tests/test_viv_coupled.f90 | 40 +++- tests/test_viv_wake_deck.f90 | 300 +++++++++++++++++++++++++++ tests/test_viv_wake_kernel.f90 | 174 ++++++++++++++++ 18 files changed, 1316 insertions(+), 25 deletions(-) create mode 100644 tests/test_viv_wake_deck.f90 create mode 100644 tests/test_viv_wake_kernel.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index baed491c..7cac3111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,14 @@ All notable changes to CableDyn are recorded in this file. The format follows - The cross-flow VIV columns `Cl [dF cF]` may follow the 14-column finite-EI `LINE TYPES` row (15 or 17 columns), so a line restrained in torsion can carry VIV; such a row free in torsion runs as the 13-column one. The Python deck reader and builder take it. +- 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 + 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. - Load power channels `VIVPow`, `DragPow` and `DampPow` [W], and `N` per unit length about a node [W/m]: the power the VIV loads, the drag and the structural damping (`BA`, `Bb`) deliver to a line at the committed state, on `EI = 0` lines and finite-EI cables, diff --git a/CMakeLists.txt b/CMakeLists.txt index a513c945..6346dd58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1316,6 +1316,20 @@ target_link_libraries(test_viv_kernels PRIVATE cabledyn_core) add_test(NAME viv_kernels COMMAND test_viv_kernels) set_tests_properties(viv_kernels PROPERTIES LABELS "fortran;unit;dynamic;viv") +# Wake-oscillator kernel (Facchinetti et al. 2004): the free limit cycle, the forced lift +# magnification of their Eq. 17, and the sub-stepped Runge-Kutta advance. +add_executable(test_viv_wake_kernel tests/test_viv_wake_kernel.f90) +target_link_libraries(test_viv_wake_kernel PRIVATE cabledyn_core) +add_test(NAME viv_wake_kernel COMMAND test_viv_wake_kernel) +set_tests_properties(viv_wake_kernel PROPERTIES LABELS "fortran;unit;dynamic;viv") + +# Wake-oscillator VIV on a deck: lock-in against the uncoupled wake, the power balance, CL0 0 as no +# section, and the refusals of the WAKE OSCILLATOR section. +add_executable(test_viv_wake_deck tests/test_viv_wake_deck.f90) +target_link_libraries(test_viv_wake_deck PRIVATE cabledyn_core) +add_test(NAME viv_wake_deck COMMAND test_viv_wake_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(viv_wake_deck PROPERTIES LABELS "fortran;integration;dynamic;viv" TIMEOUT 1200) + add_executable(test_hermite_viv tests/test_hermite_viv.f90) target_link_libraries(test_hermite_viv PRIVATE cabledyn_core) add_test(NAME hermite_viv COMMAND test_hermite_viv) diff --git a/doc/capabilities.rst b/doc/capabilities.rst index 2d954125..16c9d3c8 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -150,6 +150,11 @@ Line and constitutive capability the optional higher-harmonic force of Ulveseter et al. (2019) (``Chh``), on ``EI = 0`` lines and finite-EI cables wherever the cross-flow lift runs (:ref:`theory-viv-inline`), its state in the checkpoint + * - 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 + (:ref:`theory-viv-wake`), its state in the checkpoint Loads and environment --------------------- diff --git a/doc/driver_format.md b/doc/driver_format.md index 956f7b9b..919c972b 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -297,7 +297,8 @@ the half-range and centre of its band in non-dimensional frequency (MoorDyn's `d `cF = 0.18` when only `Cl` is given). `Cl = 0` is no VIV; `Cl > 0` needs `cF > 0` and `0 <= dF < cF`, and the line's drag in water. It acts in the dynamics on `EI = 0` lines and finite-EI cables (see [Cross-flow VIV](theory.rst)). The in-line force of a type is a -[VIV](#viv-optional) section row. +[VIV](#viv-optional) section row; a [WAKE OSCILLATOR](#wake-oscillator-optional) row replaces the +lift by a wake oscillator. **Viscoelastic axial stiffness (MoorDyn `ElasticMod`).** The EA and BA columns accept bar-separated parts: @@ -1200,6 +1201,44 @@ Behaviour: Each was fitted to its experiments by the authors and is a starting point, not a universal set; MoorDyn's band defaults (`dF` 0.08, `cF` 0.18) are those of the first. +### WAKE OSCILLATOR (optional) + +Wake-oscillator vortex-induced vibration of a line type, the model of Facchinetti et al. (2004): +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. + +```text +--------------------- WAKE OSCILLATOR ---------------------------------- +TypeName CL0 St eps A +(-) (-) (-) (-) (-) +cable 0.3 0.2 0.3 12 +``` + +| Column | Meaning | +|--------|---------| +| `TypeName` | an existing LINE TYPES name (case-insensitive), at most one row each | +| `CL0` | reference lift coefficient `C_L0` >= 0 of a fixed cylinder, at most 1e15; `0` is off | +| `St` | optional Strouhal number > 0 of the wake frequency `2 pi St U/D` (default 0.2) | +| `eps` | optional van der Pol parameter > 0 (default 0.3) | +| `A` | optional acceleration coupling >= 0 (default 12; `0` uncouples the wake from the cable) | + +Behaviour: + +- Per unit length the lift is `1/4 rho D CL0 q U^2` across the relative flow, the direction of the + `Cl` lift (`U` the relative normal flow speed), with `q'' + eps om (q^2 - 1) q' + om^2 q = (A/D) y''` + at each node, `om = 2 pi St U_a/D` with `U_a` the ambient flow speed normal to the line and `y''` + the node's cross-flow acceleration. The defaults are the values Facchinetti et al. fix + from forced-wake data. The cross-flow damping of the fluid is the Morison drag of the type's + `Cd`, which the paper's `gamma = Cd/(4 pi St)` linearises. +- `q` starts on its limit cycle at the node's VIV phase seed, `q = 2 cos(phi_0)` (`VIVphaseSeed`), + and is part of the step-recovery, snapshot and checkpoint state. The Outputs flag `V` file and + `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. + ### FAILURE (optional, EI = 0 decks) A FAILURE row detaches line ends from a point during a dynamic run, with MoorDyn's trigger rules. diff --git a/doc/references.rst b/doc/references.rst index ad3fda86..5d1f666c 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -223,6 +223,18 @@ Verification and validation references the IEA Wind 15-Megawatt Offshore Reference Wind Turbine.* Technical Report NREL/TP-5000-76773, National Renewable Energy Laboratory. https://doi.org/10.2172/1660012 +.. _ref-facchinetti2004: + +- **Facchinetti, M. L., de Langre, E. & Biolley, F. (2004).** Coupling of structure and wake + oscillators in vortex-induced vibrations. *Journal of Fluids and Structures* **19**\ (2), + 123–140. https://doi.org/10.1016/j.jfluidstructs.2003.12.004 + +.. _ref-violette2010: + +- **Violette, R., de Langre, E. & Szydlowski, J. (2010).** A linear stability approach to + vortex-induced vibrations and waves. *Journal of Fluids and Structures* **26**\ (3), 442–466. + https://doi.org/10.1016/j.jfluidstructs.2010.01.002 + .. _ref-holcombe2025: - **Holcombe, A., Hann, M., Brown, S., et al. (2025).** Experimental–numerical model diff --git a/doc/theory.rst b/doc/theory.rst index 2f23ec52..bda864ee 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1232,6 +1232,66 @@ at the phase sum, and its derivatives enter the tangent with the lift's. Ulveset in-line example with ``Chh`` 1.0 the quarter-span in-line response at four times the cross-flow frequency grows from A/D 0.002 to 0.007, the same on an ``EI = 0`` line. +.. _theory-viv-wake: + +Wake oscillator +~~~~~~~~~~~~~~~ + +A ``WAKE OSCILLATOR`` row ``TypeName CL0 [St [eps [A]]]`` replaces the synchronisation model of a +line type by the wake oscillator of :ref:`Facchinetti et al. (2004) `, +distributed along the line as in :ref:`Violette et al. (2010) `. At each node a +van der Pol oscillator in the reduced lift coefficient :math:`q = 2C_L/C_{L0}` stands for the +near wake, forced by the node's cross-flow acceleration :math:`\ddot y` (the acceleration +coupling Facchinetti et al. found to reproduce lock-in, the Griffin plot and the effective added +mass): + +.. math:: + + \ddot q + \varepsilon\,\omega_f\,(q^2 - 1)\,\dot q + \omega_f^2\,q = \frac{A}{D}\,\ddot y, + \qquad \omega_f = 2\pi\,\mathrm{St}\,\frac{U_a}{D}, + +with :math:`U_a` the speed of the ambient flow (current and host field) normal to the line, the +free stream of the paper, so that the cable's own cross-flow velocity does not modulate the wake +frequency, and :math:`\ddot y` along the cross-flow axis :math:`\mathbf t\times\mathbf v_n/U` of +the synchronisation model. The lift per unit length acts across the relative normal flow +:math:`\mathbf v_n` of speed :math:`U`, as the synchronisation lift does: + +.. math:: + + \mathbf f = \tfrac{1}{4}\rho\,D\,C_{L0}\,q\;U\,(\mathbf t\times\mathbf v_n) , + +the synchronisation lift with :math:`C_L\cos\phi` replaced by :math:`C_{L0}q/2`: a free wake +settles on the limit cycle :math:`q = 2\cos\omega_f t`, the lift :math:`C_{L0}` of a fixed +cylinder. The defaults St 0.2, :math:`\varepsilon` 0.3 and :math:`A` 12 are theirs, fixed from +forced-wake data with :math:`C_{L0}` 0.3, which the row gives. Their +fluid-added damping :math:`\gamma\,\omega_f\,\rho D^2\dot y` with +:math:`\gamma = C_D/(4\pi\mathrm{St})` is the linearised Morison drag, which CableDyn applies +in full, and their inviscid added mass is the Morison :math:`C_a`; the wake adds the lift only. + +The wake state :math:`(q, \dot q)` of a node is integrated beside the cable, as the phase of the +synchronisation model is. At the start of a step it is advanced under the step-start +acceleration to give the :math:`q` the step's lift takes; at the converged end it is advanced +again from the committed state with the acceleration linear between the step's ends, at the +step-start :math:`\omega_f`, and committed. Both use classical Runge-Kutta in equal sub-steps of +:math:`r\,\delta t \le 0.1`, :math:`r = \omega_f\max(1, \varepsilon q^2)` the faster of the +oscillation and the van der Pol damping rate at the start of the interval, so a large +: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 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. + +The kernel reproduces the limit cycle (amplitude 2.001, the van der Pol period shift of +:math:`\varepsilon^2/16`), and forced at its own frequency by a cylinder moving as +:math:`y_0 D\cos\omega_f t` it follows the lift magnification of their Eq. 17 within 0.2 % at +:math:`y_0 = 0.05` and 1.9 % at :math:`y_0 = 0.5`, the gap growing with the third harmonic their +one-harmonic balance leaves out. On the taut cable of ``viv_taut_cable_inline.dat`` with +``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. + .. _theory-dry-buoyancy: Buoyancy and wetting diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 32d9aabb..8eb564e3 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -219,6 +219,14 @@ class LineType: Optional higher-harmonic coefficient of the ``VIV`` row (``Name ClX alpha Chh``, Ulveseter et al. 2019; it needs ``clx``); ``None`` leaves it out (0). With ``chh`` set and ``il_alpha`` ``None`` the row writes alpha 0.15. + wake_cl0, wake_st, wake_eps, wake_a : float | None + Optional wake-oscillator VIV of a type (Facchinetti et al. 2004), a + ``WAKE OSCILLATOR`` section row ``Name CL0 [St [eps [A]]]``: the + 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 + solver takes 0.2, 0.3 and 12); a value given writes the ones before it. """ name: str @@ -241,6 +249,10 @@ class LineType: clx: float | None = None il_alpha: float | None = None chh: float | None = None + wake_cl0: float | None = None + wake_st: float | None = None + wake_eps: float | None = None + wake_a: float | None = None @dataclass(eq=False) @@ -1660,6 +1672,10 @@ def add_line_type( clx: float | None = None, il_alpha: float | None = None, chh: float | None = None, + wake_cl0: float | None = None, + wake_st: float | None = None, + wake_eps: float | None = None, + wake_a: float | None = None, ) -> LineType: """Add a ``LINE TYPES`` row; see :class:`LineType` for the fields. @@ -1696,6 +1712,10 @@ def add_line_type( clx, il_alpha, chh, + wake_cl0, + wake_st, + wake_eps, + wake_a, ) self._line_types.append(item) return item @@ -2587,6 +2607,7 @@ def to_text(self, *, validate: bool = True) -> str: _emit(out, "ATTACHMENTS", *self._attachment_table()) _emit(out, "STIFFENERS", *self._stiffener_table()) _emit(out, "VIV", *self._viv_table()) + _emit(out, "WAKE OSCILLATOR", *self._wake_table()) _emit(out, "FAILURE", *self._failure_table()) _emit(out, "CONTROL", *self._control_table()) _emit(out, "EXTERNAL LOADS", *self._external_load_table()) @@ -2968,6 +2989,25 @@ def _viv_table(self) -> tuple[str, str, list[list[str]]]: rows.append(row) return "Name ClX alpha Chh", "(-) (-) (-) (-)", rows + def _wake_table(self) -> tuple[str, str, list[list[str]]]: + rows: list[list[str]] = [] + defaults = (0.2, 0.3, 12.0) + for item in self._line_types: + what = f"line type {item.name!r}" + rest = (item.wake_st, item.wake_eps, item.wake_a) + if item.wake_cl0 is None: + if any(value is not None for value in rest): + raise ValueError(f"{what}: wake_st, wake_eps and wake_a need wake_cl0") + continue + row = [_text(item.name, what), _num(item.wake_cl0, what)] + # the values up to the last one given, the solver's defaults filling the gaps + last = max((index for index, value in enumerate(rest) if value is not None), default=-1) + for index in range(last + 1): + value = rest[index] + row.append(_num(defaults[index] if value is None else value, what)) + rows.append(row) + return "Name CL0 St eps A", "(-) (-) (-) (-) (-)", rows + def _syrope_table(self) -> tuple[str, str, list[list[str]]]: rows = [ [_line_list(row.lines), _num(row.tmax0, "SYROPE IC"), _num(row.tmean0, "SYROPE IC")] @@ -3172,6 +3212,13 @@ def load(self) -> None: item.clx = _f(t[1]) item.il_alpha = _f(t[2]) if len(t) >= 3 else None item.chh = _f(t[3]) if len(t) == 4 else None + for row in self.rows("WAKE OSCILLATOR"): + t = row.tokens + item = model.line_types[t[0]] + item.wake_cl0 = _f(t[1]) + item.wake_st = _f(t[2]) if len(t) >= 3 else None + item.wake_eps = _f(t[3]) if len(t) >= 4 else None + item.wake_a = _f(t[4]) if len(t) == 5 else None for row in self.rows("ATTACHMENTS"): t = row.tokens arc: float | tuple[float, float, float] diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index 13f62393..b8b165b2 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -79,6 +79,9 @@ "VIV": "VIV", "VORTEX-INDUCED VIBRATION": "VIV", "VORTEX INDUCED VIBRATION": "VIV", + "WAKE OSCILLATOR": "WAKE OSCILLATOR", + "WAKE OSCILLATORS": "WAKE OSCILLATOR", + "WAKE": "WAKE OSCILLATOR", } # Table sections whose rows the native reader takes through a Fortran # list-directed READ. Their descriptive and units rows are recognized by the @@ -101,7 +104,7 @@ # Table sections the native reader splits on whitespace and parses column by # column (their comma-separated line lists are valid there). _WHITESPACE_TABLE_SECTIONS = frozenset( - {"FAILURE", "CONTROL", "SYROPE IC", "ATTACHMENTS", "STIFFENERS", "VIV"} + {"FAILURE", "CONTROL", "SYROPE IC", "ATTACHMENTS", "STIFFENERS", "VIV", "WAKE OSCILLATOR"} ) _TABLE_SECTIONS = _LIST_DIRECTED_SECTIONS | _WHITESPACE_TABLE_SECTIONS _NATIVE_RECORD_LENGTH = 512 @@ -3256,6 +3259,67 @@ def _check_viv_section( "cross-flow one" ) + def _check_wake_section(self, lift_type_names: set[str]) -> set[str]: + """Native ``apply_type_wake`` for the WAKE OSCILLATOR section; the types it switches on. + + A row ``TypeName CL0 [St [eps [A]]]`` gives a line type the wake oscillator of + Facchinetti et al. (2004): the reference lift coefficient ``CL0 >= 0`` (0 = off), the + Strouhal number ``St > 0`` (default 0.2), the van der Pol ``eps > 0`` (0.3) and the + acceleration coupling ``A >= 0`` (12), each at most 1e15. It replaces the synchronisation + model, so a type with ``CL0 > 0`` takes no LINE TYPES lift ``Cl``. A type takes one row. + """ + types = {row.tokens[0].lower() for row in self.line_types} + named: set[str] = set() + wake: set[str] = set() + for row in self._rows("WAKE OSCILLATOR"): + where = self._at(row) + if not 2 <= len(row.tokens) <= 5: + raise DeckFormatError( + f"{where}: WAKE OSCILLATOR rows must be: TypeName CL0 [St [eps [A]]]" + ) + name = row.tokens[0].lower() + if name not in types: + raise DeckFormatError( + f'{where}: WAKE OSCILLATOR row names undefined LINE TYPE "{row.tokens[0]}"' + ) + if name in named: + raise DeckFormatError( + f'{where}: WAKE OSCILLATOR names LINE TYPE "{row.tokens[0]}" twice' + ) + named.add(name) + values = [0.0, 0.2, 0.3, 12.0] + try: + for index, token in enumerate(row.tokens[1:]): + values[index] = _native_float(token) + except ValueError as exc: + raise DeckFormatError( + f"{where}: WAKE OSCILLATOR CL0, St, eps and A must be plain numbers" + ) from exc + if not all(math.isfinite(value) for value in values): + raise DeckFormatError(f"{where}: WAKE OSCILLATOR CL0, St, eps and A must be finite") + cl0, st, eps, a = values + if cl0 < 0.0 or cl0 > _NATIVE_MAX_COEFFICIENT: + raise DeckFormatError( + f"{where}: WAKE OSCILLATOR lift coefficient CL0 must be non-negative (0 = off) " + "and at most 1e15" + ) + if not ( + 0.0 < st <= _NATIVE_MAX_COEFFICIENT + and 0.0 < eps <= _NATIVE_MAX_COEFFICIENT + and 0.0 <= a <= _NATIVE_MAX_COEFFICIENT + ): + raise DeckFormatError( + f"{where}: WAKE OSCILLATOR needs St > 0, eps > 0 and A >= 0, each at most 1e15" + ) + if cl0 > 0.0 and name in lift_type_names: + raise DeckFormatError( + f'{where}: WAKE OSCILLATOR of LINE TYPE "{row.tokens[0]}" replaces its ' + "synchronisation lift: give the type LINE TYPES Cl 0" + ) + if cl0 > 0.0: + wake.add(name) + return wake + def _legacy_rod_type_columns(self, record: DeckRecord) -> bool: """Return whether ``record`` sits under a legacy CableDyn ROD TYPES header. @@ -4433,6 +4497,24 @@ def end_key(token: str) -> str: self._check_stiffeners(line_ids, section_types_by_line, line_type_meta, line_lengths) self._check_viv_section(line_type_meta, viv_type_names) + wake_type_names = self._check_wake_section(viv_type_names) + # native build_one_hermite_cable and the EI = 0 line wiring: the wake oscillator acts + # on finite-EI cables only, and a cable 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 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 " + "the synchronisation lift (LINE TYPES Cl > 0) and the wake oscillator (WAKE " + "OSCILLATOR section)" + ) self._check_attachments(line_ids, section_types_by_line, line_type_meta, line_lengths) assigned_end_connections: set[tuple[str, str]] = set() diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index 8569fdf8..5c9e0199 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -213,6 +213,32 @@ def test_viv_columns_follow_the_wide_finite_ei_row(tmp_path: Path) -> None: assert loaded.to_text() == text +def test_wake_oscillator_rows_are_written_with_the_values_given(tmp_path: Path) -> None: + model = _chain_model(tmp_path) + model.add_line_type( + "cable", diam=0.1, mass=10.0, ea=5.0e7, ei=1.0, cdn=1.2, can=1.0, wake_cl0=0.3 + ) + model.add_line_type( + "riser", + diam=0.1, + mass=10.0, + ea=5.0e7, + ei=1.0, + cdn=1.2, + can=1.0, + wake_cl0=0.25, + wake_eps=0.2, + ) + deck = DeckFile.from_text(model.to_text(validate=False), path=tmp_path / "deck.dat") + rows = {row.tokens[0].lower(): row.tokens for row in deck._rows("WAKE OSCILLATOR")} + assert rows["cable"] == ("cable", "0.3") + # St is written at the solver's default to keep eps in its column + assert [float(value) for value in rows["riser"][1:]] == [0.25, 0.2, 0.2] + model.add_line_type("bad", diam=0.1, mass=10.0, ea=5.0e7, wake_st=0.2) + with pytest.raises(ValueError, match="need wake_cl0"): + model.to_text(validate=False) + + def test_build_spread_mooring_with_multi_section_lines() -> None: import math diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index c304a81d..aa3ab400 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -4853,6 +4853,61 @@ def test_finite_ei_row_viv_columns_follow_the_native_checks(columns, message): DeckFile.from_text(_edit(_DYNAMIC, (row, _WIDE_VIV_ROW + columns))) +@pytest.mark.parametrize( + "rows, expected", + [ + (("chain 0.3",), (0.3, None, None, None)), + (("chain 0.3 0.17",), (0.3, 0.17, None, None)), + (("TypeName CL0 St eps A", "chain 0.3 0.2 0.25 10"), (0.3, 0.2, 0.25, 10.0)), + ], +) +def test_wake_oscillator_rows_are_read_and_kept(tmp_path, rows, expected): + from cabledyn import DeckModel + + text = _with_section(_DYNAMIC, "WAKE OSCILLATOR", *rows) + DeckFile.from_text(text) + path = tmp_path / "wake.dat" + path.write_text(text, encoding="utf-8") + item = DeckModel.load(path).line_types["chain"] + assert (item.wake_cl0, item.wake_st, item.wake_eps, item.wake_a) == expected + saved = tmp_path / "saved.dat" + DeckModel.load(path).save(saved) + again = DeckModel.load(saved).line_types["chain"] + assert (again.wake_cl0, again.wake_st, again.wake_eps, again.wake_a) == expected + + +@pytest.mark.parametrize( + "base, rows, message", + [ + (None, ("chain 0.3 0.2 0.3 12 1",), "rows must be: TypeName CL0 [St [eps [A]]]"), + (None, ("chain 0.3 x",), "must be plain numbers"), + (None, ("cable 0.3",), 'undefined LINE TYPE "cable"'), + (None, ("chain 0.3", "chain 0.2"), 'names LINE TYPE "chain" twice'), + (None, ("chain -0.1",), "CL0 must be non-negative"), + (None, ("chain 0.3 0.0",), "St > 0, eps > 0 and A >= 0"), + (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"), + ], +) +def test_wake_oscillator_rows_follow_the_native_checks(base, rows, message): + text = _DYNAMIC + if base == "lift": + 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": + 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)) + + +def test_wake_oscillator_cl0_zero_is_off_and_needs_no_finite_line(): + # CL0 0 switches nothing on, so it is accepted on an EI = 0 line and next to a lift type + 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.0")) + + def test_viv_is_accepted_on_the_coupled_route(): text = _edit(_STATIC, (_VIV_ROW, _VIV_ROW + " 0.8")) DeckFile.from_text(text) diff --git a/python/tests/test_end_to_end.py b/python/tests/test_end_to_end.py index 02cd1ef3..ad2548cd 100644 --- a/python/tests/test_end_to_end.py +++ b/python/tests/test_end_to_end.py @@ -257,6 +257,60 @@ def test_generated_study_runs_on_the_real_driver(tmp_path): ] +# The in-line VIV example with its type's lift Cl 0.8 and its VIV section turned into a WAKE +# OSCILLATOR section (its row riser 0.85 0.15 then reads CL0 0.85, St 0.15). +_WAKE_LIFT = ("1.0 0.0 0.8 0.08 0.18", "1.0 0.0 0.0 0.08 0.18") +_WAKE_SECTION = ( + "--------------------- VIV -----", + "--------------------- WAKE OSCILLATOR -----", +) +_WAKE_PARITY = [ + ("wake-accepted", [_WAKE_LIFT, _WAKE_SECTION], True), + ("wake-keeps-lift", [_WAKE_SECTION], False), + ( + "wake-st-zero", + [_WAKE_LIFT, _WAKE_SECTION, ("riser 0.85 0.15", "riser 0.85 0.0")], + False, + ), + ( + "wake-row-too-long", + [_WAKE_LIFT, _WAKE_SECTION, ("riser 0.85 0.15", "riser 0.3 0.2 0.3 12 1")], + False, + ), + ( + "wake-ei0-line", + [_WAKE_LIFT, _WAKE_SECTION, ("-0.8 1.0 1.2", "-0.8 0.0 1.2")], + False, + ), +] + + +@pytest.mark.parametrize( + ("label", "edits", "accepted"), _WAKE_PARITY, ids=[item[0] for item in _WAKE_PARITY] +) +def test_wake_oscillator_validator_agrees_with_the_native_reader( + driver, tmp_path, label, edits, accepted +): + text = (EXAMPLES / "viv_taut_cable_inline.dat").read_text(encoding="utf-8") + for old, new in edits: + assert old in text, old + text = text.replace(old, new, 1) + deck = tmp_path / f"{label}.dat" + deck.write_text(text.replace("90.0 TMax", "2.0 TMax"), encoding="utf-8") + try: + DeckFile.read(deck) + python_accepts = True + except DeckFormatError: + python_accepts = False + try: + driver.run(deck, label, timeout=300) + native_accepts = True + except DriverExecutionError as exc: + assert exc.returncode == 1, exc.stderr # a deck error, not a solve failure + native_accepts = False + assert python_accepts == native_accepts == accepted + + @pytest.mark.parametrize( ("label", "example", "old", "new", "accepted"), _PARITY, ids=[item[0] for item in _PARITY] ) diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 7dbb3813..8e8dc732 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -136,7 +136,8 @@ MODULE CableDyn_DeckDriver CD_HFMF_SetCoupledKinematics, CD_HFMF_GetCoupledKinematics, & CD_HFMF_Set_Moving_End_B, CD_HFMF_GetEndBKinematics, & CD_HFMF_End, CD_HFMF_OK - USE CableDyn_VIV, ONLY: CD_VIV_DEFAULT_DF, CD_VIV_DEFAULT_CF, CD_VIV_NM, CD_VIV_DEFAULT_IL_ALPHA + USE CableDyn_VIV, ONLY: CD_VIV_DEFAULT_DF, CD_VIV_DEFAULT_CF, CD_VIV_NM, CD_VIV_DEFAULT_IL_ALPHA, & + CD_VIV_WAKE_DEFAULT_ST, CD_VIV_WAKE_DEFAULT_EPS, CD_VIV_WAKE_DEFAULT_A USE CableDyn_Hydro, ONLY: CD_Airy_Wave_Kinematics_Precomputed, CD_Component_Wave_Kinematics, & CD_Current_Profile_Velocity, CD_CurrentGridType, CD_Current_Grid_Resample, & CD_Current_Grid_Velocity, & @@ -452,6 +453,13 @@ MODULE CableDyn_DeckDriver ! the section names. REAL(wp) :: clx = CD_ZERO, il_alpha = CD_VIV_DEFAULT_IL_ALPHA, chh = CD_ZERO LOGICAL :: has_viv_row = .FALSE. + ! Wake-oscillator VIV (the optional WAKE OSCILLATOR section, a row per type: TypeName CL0 + ! [St [eps [A]]]; Facchinetti et al., J. Fluids Struct. 19, 2004): the reference lift + ! coefficient C_L0 (0 = off), Strouhal number, van der Pol eps and acceleration coupling A; + ! has_wake_row marks a type the section names. + REAL(wp) :: wo_cl0 = CD_ZERO, wo_st = CD_VIV_WAKE_DEFAULT_ST, wo_eps = CD_VIV_WAKE_DEFAULT_EPS + REAL(wp) :: wo_a = CD_VIV_WAKE_DEFAULT_A + LOGICAL :: has_wake_row = .FALSE. ! Deck file line of the row (0 when not read from a file), for error messages. INTEGER :: deck_line = 0 END TYPE @@ -1885,6 +1893,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(wp), ALLOCATABLE :: q_sequence(:) REAL(wp), ALLOCATABLE :: curv(:), cdn(:), cdt(:), can(:), cat(:), catenary_pos(:) REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:), viv_hh(:) + REAL(wp), ALLOCATABLE :: wo_cl0(:), wo_st(:), wo_eps(:), wo_a(:) REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:) REAL(wp) :: mode1_omega REAL(wp), ALLOCATABLE :: contact_kn(:), contact_cn(:) @@ -3283,7 +3292,13 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, ALLOCATE (viv_cl(SIZE(l0)), viv_cf(SIZE(l0)), viv_df(SIZE(l0)), viv_clx(SIZE(l0)), viv_al(SIZE(l0)), & viv_hh(SIZE(l0))) CALL finite_viv_arrays(ln, sections, types, viv_cl, viv_cf, viv_df, viv_clx, viv_al, viv_hh) + ALLOCATE (wo_cl0(SIZE(l0)), wo_st(SIZE(l0)), wo_eps(SIZE(l0)), wo_a(SIZE(l0))) + CALL finite_wake_arrays(ln, sections, types, wo_cl0, wo_st, wo_eps, wo_a) IF (SIZE(l0_am) /= SIZE(l0)) THEN + CALL remap_elem_by_reference_arc(wo_cl0, l0, l0_am) + CALL remap_elem_by_reference_arc(wo_st, l0, l0_am) + CALL remap_elem_by_reference_arc(wo_eps, l0, l0_am) + CALL remap_elem_by_reference_arc(wo_a, l0, l0_am) CALL remap_elem_by_reference_arc(viv_cl, l0, l0_am) CALL remap_elem_by_reference_arc(viv_cf, l0, l0_am) CALL remap_elem_by_reference_arc(viv_df, l0, l0_am) @@ -3590,7 +3605,12 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, ! lines do (init_one_model), and of the coupling step dt where the deck gives none: a ! 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 + IF (install_viv .AND. ANY(wo_cl0 > 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 + IF (install_viv .AND. (ANY(viv_cl > CD_ZERO) .OR. ANY(wo_cl0 > CD_ZERO))) THEN ! MoorDyn's phase seed counts the deck nodes from the deck's End A, with its node tangent ! towards the deck's End B; CD_Deck_VIV_Phase_Seed takes it node by node to the model's ! nodes and tangent (a line the reader turned around, a mesh the static solve refined) @@ -3603,7 +3623,15 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL CD_Deck_VIV_Phase_Seed(cable%line%l0, ln%ends_swapped, seed, zero=opts%viv_phase_zero) END IF ! with the in-line VIV of the VIV section where a type has ClX > 0 - IF (ANY(viv_clx > CD_ZERO)) THEN + IF (ANY(wo_cl0 > CD_ZERO)) THEN + ! the wake oscillator: cl is C_L0, the band unused + CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, wo_cl0, 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, & + tangent_reversed=.NOT. ln%ends_swapped, & + wake=RESHAPE([wo_st, wo_eps, wo_a], [3, SIZE(wo_st)], ORDER=[2, 1])) + ELSE IF (ANY(viv_clx > 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), & @@ -7928,7 +7956,8 @@ SUBROUTINE CD_Init_Deck_HermiteCable(deck_path, dt, cable, coupled_node, ErrStat 'use the aggregate facade with its external SeaState field'); RETURN END IF IF (line_has_viv(lines(1), types, sections)) THEN - CALL fail(ErrStat, ErrMsg, 'CD_Init_Deck_HermiteCable: VIV (LINE TYPES Cl > 0) acts with an ambient '// & + CALL fail(ErrStat, ErrMsg, 'CD_Init_Deck_HermiteCable: VIV (LINE TYPES Cl > 0, or a wake oscillator) acts '// & + 'with an ambient '// & 'fluid field, which this single-cable entry does not apply; use the aggregate facade'); RETURN END IF IF (opts%has_bathymetry_file) THEN @@ -10473,6 +10502,10 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er hydro_can(e) = types(line_section_type(sections, ln%id, i))%can 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 + END IF viv_cf(e) = types(line_section_type(sections, ln%id, i))%viv_cf viv_df(e) = types(line_section_type(sections, ln%id, i))%viv_df viv_clx(e) = types(line_section_type(sections, ln%id, i))%clx @@ -11624,6 +11657,33 @@ SUBROUTINE finite_viv_arrays(ln, sections, types, cl, cf, df, clx, il_alpha, chh chh = chh(SIZE(chh):1:-1) END SUBROUTINE finite_viv_arrays + SUBROUTINE finite_wake_arrays(ln, sections, types, cl0, st, eps, a) + !! Expand the WAKE OSCILLATOR rows (CL0, St, eps, A) to finite-EI element arrays, in the + !! element order of finite_hydro_arrays. + TYPE(DeckLine), INTENT(IN) :: ln + TYPE(DeckSection), INTENT(IN) :: sections(:) + TYPE(DeckLineType), INTENT(IN) :: types(:) + REAL(wp), INTENT(OUT) :: cl0(:), st(:), eps(:), a(:) + INTEGER :: i, j, e, tidx + + e = 0 + DO i = 1, SIZE(sections) + IF (sections(i)%line_id /= ln%id) CYCLE + tidx = sections(i)%ltype + DO j = 1, sections(i)%nsegs + e = e + 1 + cl0(e) = types(tidx)%wo_cl0 + st(e) = types(tidx)%wo_st + eps(e) = types(tidx)%wo_eps + a(e) = types(tidx)%wo_a + END DO + END DO + cl0 = cl0(SIZE(cl0):1:-1) + st = st(SIZE(st):1:-1) + eps = eps(SIZE(eps):1:-1) + a = a(SIZE(a):1:-1) + END SUBROUTINE finite_wake_arrays + LOGICAL FUNCTION line_has_viv(ln, types, sections) RESULT(has) !! Whether a section of the line uses a line type with a VIV lift coefficient Cl > 0. TYPE(DeckLine), INTENT(IN) :: ln @@ -11635,6 +11695,7 @@ LOGICAL FUNCTION line_has_viv(ln, types, sections) RESULT(has) IF (sections(j)%line_id /= ln%id) CYCLE IF (sections(j)%ltype < 1 .OR. sections(j)%ltype > SIZE(types)) CYCLE IF (types(sections(j)%ltype)%cl > CD_ZERO) has = .TRUE. + IF (types(sections(j)%ltype)%wo_cl0 > CD_ZERO) has = .TRUE. END DO END FUNCTION line_has_viv @@ -13738,6 +13799,9 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti CHARACTER(DECK_RECLEN), ALLOCATABLE :: viv_rows(:) INTEGER, ALLOCATABLE :: viv_lines(:) INTEGER :: n_viv + CHARACTER(DECK_RECLEN), ALLOCATABLE :: wake_rows(:) + INTEGER, ALLOCATABLE :: wake_lines(:) + INTEGER :: n_wake CHARACTER(2*NAMELEN), ALLOCATABLE :: channel_keys(:) LOGICAL :: ext_march, types_stock_cols, rodtypes_legacy_cols, turb_ok, static_finite_ok, tors_marched INTEGER :: unit, ios, section, nt, nb, nrt, nr, np, nlin, nsec, neq, nch, nfl, nct, nec, lineno @@ -13755,7 +13819,7 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti SEC_SECTIONS = 5, SEC_OPTIONS = 6, SEC_OUTPUTS = 7, SEC_RODTYPES = 8, SEC_RODS = 9, & SEC_EQUIV = 10, SEC_FAILURE = 11, SEC_CONTROL = 12, SEC_SYROPE_IC = 13, & SEC_ENDCONN = 14, SEC_TURBINES = 15, SEC_EXTLOADS = 16, SEC_ATTACH = 17, & - SEC_STIFF = 18, SEC_VIV = 19 + SEC_STIFF = 18, SEC_VIV = 19, SEC_WAKE = 20 ErrStat = 0; ErrMsg = '' ext_march = .FALSE. @@ -13779,6 +13843,8 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti n_stf = 0 ALLOCATE (viv_rows(0), viv_lines(0)) n_viv = 0 + ALLOCATE (wake_rows(0), wake_lines(0)) + n_wake = 0 nt = 0; nb = 0; nrt = 0; nr = 0; np = 0; nlin = 0; nsec = 0; neq = 0; nch = 0; nfl = 0; nct = 0; nec = 0 section = SEC_NONE ALLOCATE (channel_lines(0)) @@ -13913,6 +13979,15 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti END IF viv_rows(n_viv) = line(1:MIN(LEN(line), DECK_RECLEN)) viv_lines(n_viv) = lineno + CASE (SEC_WAKE) + IF (.NOT. has_numeric_token(line)) CYCLE + n_wake = n_wake + 1 + IF (n_wake > SIZE(wake_rows)) THEN + wake_rows = [wake_rows, [(REPEAT(' ', DECK_RECLEN), i_ch=1, 8)]] + wake_lines = [wake_lines, [(0, i_ch=1, 8)]] + END IF + wake_rows(n_wake) = line(1:MIN(LEN(line), DECK_RECLEN)) + wake_lines(n_wake) = lineno CASE (SEC_OPTIONS) CALL apply_option(line, opts, ErrStat, ErrMsg) CASE (SEC_OUTPUTS) @@ -14017,6 +14092,13 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti RETURN END IF END DO + DO i_ch = 1, n_wake + CALL apply_type_wake(wake_rows(i_ch), types, ErrStat, ErrMsg) + IF (ErrStat /= 0) THEN + CALL add_row_context('deck', wake_lines(i_ch), wake_rows(i_ch), ErrMsg) + RETURN + END IF + END DO ! Caller-supplied environment overrides land HERE -- before equivalent-buoyancy ! conversion and validation -- so both run under the environment the model is @@ -15685,6 +15767,8 @@ SUBROUTINE set_section(secname, section, ErrStat, ErrMsg) section = 18 CASE ('VIV', 'VORTEX-INDUCED VIBRATION', 'VORTEX INDUCED VIBRATION') section = 19 + CASE ('WAKE OSCILLATOR', 'WAKE OSCILLATORS', 'WAKE') + section = 20 CASE DEFAULT IF (LEN_TRIM(secname) > NAMELEN) THEN CALL fail(ErrStat, ErrMsg, 'unknown deck section "'//secname(1:NAMELEN)//'..."') @@ -17284,6 +17368,68 @@ SUBROUTINE apply_type_viv(row, types, ErrStat, ErrMsg) types(it)%has_viv_row = .TRUE. END SUBROUTINE apply_type_viv + SUBROUTINE apply_type_wake(row, types, ErrStat, ErrMsg) + !! One WAKE OSCILLATOR row: TypeName CL0 [St [eps [A]]] -- the wake-oscillator VIV of a line + !! type (Facchinetti et al. 2004; the defaults St 0.2, eps 0.3, A 12 are theirs): the reference + !! lift coefficient C_L0 >= 0 (0 = off; the lift of a fixed cylinder is C_L0 U^2 rho D/2), the + !! Strouhal number St > 0 of the wake frequency 2 pi St U/D, the van der Pol eps > 0 and the + !! acceleration coupling A >= 0. The wake oscillator replaces the synchronisation model, so the + !! type takes no LINE TYPES lift Cl (and so no in-line VIV, which needs it). A type takes one + !! row. + CHARACTER(*), INTENT(IN) :: row + TYPE(DeckLineType), INTENT(INOUT) :: types(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + CHARACTER(DECK_RECLEN) :: tok + INTEGER :: it, ntok, i + REAL(wp) :: v(4) + LOGICAL :: found, ok + + ErrStat = 0; ErrMsg = '' + ntok = count_tokens(row) + IF (ntok < 2 .OR. ntok > 5) THEN + CALL fail(ErrStat, ErrMsg, 'WAKE OSCILLATOR rows must be: TypeName CL0 [St [eps [A]]]'); RETURN + END IF + CALL get_token(row, 1, tok, found) + it = find_type(types, TRIM(tok)) + IF (it == 0) THEN + CALL fail(ErrStat, ErrMsg, 'WAKE OSCILLATOR row names undefined LINE TYPE "'//TRIM(tok)//'"'); RETURN + END IF + IF (types(it)%has_wake_row) THEN + CALL fail(ErrStat, ErrMsg, 'WAKE OSCILLATOR names LINE TYPE "'//TRIM(types(it)%name)//'" twice'); RETURN + END IF + v = [CD_ZERO, CD_VIV_WAKE_DEFAULT_ST, CD_VIV_WAKE_DEFAULT_EPS, CD_VIV_WAKE_DEFAULT_A] + ok = .TRUE. + DO i = 2, ntok + IF (.NOT. ok) EXIT + CALL get_token(row, i, tok, found) + CALL parse_real_token(tok, v(i - 1), ok) + END DO + IF (.NOT. ok) THEN + CALL fail(ErrStat, ErrMsg, 'WAKE OSCILLATOR CL0, St, eps and A must be plain numbers'); RETURN + END IF + IF (.NOT. ALL(IEEE_IS_FINITE(v))) THEN + CALL fail(ErrStat, ErrMsg, 'WAKE OSCILLATOR CL0, St, eps and A must be finite'); RETURN + END IF + IF (v(1) < CD_ZERO .OR. v(1) > MAX_COEFFICIENT) THEN + CALL fail(ErrStat, ErrMsg, 'WAKE OSCILLATOR lift coefficient CL0 must be non-negative (0 = off) and at '// & + 'most 1e15'); RETURN + END IF + IF (.NOT. (v(2) > CD_ZERO .AND. v(2) <= MAX_COEFFICIENT .AND. v(3) > CD_ZERO .AND. & + v(3) <= MAX_COEFFICIENT .AND. v(4) >= CD_ZERO .AND. v(4) <= MAX_COEFFICIENT)) THEN + CALL fail(ErrStat, ErrMsg, 'WAKE OSCILLATOR needs St > 0, eps > 0 and A >= 0, each at most 1e15'); RETURN + END IF + IF (v(1) > CD_ZERO .AND. types(it)%cl > CD_ZERO) THEN + CALL fail(ErrStat, ErrMsg, 'WAKE OSCILLATOR of LINE TYPE "'//TRIM(types(it)%name)//'" replaces its '// & + 'synchronisation lift: give the type LINE TYPES Cl 0'); RETURN + END IF + types(it)%wo_cl0 = v(1) + types(it)%wo_st = v(2) + types(it)%wo_eps = v(3) + types(it)%wo_a = v(4) + types(it)%has_wake_row = .TRUE. + END SUBROUTINE apply_type_wake + SUBROUTINE append_line_stiffener(row, lines, ErrStat, ErrMsg) !! One STIFFENERS row: LineID End Length RootOD TipOD InnerD E Density -- a conical segment of !! the bend stiffener sleeving End A or End B of a finite-EI line. The rows of one line end diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 6f40c37e..6d4ef5cc 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -67,7 +67,7 @@ MODULE CableDyn_HermiteCableDynamic USE CableDyn_Linalg, ONLY: CD_Factor_Banded, CD_Solve_Factored_Banded, CD_LINALG_OK USE CableDyn_VIV, ONLY: CD_VIV_Lift_Per_Length, CD_VIV_Crossflow_Along, CD_VIV_Phase_Rate, CD_VIV_Mean_Square, & CD_VIV_Wrap_Phase, CD_VIV_TWO_PI, CD_VIV_NM, CD_VIV_Inline_Per_Length, & - CD_VIV_Inline_Phase_Rate + CD_VIV_Inline_Phase_Rate, CD_VIV_Wake_Advance USE CableDyn_Hydro, ONLY: CD_Morison_Drag_Per_Length_Jac, CD_Airy_Wave_Kinematics_Precomputed, & CD_Component_Wave_Kinematics, CD_Solve_Dispersion_Wavenumber, CD_HYDRO_OK USE CableDyn_SeabedContact, ONLY: CD_Seabed_Normal_Law, CD_Seabed_Contact_Gate, CD_SEABED_CONTACT_BLEND, & @@ -343,6 +343,16 @@ MODULE CableDyn_HermiteCableDynamic REAL(wp), ALLOCATABLE :: vil_ms(:, :), vil_ms_next(:, :), ws_recovery_vil_phi(:), ws_recovery_vil_ms(:, :) REAL(wp), ALLOCATABLE :: snap_vil_phi(:), snap_vil_ms(:, :) LOGICAL, ALLOCATABLE :: vil_node(:) + ! Wake-oscillator VIV (Set_VIV wake; Facchinetti et al. 2004): viv_wake replaces the + ! synchronisation phase of the whole cable by the van der Pol wake variable q = 2 C_L/C_L0, the + ! lift taking viv_k = 1/2 rho D viv_cl with viv_cl = C_L0/2. Per node the Strouhal number, + ! van der Pol eps and coupling A (length-weighted over its lifting elements), the state + ! wo_s(:, k) = (q, dq/dt), q at the step's evaluation point (wo_q_eval, as viv_phi_eval), the + ! step-start cross-flow acceleration and wake frequency (wo_ydd0, wo_om0) the step end + ! integrates from, and the recovery and snapshot copies of the state. + LOGICAL :: viv_wake = .FALSE. + REAL(wp), ALLOCATABLE :: wo_st(:), wo_eps(:), wo_a(:), wo_s(:, :), wo_q_eval(:), wo_ydd0(:), wo_om0(:) + REAL(wp), ALLOCATABLE :: ws_recovery_wo_s(:, :), snap_wo_s(:, :) REAL(wp), ALLOCATABLE :: Mgb(:, :) ! constant global mass (band) LOGICAL, ALLOCATABLE :: freemask(:), solve_mask(:) INTEGER, ALLOCATABLE :: fmap(:) ! free -> global DOF index @@ -1101,7 +1111,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial(model, mu_axial, ErrStat, ErrM END SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg, phase_seed, tangent_reversed, & - clx, il_alpha, chh) + clx, il_alpha, chh, wake) !! 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 @@ -1123,6 +1133,13 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! node starts at twice its cross-flow phase. chh (optional, with clx), per element, the !! coefficient C_hh >= 0 of the higher-harmonic force of Ulveseter et al. (2019), the lift's !! form at the phase sum phi_y + phi_x (0: none; > 0 only where clx > 0). + !! + !! Wake oscillator (Facchinetti et al. 2004; no in-line VIV): wake(1:3, e) = (St, eps, A) per + !! element selects it for the cable, cl then being the reference lift coefficient C_L0 and cf, + !! df unused. The lift per unit length is 1/4 rho D C_L0 q U^2 along the cross-flow axis, with + !! q'' + eps om (q^2 - 1) q' + om^2 q = (A/D) y'' at each lifting node (om = 2 pi St U/D, y'' + !! its cross-flow acceleration); q starts on its limit cycle at the phase seed, q = 2 cos(phi_0) + !! and q' = 0. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: cl(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -1133,9 +1150,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! (CD_VIV_Phase_Rate phi_rest); .FALSE. on a line the reader turned around LOGICAL, INTENT(IN), OPTIONAL :: tangent_reversed REAL(wp), INTENT(IN), OPTIONAL :: clx(:), il_alpha(:), chh(:) + REAL(wp), INTENT(IN), OPTIONAL :: wake(:, :) INTEGER :: e, k, ne, nn, es REAL(wp) :: wsum, tw_old, rest_old - LOGICAL :: had_viv, had_il, want_il + LOGICAL :: had_viv, had_il, want_il, had_wake, want_wake, bad_band CHARACTER(LEN=1024) :: em REAL(wp), ALLOCATABLE :: a_old(:), o_cl(:), o_k(:), o_cf(:), o_df(:), o_dn(:), o_phi(:), o_phi_eval(:), & o_rate(:), o_ms(:, :), o_ms_next(:, :), o_rec_phi(:), o_rec_ms(:, :), & @@ -1143,6 +1161,8 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err REAL(wp), ALLOCATABLE :: x_cx(:), x_k(:), x_al(:), x_phi(:), x_phi_eval(:), x_rate(:), x_ms(:, :), & x_ms_next(:, :), x_rec_phi(:), x_rec_ms(:, :), x_snap_phi(:), x_snap_ms(:, :), & x_hcx(:), x_hk(:) + REAL(wp), ALLOCATABLE :: w_st(:), w_eps(:), w_a(:), w_s(:, :), w_qe(:), w_y0(:), w_om(:), w_rec(:, :), & + w_snap(:, :) LOGICAL, ALLOCATABLE :: o_node(:), x_node(:) ErrStat = CD_HCDYN_OK; ErrMsg = '' @@ -1159,8 +1179,32 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err CD_Is_Finite(t_window))) THEN ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: inputs must be finite'; RETURN END IF - IF (ANY(cl < CD_ZERO) .OR. t_window < CD_ZERO .OR. & - ANY(cl > CD_ZERO .AND. .NOT. (cf > CD_ZERO .AND. df >= CD_ZERO .AND. df < cf))) THEN + want_wake = PRESENT(wake) + IF (want_wake) THEN + IF (SIZE(wake, 1) /= 3 .OR. SIZE(wake, 2) /= ne) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: wake must be shaped (3, ne): St, eps, A per element'; RETURN + END IF + IF (.NOT. CD_All_Finite(RESHAPE(wake, [3*ne]))) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: wake must be finite'; RETURN + END IF + IF (ANY(cl > CD_ZERO .AND. .NOT. (wake(1, :) > CD_ZERO .AND. wake(2, :) > CD_ZERO .AND. & + wake(3, :) >= CD_ZERO))) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the wake oscillator needs St > 0, eps > 0 and A >= 0 where cl > 0' + RETURN + END IF + IF (PRESENT(clx)) THEN + IF (ANY(clx > CD_ZERO)) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the wake oscillator takes no in-line VIV (clx > 0)'; RETURN + END IF + END IF + END IF + ! the synchronisation band applies to the lift of the synchronisation model only + bad_band = ANY(cl > CD_ZERO .AND. .NOT. (cf > CD_ZERO .AND. df >= CD_ZERO .AND. df < cf)) + IF (want_wake) bad_band = .FALSE. + IF (ANY(cl < CD_ZERO) .OR. t_window < CD_ZERO .OR. bad_band) THEN ErrStat = CD_HCDYN_BADINPUT ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: need cl >= 0, t_window >= 0 and 0 <= df < cf where cl > 0' RETURN @@ -1225,6 +1269,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err ! the previous configuration and state, kept for a rollback had_viv = model%has_viv had_il = model%has_viv_il + had_wake = model%viv_wake tw_old = model%viv_tw rest_old = model%viv_phi_rest a_old = model%a @@ -1299,6 +1344,38 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err model%snap_vil_ms = model%vil_ms model%has_viv_il = .TRUE. END IF + IF (want_wake) THEN + ALLOCATE (model%wo_st(nn), model%wo_eps(nn), model%wo_a(nn), model%wo_s(2, nn), model%wo_q_eval(nn), & + model%wo_ydd0(nn), model%wo_om0(nn), model%ws_recovery_wo_s(2, nn), model%snap_wo_s(2, nn)) + ! the lift scale 1/2 rho D viv_cl is then 1/4 rho D C_L0, the lift 1/4 rho D C_L0 q U^2 + model%viv_cl = 0.5_wp*cl + model%wo_st = CD_ZERO + model%wo_eps = CD_ZERO + model%wo_a = CD_ZERO + model%wo_s = CD_ZERO + DO k = 1, nn + IF (.NOT. model%viv_node(k)) CYCLE + wsum = CD_ZERO + DO e = MAX(1, k - 1), MIN(ne, k) + IF (.NOT. (cl(e) > CD_ZERO)) CYCLE + wsum = wsum + model%l0(e) + model%wo_st(k) = model%wo_st(k) + model%l0(e)*wake(1, e) + model%wo_eps(k) = model%wo_eps(k) + model%l0(e)*wake(2, e) + model%wo_a(k) = model%wo_a(k) + model%l0(e)*wake(3, e) + END DO + model%wo_st(k) = model%wo_st(k)/wsum + model%wo_eps(k) = model%wo_eps(k)/wsum + model%wo_a(k) = model%wo_a(k)/wsum + ! on the limit cycle at the node's phase seed + model%wo_s(1, k) = 2.0_wp*COS(model%viv_phi(k)) + END DO + model%wo_q_eval = model%wo_s(1, :) + model%wo_ydd0 = CD_ZERO + model%wo_om0 = CD_ZERO + model%ws_recovery_wo_s = model%wo_s + model%snap_wo_s = model%wo_s + model%viv_wake = .TRUE. + END IF CALL viv_drag_terms(model) model%viv_phi_eval = model%viv_phi model%viv_rate = CD_ZERO @@ -1322,6 +1399,7 @@ SUBROUTINE refresh_acceleration() CALL move_viv(.TRUE.) model%has_viv = had_viv model%has_viv_il = had_il + model%viv_wake = had_wake model%viv_tw = tw_old model%viv_phi_rest = rest_old model%a = a_old @@ -1349,6 +1427,11 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(x_snap_phi, model%snap_vil_phi); CALL MOVE_ALLOC(x_snap_ms, model%snap_vil_ms) CALL MOVE_ALLOC(x_node, model%vil_node) CALL MOVE_ALLOC(x_hcx, model%vhh_cx); CALL MOVE_ALLOC(x_hk, model%vhh_k) + CALL MOVE_ALLOC(w_st, model%wo_st); CALL MOVE_ALLOC(w_eps, model%wo_eps) + CALL MOVE_ALLOC(w_a, model%wo_a); CALL MOVE_ALLOC(w_s, model%wo_s) + CALL MOVE_ALLOC(w_qe, model%wo_q_eval); CALL MOVE_ALLOC(w_y0, model%wo_ydd0) + CALL MOVE_ALLOC(w_om, model%wo_om0); CALL MOVE_ALLOC(w_rec, model%ws_recovery_wo_s) + CALL MOVE_ALLOC(w_snap, model%snap_wo_s) ELSE CALL MOVE_ALLOC(model%viv_cl, o_cl); CALL MOVE_ALLOC(model%viv_k, o_k) CALL MOVE_ALLOC(model%viv_cf, o_cf); CALL MOVE_ALLOC(model%viv_df, o_df) @@ -1366,6 +1449,11 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(model%snap_vil_phi, x_snap_phi); CALL MOVE_ALLOC(model%snap_vil_ms, x_snap_ms) CALL MOVE_ALLOC(model%vil_node, x_node) CALL MOVE_ALLOC(model%vhh_cx, x_hcx); CALL MOVE_ALLOC(model%vhh_k, x_hk) + CALL MOVE_ALLOC(model%wo_st, w_st); CALL MOVE_ALLOC(model%wo_eps, w_eps) + CALL MOVE_ALLOC(model%wo_a, w_a); CALL MOVE_ALLOC(model%wo_s, w_s) + CALL MOVE_ALLOC(model%wo_q_eval, w_qe); CALL MOVE_ALLOC(model%wo_ydd0, w_y0) + CALL MOVE_ALLOC(model%wo_om0, w_om); CALL MOVE_ALLOC(model%ws_recovery_wo_s, w_rec) + CALL MOVE_ALLOC(model%snap_wo_s, w_snap) END IF END SUBROUTINE move_viv END SUBROUTINE CD_HermiteCable_Dyn_Set_VIV @@ -1384,8 +1472,11 @@ SUBROUTINE clear_viv(model) model%ws_recovery_vil_phi, model%ws_recovery_vil_ms, & model%snap_vil_phi, model%snap_vil_ms, model%vil_node) IF (ALLOCATED(model%vhh_k)) DEALLOCATE (model%vhh_cx, model%vhh_k) + IF (ALLOCATED(model%wo_s)) DEALLOCATE (model%wo_st, model%wo_eps, model%wo_a, model%wo_s, model%wo_q_eval, & + model%wo_ydd0, model%wo_om0, model%ws_recovery_wo_s, model%snap_wo_s) model%has_viv = .FALSE. model%has_viv_il = .FALSE. + model%viv_wake = .FALSE. model%viv_tw = CD_ZERO END SUBROUTINE clear_viv @@ -1413,6 +1504,24 @@ SUBROUTINE viv_drag_terms(model) END DO END SUBROUTINE viv_drag_terms + REAL(wp) FUNCTION viv_node_ambient_speed(model, k) RESULT(ua) + !! Speed of the ambient flow (current plus a held field) normal to node k's tangent (the slope + !! DOFs) at the committed state; 0 for a degenerate tangent. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: k + REAL(wp) :: uu(3), t(3), un(3), speed + INTEGER :: i0 + i0 = 6*(k - 1) + uu = model%current + IF (model%has_held_field) uu = uu + model%hf_u(:, k) + speed = NORM2(model%q(i0 + 4:i0 + 6)) + ua = CD_ZERO + IF (.NOT. (speed > CD_ZERO)) RETURN + t = model%q(i0 + 4:i0 + 6)/speed + un = uu - DOT_PRODUCT(t, uu)*t + ua = NORM2(un) + END FUNCTION viv_node_ambient_speed + SUBROUTINE viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) !! Cross-flow velocity and acceleration of node k at the committed state, along its own !! tangent (the slope DOFs), in the flow the drag sees there (current plus a held field); @@ -1447,13 +1556,33 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: k - REAL(wp) :: w, frac, yd, ydd, un, xd, xdd + REAL(wp) :: w, frac, yd, ydd, un, xd, xdd, sw(2) LOGICAL :: ok ErrStat = CD_HCDYN_OK; ErrMsg = '' IF (.NOT. (model%viv_tw > CD_ZERO)) model%viv_tw = REAL(CD_VIV_NM, wp)*dt w = MIN(CD_ONE, dt/model%viv_tw) frac = CD_ONE IF (.NOT. model%force_blend) frac = CD_ONE - model%alpha_f + IF (model%viv_wake) THEN + ! the wake state predicted at the step's evaluation point under the step-start forcing + model%wo_q_eval = model%wo_s(1, :) + DO k = 1, model%nn + IF (.NOT. model%viv_node(k)) CYCLE + CALL viv_node_motion(model, k, yd, ydd, un, ok) + IF (.NOT. ok) THEN + ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'VIV wake oscillator: degenerate node tangent'; RETURN + END IF + ! the wake frequency of the ambient flow normal to the line (the free stream of the + ! paper), not of the relative flow, which the cable's own cross-flow motion modulates + model%wo_om0(k) = CD_VIV_TWO_PI*model%wo_st(k)*viv_node_ambient_speed(model, k)/model%viv_dn(k) + model%wo_ydd0(k) = ydd + sw = model%wo_s(:, k) + CALL CD_VIV_Wake_Advance(sw, model%wo_om0(k), model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), ydd, ydd, & + frac*dt) + model%wo_q_eval(k) = sw(1) + END DO + RETURN + END IF model%viv_rate = CD_ZERO model%viv_ms_next = model%viv_ms model%viv_phi_eval = model%viv_phi @@ -1494,8 +1623,29 @@ SUBROUTINE viv_step_end(model, dt) TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: dt INTEGER :: k - REAL(wp) :: w, yd, ydd, un, ms1, ms2, rate_end, xd, xdd, rate_end_x + REAL(wp) :: w, yd, ydd, un, ms1, ms2, rate_end, xd, xdd, rate_end_x, sw(2) LOGICAL :: ok, il + IF (model%viv_wake) THEN + ! the wake state over the step with the cross-flow acceleration linear from its step-start + ! value to the converged end one (held where the end tangent is degenerate), at the + ! step-start wake frequency; a non-finite result keeps the step-start forcing alone + DO k = 1, model%nn + IF (.NOT. model%viv_node(k)) CYCLE + CALL viv_node_motion(model, k, yd, ydd, un, ok) + IF (.NOT. (ok .AND. CD_Is_Finite(ydd))) ydd = model%wo_ydd0(k) + sw = model%wo_s(:, k) + CALL CD_VIV_Wake_Advance(sw, model%wo_om0(k), model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), & + model%wo_ydd0(k), ydd, dt) + IF (.NOT. (CD_Is_Finite(sw(1)) .AND. CD_Is_Finite(sw(2)))) THEN + sw = model%wo_s(:, k) + CALL CD_VIV_Wake_Advance(sw, model%wo_om0(k), model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), & + model%wo_ydd0(k), model%wo_ydd0(k), dt) + END IF + model%wo_s(:, k) = sw + END DO + model%wo_q_eval = model%wo_s(1, :) + RETURN + END IF w = MIN(CD_ONE, dt/model%viv_tw) DO k = 1, model%nn IF (.NOT. model%viv_node(k)) CYCLE @@ -1559,7 +1709,11 @@ SUBROUTINE viv_element_lift(model, q_cfg, v_cfg, e, flift, ErrStat, ErrMsg, djq, uu = uu + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)) wl = 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)) END IF - kn = model%viv_k(e)*[COS(model%viv_phi_eval(e)), COS(model%viv_phi_eval(e + 1))] + IF (model%viv_wake) THEN + kn = model%viv_k(e)*[model%wo_q_eval(e), model%wo_q_eval(e + 1)] + ELSE + kn = model%viv_k(e)*[COS(model%viv_phi_eval(e)), COS(model%viv_phi_eval(e + 1))] + END IF il = .FALSE. IF (model%has_viv_il) il = model%vil_k(e) > CD_ZERO IF (il) THEN @@ -4036,6 +4190,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Step(model, dt, max_iter, tol, ErrStat, ErrMsg, i ! every evaluation outside a step takes the committed VIV phase IF (model%has_viv) model%viv_phi_eval = model%viv_phi IF (model%has_viv_il) model%vil_phi_eval = model%vil_phi + IF (model%viv_wake) model%wo_q_eval = model%wo_s(1, :) END SUBROUTINE CD_HermiteCable_Dyn_Step SUBROUTINE CD_HermiteCable_Dyn_Set_Torsion_Drive(model, ends, phi, ErrStat, ErrMsg) @@ -5893,6 +6048,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Step_Recovering(model, dt, max_iter, tol, ErrStat model%ws_recovery_viv_phi = model%viv_phi model%ws_recovery_viv_ms = model%viv_ms END IF + IF (model%viv_wake) model%ws_recovery_wo_s = model%wo_s IF (model%has_viv_il) THEN model%ws_recovery_vil_phi = model%vil_phi model%ws_recovery_vil_ms = model%vil_ms @@ -5994,6 +6150,9 @@ SUBROUTINE CD_HermiteCable_Dyn_Step_Recovering(model, dt, max_iter, tol, ErrStat model%viv_phi = model%ws_recovery_viv_phi; model%viv_ms = model%ws_recovery_viv_ms model%viv_phi_eval = model%viv_phi END IF + IF (model%viv_wake) THEN + model%wo_s = model%ws_recovery_wo_s; model%wo_q_eval = model%wo_s(1, :) + END IF IF (model%has_viv_il) THEN model%vil_phi = model%ws_recovery_vil_phi; model%vil_ms = model%ws_recovery_vil_ms model%vil_phi_eval = model%vil_phi @@ -6078,6 +6237,9 @@ SUBROUTINE CD_HermiteCable_Dyn_Step_Recovering(model, dt, max_iter, tol, ErrStat model%viv_phi = model%ws_recovery_viv_phi; model%viv_ms = model%ws_recovery_viv_ms model%viv_phi_eval = model%viv_phi END IF + IF (model%viv_wake) THEN + model%wo_s = model%ws_recovery_wo_s; model%wo_q_eval = model%wo_s(1, :) + END IF IF (model%has_viv_il) THEN model%vil_phi = model%ws_recovery_vil_phi; model%vil_ms = model%ws_recovery_vil_ms model%vil_phi_eval = model%vil_phi @@ -6132,6 +6294,9 @@ SUBROUTINE CD_HermiteCable_Dyn_Step_Recovering(model, dt, max_iter, tol, ErrStat model%viv_phi = model%ws_recovery_viv_phi; model%viv_ms = model%ws_recovery_viv_ms model%viv_phi_eval = model%viv_phi END IF + IF (model%viv_wake) THEN + model%wo_s = model%ws_recovery_wo_s; model%wo_q_eval = model%wo_s(1, :) + END IF IF (model%has_viv_il) THEN model%vil_phi = model%ws_recovery_vil_phi; model%vil_ms = model%ws_recovery_vil_ms model%vil_phi_eval = model%vil_phi @@ -8670,6 +8835,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Snapshot(model, ErrStat, ErrMsg) model%snap_viv_phi = model%viv_phi model%snap_viv_ms = model%viv_ms END IF + IF (model%viv_wake) model%snap_wo_s = model%wo_s IF (model%has_viv_il) THEN model%snap_vil_phi = model%vil_phi model%snap_vil_ms = model%vil_ms @@ -8756,6 +8922,9 @@ SUBROUTINE CD_HermiteCable_Dyn_Restore(model, ErrStat, ErrMsg) model%viv_phi = model%snap_viv_phi; model%viv_ms = model%snap_viv_ms model%viv_phi_eval = model%viv_phi END IF + IF (model%viv_wake) THEN + model%wo_s = model%snap_wo_s; model%wo_q_eval = model%wo_s(1, :) + END IF IF (model%has_viv_il) THEN model%vil_phi = model%snap_vil_phi; model%vil_ms = model%snap_vil_ms model%vil_phi_eval = model%vil_phi diff --git a/src/CableDyn_OpenFAST_HermiteFMF.f90 b/src/CableDyn_OpenFAST_HermiteFMF.f90 index 9c0ab817..4de6294e 100644 --- a/src/CableDyn_OpenFAST_HermiteFMF.f90 +++ b/src/CableDyn_OpenFAST_HermiteFMF.f90 @@ -2252,12 +2252,14 @@ INTEGER FUNCTION CD_HFMF_VIVMirrorSize(self) RESULT(n) !! Mirror slots of the VIV state, before the torsion block: the cross-flow shedding phase !! per node, the running mean squares of the cross-flow velocity and acceleration per node !! (interleaved) and the averaging time (3 nn + 1 values); with in-line VIV then the in-line - !! phase and mean squares (3 nn more); zero without VIV. + !! phase and mean squares (3 nn more); with the wake oscillator its state (q, dq/dt) per node + !! (2 nn more); zero without VIV. TYPE(CD_HFMF_ModuleType), INTENT(IN) :: self n = 0 IF (.NOT. self%initialized) RETURN IF (self%line%has_viv) n = 3*self%line%nn + 1 IF (self%line%has_viv_il) n = n + 3*self%line%nn + IF (self%line%viv_wake) n = n + 2*self%line%nn END FUNCTION CD_HFMF_VIVMirrorSize INTEGER FUNCTION CD_HFMF_FrictionMirrorSize(self) RESULT(n) @@ -2345,6 +2347,10 @@ SUBROUTINE CD_HFMF_PackMirror(self, buf, ErrStat, ErrMsg) buf(k + self%line%nn + 1:k + 3*self%line%nn) = RESHAPE(self%line%vil_ms, [2*self%line%nn]) k = k + 3*self%line%nn END IF + IF (self%line%viv_wake) THEN + buf(k + 1:k + 2*self%line%nn) = RESHAPE(self%line%wo_s, [2*self%line%nn]) + k = k + 2*self%line%nn + END IF IF (self%line%torsion%active) THEN buf(k + 1) = self%line%torsion%theta buf(k + 2) = self%line%torsion%phi @@ -2521,6 +2527,12 @@ SUBROUTINE CD_HFMF_UnpackMirror(self, buf, t, ErrStat, ErrMsg) self%line%ws_recovery_vil_ms = self%line%vil_ms k = k + 3*self%line%nn END IF + IF (self%line%viv_wake) THEN + self%line%wo_s = RESHAPE(buf(k + 1:k + 2*self%line%nn), [2, self%line%nn]) + self%line%wo_q_eval = self%line%wo_s(1, :) + self%line%ws_recovery_wo_s = self%line%wo_s + k = k + 2*self%line%nn + END IF IF (self%line%torsion%active) THEN self%line%torsion%theta = buf(k + 1) self%line%torsion%phi = buf(k + 2) diff --git a/src/CableDyn_VIV.f90 b/src/CableDyn_VIV.f90 index 966d9cd2..f2e1189a 100644 --- a/src/CableDyn_VIV.f90 +++ b/src/CableDyn_VIV.f90 @@ -61,6 +61,7 @@ MODULE CableDyn_VIV PUBLIC :: CD_VIV_Node_Inline PUBLIC :: CD_VIV_Inline_Per_Length PUBLIC :: CD_VIV_Inline_Phase_Rate + PUBLIC :: CD_VIV_Wake_Advance !> MoorDyn's running-RMS window in time steps (Line%n_m): each step updates the stored !> mean square as ((n_m - 1) old + new) / n_m. @@ -72,6 +73,13 @@ MODULE CableDyn_VIV REAL(wp), PARAMETER, PUBLIC :: CD_VIV_TWO_PI = 6.283185307179586476925286766559005768394_wp !> The in-line frequency band alpha of Ulveseter et al. (2018, Table 3) and Thorsen et al. REAL(wp), PARAMETER, PUBLIC :: CD_VIV_DEFAULT_IL_ALPHA = 0.15_wp + !> The wake oscillator of Facchinetti, de Langre and Biolley (J. Fluids Struct. 19, 2004, + !> 123-140, Sec. 3): Strouhal number, reference lift coefficient C_L0, van der Pol parameter + !> epsilon and acceleration coupling A, fixed there from forced-wake data. + REAL(wp), PARAMETER, PUBLIC :: CD_VIV_WAKE_DEFAULT_ST = 0.2_wp + REAL(wp), PARAMETER, PUBLIC :: CD_VIV_WAKE_DEFAULT_CL0 = 0.3_wp + REAL(wp), PARAMETER, PUBLIC :: CD_VIV_WAKE_DEFAULT_EPS = 0.3_wp + REAL(wp), PARAMETER, PUBLIC :: CD_VIV_WAKE_DEFAULT_A = 12.0_wp !> Chord below which a node tangent is undefined (a collapsed pair of neighbours). REAL(wp), PARAMETER :: TINY_CHORD = 1.0e-12_wp @@ -438,6 +446,64 @@ PURE SUBROUTINE inline_jacobians(s, t, vr, vn, un, dfdv, dfdt) END DO END SUBROUTINE inline_jacobians + PURE SUBROUTINE CD_VIV_Wake_Advance(s, om, eps, ad, f0, f1, h) + !! Advance the wake oscillator of Facchinetti et al. (2004, Eq. 5 with the acceleration + !! coupling F = A Y''/D; Violette et al., J. Fluids Struct. 26, 2010, Eq. 3) over a time h: + !! + !! q'' + eps om (q^2 - 1) q' + om^2 q = ad y''(t) + !! + !! s = (q, q'), om the wake frequency 2 pi St U/D, ad = A/D and the cross-flow acceleration + !! y'' of the line, taken linear from f0 at the start of the interval to f1 at its end. + !! Classical Runge-Kutta in equal sub-steps of r dt <= 0.1 (at least one), r = om max(1, + !! eps q^2) the faster of the oscillation and the van der Pol damping rate eps om (q^2 - 1) at + !! the start of the interval, so the error is that of a resolved oscillation however long h is + !! against the wake period and however large eps is. Should the rate at a sub-step exceed + !! 0.2/dt (q grown on the way) or the result not be finite, the interval is redone from its + !! start with twice the sub-steps. q = 2 C_L/C_L0: the free oscillator settles on its limit + !! cycle q = 2 cos(om t), the lift of a fixed cylinder. + REAL(wp), INTENT(INOUT) :: s(2) + REAL(wp), INTENT(IN) :: om, eps, ad, f0, f1, h + INTEGER :: n, i, attempt + REAL(wp) :: dt, t, k1(2), k2(2), k3(2), k4(2), s0(2) + LOGICAL :: ok + IF (.NOT. (h > CD_ZERO)) RETURN + s0 = s + n = MAX(1, CEILING(MIN(rate(s0)*h/0.1_wp, 1.0e6_wp))) + DO attempt = 1, 24 + s = s0 + dt = h/REAL(n, wp) + ok = .TRUE. + DO i = 0, n - 1 + IF (rate(s)*dt > 0.2_wp .AND. n < 1000000) THEN + ok = .FALSE. + EXIT + END IF + t = REAL(i, wp)*dt + k1 = rhs(s, t) + k2 = rhs(s + 0.5_wp*dt*k1, t + 0.5_wp*dt) + k3 = rhs(s + 0.5_wp*dt*k2, t + 0.5_wp*dt) + k4 = rhs(s + dt*k3, t + dt) + s = s + (dt/6.0_wp)*(k1 + 2.0_wp*k2 + 2.0_wp*k3 + k4) + END DO + IF (ok) ok = ABS(s(1)) <= HUGE(s(1)) .AND. ABS(s(2)) <= HUGE(s(2)) + IF (ok .OR. n >= 1000000) EXIT + n = MIN(2*n, 1000000) + END DO + CONTAINS + PURE REAL(wp) FUNCTION rate(x) RESULT(r) + !! The faster of the oscillation and the damping rate of state x (finite or not). + REAL(wp), INTENT(IN) :: x(2) + r = ABS(om)*MAX(CD_ONE, eps*x(1)*x(1)) + IF (.NOT. (r <= HUGE(r))) r = HUGE(r) + END FUNCTION rate + PURE FUNCTION rhs(x, tau) RESULT(d) + REAL(wp), INTENT(IN) :: x(2), tau + REAL(wp) :: d(2) + d(1) = x(2) + d(2) = ad*(f0 + (f1 - f0)*tau/h) - eps*om*(x(1)*x(1) - CD_ONE)*x(2) - om*om*x(1) + END FUNCTION rhs + END SUBROUTINE CD_VIV_Wake_Advance + ELEMENTAL REAL(wp) FUNCTION CD_VIV_Wrap_Phase(phi) RESULT(wrapped) !! The phase mapped to [0, 2 pi); the model only uses cos(phi) and sin(. - phi). REAL(wp), INTENT(IN) :: phi diff --git a/tests/test_viv_coupled.f90 b/tests/test_viv_coupled.f90 index 1514c5fe..bc078835 100644 --- a/tests/test_viv_coupled.f90 +++ b/tests/test_viv_coupled.f90 @@ -29,7 +29,11 @@ PROGRAM test_viv_coupled !! at the deck nodes of a refined mesh (added nodes interpolated in arc length); !! * in-line VIV (a VIV section, ClX 0.85, on both lines): the checkpoint blocks grow by the !! in-line phase and mean squares (3 per node), the restarted run continues bit for bit with - !! both phases, a rebuild without the VIV state does not, and a rewound step repeats. + !! both phases, a rebuild without the VIV state does not, and a rewound step repeats; + !! * wake oscillator (a WAKE OSCILLATOR row, C_L0 0.3, on the cable, whose type has Cl 0; the + !! EI = 0 riser keeps its synchronisation lift): the cable's checkpoint block grows by the wake + !! state (2 per node), the restarted run continues bit for bit with it, a rebuild without the + !! VIV state does not, and a rewound step repeats. USE CableDyn_Precision, ONLY: wp USE CableDyn_OpenFAST_Aggregate, ONLY: CD_AGG_ModuleType, CD_AGG_Init_From_Deck, CD_AGG_End, CD_AGG_OK, & CD_AGG_NMovingPoints, CD_AGG_GetMovingPointMesh, CD_AGG_Step_Moving, & @@ -49,12 +53,13 @@ PROGRAM test_viv_coupled INTEGER :: nfail ! the deck of the restart and rewind cases, and whether its lines carry in-line VIV CHARACTER(32) :: deck_name = 'viv_coupled.dat' - LOGICAL :: il_case = .FALSE. + LOGICAL :: il_case = .FALSE., wake_case = .FALSE. nfail = 0 CALL write_deck('viv_coupled.dat', 0.8_wp) CALL write_deck('viv_coupled_nolift.dat', 0.0_wp) CALL write_deck('viv_coupled_il.dat', 0.8_wp, inline=.TRUE.) + CALL write_deck('viv_coupled_wake.dat', 0.8_wp, wake=.TRUE.) CALL case_lockin() CALL case_restart() CALL case_rewind() @@ -64,6 +69,11 @@ PROGRAM test_viv_coupled il_case = .TRUE. CALL case_restart() CALL case_rewind() + deck_name = 'viv_coupled_wake.dat' + il_case = .FALSE. + wake_case = .TRUE. + CALL case_restart() + CALL case_rewind() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' coupled VIV check(s) failed' ERROR STOP 1 @@ -364,7 +374,7 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) ALLOCATE (buf(CD_HFMF_MirrorSize(a%cables(1))), fresh(CD_HFMF_MirrorSize(b%cables(1)))) CALL CD_HFMF_PackMirror(a%cables(1), buf, es, em) nvc = CD_HFMF_VIVMirrorSize(a%cables(1)) - ok = ok .AND. nvc == MERGE(6, 3, il_case)*a%cables(1)%line%nn + 1 + ok = ok .AND. nvc == (MERGE(6, 3, il_case) + MERGE(2, 0, wake_case))*a%cables(1)%line%nn + 1 IF (.NOT. with_viv) THEN ! the cable's VIV block as the fresh build has it (the torsion-free cable ends with it) CALL CD_HFMF_PackMirror(b%cables(1), fresh, es, em) @@ -382,6 +392,8 @@ LOGICAL FUNCTION identical(a, b) RESULT(same) MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_phi - b%sys%fast%system%lines(1)%viv_phi)) <= 0.0_wp .AND. & MAXVAL(ABS(a%cables(1)%line%q - b%cables(1)%line%q)) <= 0.0_wp .AND. & MAXVAL(ABS(a%cables(1)%line%viv_phi - b%cables(1)%line%viv_phi)) <= 0.0_wp + IF (same .AND. wake_case) same = a%cables(1)%line%viv_wake .AND. & + MAXVAL(ABS(a%cables(1)%line%wo_s - b%cables(1)%line%wo_s)) <= 0.0_wp IF (.NOT. (same .AND. il_case)) RETURN same = a%sys%fast%system%lines(1)%has_viv_il .AND. a%cables(1)%line%has_viv_il .AND. & MAXVAL(ABS(a%sys%fast%system%lines(1)%vil_phi - b%sys%fast%system%lines(1)%vil_phi)) <= 0.0_wp .AND. & @@ -410,20 +422,25 @@ SUBROUTINE response(z, ad, f) IF (n > 1) f = REAL(n - 1, wp)/(t1 - t0) END SUBROUTINE response - SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline) + SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake) !! The EI = 0 riser (line 1) and the finite-EI cable (line 2), 20 m apart across the current; !! VIVrmsWindow 0.25 s unless window is given (0: none), and a deck dtM when dtm is given; - !! inline adds the in-line VIV of both types (a VIV section, ClX 0.85). + !! inline adds the in-line VIV of both types (a VIV section, ClX 0.85); wake gives the cable + !! the wake oscillator instead of its lift (Cl 0 and a WAKE OSCILLATOR row, C_L0 0.3). CHARACTER(*), INTENT(IN) :: path REAL(wp), INTENT(IN) :: cl REAL(wp), INTENT(IN), OPTIONAL :: window, dtm - LOGICAL, INTENT(IN), OPTIONAL :: anchor_first, inline + LOGICAL, INTENT(IN), OPTIONAL :: anchor_first, inline, wake INTEGER :: u - LOGICAL :: stock + LOGICAL :: stock, wo REAL(wp) :: tw - CHARACTER(32) :: len_txt, cl_txt + CHARACTER(32) :: len_txt, cl_txt, clc_txt WRITE (len_txt, '(F12.6)') 100.0_wp/(1.0_wp + 5.0e4_wp/5.0e7_wp) WRITE (cl_txt, '(F4.2)') cl + wo = .FALSE. + IF (PRESENT(wake)) wo = wake + clc_txt = cl_txt + IF (wo) clc_txt = '0.00' OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') WRITE (u, '(A)') '--------------------- CableDyn Input File ---' WRITE (u, '(A)') 'coupled VIV gate: taut riser and cable in a host cross current' @@ -431,7 +448,7 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline) WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' WRITE (u, '(A)') '(name) (m) (kg/m) (N) (N-s/-) (-) (-) (-) (-) (-) (-) (-) (-)' WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 0.0 1.2 1.0 0.0 0.0 '//TRIM(cl_txt)//' 0.08 0.18' - WRITE (u, '(A)') 'cable 0.10 10.0 5.0e7 -0.8 1.0 1.2 1.0 0.0 0.0 '//TRIM(cl_txt)//' 0.08 0.18' + WRITE (u, '(A)') 'cable 0.10 10.0 5.0e7 -0.8 1.0 1.2 1.0 0.0 0.0 '//TRIM(clc_txt)//' 0.08 0.18' WRITE (u, '(A)') '--------------------- POINTS ---' WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' WRITE (u, '(A)') '(#) (-) (m) (m) (m) (kg) (m^3) (m^2) (-)' @@ -461,6 +478,11 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline) WRITE (u, '(A)') 'cable 0.85 0.15' END IF END IF + IF (wo) THEN + WRITE (u, '(A)') '--------------------- WAKE OSCILLATOR ---' + WRITE (u, '(A)') 'TypeName CL0 St eps A' + WRITE (u, '(A)') 'cable 0.3 0.2 0.3 12' + END IF WRITE (u, '(A)') '--------------------- OPTIONS ---' WRITE (u, '(A)') '100.0 WtrDpth' WRITE (u, '(A)') '1025.0 rhoW' diff --git a/tests/test_viv_wake_deck.f90 b/tests/test_viv_wake_deck.f90 new file mode 100644 index 00000000..75465161 --- /dev/null +++ b/tests/test_viv_wake_deck.f90 @@ -0,0 +1,300 @@ +! File: tests/test_viv_wake_deck.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_wake_deck + !! Wake-oscillator VIV on a deck (the optional WAKE OSCILLATOR section, TypeName CL0 [St [eps + !! [A]]]; Facchinetti et al. 2004): the taut finite-EI cable of the in-line VIV gate (100 m, + !! D 0.1 m, EI 1 N m^2, 50 kN, pinned at 50 m depth) in a uniform 0.15 m/s current along y, its + !! type with no synchronisation lift (Cl 0) and the row riser 0.3 (St 0.2, eps 0.3, A 12). + !! W1 lock-in: with the acceleration coupling A 12 the cross-flow response is captured by the + !! cable's first mode, below the wake's own frequency St U/D = 0.30 Hz by more than + !! 0.01 Hz, at a steady mid-span A/D between 0.4 and 0.8; uncoupled (A 0) the wake drives + !! the cable at its own 0.30 Hz (within 0.005 Hz), and the coupled amplitude is at least + !! three times the uncoupled one; + !! W2 power: over 60-100 s the mean wake-lift power (VIVPow1) is positive and the drag and + !! damping powers (DragPow1, DampPow1) take it out within 0.5 %; + !! W3 a row with CL0 0 is the deck without the section, to the printed digits; + !! W4 refusals by name: a malformed or non-numeric row, an unknown or repeated type, St, eps or + !! A out of range, a type that keeps its synchronisation lift (Cl > 0, which in-line VIV + !! also needs), a line that mixes the two models, and an EI = 0 line. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp, D = 0.1_wp, F_WAKE = 0.2_wp*0.15_wp/0.1_wp + INTEGER :: nfail = 0 + + CALL write_current('wod_current.dat') + CALL check_runs() + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: wake-oscillator deck gates' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE write_current(path) + CHARACTER(*), INTENT(IN) :: path + INTEGER :: u + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') 'MoorDyn v2 water kinematics file' + WRITE (u, '(A)') 'uniform current along y for the wake-oscillator deck gate' + WRITE (u, '(A)') '--------------------------- WAVES -------------------------------------' + WRITE (u, '(A)') '0 WaveKinMod - type of wave input' + WRITE (u, '(A)') '"" WaveKinFile - file containing wave elevation time series' + WRITE (u, '(A)') '0.000000E+00 dtWave - time step to use in setting up wave kinematics grid (s)' + WRITE (u, '(A)') '0 WaveDir - wave heading (deg)' + WRITE (u, '(A)') '2 - X wave input type' + WRITE (u, '(A)') '-10, 110, 2 - X wave grid point data' + WRITE (u, '(A)') '2 - Y wave input type' + WRITE (u, '(A)') '-10, 10, 2 - Y wave grid point data' + WRITE (u, '(A)') '2 - Z wave input type' + WRITE (u, '(A)') '-100, 0, 2 - Z wave grid point data' + WRITE (u, '(A)') '--------------------------- CURRENT -------------------------------------' + WRITE (u, '(A)') '1 CurrentMod - type of current input' + WRITE (u, '(A)') 'z-depth x-current y-current' + WRITE (u, '(A)') '(m) (m/s) (m/s)' + WRITE (u, '(A)') '0.0 0.0 0.15' + WRITE (u, '(A)') '-100.0 0.0 0.15' + WRITE (u, '(A)') '--------------------- need this line ------------------' + CLOSE (u) + END SUBROUTINE write_current + + SUBROUTINE write_deck(path, wake_rows, tmax, cl, ei, viv_row, mixed) + !! wake_rows: the WAKE OSCILLATOR section's data rows, ';'-separated ('' for no section); cl the + !! type's LINE TYPES Cl (default 0), ei its EI (default 1), viv_row a VIV section row, mixed: + !! the line in two sections, the second of a type 'lift' with Cl 0.8. + CHARACTER(*), INTENT(IN) :: path, wake_rows + REAL(wp), INTENT(IN) :: tmax + CHARACTER(*), INTENT(IN), OPTIONAL :: cl, ei, viv_row + LOGICAL, INTENT(IN), OPTIONAL :: mixed + CHARACTER(32) :: cl_col, ei_col + INTEGER :: u, i0, i1 + LOGICAL :: two + cl_col = '0.0' + IF (PRESENT(cl)) cl_col = cl + ei_col = '1.0' + IF (PRESENT(ei)) ei_col = ei + two = .FALSE. + IF (PRESENT(mixed)) two = mixed + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' + WRITE (u, '(A)') 'wake-oscillator deck gate: taut cable in a uniform current' + WRITE (u, '(A)') '----------------------- LINE TYPES ------------------------------------------' + WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//TRIM(ei_col)//' 1.2 1.0 0.0 0.0 '// & + TRIM(cl_col)//' 0.08 0.18' + WRITE (u, '(A)') 'lift 0.10 10.0 5.0e7 -0.8 '//TRIM(ei_col)//' 1.2 1.0 0.0 0.0 '// & + '0.8 0.08 0.18' + WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' + WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' + WRITE (u, '(A)') '1 Coupled 0.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '2 Fixed 100.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '----------------------- LINES -----------------------------------------------' + WRITE (u, '(A)') 'ID NodeA NodeB Outputs' + WRITE (u, '(A)') '1 1 2 -' + WRITE (u, '(A)') '----------------------- SECTIONS --------------------------------------------' + WRITE (u, '(A)') 'LineID LineType Length NumSegs' + IF (two) THEN + WRITE (u, '(A)') '1 riser 49.950050 25' + WRITE (u, '(A)') '1 lift 49.950050 25' + ELSE + WRITE (u, '(A)') '1 riser 99.900100 50' + END IF + IF (PRESENT(viv_row)) THEN + WRITE (u, '(A)') '----------------------- VIV -------------------------------------------------' + WRITE (u, '(A)') 'TypeName ClX alpha' + WRITE (u, '(A)') viv_row + END IF + IF (LEN_TRIM(wake_rows) > 0) THEN + WRITE (u, '(A)') '----------------------- WAKE OSCILLATOR -------------------------------------' + WRITE (u, '(A)') 'TypeName CL0 St eps A' + i0 = 1 + DO + i1 = INDEX(wake_rows(i0:), ';') + IF (i1 == 0) THEN + WRITE (u, '(A)') TRIM(wake_rows(i0:)) + EXIT + END IF + WRITE (u, '(A)') wake_rows(i0:i0 + i1 - 2) + i0 = i0 + i1 + END DO + END IF + WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' + WRITE (u, '(A)') '0.01 dtM' + WRITE (u, '(A)') '100.0 WtrDpth' + WRITE (u, '(A)') '1025.0 rhoW' + WRITE (u, '(A)') '9.80665 g' + WRITE (u, '(A)') 'wod_current.dat WaterKin' + WRITE (u, '(A,F8.3,A)') ' ', tmax, ' TMax' + WRITE (u, '(A)') '---------------------- OUTPUTS -----------------------------------------------' + WRITE (u, '(A)') 'L1N25PZ' + WRITE (u, '(A)') 'VIVPow1' + WRITE (u, '(A)') 'DragPow1' + WRITE (u, '(A)') 'DampPow1' + WRITE (u, '(A)') 'END' + WRITE (u, '(A)') '------------------------- need this line --------------------------------------' + CLOSE (u) + END SUBROUTINE write_deck + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK .AND. conv + END SUBROUTINE run + + SUBROUTINE read_out(path, tab, n) + !! The rows (time, L1N25PZ, VIVPow1, DragPow1, DampPow1) of a deck's main output file. + CHARACTER(*), INTENT(IN) :: path + REAL(wp), ALLOCATABLE, INTENT(OUT) :: tab(:, :) + INTEGER, INTENT(OUT) :: n + CHARACTER(1024) :: rec + INTEGER :: u, ios + ALLOCATE (tab(5, 20000)) + n = 0 + OPEN (NEWUNIT=u, FILE=path, STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (u, '(A)') rec + READ (u, '(A)') rec + DO + READ (u, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + IF (n == SIZE(tab, 2)) EXIT + n = n + 1 + READ (rec, *) tab(:, n) + END DO + CLOSE (u) + END SUBROUTINE read_out + + REAL(wp) FUNCTION peak_frequency(tt, x) RESULT(fpk) + !! The frequency of the largest Fourier amplitude of x - mean(x) on 0.05-2 Hz (0.001 Hz grid). + REAL(wp), INTENT(IN) :: tt(:), x(:) + REAL(wp) :: xm(SIZE(x)), f, best, re, im + INTEGER :: j + xm = x - SUM(x)/REAL(SIZE(x), wp) + best = -1.0_wp + fpk = 0.0_wp + DO j = 0, 1950 + f = 0.05_wp + 0.001_wp*REAL(j, wp) + re = SUM(xm*COS(2.0_wp*PI*f*tt)) + im = SUM(xm*SIN(2.0_wp*PI*f*tt)) + IF (re*re + im*im > best) THEN + best = re*re + im*im + fpk = f + END IF + END DO + END FUNCTION peak_frequency + + SUBROUTINE window_stats(tab, n, t0, t1, ad, f) + !! Half peak-to-peak mid-span amplitude over D and dominant frequency on [t0, t1]. + REAL(wp), INTENT(IN) :: tab(:, :), t0, t1 + INTEGER, INTENT(IN) :: n + REAL(wp), INTENT(OUT) :: ad, f + LOGICAL :: keep(n) + REAL(wp), ALLOCATABLE :: tt(:), z(:) + keep = tab(1, 1:n) >= t0 .AND. tab(1, 1:n) <= t1 + tt = PACK(tab(1, 1:n), keep) + z = PACK(tab(2, 1:n), keep) + ad = 0.5_wp*(MAXVAL(z) - MINVAL(z))/D + f = peak_frequency(tt, z) + END SUBROUTINE window_stats + + SUBROUTINE check_runs() + REAL(wp), ALLOCATABLE :: tw(:, :), t0(:, :), tn(:, :), tz(:, :) + INTEGER :: nw, n0, nn, nz + REAL(wp) :: ad_w, f_w, ad_w2, f_w2, ad_0, f_0, pv, pd, pb + LOGICAL :: ok, keep(20000) + CHARACTER(1024) :: msg + CALL write_deck('wod_wake.dat', 'riser 0.3', 100.0_wp) + CALL run('wod_wake.dat', 'wod_wake', ok, msg) + CALL require(ok, 'W1: the wake-oscillator deck runs: '//TRIM(msg)) + CALL write_deck('wod_a0.dat', 'riser 0.3 0.2 0.3 0.0', 100.0_wp) + CALL run('wod_a0.dat', 'wod_a0', ok, msg) + CALL require(ok, 'W1: the uncoupled deck (A 0) runs: '//TRIM(msg)) + CALL read_out('wod_wake.out', tw, nw) + CALL read_out('wod_a0.out', t0, n0) + CALL require(nw > 1000 .AND. n0 == nw, 'W1: the runs wrote matching rows') + IF (.NOT. (nw > 1000 .AND. n0 == nw)) RETURN + CALL window_stats(tw, nw, 50.0_wp, 75.0_wp, ad_w, f_w) + CALL window_stats(tw, nw, 75.0_wp, 100.0_wp, ad_w2, f_w2) + CALL window_stats(t0, n0, 50.0_wp, 100.0_wp, ad_0, f_0) + WRITE (*, '(A,2F8.4,A,2F8.4,A,F7.4)') 'W1: coupled A/D, f [Hz] (50-75 s, 75-100 s) ', ad_w, f_w, ', ', ad_w2, & + f_w2, '; wake frequency ', F_WAKE + WRITE (*, '(A,2F8.4)') 'W1: uncoupled (A 0) A/D, f [Hz] ', ad_0, f_0 + CALL require(f_w < F_WAKE - 0.01_wp .AND. ad_w > 0.4_wp .AND. ad_w < 0.8_wp, & + 'W1: the coupled response locks in below the wake frequency at A/D 0.4-0.8') + CALL require(ABS(ad_w2/ad_w - 1.0_wp) <= 0.01_wp .AND. ABS(f_w2 - f_w) <= 0.002_wp, 'W1: and is steady') + CALL require(ABS(f_0 - F_WAKE) <= 0.005_wp, 'W1: uncoupled, the wake drives the cable at its own frequency') + CALL require(ad_w >= 3.0_wp*ad_0, 'W1: lock-in at least triples the uncoupled amplitude') + ! W2: the power balance of the steady lock-in + keep(1:nw) = tw(1, 1:nw) >= 60.0_wp + pv = SUM(PACK(tw(3, 1:nw), keep(1:nw)))/COUNT(keep(1:nw)) + pd = SUM(PACK(tw(4, 1:nw), keep(1:nw)))/COUNT(keep(1:nw)) + pb = SUM(PACK(tw(5, 1:nw), keep(1:nw)))/COUNT(keep(1:nw)) + WRITE (*, '(A,3ES12.4)') 'W2: mean VIVPow, DragPow, DampPow [W] over 60-100 s: ', pv, pd, pb + CALL require(pv > 0.0_wp .AND. ABS(pv + pd + pb) <= 0.005_wp*pv, & + 'W2: the drag and damping take out the wake-lift power within 0.5 %') + ! W3: CL0 0 is no wake oscillator + CALL write_deck('wod_none.dat', '', 20.0_wp) + CALL run('wod_none.dat', 'wod_none', ok, msg) + CALL require(ok, 'W3: the deck without the section runs: '//TRIM(msg)) + CALL write_deck('wod_zero.dat', 'riser 0.0', 20.0_wp) + CALL run('wod_zero.dat', 'wod_zero', ok, msg) + CALL require(ok, 'W3: the CL0 0 deck runs: '//TRIM(msg)) + CALL read_out('wod_none.out', tn, nn) + CALL read_out('wod_zero.out', tz, nz) + CALL require(nn > 100 .AND. nz == nn, 'W3: the runs wrote matching rows') + IF (nn > 100 .AND. nz == nn) CALL require(ALL(tz(:, 1:nz) == tn(:, 1:nn)), & + 'W3: a row with CL0 0 is the deck without the section') + END SUBROUTINE check_runs + + SUBROUTINE check_refusals() + CALL refused('riser 0.3 0.2 0.3 12 1', 'TypeName CL0 [St [eps [A]]]', 'a row of six columns') + CALL refused('riser 0.3 x', 'plain numbers', 'a non-numeric St') + CALL refused('cable 0.3', 'undefined LINE TYPE', 'an unknown type') + CALL refused('riser 0.3;riser 0.2', 'twice', 'a repeated type') + CALL refused('riser -0.1', 'CL0 must be non-negative', 'a negative CL0') + CALL refused('riser 0.3 0.0', 'St > 0, eps > 0 and A >= 0', 'St = 0') + CALL refused('riser 0.3 0.2 0.0', 'St > 0, eps > 0 and A >= 0', 'eps = 0') + CALL refused('riser 0.3 0.2 0.3 -1', 'St > 0, eps > 0 and A >= 0', 'a negative A') + CALL refused('riser 0.3', 'give the type LINE TYPES Cl 0', 'a type that keeps its lift', cl='0.8') + CALL refused('riser 0.3', 'a line takes one VIV model', 'a line mixing the two models', mixed=.TRUE.) + CALL refused('riser 0.3', 'finite-EI cables (EI > 0) only', 'an EI = 0 line', ei='0.0') + END SUBROUTINE check_refusals + + SUBROUTINE refused(rows, needle, what, cl, ei, viv_row, mixed) + CHARACTER(*), INTENT(IN) :: rows, needle, what + CHARACTER(*), INTENT(IN), OPTIONAL :: cl, ei, viv_row + LOGICAL, INTENT(IN), OPTIONAL :: mixed + LOGICAL :: ok + CHARACTER(1024) :: msg + IF (PRESENT(viv_row)) THEN + CALL write_deck('wod_bad.dat', rows, 1.0_wp, cl=cl, viv_row=viv_row) + ELSE IF (PRESENT(cl)) THEN + CALL write_deck('wod_bad.dat', rows, 1.0_wp, cl=cl) + ELSE IF (PRESENT(ei)) THEN + CALL write_deck('wod_bad.dat', rows, 1.0_wp, ei=ei) + ELSE IF (PRESENT(mixed)) THEN + CALL write_deck('wod_bad.dat', rows, 1.0_wp, mixed=mixed) + ELSE + CALL write_deck('wod_bad.dat', rows, 1.0_wp) + END IF + CALL run('wod_bad.dat', 'wod_bad', ok, msg) + CALL require(.NOT. ok .AND. INDEX(msg, needle) > 0, 'W4: '//what//' is refused: '//TRIM(msg)) + END SUBROUTINE refused + +END PROGRAM test_viv_wake_deck diff --git a/tests/test_viv_wake_kernel.f90 b/tests/test_viv_wake_kernel.f90 new file mode 100644 index 00000000..418c42ef --- /dev/null +++ b/tests/test_viv_wake_kernel.f90 @@ -0,0 +1,174 @@ +! File: tests/test_viv_wake_kernel.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_wake_kernel + !! The wake-oscillator kernel CD_VIV_Wake_Advance (Facchinetti, de Langre and Biolley, J. Fluids + !! Struct. 19, 2004, 123-140) against its published properties, with eps 0.3 and A 12: + !! K1 the free oscillator (no forcing) from q = 0.1 settles on the limit cycle q = 2 cos(om t): + !! amplitude 2 and period 2 pi/om within 1 %; + !! K2 forced at its own frequency by a structure moving as y0 D cos(om t), the lift + !! magnification K, half the first-harmonic amplitude of q, follows the closed form of their + !! Eq. 17, a one-harmonic balance, for y0 = 0.05-0.5; + !! K3 one call over an interval equals the same interval in two calls with the forcing split + !! at its midpoint, and refining the sub-steps converges at fourth order; + !! K4 a large eps (20, om 1) from (2, 0), whose damping rate eps om (q^2 - 1) is sixty times the + !! oscillation, stays finite in 0.1 s calls and matches 0.001 s calls within 1e-6 at t = 1. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_VIV, ONLY: CD_VIV_Wake_Advance, CD_VIV_WAKE_DEFAULT_EPS, CD_VIV_WAKE_DEFAULT_A + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp + REAL(wp), PARAMETER :: EPS = CD_VIV_WAKE_DEFAULT_EPS, A = CD_VIV_WAKE_DEFAULT_A + REAL(wp), PARAMETER :: D = 0.1_wp, OM = 2.0_wp*PI ! 1 Hz wake frequency + INTEGER :: nfail = 0 + + CALL check_free() + CALL check_forced() + CALL check_steps() + CALL check_stiff() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: wake-oscillator kernel' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE check_free() + REAL(wp) :: s(2), dt, qmax, t, t_up(2), q_old + INTEGER :: i, n_up + s = [0.1_wp, 0.0_wp] + dt = 0.01_wp + qmax = 0.0_wp + n_up = 0 + t_up = 0.0_wp + DO i = 1, 8000 ! 80 periods + q_old = s(1) + CALL CD_VIV_Wake_Advance(s, OM, EPS, A/D, 0.0_wp, 0.0_wp, dt) + t = REAL(i, wp)*dt + IF (t < 70.0_wp) CYCLE + qmax = MAX(qmax, ABS(s(1))) + ! upward zero crossings, interpolated + IF (q_old < 0.0_wp .AND. s(1) >= 0.0_wp .AND. n_up < 2) THEN + n_up = n_up + 1 + t_up(n_up) = t - dt*s(1)/(s(1) - q_old) + END IF + END DO + WRITE (*, '(A,F9.5,A,F9.5,A)') 'K1: limit-cycle amplitude ', qmax, ', period ', t_up(2) - t_up(1), ' s' + CALL require(ABS(qmax/2.0_wp - 1.0_wp) <= 0.01_wp, 'K1: the free limit cycle has the amplitude 2') + CALL require(n_up == 2 .AND. ABS(t_up(2) - t_up(1) - 1.0_wp) <= 0.01_wp, 'K1: and the wake period') + END SUBROUTINE check_free + + REAL(wp) FUNCTION eq17(y0) RESULT(k) + !! Facchinetti et al. (2004), Eq. 17: K = (X/36)^(1/3) + (4/(3X))^(1/3), + !! X = 9 (A/eps) y0 + sqrt((9 (A/eps) y0)^2 - 48). + REAL(wp), INTENT(IN) :: y0 + REAL(wp) :: x, b + b = 9.0_wp*(A/EPS)*y0 + x = b + SQRT(b*b - 48.0_wp) + k = (x/36.0_wp)**(1.0_wp/3.0_wp) + (4.0_wp/(3.0_wp*x))**(1.0_wp/3.0_wp) + END FUNCTION eq17 + + SUBROUTINE check_forced() + !! Eq. 17 keeps the first harmonic only; the cubic damping term also makes a third harmonic, + !! so the computed K exceeds it by a share that grows with the forcing (about 2 % at + !! y0 = 0.5). The step is converged: halving it changes K by under 1e-4 of itself. + REAL(wp), PARAMETER :: Y0S(5) = [0.05_wp, 0.1_wp, 0.2_wp, 0.3_wp, 0.5_wp] + REAL(wp) :: k_num, k_ref, worst, k_half + INTEGER :: j + worst = 0.0_wp + DO j = 1, SIZE(Y0S) + k_num = forced_k(Y0S(j), 0.005_wp) + k_ref = eq17(Y0S(j)) + worst = MAX(worst, ABS(k_num/k_ref - 1.0_wp)) + WRITE (*, '(A,F5.2,A,F8.4,A,F8.4)') 'K2: y0 ', Y0S(j), ': K ', k_num, ', Eq. 17 ', k_ref + END DO + k_half = forced_k(0.5_wp, 0.0025_wp) + WRITE (*, '(A,ES10.3)') 'K2: change of K at y0 0.5 with half the step: ', ABS(k_half - k_num) + CALL require(worst <= 0.02_wp, 'K2: the forced lift magnification follows Eq. 17 within 2 %') + CALL require(ABS(k_half - k_num) <= 1.0e-4_wp*k_num, 'K2: with a converged step') + END SUBROUTINE check_forced + + REAL(wp) FUNCTION forced_k(y0, dt) RESULT(k) + !! Half the first-harmonic amplitude of q over periods 91-100 of the forcing y0 D cos(om t). + REAL(wp), INTENT(IN) :: y0, dt + REAL(wp) :: s(2), t, c, sn + INTEGER :: i, n, n_keep + n = NINT(100.0_wp/dt) + n_keep = NINT(10.0_wp/dt) + s = [2.0_wp, 0.0_wp] + c = 0.0_wp + sn = 0.0_wp + DO i = 1, n + t = REAL(i - 1, wp)*dt + CALL CD_VIV_Wake_Advance(s, OM, EPS, A/D, -OM*OM*y0*D*COS(OM*t), -OM*OM*y0*D*COS(OM*(t + dt)), dt) + IF (i > n - n_keep) THEN + c = c + s(1)*COS(OM*(t + dt)) + sn = sn + s(1)*SIN(OM*(t + dt)) + END IF + END DO + k = 0.5_wp*(2.0_wp/REAL(n_keep, wp))*SQRT(c*c + sn*sn) + END FUNCTION forced_k + + SUBROUTINE check_steps() + REAL(wp) :: s1(2), s2(2), sc(2), sf(2), h, e1, e2 + h = 0.4_wp + s1 = [1.3_wp, -4.0_wp] + s2 = s1 + CALL CD_VIV_Wake_Advance(s1, OM, EPS, A/D, 0.2_wp, -0.6_wp, h) + CALL CD_VIV_Wake_Advance(s2, OM, EPS, A/D, 0.2_wp, -0.2_wp, 0.5_wp*h) + CALL CD_VIV_Wake_Advance(s2, OM, EPS, A/D, -0.2_wp, -0.6_wp, 0.5_wp*h) + WRITE (*, '(A,ES10.3)') 'K3: one call against two halves: ', MAXVAL(ABS(s1 - s2)) + CALL require(MAXVAL(ABS(s1 - s2)) <= 1.0e-12_wp*MAXVAL(ABS(s1)), 'K3: an interval in two calls is one call') + ! fourth order: calls short enough for one sub-step each (om h/N <= 0.1) set the step; 32 and + ! 64 of them against 1024 + sf = march(1024, h) + e1 = MAXVAL(ABS(march(32, h) - sf)) + e2 = MAXVAL(ABS(march(64, h) - sf)) + WRITE (*, '(A,2ES11.3,A,F7.2)') 'K3: errors with 32 and 64 steps ', e1, e2, ', ratio ', e1/e2 + CALL require(e1 < 1.0e-5_wp*MAXVAL(ABS(sf)), 'K3: the advance is accurate at om dt = 0.08') + CALL require(e1/e2 > 12.0_wp, 'K3: and converges at fourth order (ratio near 16)') + ! the kernel's own sub-steps in one call match the reference as closely + sc = [1.3_wp, -4.0_wp] + CALL CD_VIV_Wake_Advance(sc, OM, EPS, A/D, 0.2_wp, -0.6_wp, h) + CALL require(MAXVAL(ABS(sc - sf)) < 1.0e-5_wp*MAXVAL(ABS(sf)), 'K3: one call sub-steps as finely') + END SUBROUTINE check_steps + + FUNCTION march(n, h) RESULT(x) + !! The K3 interval in n equal calls, the forcing linear from 0.2 to -0.6 over it. + INTEGER, INTENT(IN) :: n + REAL(wp), INTENT(IN) :: h + REAL(wp) :: x(2) + INTEGER :: k + x = [1.3_wp, -4.0_wp] + DO k = 1, n + CALL CD_VIV_Wake_Advance(x, OM, EPS, A/D, 0.2_wp - 0.8_wp*REAL(k - 1, wp)/REAL(n, wp), & + 0.2_wp - 0.8_wp*REAL(k, wp)/REAL(n, wp), h/REAL(n, wp)) + END DO + END FUNCTION march + + SUBROUTINE check_stiff() + !! The sub-steps follow the damping rate as well as the oscillation (eps 20, om 1). + REAL(wp) :: sc(2), sf(2) + INTEGER :: k + sc = [2.0_wp, 0.0_wp] + sf = sc + DO k = 1, 10 + CALL CD_VIV_Wake_Advance(sc, 1.0_wp, 20.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.1_wp) + END DO + DO k = 1, 1000 + CALL CD_VIV_Wake_Advance(sf, 1.0_wp, 20.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.001_wp) + END DO + WRITE (*, '(A,2ES12.4,A,ES10.3)') 'K4: eps 20 at t = 1 s: ', sc, ', against 1 ms calls ', MAXVAL(ABS(sc - sf)) + CALL require(ALL(ABS(sc) < 10.0_wp) .AND. MAXVAL(ABS(sc - sf)) <= 1.0e-6_wp, 'K4: a large eps stays '// & + 'resolved in long calls') + END SUBROUTINE check_stiff + +END PROGRAM test_viv_wake_kernel From 3a2753f591bfa9bc093b7dbb1c491fc711a0acf3 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 13 Nov 2026 17:43:34 +0900 Subject: [PATCH 12/47] feat: amplitude-dependent VIV coefficients (VIV AMPLITUDE section) (#155) Thorsen, Saevik and Larsen (J. Fluids Struct. 61, 2016) make the cross-flow excitation coefficient of the synchronisation model a function of the vibration amplitude, C_v(y0/D), fitted to riser tests; drag amplification laws of vibrating cylinders (Chaplin et al. 2005, Eq. 4) are functions of the same amplitude. An optional VIV AMPLITUDE section, rows TypeName AD Cv [CdAmp], gives a line type a table over the amplitude ratio A/D of the coefficient Cv that replaces its LINE TYPES Cl and a factor CdAmp (default 1) of its normal drag coefficient, linear between rows and held beyond the end ones (2 to 32 rows, A/D strictly increasing, the type with Cl > 0). Each node estimates its amplitude as Thorsen et al. do (Eq. 8 and 9): half the travel between two zero crossings of the cross-flow velocity (trapezoidal, crossings placed by linear interpolation; the travel is carried signed, so a reversal through a sample at zero ends a half cycle and a touch does not), smoothed by a tenth of the difference per step (k_a = 0.1/dt). The velocity is taken across the ambient flow normal to the line, their incoming flow: the phase's axis across the relative flow turns with the node's own velocity and read the amplitude 16 % low at A/D 0.68. An element reads its table at the mean of its free nodes over its diameter, at the committed estimate, so the Jacobians only scale. The estimate is updated at the end of each converged step from the committed one. The estimate is four more rows of the per-node VIV motion statistics (viv_ms, CD_VIV_NMS_AMP rows with a table, CD_VIV_NMS without, so a deck without a table runs and checkpoints exactly as before), carried by the step-recovery, snapshot and system rewind paths (the system snapshot and the sub-step slots follow a line that gains tables, a restore across that change is refused) and appended to the line VIV checkpoint blocks (4 nn values). VIVAmpN writes the smoothed estimate [m] on a line with a table. The Python deck reader mirrors the section and channel checks; the builder writes the table (LineType.viv_amplitude). Checks: - tests/test_viv_amplitude_kernel.f90: a harmonic velocity gives the amplitude within the trapezoidal (om dt)^2/12 (1.95e-6; halving the step quarters it), the smoothing is Eq. 9 step by step, a touch of zero ends no half cycle while a reversal through a zero sample does (a triangular velocity on its zeros: nine half cycles at y0 = 1 exactly), a growing oscillation gives each half cycle's mean amplitude within 0.1 %, tables interpolate and hold, a NaN amplitude stays inside a table, and bad tables are refused by name; - tests/test_viv_amplitude_deck.f90, on the taut gate line as an EI = 0 line and a finite-EI cable: Cv = Cl with CdAmp 1 is the deck without the section bit for bit; VIVAmp follows the steady mid-span response within 0.03 % (A/D 0.68); a Cv falling to zero at A/D 0.3 holds the response at 0.28; Cv 0 with CdAmp 2 settles at the static offset of Cd 2.4 to six digits; thirteen refusals; - tests/test_viv_coupled.f90: with tables on both lines the checkpoint blocks grow by 4 nn, the restarted run continues bit for bit, a rebuild without the VIV state does not, and a rewound step repeats; - tests/test_system.f90: a snapshot after a line gains tables is resized and restores, a restore of one taken before is refused untouched; - tests/test_model.f90: tables set on a sub-stepped VIV line after it has stepped, the sub-step slots take the six rows and 100 more steps converge; - Python: rows read, kept and refused as natively, the builder writes them, six native/Python parity decks agree. Full ctest under both BLAS kernels, Debug -fcheck=all on the new and changed tests, pytest, ruff, mypy, Sphinx -W, pre-commit. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 9 + CMakeLists.txt | 14 ++ doc/capabilities.rst | 6 + doc/driver_format.md | 53 ++++- doc/outputs.rst | 9 + doc/theory.rst | 44 ++++ python/cabledyn/builder.py | 41 +++- python/cabledyn/deck_file.py | 137 +++++++++++- python/tests/test_builder.py | 42 ++++ python/tests/test_deck_file.py | 66 ++++++ python/tests/test_end_to_end.py | 55 +++++ src/CableDyn_DeckDriver.f90 | 276 ++++++++++++++++++++++-- src/CableDyn_HermiteCableDynamic.f90 | 187 +++++++++++++++-- src/CableDyn_Model.f90 | 221 +++++++++++++++++--- src/CableDyn_OpenFAST_HermiteFMF.f90 | 47 +++-- src/CableDyn_System.f90 | 123 ++++++++--- src/CableDyn_VIV.f90 | 141 +++++++++++++ tests/test_model.f90 | 34 +++ tests/test_system.f90 | 75 ++++++- tests/test_viv_amplitude_deck.f90 | 300 +++++++++++++++++++++++++++ tests/test_viv_amplitude_kernel.f90 | 241 +++++++++++++++++++++ tests/test_viv_coupled.f90 | 43 +++- 22 files changed, 2047 insertions(+), 117 deletions(-) create mode 100644 tests/test_viv_amplitude_deck.f90 create mode 100644 tests/test_viv_amplitude_kernel.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cac3111..6ef04ae8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,15 @@ All notable changes to CableDyn are recorded in this file. The format follows 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. +- 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 + at the amplitude estimate of Thorsen et al. (2016, Eq. 8 and 9) of each node, on `EI = 0` lines + and finite-EI cables, standalone and coupled. `VIVAmpN` writes the estimate. On the taut + example line it follows the steady response amplitude within 0.03 %, a falling `Cv` limits the + response inside its falling range, and a table with `Cv = Cl` and `CdAmp = 1` is the line + without it, bit for bit. The estimate is in the step-recovery, snapshot and checkpoint state; + the Python deck reader and builder take the section. - Load power channels `VIVPow`, `DragPow` and `DampPow` [W], and `N` per unit length about a node [W/m]: the power the VIV loads, the drag and the structural damping (`BA`, `Bb`) deliver to a line at the committed state, on `EI = 0` lines and finite-EI cables, diff --git a/CMakeLists.txt b/CMakeLists.txt index 6346dd58..1c134aff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1330,6 +1330,20 @@ target_link_libraries(test_viv_wake_deck PRIVATE cabledyn_core) add_test(NAME viv_wake_deck COMMAND test_viv_wake_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_tests_properties(viv_wake_deck PROPERTIES LABELS "fortran;integration;dynamic;viv" TIMEOUT 1200) +# VIV amplitude estimate (Thorsen et al. 2016, Eq. 8 and 9) and the amplitude tables. +add_executable(test_viv_amplitude_kernel tests/test_viv_amplitude_kernel.f90) +target_link_libraries(test_viv_amplitude_kernel PRIVATE cabledyn_core) +add_test(NAME viv_amplitude_kernel COMMAND test_viv_amplitude_kernel) +set_tests_properties(viv_amplitude_kernel PROPERTIES LABELS "fortran;unit;dynamic;viv") + +# Amplitude-dependent VIV coefficients on a deck (VIV AMPLITUDE section), both line kinds: the +# identity table, the amplitude channel against the response, self-limiting, drag amplification +# and the refusals. +add_executable(test_viv_amplitude_deck tests/test_viv_amplitude_deck.f90) +target_link_libraries(test_viv_amplitude_deck PRIVATE cabledyn_core) +add_test(NAME viv_amplitude_deck COMMAND test_viv_amplitude_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(viv_amplitude_deck PROPERTIES LABELS "fortran;integration;dynamic;viv" TIMEOUT 1200) + add_executable(test_hermite_viv tests/test_hermite_viv.f90) target_link_libraries(test_hermite_viv PRIVATE cabledyn_core) add_test(NAME hermite_viv COMMAND test_hermite_viv) diff --git a/doc/capabilities.rst b/doc/capabilities.rst index 16c9d3c8..28b3690a 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -155,6 +155,12 @@ Line and constitutive capability - 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 (:ref:`theory-viv-wake`), its state in the checkpoint + * - Amplitude-dependent VIV coefficients (``VIV AMPLITUDE`` section ``AD``, ``Cv``, ``CdAmp``) + - Standalone and coupled + - a table over the cross-flow amplitude of the synchronisation coefficient and a drag + factor, read at the amplitude estimate of Thorsen et al. (2016) (``VIVAmp`` channel), on + ``EI = 0`` lines and finite-EI cables (:ref:`theory-viv-amplitude`), its state in the + checkpoint Loads and environment --------------------- diff --git a/doc/driver_format.md b/doc/driver_format.md index 919c972b..97d81fb5 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -298,7 +298,8 @@ the half-range and centre of its band in non-dimensional frequency (MoorDyn's `d `0 <= dF < cF`, and the line's drag in water. It acts in the dynamics on `EI = 0` lines and finite-EI cables (see [Cross-flow VIV](theory.rst)). The in-line force of a type is a [VIV](#viv-optional) section row; a [WAKE OSCILLATOR](#wake-oscillator-optional) row replaces the -lift by a wake oscillator. +lift by a wake oscillator, and a [VIV AMPLITUDE](#viv-amplitude-optional) table makes `Cl` (and +`Cd`) depend on the cross-flow amplitude. **Viscoelastic axial stiffness (MoorDyn `ElasticMod`).** The EA and BA columns accept bar-separated parts: @@ -1239,6 +1240,55 @@ Behaviour: 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. +### VIV AMPLITUDE (optional) + +Amplitude-dependent coefficients of the synchronisation model of a line type (Thorsen et al. +2016): a table over the cross-flow amplitude ratio A/D of the coefficient `Cv` that replaces the +type's LINE TYPES `Cl`, and of a factor `CdAmp` of its normal drag coefficient `Cd` (see +[Amplitude-dependent coefficients](theory.rst)). The rows of one type follow each other in +increasing A/D. + +```text +--------------------- VIV AMPLITUDE ------------------------------------ +TypeName AD Cv CdAmp +(-) (-) (-) (-) +riser 0.0 0.8 1.0 +riser 0.3 0.9 1.5 +riser 0.6 0.0 2.0 +``` + +| Column | Meaning | +|--------|---------| +| `TypeName` | an existing LINE TYPES name (case-insensitive) whose `Cl > 0` | +| `AD` | amplitude ratio A/D >= 0 of the row, strictly increasing over the type's rows | +| `Cv` | cross-flow coefficient >= 0 at that amplitude, in place of `Cl` | +| `CdAmp` | optional factor > 0 of the type's normal drag coefficient at that amplitude (default 1) | + +Behaviour: + +- Each node estimates its cross-flow amplitude as Thorsen et al. do (their Eq. 8 and 9): half the + travel of the node across the ambient flow between two zero crossings of its cross-flow + velocity, smoothed by a tenth of the difference at every time step. An element takes the mean of + its free nodes over its diameter as A/D (the one free node next to a fixed end or anchor), and + from its table `Cv` (for the lift) and `CdAmp` + (times `Cd`, for the normal Morison drag), linear between rows and held beyond the first and + last. The coefficients of a step use the estimate of the committed state. The estimate starts + at 0, and the static equilibrium takes the type's own `Cd`, so a table whose `CdAmp` at A/D 0 + is not 1 starts the run off that equilibrium. +- `VIVAmpN` (OUTPUTS) is the smoothed amplitude of node J [m]. +- A table whose `Cv` falls to zero above some A/D limits the response there (Thorsen et al. fit + such a curve to riser tests, their Fig. 7). `CdAmp` gives the drag amplification of a vibrating + cylinder, for example Chaplin et al. (2005, Eq. 4), `Cd/Cd0 = 1 + 2.3 s + 1.7 s^2` with the + r.m.s. cross-flow displacement `s = (A/D)/sqrt(2)` of a harmonic response. +- The estimate assumes a narrow-band response, as theirs does. With the in-line VIV of a `VIV` + section row, `ClX` and `Chh` stay constant. The estimate is part of the step-recovery, snapshot + and checkpoint state. A table with `Cv = Cl` and `CdAmp = 1` throughout runs as the type + without it. +- It acts on `EI = 0` lines and finite-EI cables, standalone and coupled. A row fails if it is not + `TypeName AD Cv [CdAmp]`, names an undefined type or one without the synchronisation lift + (`Cl = 0`, as a wake-oscillator type), holds a value out of range, does not increase in `AD`, + or has other columns than the type's earlier rows; a type takes 2 to 32 rows. + ### FAILURE (optional, EI = 0 decks) A FAILURE row detaches line ends from a point during a dynamic run, with MoorDyn's trigger rules. @@ -1713,6 +1763,7 @@ bending moment. None of these channels is mandatory. | `DragPow` | line L power of the Morison drag (and, on a finite-EI line, its ATTACHMENTS' drag) | W | | `DampPow` | line L power of the structural damping (`BA`, and `EI|Bb` on a finite-EI line); never positive | W | | `VIVPowN`, `DragPowN`, `DampPowN` | the same per unit unstretched length about node J (node J's share: half of each of its elements' power and its own node loads', over half their unstretched length) | W/m | +| `VIVAmpN` | line L smoothed cross-flow amplitude estimate at node J (Thorsen et al. 2016, Eq. 9), which a [VIV AMPLITUDE](#viv-amplitude-optional) table reads; only on a line with such a table; 0 at a node without VIV | m | - ``/`

` are deck LINE/POINT **ids**, not array positions. A channel that matches no supported form, names an unknown id, or carries trailing text (for example `Point2px_raw`) is a diff --git a/doc/outputs.rst b/doc/outputs.rst index 1e8fb1aa..988ff65e 100644 --- a/doc/outputs.rst +++ b/doc/outputs.rst @@ -918,6 +918,15 @@ three balance within 0.5 % of the VIV power, the line's loss of energy over the response settles, and as an ``EI = 0`` line the same. Integrating a channel over the output times gives the work of its load, :math:`W = \int P\,dt`; a static run reports 0. +VIV amplitude channel +~~~~~~~~~~~~~~~~~~~~~ + +``VIVAmpN`` [m] is the smoothed cross-flow amplitude estimate of node ``J`` of line ``L``, +the amplitude at which a ``VIV AMPLITUDE`` table reads the coefficients of the node's elements +(:ref:`theory-viv-amplitude`): half the node's travel across the ambient flow between two zero +crossings of its cross-flow velocity, smoothed over about ten time steps. It is requested only on +a line with such a table, and is 0 at a node without VIV and in a static run. + Point channels ~~~~~~~~~~~~~~ diff --git a/doc/theory.rst b/doc/theory.rst index bda864ee..cff755e8 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1292,6 +1292,50 @@ steady mid-span A/D of 0.58; with :math:`A` = 0 the uncoupled wake drives it at 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. +.. _theory-viv-amplitude: + +Amplitude-dependent coefficients +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A ``VIV AMPLITUDE`` table makes the cross-flow coefficient of the synchronisation model and the +normal drag coefficient of a line type functions of the cross-flow amplitude, the form of +:ref:`Thorsen et al. (2016) `, who fit an excitation curve +:math:`C_v(y_0/D)` to riser tests. Each node estimates its amplitude as they do (their Eq. 8 and +9): + +.. math:: + + y_0 = \frac{1}{2}\int_{t_1}^{t_2} |\dot y|\,\mathrm{d}t, \qquad + \frac{\mathrm{d}y_0^*}{\mathrm{d}t} = k_a\,(y_0 - y_0^*), \quad k_a = \frac{0.1}{\Delta t}, + +with :math:`t_1, t_2` the last two zero crossings of :math:`\dot y` (a narrow-band response +travels :math:`2y_0` between them) and :math:`y_0^*` the smoothed amplitude, which moves a tenth +of the way to :math:`y_0` in each time step :math:`\Delta t`. :math:`\dot y` is the node's +velocity across the ambient flow normal to the line, :math:`\dot{\mathbf r}\cdot(\mathbf t\times +\mathbf u_n)/|\mathbf u_n|`: their :math:`y` is measured across the incoming flow, and the +cross-flow axis of the phase, across the relative flow, turns with the node's own velocity, which +at a response velocity comparable to the flow would shorten the projected velocity by +:math:`U/|\mathbf v_n|` (16 % at the A/D of 0.68 of the gate below). The travel is integrated by +the trapezoidal rule over each step, with a crossing inside a step placed by linear interpolation; +the error is that of the rule, :math:`(\omega\Delta t)^2/12` relative for a harmonic response. +The travel is carried signed, :math:`\int\dot y\,\mathrm{d}t` since the last crossing, whose sign +is that of the half cycle: a velocity that reverses through a sample at zero ends the half cycle +there, and one that touches zero without a sign change ends none. + +An element takes the mean :math:`y_0^*` of its free nodes (the VIV nodes; a fixed end node has +none) over its diameter as :math:`A/D` and reads its table there: :math:`C_v` in place of ``Cl`` in the lift, and a factor of ``Cd`` in the +normal Morison drag, linear between rows and held beyond the end ones. The coefficients of a step +use the estimate of the committed state, so the Jacobians only scale. The estimate is updated at +the end of each converged step from the committed one, so a repeated or rewound step updates it +once, and it is part of the step-recovery, snapshot and checkpoint state. + +On the taut line of the wake-oscillator gate (Cl 0.8, ``EI = 0`` and finite-EI alike) the +smoothed mid-span estimate follows the half peak-to-peak cross-flow displacement of the steady +response within 0.03 % at A/D 0.68; a table whose :math:`C_v` falls from 0.8 at A/D 0.1 to zero +at 0.3 holds the response at A/D 0.28; :math:`C_v = 0` with a drag factor 2 settles at the static +offset of ``Cd`` 2.4 to six digits; and a table with :math:`C_v` = ``Cl`` and factor 1 is the +line without it, bit for bit. + .. _theory-dry-buoyancy: Buoyancy and wetting diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 8eb564e3..518a3fa9 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -114,7 +114,9 @@ ("line", re.compile(r"(tdp)([0-9]+)(s|x|y|z|lay|exc|grd)", re.IGNORECASE)), ( "line", - re.compile(r"(ten|curvx|curvy|curv|bendmom|stfmom|torq)([0-9]+)(n[0-9]+)", re.IGNORECASE), + re.compile( + r"(ten|curvx|curvy|curv|bendmom|stfmom|torq|vivamp)([0-9]+)(n[0-9]+)", re.IGNORECASE + ), ), ("line", re.compile(r"(twist)([0-9]+)(n[0-9]+|)", re.IGNORECASE)), ("line", re.compile(r"(vivpow|dragpow|damppow)([0-9]+)(n[0-9]+|)", re.IGNORECASE)), @@ -227,6 +229,13 @@ class LineType: synchronisation lift, so ``cl`` stays ``None`` or 0, and acts on 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. + 2016), the rows of a ``VIV AMPLITUDE`` section table ``Name AD Cv + [CdAmp]`` as ``(AD, Cv)`` or ``(AD, Cv, CdAmp)`` tuples, all of one + length, 2 to 32 of them in increasing amplitude ratio ``AD``: ``Cv`` + replaces ``cl`` at that amplitude (so ``cl`` must be set) and ``CdAmp`` + multiplies the normal drag coefficient ``cdn`` (1 when left out). """ name: str @@ -253,6 +262,7 @@ class LineType: wake_st: float | None = None wake_eps: float | None = None wake_a: float | None = None + viv_amplitude: list[tuple[float, ...]] | None = None @dataclass(eq=False) @@ -1676,6 +1686,7 @@ def add_line_type( wake_st: float | None = None, wake_eps: float | None = None, wake_a: float | None = None, + viv_amplitude: list[tuple[float, ...]] | None = None, ) -> LineType: """Add a ``LINE TYPES`` row; see :class:`LineType` for the fields. @@ -1716,6 +1727,7 @@ def add_line_type( wake_st, wake_eps, wake_a, + None if viv_amplitude is None else [tuple(row) for row in viv_amplitude], ) self._line_types.append(item) return item @@ -2608,6 +2620,7 @@ def to_text(self, *, validate: bool = True) -> str: _emit(out, "STIFFENERS", *self._stiffener_table()) _emit(out, "VIV", *self._viv_table()) _emit(out, "WAKE OSCILLATOR", *self._wake_table()) + _emit(out, "VIV AMPLITUDE", *self._viv_amp_table()) _emit(out, "FAILURE", *self._failure_table()) _emit(out, "CONTROL", *self._control_table()) _emit(out, "EXTERNAL LOADS", *self._external_load_table()) @@ -3008,6 +3021,26 @@ def _wake_table(self) -> tuple[str, str, list[list[str]]]: rows.append(row) return "Name CL0 St eps A", "(-) (-) (-) (-) (-)", rows + def _viv_amp_table(self) -> tuple[str, str, list[list[str]]]: + rows: list[list[str]] = [] + for item in self._line_types: + if item.viv_amplitude is None: + continue + what = f"line type {item.name!r}" + table = list(item.viv_amplitude) + if not table: + raise ValueError(f"{what}: viv_amplitude needs at least two rows") + widths = {len(row) for row in table} + if len(widths) != 1 or not widths <= {2, 3}: + raise ValueError( + f"{what}: viv_amplitude rows are (AD, Cv) or (AD, Cv, CdAmp), all of one length" + ) + if item.cl is None: + raise ValueError(f"{what}: viv_amplitude scales the synchronisation lift, set cl") + for row in table: + rows.append([_text(item.name, what), *(_num(value, what) for value in row)]) + return "Name AD Cv CdAmp", "(-) (-) (-) (-)", rows + def _syrope_table(self) -> tuple[str, str, list[list[str]]]: rows = [ [_line_list(row.lines), _num(row.tmax0, "SYROPE IC"), _num(row.tmean0, "SYROPE IC")] @@ -3219,6 +3252,12 @@ def load(self) -> None: item.wake_st = _f(t[2]) if len(t) >= 3 else None item.wake_eps = _f(t[3]) if len(t) >= 4 else None item.wake_a = _f(t[4]) if len(t) == 5 else None + for row in self.rows("VIV AMPLITUDE"): + t = row.tokens + item = model.line_types[t[0]] + if item.viv_amplitude is None: + item.viv_amplitude = [] + item.viv_amplitude.append(tuple(_f(token) for token in t[1:])) for row in self.rows("ATTACHMENTS"): t = row.tokens arc: float | tuple[float, float, float] diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index b8b165b2..292cd911 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -82,6 +82,8 @@ "WAKE OSCILLATOR": "WAKE OSCILLATOR", "WAKE OSCILLATORS": "WAKE OSCILLATOR", "WAKE": "WAKE OSCILLATOR", + "VIV AMPLITUDE": "VIV AMPLITUDE", + "VIV AMPLITUDES": "VIV AMPLITUDE", } # Table sections whose rows the native reader takes through a Fortran # list-directed READ. Their descriptive and units rows are recognized by the @@ -104,7 +106,16 @@ # Table sections the native reader splits on whitespace and parses column by # column (their comma-separated line lists are valid there). _WHITESPACE_TABLE_SECTIONS = frozenset( - {"FAILURE", "CONTROL", "SYROPE IC", "ATTACHMENTS", "STIFFENERS", "VIV", "WAKE OSCILLATOR"} + { + "FAILURE", + "CONTROL", + "SYROPE IC", + "ATTACHMENTS", + "STIFFENERS", + "VIV", + "WAKE OSCILLATOR", + "VIV AMPLITUDE", + } ) _TABLE_SECTIONS = _LIST_DIRECTED_SECTIONS | _WHITESPACE_TABLE_SECTIONS _NATIVE_RECORD_LENGTH = 512 @@ -766,6 +777,7 @@ def _parse_line_node_channel(lowered: str) -> tuple[int, int, int, int]: ("curv", 5), ("bendmom", 6), ("stfmom", 12), + ("vivamp", 21), ): if lowered.startswith(keyword): prefix = len(keyword) @@ -840,7 +852,19 @@ def _channel_identity_key(channel: str) -> str: component = ("s", "x", "y", "z", "lay", "exc", "grd").index(touchdown.group(2)) + 1 return f"tdp:{int(touchdown.group(1))}:{component}" if lowered.startswith( - ("ten", "curv", "bendmom", "stfmom", "l", "torq", "twist", "vivpow", "dragpow", "damppow") + ( + "ten", + "curv", + "bendmom", + "stfmom", + "l", + "torq", + "twist", + "vivpow", + "dragpow", + "damppow", + "vivamp", + ) ): line_id, node_id, kind, component = _parse_line_node_channel(lowered) if line_id > 0 and node_id > 0 and kind > 0: @@ -3320,6 +3344,81 @@ def _check_wake_section(self, lift_type_names: set[str]) -> set[str]: wake.add(name) return wake + def _check_viv_amp_section(self, lift_type_names: set[str]) -> set[str]: + """Native ``apply_type_viv_amp`` for the VIV AMPLITUDE section; the types with a table. + + Rows ``TypeName AD Cv [CdAmp]`` build a line type's amplitude table: the rows of a type + in strictly increasing ``AD >= 0``, ``Cv >= 0`` replacing the type's LINE TYPES ``Cl`` + and ``CdAmp > 0`` (default 1) multiplying its normal drag coefficient, each at most + 1e15, all rows of a type with the same columns, 2 to 32 rows. The type needs the + synchronisation lift (LINE TYPES ``Cl > 0``). + """ + types = {row.tokens[0].lower(): row.tokens[0] for row in self.line_types} + rows_of: dict[str, int] = {} + cols_of: dict[str, int] = {} + last_ad: dict[str, float] = {} + for row in self._rows("VIV AMPLITUDE"): + where = self._at(row) + if not 3 <= len(row.tokens) <= 4: + raise DeckFormatError( + f"{where}: VIV AMPLITUDE rows must be: TypeName AD Cv [CdAmp]" + ) + name = row.tokens[0].lower() + if name not in types: + raise DeckFormatError( + f'{where}: VIV AMPLITUDE row names undefined LINE TYPE "{row.tokens[0]}"' + ) + label = types[name] + if name not in lift_type_names: + raise DeckFormatError( + f'{where}: VIV AMPLITUDE of LINE TYPE "{label}" scales its synchronisation ' + "lift: give the type LINE TYPES Cl > 0" + ) + if name in rows_of and len(row.tokens) != cols_of[name]: + raise DeckFormatError( + f'{where}: the VIV AMPLITUDE rows of LINE TYPE "{label}" must all have the ' + "same columns" + ) + if rows_of.get(name, 0) >= 32: + raise DeckFormatError( + f'{where}: VIV AMPLITUDE gives LINE TYPE "{label}" more than 32 rows' + ) + values = [0.0, 0.0, 1.0] + try: + for index, token in enumerate(row.tokens[1:]): + values[index] = _native_float(token) + except ValueError as exc: + raise DeckFormatError( + f"{where}: VIV AMPLITUDE AD, Cv and CdAmp must be plain numbers" + ) from exc + if not all(math.isfinite(value) for value in values): + raise DeckFormatError(f"{where}: VIV AMPLITUDE AD, Cv and CdAmp must be finite") + ad, cv, cd_amp = values + if not ( + 0.0 <= ad <= _NATIVE_MAX_COEFFICIENT + and 0.0 <= cv <= _NATIVE_MAX_COEFFICIENT + and 0.0 < cd_amp <= _NATIVE_MAX_COEFFICIENT + ): + raise DeckFormatError( + f"{where}: VIV AMPLITUDE needs AD >= 0, Cv >= 0 and CdAmp > 0, each at most " + "1e15" + ) + if name in last_ad and not ad > last_ad[name]: + raise DeckFormatError( + f'{where}: the VIV AMPLITUDE rows of LINE TYPE "{label}" must increase ' + "strictly in AD" + ) + rows_of[name] = rows_of.get(name, 0) + 1 + cols_of[name] = len(row.tokens) + last_ad[name] = ad + for name, count in rows_of.items(): + if count == 1: + raise DeckFormatError( + f'{self._label}: VIV AMPLITUDE gives LINE TYPE "{types[name]}" one row: a ' + "table needs at least two" + ) + return set(rows_of) + def _legacy_rod_type_columns(self, record: DeckRecord) -> bool: """Return whether ``record`` sits under a legacy CableDyn ROD TYPES header. @@ -4498,6 +4597,12 @@ def end_key(token: str) -> str: self._check_stiffeners(line_ids, section_types_by_line, line_type_meta, line_lengths) self._check_viv_section(line_type_meta, viv_type_names) wake_type_names = self._check_wake_section(viv_type_names) + amp_type_names = self._check_viv_amp_section(viv_type_names) + amp_lines = { + line_id + 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 acts # on finite-EI cables only, and a cable takes one VIV model for line_id, section_types in section_types_by_line.items(): @@ -5525,6 +5630,34 @@ def is_body_kind(kind: str, pinned: bool) -> bool: "restrained (END CONNECTIONS TorsStiffness), so it carries no torque" ) continue + if lowered.startswith("vivamp"): + # native: VIVAmpN, the smoothed VIV amplitude estimate (VIV AMPLITUDE) + line_number, node_id, kind, _ = _parse_line_node_channel(lowered) + line_id = str(line_number) + if ( + node_id == 0 + and line_id in line_ids + and re.search(r"[0-9]n0(?![0-9])", lowered) is not None + ): + raise DeckFormatError( + f"{self._label}: OUTPUT {channel!r}: node numbers start at 1 = End A " + "(MoorDyn numbers from N0)" + ) + if line_id not in line_ids or kind == 0 or node_id < 1: + raise DeckFormatError( + f"{self._label}: OUTPUT {channel!r}: bad VIV amplitude channel (use " + "VIVAmpN, with a known line id)" + ) + if node_id > line_nelems[line_id] + 1: + raise DeckFormatError( + f"{self._label}: OUTPUT {channel!r} node exceeds the line node count" + ) + if line_id not in amp_lines: + raise DeckFormatError( + f"{self._label}: OUTPUT {channel!r}: line {line_id} has no VIV AMPLITUDE " + "table, so no amplitude estimate" + ) + continue if lowered.startswith(("vivpow", "dragpow", "damppow")): # native: VIVPow/DragPow/DampPow and N, the load power channels line_number, node_id, kind, _ = _parse_line_node_channel(lowered) diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index 5c9e0199..c46fb843 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -239,6 +239,48 @@ def test_wake_oscillator_rows_are_written_with_the_values_given(tmp_path: Path) model.to_text(validate=False) +def test_viv_amplitude_rows_are_written_with_the_values_given(tmp_path: Path) -> None: + model = _chain_model(tmp_path) + model.add_line_type( + "cable", + diam=0.1, + mass=10.0, + ea=5.0e7, + ei=1.0, + cdn=1.2, + can=1.0, + cl=0.8, + viv_amplitude=[(0.0, 0.8), (0.3, 0.0)], + ) + model.add_line_type( + "riser", + diam=0.1, + mass=10.0, + ea=5.0e7, + cdn=1.2, + can=1.0, + cl=0.8, + viv_amplitude=[(0.0, 0.8, 1.0), (0.5, 0.9, 1.6), (1.0, 0.0, 2.0)], + ) + deck = DeckFile.from_text(model.to_text(validate=False), path=tmp_path / "deck.dat") + rows = [row.tokens for row in deck._rows("VIV AMPLITUDE")] + assert [row[0] for row in rows] == ["cable", "cable", "riser", "riser", "riser"] + assert [[float(value) for value in row[1:]] for row in rows[2:]] == [ + [0.0, 0.8, 1.0], + [0.5, 0.9, 1.6], + [1.0, 0.0, 2.0], + ] + model.add_line_type( + "mixed", diam=0.1, mass=10.0, ea=5.0e7, cl=0.8, viv_amplitude=[(0.0, 0.8, 1.0), (1.0, 0.8)] + ) + with pytest.raises(ValueError, match="all of one length"): + model.to_text(validate=False) + model.line_types["mixed"].viv_amplitude = [(0.0, 0.8), (1.0, 0.8)] + model.line_types["mixed"].cl = None + with pytest.raises(ValueError, match="set cl"): + model.to_text(validate=False) + + def test_build_spread_mooring_with_multi_section_lines() -> None: import math diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index aa3ab400..346b1050 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -4902,6 +4902,72 @@ def test_wake_oscillator_rows_follow_the_native_checks(base, rows, message): DeckFile.from_text(_with_section(text, "WAKE OSCILLATOR", *rows)) +_LIFT_ROW = "chain 0.252 390.0 1.674e9 -1.0 1.0e4 1.37 0.64 1.0 0.0" + + +@pytest.mark.parametrize( + "rows, expected", + [ + (("chain 0.0 0.8", "chain 0.5 0.0"), [(0.0, 0.8), (0.5, 0.0)]), + ( + ("TypeName AD Cv CdAmp", "chain 0.0 0.8 1.0", "chain 0.4 0.9 1.5", "chain 1.0 0.0 2.0"), + [(0.0, 0.8, 1.0), (0.4, 0.9, 1.5), (1.0, 0.0, 2.0)], + ), + ], +) +def test_viv_amplitude_rows_are_read_and_kept(tmp_path, rows, expected): + from cabledyn import DeckModel + + text = _with_section(_edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")), "VIV AMPLITUDE", *rows) + DeckFile.from_text(text) + path = tmp_path / "amp.dat" + path.write_text(text, encoding="utf-8") + assert DeckModel.load(path).line_types["chain"].viv_amplitude == expected + saved = tmp_path / "saved.dat" + DeckModel.load(path).save(saved) + assert DeckModel.load(saved).line_types["chain"].viv_amplitude == expected + + +@pytest.mark.parametrize( + "lift, rows, message", + [ + (True, ("chain 0.0 0.8 1.0 2.0",), "rows must be: TypeName AD Cv [CdAmp]"), + (True, ("chain 0.0",), "rows must be: TypeName AD Cv [CdAmp]"), + (True, ("chain 0.0 x", "chain 1.0 0.8"), "must be plain numbers"), + (True, ("cable 0.0 0.8", "cable 1.0 0.8"), 'undefined LINE TYPE "cable"'), + (False, ("chain 0.0 0.8", "chain 1.0 0.8"), "give the type LINE TYPES Cl > 0"), + (True, ("chain 0.0 0.8 1.0", "chain 1.0 0.8"), "must all have the same columns"), + (True, ("chain 0.5 0.8", "chain 0.5 0.6"), "must increase strictly in AD"), + (True, ("chain -0.1 0.8", "chain 1.0 0.8"), "AD >= 0, Cv >= 0 and CdAmp > 0"), + (True, ("chain 0.0 -0.8", "chain 1.0 0.8"), "AD >= 0, Cv >= 0 and CdAmp > 0"), + (True, ("chain 0.0 0.8 0.0", "chain 1.0 0.8 1.0"), "AD >= 0, Cv >= 0 and CdAmp > 0"), + (True, ("chain 0.0 0.8",), "a table needs at least two"), + (True, tuple(f"chain {0.01 * k:.2f} 0.8" for k in range(33)), "more than 32 rows"), + ], +) +def test_viv_amplitude_rows_follow_the_native_checks(lift, rows, message): + text = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) if lift else _DYNAMIC + with pytest.raises(DeckFormatError, match=re.escape(message)): + DeckFile.from_text(_with_section(text, "VIV AMPLITUDE", *rows)) + + +def test_viv_amplitude_channel_needs_a_table(): + text = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) + text = _edit(text, ("FairTen1\n", "FairTen1\nVIVAmp1N2\n")) + with pytest.raises(DeckFormatError, match="has no VIV AMPLITUDE table"): + DeckFile.from_text(text) + DeckFile.from_text(_with_section(text, "VIV AMPLITUDE", "chain 0.0 0.8", "chain 1.0 0.4")) + with pytest.raises(DeckFormatError, match="bad VIV amplitude channel"): + DeckFile.from_text( + _with_section( + _edit(text, ("VIVAmp1N2\n", "VIVAmp9N2\n")), + "VIV AMPLITUDE", + "chain 0.0 0.8", + "chain 1.0 0.4", + ) + ) + + def test_wake_oscillator_cl0_zero_is_off_and_needs_no_finite_line(): # CL0 0 switches nothing on, so it is accepted on an EI = 0 line and next to a lift type text = _edit(_DYNAMIC, ("1.674e9 -1.0 1.0e4 1.37", "1.674e9 -1.0 0.0 1.37")) diff --git a/python/tests/test_end_to_end.py b/python/tests/test_end_to_end.py index ad2548cd..5ed655df 100644 --- a/python/tests/test_end_to_end.py +++ b/python/tests/test_end_to_end.py @@ -285,6 +285,61 @@ def test_generated_study_runs_on_the_real_driver(tmp_path): ] +_AMP_OPTIONS = "--------------------- OPTIONS -----" +_AMP_CHANNEL = ('"DampPow1"', '"DampPow1"\n"VIVAmp1N26"') + + +def _amp_table(*rows: str) -> tuple[str, str]: + """The edit that puts a VIV AMPLITUDE section with ``rows`` before OPTIONS.""" + block = "--------------------- VIV AMPLITUDE -----\n" + "".join(f"{row}\n" for row in rows) + return _AMP_OPTIONS, block + _AMP_OPTIONS + + +_AMP_PARITY = [ + ("amp-accepted", [_amp_table("riser 0.0 0.8 1.0", "riser 0.5 0.4 1.5")], True), + ("amp-channel", [_amp_table("riser 0.0 0.8", "riser 0.5 0.4"), _AMP_CHANNEL], True), + ("amp-channel-no-table", [_AMP_CHANNEL], False), + ("amp-one-row", [_amp_table("riser 0.0 0.8")], False), + ("amp-not-increasing", [_amp_table("riser 0.5 0.8", "riser 0.5 0.4")], False), + ( + "amp-no-lift", + [ + _WAKE_LIFT, + _WAKE_SECTION, + ("riser 0.85 0.15", "riser 0.3"), + _amp_table("riser 0.0 0.8", "riser 0.5 0.4"), + ], + False, + ), +] + + +@pytest.mark.parametrize( + ("label", "edits", "accepted"), _AMP_PARITY, ids=[item[0] for item in _AMP_PARITY] +) +def test_viv_amplitude_validator_agrees_with_the_native_reader( + driver, tmp_path, label, edits, accepted +): + text = (EXAMPLES / "viv_taut_cable_inline.dat").read_text(encoding="utf-8") + for old, new in edits: + assert old in text, old + text = text.replace(old, new, 1) + deck = tmp_path / f"{label}.dat" + deck.write_text(text.replace("90.0 TMax", "2.0 TMax"), encoding="utf-8") + try: + DeckFile.read(deck) + python_accepts = True + except DeckFormatError: + python_accepts = False + try: + driver.run(deck, label, timeout=300) + native_accepts = True + except DriverExecutionError as exc: + assert exc.returncode == 1, exc.stderr # a deck error, not a solve failure + native_accepts = False + assert python_accepts == native_accepts == accepted + + @pytest.mark.parametrize( ("label", "edits", "accepted"), _WAKE_PARITY, ids=[item[0] for item in _WAKE_PARITY] ) diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 8e8dc732..fa58aca2 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -59,7 +59,8 @@ MODULE CableDyn_DeckDriver CD_Get_Model_EndForces, & CD_Update_Model_CoupledMotion, CD_Update_Model_Hydro_Fields, & CD_Recompute_Model_Acceleration, CD_Step_Model, CD_Step_Model_Recovering, CD_MODEL_OK, & - CD_Audit_Model_Step, CD_Set_Model_VIV, CD_Get_Model_VIV_Lift, CD_Get_Model_Load_Power + CD_Audit_Model_Step, CD_Set_Model_VIV, CD_Get_Model_VIV_Lift, CD_Get_Model_Load_Power, & + CD_Get_Model_VIV_Amplitude USE CableDyn_System, ONLY: CD_SystemType, CD_SystemPointType, CD_LineEndpointBinding, & CD_Init_System_From_Points, CD_End_System, CD_System_Line_NDOF, & CD_System_Line_NElem, CD_Get_System_Point_State, CD_Get_System_Line_State, & @@ -97,6 +98,7 @@ MODULE CableDyn_DeckDriver CD_HC_COMPRESSION_STRICT USE CableDyn_HermiteCableDynamic, ONLY: CD_HCDYN_OK, CD_HCDYN_TENSILE_OFF, CD_HCDYN_TENSILE_WARN, & CD_HCDYN_TENSILE_ERROR, CD_HermiteCable_Dyn_Load_Power, & + CD_HermiteCable_Dyn_VIV_Amplitude, & CD_HermiteCable_Axial_Damping_Resultant, & CD_HermiteCable_Axial_Damping_Element, CD_HermiteCable_Dyn_End_Force, & CD_HermiteCable_Dyn_Node_Values, CD_HermiteCable_Dyn_Node_Recovery, & @@ -137,7 +139,7 @@ MODULE CableDyn_DeckDriver CD_HFMF_Set_Moving_End_B, CD_HFMF_GetEndBKinematics, & CD_HFMF_End, CD_HFMF_OK USE CableDyn_VIV, ONLY: CD_VIV_DEFAULT_DF, CD_VIV_DEFAULT_CF, CD_VIV_NM, CD_VIV_DEFAULT_IL_ALPHA, & - CD_VIV_WAKE_DEFAULT_ST, CD_VIV_WAKE_DEFAULT_EPS, CD_VIV_WAKE_DEFAULT_A + CD_VIV_WAKE_DEFAULT_ST, CD_VIV_WAKE_DEFAULT_EPS, CD_VIV_WAKE_DEFAULT_A, CD_VIV_AMP_MAXP USE CableDyn_Hydro, ONLY: CD_Airy_Wave_Kinematics_Precomputed, CD_Component_Wave_Kinematics, & CD_Current_Profile_Velocity, CD_CurrentGridType, CD_Current_Grid_Resample, & CD_Current_Grid_Velocity, & @@ -460,6 +462,11 @@ MODULE CableDyn_DeckDriver REAL(wp) :: wo_cl0 = CD_ZERO, wo_st = CD_VIV_WAKE_DEFAULT_ST, wo_eps = CD_VIV_WAKE_DEFAULT_EPS REAL(wp) :: wo_a = CD_VIV_WAKE_DEFAULT_A LOGICAL :: has_wake_row = .FALSE. + ! Amplitude-dependent VIV coefficients (the optional VIV AMPLITUDE section, rows TypeName AD Cv + ! [CdAmp]): amp_n rows of (A/D, C_v, drag factor) in amp_tab, A/D increasing; amp_cols the + ! token count of the type's rows (3 or 4, the drag factor 1 with 3). + INTEGER :: amp_n = 0, amp_cols = 0 + REAL(wp) :: amp_tab(3, CD_VIV_AMP_MAXP) = CD_ZERO ! Deck file line of the row (0 when not read from a file), for error messages. INTEGER :: deck_line = 0 END TYPE @@ -1893,6 +1900,8 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(wp), ALLOCATABLE :: q_sequence(:) REAL(wp), ALLOCATABLE :: curv(:), cdn(:), cdt(:), can(:), cat(:), catenary_pos(:) REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:), viv_hh(:) + REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :) + INTEGER, ALLOCATABLE :: viv_ampn(:) REAL(wp), ALLOCATABLE :: wo_cl0(:), wo_st(:), wo_eps(:), wo_a(:) REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:) REAL(wp) :: mode1_omega @@ -3294,7 +3303,10 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL finite_viv_arrays(ln, sections, types, viv_cl, viv_cf, viv_df, viv_clx, viv_al, viv_hh) ALLOCATE (wo_cl0(SIZE(l0)), wo_st(SIZE(l0)), wo_eps(SIZE(l0)), wo_a(SIZE(l0))) CALL finite_wake_arrays(ln, sections, types, wo_cl0, wo_st, wo_eps, wo_a) + ALLOCATE (viv_tix(SIZE(l0))) + CALL viv_amp_type_index(ln, sections, types, viv_tix) IF (SIZE(l0_am) /= SIZE(l0)) THEN + CALL remap_elem_by_reference_arc(viv_tix, l0, l0_am) CALL remap_elem_by_reference_arc(wo_cl0, l0, l0_am) CALL remap_elem_by_reference_arc(wo_st, l0, l0_am) CALL remap_elem_by_reference_arc(wo_eps, l0, l0_am) @@ -3622,6 +3634,8 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, ELSE CALL CD_Deck_VIV_Phase_Seed(cable%line%l0, ln%ends_swapped, seed, zero=opts%viv_phase_zero) END IF + ! 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(wo_cl0 > CD_ZERO)) THEN ! the wake oscillator: cl is C_L0, the band unused @@ -3637,13 +3651,13 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(CD_VIV_NM, wp)*MERGE(opts%dtM, dt, opts%has_dtm), & opts%viv_rms_window > CD_ZERO), es, em, phase_seed=seed, & tangent_reversed=.NOT. ln%ends_swapped, clx=viv_clx, il_alpha=viv_al, & - chh=viv_hh) + chh=viv_hh, amp=viv_amp3, amp_n=viv_ampn) 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, phase_seed=seed, & - tangent_reversed=.NOT. ln%ends_swapped) + tangent_reversed=.NOT. ln%ends_swapped, amp=viv_amp3, amp_n=viv_ampn) END IF END BLOCK IF (es /= CD_HCDYN_OK) THEN @@ -10401,6 +10415,8 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er REAL(wp), ALLOCATABLE :: hydro_diam(:), hydro_cdn(:), hydro_cdt(:), hydro_can(:), hydro_cat(:) 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(:, :, :) + INTEGER, ALLOCATABLE :: viv_ampn(:) LOGICAL, ALLOCATABLE :: syr_el(:) REAL(wp) :: anchor(3), fairlead(3), mode1_omega REAL(wp), PARAMETER :: factors(4) = [0.25_wp, 0.5_wp, 0.75_wp, CD_ONE] @@ -10439,7 +10455,9 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er ALLOCATE (ba(SIZE(l0)), hydro_diam(SIZE(l0)), hydro_cdn(SIZE(l0)), hydro_cdt(SIZE(l0)), & 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_df(SIZE(l0)), syr_el(SIZE(l0)), viv_clx(SIZE(l0)), viv_al(SIZE(l0)), viv_hh(SIZE(l0)), & + viv_tix(SIZE(l0))) + viv_tix = CD_ZERO viv_cl = CD_ZERO viv_cf = CD_ZERO viv_df = CD_ZERO @@ -10511,6 +10529,8 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er viv_clx(e) = types(line_section_type(sections, ln%id, i))%clx viv_al(e) = types(line_section_type(sections, ln%id, i))%il_alpha viv_hh(e) = types(line_section_type(sections, ln%id, i))%chh + IF (types(line_section_type(sections, ln%id, i))%amp_n > 0) viv_tix(e) = REAL(line_section_type(sections, & + ln%id, i), wp) syr_el(e) = types(line_section_type(sections, ln%id, i))%is_syrope END DO END DO @@ -10521,6 +10541,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er viv_clx = viv_clx(SIZE(viv_clx):1:-1) viv_al = viv_al(SIZE(viv_al):1:-1) viv_hh = viv_hh(SIZE(viv_hh):1:-1) + viv_tix = viv_tix(SIZE(viv_tix):1:-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) @@ -10810,14 +10831,17 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er BLOCK REAL(wp) :: seed(model%n_dof/3) CALL CD_Deck_VIV_Phase_Seed(model%l0, ln%ends_swapped, seed, zero=opts%viv_phase_zero) + ! 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 CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, 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) + il_alpha=viv_al, chh=viv_hh, amp=viv_amp3, amp_n=viv_ampn) ELSE CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em, & - phase_seed=seed, tangent_reversed=.NOT. ln%ends_swapped) + phase_seed=seed, tangent_reversed=.NOT. ln%ends_swapped, amp=viv_amp3, & + amp_n=viv_ampn) END IF END BLOCK IF (es == CD_MODEL_OK) CALL CD_Recompute_Model_Acceleration(model, es, em) @@ -11684,6 +11708,63 @@ SUBROUTINE finite_wake_arrays(ln, sections, types, cl0, st, eps, a) a = a(SIZE(a):1:-1) END SUBROUTINE finite_wake_arrays + SUBROUTINE viv_amp_type_index(ln, sections, types, tix) + !! The LINE TYPES index of every element of a line whose type has a VIV AMPLITUDE table (0 + !! elsewhere), as a real per-element field for remap_elem_by_reference_arc, in the element order + !! of finite_hydro_arrays (the deck order reversed). + TYPE(DeckLine), INTENT(IN) :: ln + TYPE(DeckSection), INTENT(IN) :: sections(:) + TYPE(DeckLineType), INTENT(IN) :: types(:) + REAL(wp), INTENT(OUT) :: tix(:) + INTEGER :: i, j, e, tidx + e = 0 + DO i = 1, SIZE(sections) + IF (sections(i)%line_id /= ln%id) CYCLE + tidx = sections(i)%ltype + DO j = 1, sections(i)%nsegs + e = e + 1 + tix(e) = CD_ZERO + IF (types(tidx)%amp_n > 0) tix(e) = REAL(tidx, wp) + END DO + END DO + tix = tix(SIZE(tix):1:-1) + END SUBROUTINE viv_amp_type_index + + SUBROUTINE viv_amp_tables(types, tix, amp, ampn) + !! Allocate and fill the per-element amplitude tables (CD_Set_Model_VIV and + !! CD_HermiteCable_Dyn_Set_VIV amp, amp_n) from the element type indices of + !! viv_amp_type_index; left unallocated (so absent in those calls) when no element has one. + TYPE(DeckLineType), INTENT(IN) :: types(:) + REAL(wp), INTENT(IN) :: tix(:) + REAL(wp), ALLOCATABLE, INTENT(OUT) :: amp(:, :, :) + INTEGER, ALLOCATABLE, INTENT(OUT) :: ampn(:) + INTEGER :: e, t + IF (.NOT. ANY(tix > 0.5_wp)) RETURN + ALLOCATE (amp(3, CD_VIV_AMP_MAXP, SIZE(tix)), ampn(SIZE(tix))) + amp = CD_ZERO + ampn = 0 + DO e = 1, SIZE(tix) + t = NINT(tix(e)) + IF (t < 1) CYCLE + ampn(e) = types(t)%amp_n + amp(:, :, e) = types(t)%amp_tab + END DO + END SUBROUTINE viv_amp_tables + + LOGICAL FUNCTION line_has_viv_amp(ln, types, sections) RESULT(has) + !! Whether a section of the line uses a line type with a VIV AMPLITUDE table. + TYPE(DeckLine), INTENT(IN) :: ln + TYPE(DeckLineType), INTENT(IN) :: types(:) + TYPE(DeckSection), INTENT(IN) :: sections(:) + INTEGER :: j + has = .FALSE. + DO j = 1, SIZE(sections) + IF (sections(j)%line_id /= ln%id) CYCLE + IF (sections(j)%ltype < 1 .OR. sections(j)%ltype > SIZE(types)) CYCLE + IF (types(sections(j)%ltype)%amp_n > 0) has = .TRUE. + END DO + END FUNCTION line_has_viv_amp + LOGICAL FUNCTION line_has_viv(ln, types, sections) RESULT(has) !! Whether a section of the line uses a line type with a VIV lift coefficient Cl > 0. TYPE(DeckLine), INTENT(IN) :: ln @@ -13802,6 +13883,9 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti CHARACTER(DECK_RECLEN), ALLOCATABLE :: wake_rows(:) INTEGER, ALLOCATABLE :: wake_lines(:) INTEGER :: n_wake + CHARACTER(DECK_RECLEN), ALLOCATABLE :: vamp_rows(:) + INTEGER, ALLOCATABLE :: vamp_lines(:) + INTEGER :: n_vamp CHARACTER(2*NAMELEN), ALLOCATABLE :: channel_keys(:) LOGICAL :: ext_march, types_stock_cols, rodtypes_legacy_cols, turb_ok, static_finite_ok, tors_marched INTEGER :: unit, ios, section, nt, nb, nrt, nr, np, nlin, nsec, neq, nch, nfl, nct, nec, lineno @@ -13819,7 +13903,7 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti SEC_SECTIONS = 5, SEC_OPTIONS = 6, SEC_OUTPUTS = 7, SEC_RODTYPES = 8, SEC_RODS = 9, & SEC_EQUIV = 10, SEC_FAILURE = 11, SEC_CONTROL = 12, SEC_SYROPE_IC = 13, & SEC_ENDCONN = 14, SEC_TURBINES = 15, SEC_EXTLOADS = 16, SEC_ATTACH = 17, & - SEC_STIFF = 18, SEC_VIV = 19, SEC_WAKE = 20 + SEC_STIFF = 18, SEC_VIV = 19, SEC_WAKE = 20, SEC_VIVAMP = 21 ErrStat = 0; ErrMsg = '' ext_march = .FALSE. @@ -13844,6 +13928,8 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti ALLOCATE (viv_rows(0), viv_lines(0)) n_viv = 0 ALLOCATE (wake_rows(0), wake_lines(0)) + ALLOCATE (vamp_rows(0), vamp_lines(0)) + n_vamp = 0 n_wake = 0 nt = 0; nb = 0; nrt = 0; nr = 0; np = 0; nlin = 0; nsec = 0; neq = 0; nch = 0; nfl = 0; nct = 0; nec = 0 section = SEC_NONE @@ -13988,6 +14074,15 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti END IF wake_rows(n_wake) = line(1:MIN(LEN(line), DECK_RECLEN)) wake_lines(n_wake) = lineno + CASE (SEC_VIVAMP) + IF (.NOT. has_numeric_token(line)) CYCLE + n_vamp = n_vamp + 1 + IF (n_vamp > SIZE(vamp_rows)) THEN + vamp_rows = [vamp_rows, [(REPEAT(' ', DECK_RECLEN), i_ch=1, 8)]] + vamp_lines = [vamp_lines, [(0, i_ch=1, 8)]] + END IF + vamp_rows(n_vamp) = line(1:MIN(LEN(line), DECK_RECLEN)) + vamp_lines(n_vamp) = lineno CASE (SEC_OPTIONS) CALL apply_option(line, opts, ErrStat, ErrMsg) CASE (SEC_OUTPUTS) @@ -14099,6 +14194,19 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti RETURN END IF END DO + DO i_ch = 1, n_vamp + CALL apply_type_viv_amp(vamp_rows(i_ch), types, ErrStat, ErrMsg) + IF (ErrStat /= 0) THEN + CALL add_row_context('deck', vamp_lines(i_ch), vamp_rows(i_ch), ErrMsg) + RETURN + END IF + END DO + DO i_ch = 1, SIZE(types) + IF (types(i_ch)%amp_n == 1) THEN + CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE gives LINE TYPE "'//TRIM(types(i_ch)%name)//'" one row: a '// & + 'table needs at least two'); RETURN + END IF + END DO ! Caller-supplied environment overrides land HERE -- before equivalent-buoyancy ! conversion and validation -- so both run under the environment the model is @@ -15767,6 +15875,8 @@ SUBROUTINE set_section(secname, section, ErrStat, ErrMsg) section = 18 CASE ('VIV', 'VORTEX-INDUCED VIBRATION', 'VORTEX INDUCED VIBRATION') section = 19 + CASE ('VIV AMPLITUDE', 'VIV AMPLITUDES') + section = 21 CASE ('WAKE OSCILLATOR', 'WAKE OSCILLATORS', 'WAKE') section = 20 CASE DEFAULT @@ -17430,6 +17540,72 @@ SUBROUTINE apply_type_wake(row, types, ErrStat, ErrMsg) types(it)%has_wake_row = .TRUE. END SUBROUTINE apply_type_wake + SUBROUTINE apply_type_viv_amp(row, types, ErrStat, ErrMsg) + !! One VIV AMPLITUDE row: TypeName AD Cv [CdAmp] -- a row of a line type's amplitude table, the + !! rows of a type in increasing amplitude ratio AD = A/D >= 0, the cross-flow coefficient + !! Cv >= 0 that replaces the type's LINE TYPES Cl at that amplitude, and the factor CdAmp > 0 + !! (default 1) of its normal drag coefficient; the rows of one type have the same columns. The + !! type needs the synchronisation lift (LINE TYPES Cl > 0). At most CD_VIV_AMP_MAXP rows a type. + CHARACTER(*), INTENT(IN) :: row + TYPE(DeckLineType), INTENT(INOUT) :: types(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + CHARACTER(DECK_RECLEN) :: tok + INTEGER :: it, ntok, i, n + REAL(wp) :: v(3) + LOGICAL :: found, ok + + ErrStat = 0; ErrMsg = '' + ntok = count_tokens(row) + IF (ntok < 3 .OR. ntok > 4) THEN + CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE rows must be: TypeName AD Cv [CdAmp]'); RETURN + END IF + CALL get_token(row, 1, tok, found) + it = find_type(types, TRIM(tok)) + IF (it == 0) THEN + CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE row names undefined LINE TYPE "'//TRIM(tok)//'"'); RETURN + END IF + IF (.NOT. (types(it)%cl > CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE of LINE TYPE "'//TRIM(types(it)%name)//'" scales its '// & + 'synchronisation lift: give the type LINE TYPES Cl > 0'); RETURN + END IF + IF (types(it)%amp_n > 0 .AND. ntok /= types(it)%amp_cols) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV AMPLITUDE rows of LINE TYPE "'//TRIM(types(it)%name)// & + '" must all have the same columns'); RETURN + END IF + IF (types(it)%amp_n >= CD_VIV_AMP_MAXP) THEN + CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE gives LINE TYPE "'//TRIM(types(it)%name)//'" more than 32 '// & + 'rows'); RETURN + END IF + v = [CD_ZERO, CD_ZERO, CD_ONE] + ok = .TRUE. + DO i = 2, ntok + IF (.NOT. ok) EXIT + CALL get_token(row, i, tok, found) + CALL parse_real_token(tok, v(i - 1), ok) + END DO + IF (.NOT. ok) THEN + CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE AD, Cv and CdAmp must be plain numbers'); RETURN + END IF + IF (.NOT. ALL(IEEE_IS_FINITE(v))) THEN + CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE AD, Cv and CdAmp must be finite'); RETURN + END IF + IF (.NOT. (v(1) >= CD_ZERO .AND. v(1) <= MAX_COEFFICIENT .AND. v(2) >= CD_ZERO .AND. & + v(2) <= MAX_COEFFICIENT .AND. v(3) > CD_ZERO .AND. v(3) <= MAX_COEFFICIENT)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE needs AD >= 0, Cv >= 0 and CdAmp > 0, each at most 1e15'); RETURN + END IF + n = types(it)%amp_n + IF (n > 0) THEN + IF (.NOT. (v(1) > types(it)%amp_tab(1, n))) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV AMPLITUDE rows of LINE TYPE "'//TRIM(types(it)%name)// & + '" must increase strictly in AD'); RETURN + END IF + END IF + types(it)%amp_n = n + 1 + types(it)%amp_cols = ntok + types(it)%amp_tab(:, n + 1) = v + END SUBROUTINE apply_type_viv_amp + SUBROUTINE append_line_stiffener(row, lines, ErrStat, ErrMsg) !! One STIFFENERS row: LineID End Length RootOD TipOD InnerD E Density -- a conical segment of !! the bend stiffener sleeving End A or End B of a finite-EI line. The rows of one line end @@ -18755,7 +18931,7 @@ FUNCTION channel_identity_key(ch) RESULT(key) IF (a > 0 .AND. b > 0) key = 'point:'//TRIM(int_to_str(a))//':'//TRIM(int_to_str(b)) ELSE IF (starts_with(lo, 'ten') .OR. starts_with(lo, 'curv') .OR. starts_with(lo, 'bendmom') .OR. & starts_with(lo, 'stfmom') .OR. starts_with(lo, 'l') .OR. starts_with(lo, 'torq') .OR. & - starts_with(lo, 'twist') .OR. is_load_power_channel(lo)) THEN + starts_with(lo, 'twist') .OR. is_load_power_channel(lo) .OR. starts_with(lo, 'vivamp')) THEN CALL parse_line_node_channel(ch, a, b, c, d) IF (a > 0 .AND. b > 0 .AND. c > 0) key = 'node:'//TRIM(int_to_str(a))//':'//TRIM(int_to_str(b))// & ':'//TRIM(int_to_str(c))//':'//TRIM(int_to_str(d)) @@ -35214,7 +35390,8 @@ SUBROUTINE build_plan() END IF ELSE CALL parse_line_node_channel(channels(j), il, node, kind, comp) - IF (is_load_power_kind(kind)) CYCLE ! from the line model, channel-at-a-time (CH_LEGACY) + ! from the line model, channel-at-a-time (CH_LEGACY) + IF (is_load_power_kind(kind) .OR. kind == 21) CYCLE il = find_line(lines, il) IF (il < 1) CYCLE CALL line_sizes(il, sized, tension_sized) @@ -35481,6 +35658,19 @@ SUBROUTINE system_channel_value(ch, lines, points, system, work, val, ErrStat, E END BLOCK RETURN END IF + IF (kind == 21) THEN + BLOCK + REAL(wp) :: amp(nnode) + CALL CD_Get_Model_VIV_Amplitude(system%lines(li), amp, es, em) + IF (es /= CD_MODEL_OK) THEN + ErrStat = CD_DECKDRV_SOLVEFAIL + ErrMsg = 'CableDyn_DeckDriver: system line VIV amplitude recovery failed: '//TRIM(em) + RETURN + END IF + val = amp(inode) + END BLOCK + RETURN + END IF IF (kind == 3) THEN CALL ensure_model_output_workspace(work, 0, nnode - 1) CALL CD_Get_System_Line_Tension(system, li, work%tension(1:nnode - 1), es, em) @@ -35636,6 +35826,19 @@ SUBROUTINE model_channel_value(ch, lines, points, models, work, val, ErrStat, Er END BLOCK RETURN END IF + IF (kind == 21) THEN + BLOCK + REAL(wp) :: amp(nnode) + CALL CD_Get_Model_VIV_Amplitude(models(li), amp, es, em) + IF (es /= CD_MODEL_OK) THEN + ErrStat = CD_DECKDRV_SOLVEFAIL + ErrMsg = 'CableDyn_DeckDriver: dynamic line VIV amplitude recovery failed: '//TRIM(em) + RETURN + END IF + val = amp(inode) + END BLOCK + RETURN + END IF IF (kind == 3) THEN CALL ensure_model_output_workspace(work, 0, nnode - 1) CALL CD_Get_Model_Tension(models(li), work%tension(1:nnode - 1), es, em) @@ -37078,6 +37281,27 @@ SUBROUTINE check_channel(ch, lines, points, sections, ErrStat, ErrMsg, bodies, r CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": line '//TRIM(int_to_str(line_id))//' is not '// & 'torsionally restrained (END CONNECTIONS TorsStiffness), so it carries no torque'); RETURN END IF + ELSE IF (starts_with(lo, 'vivamp')) THEN + CALL parse_line_node_channel(ch, line_id, node, kind, comp) + li = find_line(lines, line_id) + IF (li /= 0 .AND. node == 0 .AND. names_node_zero(lo)) THEN + CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": node numbers start at 1 = End A (MoorDyn '// & + 'numbers from N0)'); RETURN + END IF + IF (li == 0 .OR. kind == 0 .OR. node < 1) THEN + CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": bad VIV amplitude channel (use VIVAmpN, '// & + 'with a known line id)'); RETURN + END IF + nelem = line_nelem_from_sections(lines(li)%id, sections) + IF (node > nelem + 1) THEN + CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": node index exceeds line node count'); RETURN + END IF + IF (PRESENT(types)) THEN + IF (.NOT. line_has_viv_amp(lines(li), types, sections)) THEN + CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": line '//TRIM(int_to_str(line_id))//' has no '// & + 'VIV AMPLITUDE table, so no amplitude estimate'); RETURN + END IF + END IF ELSE IF (is_load_power_channel(lo)) THEN CALL parse_line_node_channel(ch, line_id, node, kind, comp) li = find_line(lines, line_id) @@ -37126,7 +37350,7 @@ SUBROUTINE check_channel(ch, lines, points, sections, ErrStat, ErrMsg, bodies, r 'Point

p{x,y,z} (alias Con

p{x,y,z}), Point

F{x,y,z,H}, '// & 'TenN, CurvN, CurvXN, CurvYN, BendMomN, StfMomN, '// & 'TorqN, TwistN, Twist, '// & - 'VIVPow, DragPow, DampPow (and N), '// & + 'VIVPow, DragPow, DampPow (and N), VIVAmpN, '// & 'LNp{x,y,z}, LNv{x,y,z}, LNa{x,y,z}, LNDec, LNAzi, '// & 'TDP{s,x,y,z,Lay,Exc,Grd}, or the Body/Rod channels)'); RETURN END IF @@ -37389,6 +37613,7 @@ SUBROUTINE parse_line_node_channel(ch, line_id, node_id, kind, comp) !! DragPowN -> kind=18, comp=0 the same per unit length about node J [W/m] !! DampPow -> kind=19, comp=0 power of the structural damping (node 1) [W] !! DampPowN -> kind=20, comp=0 the same per unit length about node J [W/m] + !! VIVAmpN -> kind=21, comp=0 smoothed VIV amplitude estimate (VIV AMPLITUDE) [m] CHARACTER(*), INTENT(IN) :: ch INTEGER, INTENT(OUT) :: line_id, node_id, kind, comp @@ -37441,6 +37666,10 @@ SUBROUTINE parse_line_node_channel(ch, line_id, node_id, kind, comp) CALL parse_keyword_line_node(lo, 6, last, line_id, node_id) IF (line_id > 0 .AND. node_id > 0) kind = 12 RETURN + ELSE IF (starts_with(lo, 'vivamp')) THEN + CALL parse_keyword_line_node(lo, 6, last, line_id, node_id) + IF (line_id > 0 .AND. node_id > 0) kind = 21 + RETURN ELSE IF (is_load_power_channel(lo)) THEN ! the load power channels: the line total (node 1, as Twist), or the power per ! unit length about a node N (the next kind) @@ -39360,6 +39589,17 @@ SUBROUTINE eval_system_line_channel(system, li, ch, val, ErrStat, ErrMsg) END BLOCK RETURN END IF + IF (kind == 21) THEN + BLOCK + REAL(wp) :: amp(nnode) + CALL CD_Get_Model_VIV_Amplitude(system%lines(li), amp, es, em) + IF (es /= CD_MODEL_OK) THEN + CALL sys_solvefail(ch, em, ErrStat, ErrMsg); RETURN + END IF + val = amp(inode) + END BLOCK + RETURN + END IF IF (kind == 3) THEN BLOCK REAL(wp) :: tension(nnode - 1) @@ -39514,6 +39754,16 @@ SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node) END IF val = load_power_value(kind, inode, pv, pd, pm, cable%line%l0) END BLOCK + CASE (21) ! the smoothed VIV amplitude estimate of the node (VIV AMPLITUDE) + BLOCK + REAL(wp) :: amp(nnode) + CALL CD_HermiteCable_Dyn_VIV_Amplitude(cable%line, amp, es, em) + IF (es /= CD_HCDYN_OK) THEN + CALL fail_solve(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": finite-EI VIV amplitude recovery failed: '// & + TRIM(em)); RETURN + END IF + val = amp(inode) + END BLOCK CASE (3, 5, 6) ! nodal tension, curvature, bend moment CALL cable_recovered_value(cable, kind, inode, ch, val, ErrStat, ErrMsg) CASE (1) ! position (cable-local state rotated to the deck's global frame) @@ -39986,7 +40236,7 @@ FUNCTION CD_Channel_Unit(ch) RESULT(unit) !! OrcaFlex-vocabulary output unit for a channel token, by kind: tension (FairTen/AnchTen/Ten) !! and anchor force (AnchFz/AnchFH) -> (N); curvature (Curv) -> (1/m); bend moment (BendMom) !! -> (N.m); endpoint orientation/Dec/Azi -> (deg); torque (Torq) -> (N.m); twist (Twist) -> (deg); position (Point/...p) -> (m); - !! load power (VIVPow/DragPow/DampPow) -> (W), per unit length about a node -> (W/m); + !! load power (VIVPow/DragPow/DampPow) -> (W), per unit length about a node -> (W/m); VIVAmp -> (m); !! velocity (...v) -> (m/s); !! acceleration (...a) -> (m/s2). CHARACTER(*), INTENT(IN) :: ch @@ -40027,7 +40277,7 @@ FUNCTION CD_Channel_Unit(ch) RESULT(unit) CASE (10, 11); unit = '(deg)' CASE (15, 17, 19); unit = '(W)' CASE (16, 18, 20); unit = '(W/m)' - CASE (1); unit = '(m)' + CASE (1, 21); unit = '(m)' CASE (2); unit = '(m/s)' CASE (4); unit = '(m/s2)' CASE DEFAULT; unit = '(-)' diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 6d4ef5cc..23e309c0 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -67,7 +67,9 @@ MODULE CableDyn_HermiteCableDynamic USE CableDyn_Linalg, ONLY: CD_Factor_Banded, CD_Solve_Factored_Banded, CD_LINALG_OK USE CableDyn_VIV, ONLY: CD_VIV_Lift_Per_Length, CD_VIV_Crossflow_Along, CD_VIV_Phase_Rate, CD_VIV_Mean_Square, & CD_VIV_Wrap_Phase, CD_VIV_TWO_PI, CD_VIV_NM, CD_VIV_Inline_Per_Length, & - CD_VIV_Inline_Phase_Rate, CD_VIV_Wake_Advance + CD_VIV_Inline_Phase_Rate, CD_VIV_Wake_Advance, CD_VIV_NMS, CD_VIV_NMS_AMP, & + CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, CD_VIV_Check_Amp_Table, & + CD_VIV_Ambient_Crossflow_Rate USE CableDyn_Hydro, ONLY: CD_Morison_Drag_Per_Length_Jac, CD_Airy_Wave_Kinematics_Precomputed, & CD_Component_Wave_Kinematics, CD_Solve_Dispersion_Wavenumber, CD_HYDRO_OK USE CableDyn_SeabedContact, ONLY: CD_Seabed_Normal_Law, CD_Seabed_Contact_Gate, CD_SEABED_CONTACT_BLEND, & @@ -129,6 +131,7 @@ MODULE CableDyn_HermiteCableDynamic PUBLIC :: CD_HermiteCable_Drag_Element PUBLIC :: CD_HermiteCable_VIV_Lift_Element PUBLIC :: CD_HermiteCable_Dyn_Load_Power + PUBLIC :: CD_HermiteCable_Dyn_VIV_Amplitude PUBLIC :: CD_HermiteCable_Axial_Damping_Element PUBLIC :: CD_HermiteCable_Axial_Damping_Resultant PUBLIC :: CD_HermiteCable_AddedMass_Element @@ -353,7 +356,16 @@ MODULE CableDyn_HermiteCableDynamic LOGICAL :: viv_wake = .FALSE. REAL(wp), ALLOCATABLE :: wo_st(:), wo_eps(:), wo_a(:), wo_s(:, :), wo_q_eval(:), wo_ydd0(:), wo_om0(:) REAL(wp), ALLOCATABLE :: ws_recovery_wo_s(:, :), snap_wo_s(:, :) - REAL(wp), ALLOCATABLE :: Mgb(:, :) ! constant global mass (band) + ! Amplitude-dependent VIV coefficients (Set_VIV amp, amp_n; VIV AMPLITUDE section): per element + ! a table of viv_amp_n rows (A/D, C_v, drag factor) in viv_amp(:, 1:n, e). With it viv_ms carries + ! CD_VIV_NMS_AMP rows per node, the amplitude estimate of Thorsen et al. (2016) after the mean + ! squares (CD_VIV_Amplitude_Update; row 5 the smoothed amplitude); an element takes C_v in place + ! of cl and the factor of its normal drag coefficient at the mean smoothed amplitude of its VIV + ! nodes over its diameter. + LOGICAL :: has_viv_amp = .FALSE. + REAL(wp), ALLOCATABLE :: viv_amp(:, :, :) + INTEGER, ALLOCATABLE :: viv_amp_n(:) + REAL(wp), ALLOCATABLE :: Mgb(:, :) ! constant global mass (band) LOGICAL, ALLOCATABLE :: freemask(:), solve_mask(:) INTEGER, ALLOCATABLE :: fmap(:) ! free -> global DOF index REAL(wp), ALLOCATABLE :: q(:), v(:), a(:) ! dynamic state @@ -1111,7 +1123,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial(model, mu_axial, ErrStat, ErrM END SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg, phase_seed, tangent_reversed, & - clx, il_alpha, chh, wake) + clx, il_alpha, chh, wake, amp, amp_n) !! 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 @@ -1140,6 +1152,13 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! q'' + eps om (q^2 - 1) q' + om^2 q = (A/D) y'' at each lifting node (om = 2 pi St U/D, y'' !! its cross-flow acceleration); q starts on its limit cycle at the phase seed, q = 2 cos(phi_0) !! and q' = 0. + !! + !! Amplitude-dependent coefficients (both or neither; not with the wake oscillator): amp (3, + !! CD_VIV_AMP_MAXP, ne) and amp_n (ne), per element a table of amp_n rows (0: none; only where + !! cl > 0) of the amplitude ratio A/D >= 0 (strictly increasing), the cross-flow coefficient + !! C_v >= 0 that replaces cl, and the factor > 0 of the element's normal drag coefficient, at + !! the smoothed amplitude estimate of Thorsen et al. (2016); piecewise linear, held beyond the + !! end rows. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: cl(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -1151,10 +1170,14 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err LOGICAL, INTENT(IN), OPTIONAL :: tangent_reversed REAL(wp), INTENT(IN), OPTIONAL :: clx(:), il_alpha(:), chh(:) REAL(wp), INTENT(IN), OPTIONAL :: wake(:, :) - INTEGER :: e, k, ne, nn, es + REAL(wp), INTENT(IN), OPTIONAL :: amp(:, :, :) + INTEGER, INTENT(IN), OPTIONAL :: amp_n(:) + INTEGER :: e, k, ne, nn, es, nms REAL(wp) :: wsum, tw_old, rest_old - LOGICAL :: had_viv, had_il, want_il, had_wake, want_wake, bad_band + LOGICAL :: had_viv, had_il, want_il, had_wake, want_wake, bad_band, had_amp, want_amp CHARACTER(LEN=1024) :: em + REAL(wp), ALLOCATABLE :: p_amp(:, :, :) + INTEGER, ALLOCATABLE :: p_ampn(:) REAL(wp), ALLOCATABLE :: a_old(:), o_cl(:), o_k(:), o_cf(:), o_df(:), o_dn(:), o_phi(:), o_phi_eval(:), & o_rate(:), o_ms(:, :), o_ms_next(:, :), o_rec_phi(:), o_rec_ms(:, :), & o_snap_phi(:), o_snap_ms(:, :) @@ -1266,10 +1289,28 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err 'higher-harmonic force runs at the cross-flow plus in-line phase)'; RETURN END IF END IF + IF (PRESENT(amp) .NEQV. PRESENT(amp_n)) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the amplitude tables amp and amp_n go together'; RETURN + END IF + want_amp = .FALSE. + IF (PRESENT(amp)) THEN + CALL CD_VIV_Check_Amp_Table(amp, amp_n, cl, em) + IF (LEN_TRIM(em) > 0) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: '//TRIM(em); RETURN + END IF + want_amp = ANY(amp_n > 0) + IF (want_amp .AND. want_wake) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the amplitude tables act on the synchronisation model, not the '// & + 'wake oscillator'; RETURN + END IF + END IF ! the previous configuration and state, kept for a rollback had_viv = model%has_viv had_il = model%has_viv_il had_wake = model%viv_wake + had_amp = model%has_viv_amp tw_old = model%viv_tw rest_old = model%viv_phi_rest a_old = model%a @@ -1283,11 +1324,18 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err IF (had_viv) CALL refresh_acceleration() RETURN END IF + nms = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, want_amp) ALLOCATE (model%viv_cl(ne), model%viv_k(ne), model%viv_cf(nn), model%viv_df(nn), model%viv_dn(nn), & model%viv_phi(nn), & - model%viv_phi_eval(nn), model%viv_rate(nn), model%viv_ms(2, nn), model%viv_ms_next(2, nn), & - model%ws_recovery_viv_phi(nn), model%ws_recovery_viv_ms(2, nn), model%snap_viv_phi(nn), & - model%snap_viv_ms(2, nn), model%viv_node(nn)) + model%viv_phi_eval(nn), model%viv_rate(nn), model%viv_ms(nms, nn), model%viv_ms_next(nms, nn), & + model%ws_recovery_viv_phi(nn), model%ws_recovery_viv_ms(nms, nn), model%snap_viv_phi(nn), & + model%snap_viv_ms(nms, nn), model%viv_node(nn)) + IF (want_amp) THEN + ALLOCATE (model%viv_amp(3, CD_VIV_AMP_MAXP, ne), model%viv_amp_n(ne)) + model%viv_amp = amp + model%viv_amp_n = amp_n + model%has_viv_amp = .TRUE. + END IF model%viv_cl = cl model%viv_cf = CD_ZERO model%viv_df = CD_ZERO @@ -1400,6 +1448,7 @@ SUBROUTINE refresh_acceleration() model%has_viv = had_viv model%has_viv_il = had_il model%viv_wake = had_wake + model%has_viv_amp = had_amp model%viv_tw = tw_old model%viv_phi_rest = rest_old model%a = a_old @@ -1432,6 +1481,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(w_qe, model%wo_q_eval); CALL MOVE_ALLOC(w_y0, model%wo_ydd0) CALL MOVE_ALLOC(w_om, model%wo_om0); CALL MOVE_ALLOC(w_rec, model%ws_recovery_wo_s) CALL MOVE_ALLOC(w_snap, model%snap_wo_s) + CALL MOVE_ALLOC(p_amp, model%viv_amp); CALL MOVE_ALLOC(p_ampn, model%viv_amp_n) ELSE CALL MOVE_ALLOC(model%viv_cl, o_cl); CALL MOVE_ALLOC(model%viv_k, o_k) CALL MOVE_ALLOC(model%viv_cf, o_cf); CALL MOVE_ALLOC(model%viv_df, o_df) @@ -1454,6 +1504,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(model%wo_q_eval, w_qe); CALL MOVE_ALLOC(model%wo_ydd0, w_y0) CALL MOVE_ALLOC(model%wo_om0, w_om); CALL MOVE_ALLOC(model%ws_recovery_wo_s, w_rec) CALL MOVE_ALLOC(model%snap_wo_s, w_snap) + CALL MOVE_ALLOC(model%viv_amp, p_amp); CALL MOVE_ALLOC(model%viv_amp_n, p_ampn) END IF END SUBROUTINE move_viv END SUBROUTINE CD_HermiteCable_Dyn_Set_VIV @@ -1474,6 +1525,9 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%vhh_k)) DEALLOCATE (model%vhh_cx, model%vhh_k) IF (ALLOCATED(model%wo_s)) DEALLOCATE (model%wo_st, model%wo_eps, model%wo_a, model%wo_s, model%wo_q_eval, & model%wo_ydd0, model%wo_om0, model%ws_recovery_wo_s, model%snap_wo_s) + IF (ALLOCATED(model%viv_amp)) DEALLOCATE (model%viv_amp) + IF (ALLOCATED(model%viv_amp_n)) DEALLOCATE (model%viv_amp_n) + model%has_viv_amp = .FALSE. model%has_viv = .FALSE. model%has_viv_il = .FALSE. model%viv_wake = .FALSE. @@ -1504,6 +1558,65 @@ SUBROUTINE viv_drag_terms(model) END DO END SUBROUTINE viv_drag_terms + PURE REAL(wp) FUNCTION viv_elem_amplitude(model, e) RESULT(y0) + !! The smoothed cross-flow amplitude of element e [m]: the mean over its VIV end nodes (zero + !! without amplitude tables). + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + INTEGER :: k, n + y0 = CD_ZERO + IF (.NOT. model%has_viv_amp) RETURN + n = 0 + DO k = e, e + 1 + IF (.NOT. model%viv_node(k)) CYCLE + y0 = y0 + model%viv_ms(5, k) + n = n + 1 + END DO + IF (n > 1) y0 = y0/REAL(n, wp) + END FUNCTION viv_elem_amplitude + + PURE REAL(wp) FUNCTION elem_viv_k(model, e) RESULT(k) + !! The lift scale of element e: viv_k = 1/2 rho D Cl, or with an amplitude table 1/2 rho D C_v + !! with the table's C_v at the element's smoothed amplitude over its diameter. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + INTEGER :: n + k = model%viv_k(e) + IF (.NOT. model%has_viv_amp) RETURN + n = model%viv_amp_n(e) + IF (n == 0) RETURN + k = 0.5_wp*model%rho_w*model%diam(e)*CD_VIV_Table(viv_elem_amplitude(model, e)/model%diam(e), & + model%viv_amp(1, 1:n, e), model%viv_amp(2, 1:n, e)) + END FUNCTION elem_viv_k + + PURE REAL(wp) FUNCTION elem_cdn(model, e) RESULT(cdn) + !! The normal drag coefficient of element e: cdn, times the drag factor of its VIV amplitude + !! table at the element's smoothed amplitude where it has one. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + INTEGER :: n + cdn = model%cdn(e) + IF (.NOT. model%has_viv_amp) RETURN + n = model%viv_amp_n(e) + IF (n == 0) RETURN + cdn = cdn*CD_VIV_Table(viv_elem_amplitude(model, e)/model%diam(e), model%viv_amp(1, 1:n, e), & + model%viv_amp(3, 1:n, e)) + END FUNCTION elem_cdn + + REAL(wp) FUNCTION viv_node_ambient_yd(model, k) RESULT(yd) + !! Cross-flow velocity of node k across the ambient flow (current plus a held field) normal to + !! its tangent (the slope DOFs) at the committed state, the y' of the amplitude estimate + !! (CD_VIV_Ambient_Crossflow_Rate). + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: k + REAL(wp) :: uu(3) + INTEGER :: i0 + i0 = 6*(k - 1) + uu = model%current + IF (model%has_held_field) uu = uu + model%hf_u(:, k) + yd = CD_VIV_Ambient_Crossflow_Rate(model%q(i0 + 4:i0 + 6), model%v(i0 + 1:i0 + 3), uu) + END FUNCTION viv_node_ambient_yd + REAL(wp) FUNCTION viv_node_ambient_speed(model, k) RESULT(ua) !! Speed of the ambient flow (current plus a held field) normal to node k's tangent (the slope !! DOFs) at the committed state; 0 for a degenerate tangent. @@ -1623,7 +1736,7 @@ SUBROUTINE viv_step_end(model, dt) TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: dt INTEGER :: k - REAL(wp) :: w, yd, ydd, un, ms1, ms2, rate_end, xd, xdd, rate_end_x, sw(2) + REAL(wp) :: w, yd, ydd, un, ms1, ms2, rate_end, xd, xdd, rate_end_x, sw(2), st(4), yda LOGICAL :: ok, il IF (model%viv_wake) THEN ! the wake state over the step with the cross-flow acceleration linear from its step-start @@ -1655,6 +1768,15 @@ SUBROUTINE viv_step_end(model, dt) rate_end_x = CD_ZERO IF (il) rate_end_x = model%vil_rate(k) CALL viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) + IF (model%has_viv_amp) THEN + ! the amplitude estimate over the step on the cross-flow velocity across the ambient flow; + ! a non-finite one holds y' (no crossing) + st = model%viv_ms(3:6, k) + yda = viv_node_ambient_yd(model, k) + IF (.NOT. CD_Is_Finite(yda)) yda = st(4) + CALL CD_VIV_Amplitude_Update(st, yda, dt) + model%viv_ms_next(3:6, k) = st + END IF IF (ok) THEN ms1 = CD_VIV_Mean_Square(model%viv_ms_next(1, k), yd, w) ms2 = CD_VIV_Mean_Square(model%viv_ms_next(2, k), ydd, w) @@ -1712,7 +1834,7 @@ SUBROUTINE viv_element_lift(model, q_cfg, v_cfg, e, flift, ErrStat, ErrMsg, djq, IF (model%viv_wake) THEN kn = model%viv_k(e)*[model%wo_q_eval(e), model%wo_q_eval(e + 1)] ELSE - kn = model%viv_k(e)*[COS(model%viv_phi_eval(e)), COS(model%viv_phi_eval(e + 1))] + kn = elem_viv_k(model, e)*[COS(model%viv_phi_eval(e)), COS(model%viv_phi_eval(e + 1))] END IF il = .FALSE. IF (model%has_viv_il) il = model%vil_k(e) > CD_ZERO @@ -1750,7 +1872,7 @@ SUBROUTINE element_drag_load(model, e, qe, ve, l0, t_eval, fdrag, ErrStat, ErrMs INTEGER :: es IF (model%has_wave .AND. model%wv_ncomp > 0) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, ErrStat=es, ErrMsg=ErrMsg, & wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval, & wvc_amp=model%wv_ampc, wvc_om=model%wv_omc, & @@ -1758,7 +1880,7 @@ SUBROUTINE element_drag_load(model, e, qe, ve, l0, t_eval, fdrag, ErrStat, ErrMs wvc_e2kd=model%wv_e2kd) ELSE IF (model%has_wave) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, ErrStat=es, ErrMsg=ErrMsg, & wv_h=model%wv_h, wv_om=model%wv_om, wv_k=model%wv_k, & wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval) @@ -1766,11 +1888,11 @@ SUBROUTINE element_drag_load(model, e, qe, ve, l0, t_eval, fdrag, ErrStat, ErrMs CALL CD_HermiteCable_Drag_Element(qe, ve, l0, & model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, ErrStat=es, ErrMsg=ErrMsg) ELSE CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, ErrStat=es, ErrMsg=ErrMsg) END IF ErrStat = es @@ -1804,6 +1926,27 @@ SUBROUTINE CD_HermiteCable_Dyn_VIV_Node_Lift(model, lift, ErrStat, ErrMsg) END DO END SUBROUTINE CD_HermiteCable_Dyn_VIV_Node_Lift + SUBROUTINE CD_HermiteCable_Dyn_VIV_Amplitude(model, amp, ErrStat, ErrMsg) + !! The smoothed cross-flow amplitude estimate of every node at the committed state [m] (nn; + !! Thorsen et al. 2016, Eq. 9); zero on nodes without VIV and on a cable without amplitude + !! tables. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + REAL(wp), INTENT(OUT) :: amp(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + amp = CD_ZERO + ErrStat = CD_HCDYN_OK; ErrMsg = '' + IF (.NOT. model%initialized) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_VIV_Amplitude: model not initialised'; RETURN + END IF + IF (SIZE(amp) /= model%nn) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_VIV_Amplitude: amp must have one value per node' + RETURN + END IF + IF (.NOT. model%has_viv_amp) RETURN + amp = MERGE(model%viv_ms(5, :), CD_ZERO, model%viv_node) + END SUBROUTINE CD_HermiteCable_Dyn_VIV_Amplitude + SUBROUTINE CD_HermiteCable_Dyn_Load_Power(model, p_viv, p_drag, p_damp, ErrStat, ErrMsg) !! The power [W] three loads deliver to the cable at the committed state, per node (nn): the !! VIV loads (cross-flow lift, and the in-line force where it is on), the hydrodynamic drag @@ -9498,7 +9641,7 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta IF (want_tangent) THEN IF (model%has_wave .AND. model%wv_ncomp > 0) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, djq, djv, es, em_e, & wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval, & wvc_amp=model%wv_ampc, wvc_om=model%wv_omc, & @@ -9506,7 +9649,7 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta wvc_e2kd=model%wv_e2kd) ELSE IF (model%has_wave) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, djq, djv, es, em_e, & wv_h=model%wv_h, wv_om=model%wv_om, wv_k=model%wv_k, & wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval) @@ -9517,11 +9660,11 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), & model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, djq, djv, es, em_e) ELSE CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, djq, djv, es, em_e) END IF ELSE @@ -11043,14 +11186,14 @@ SUBROUTINE evaluate_tangent_element(model, e, q_cfg, v_cfg, t_eval, Kstruct, Kdr IF (model%has_drag) THEN IF (model%has_wave .AND. model%wv_ncomp > 0) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fload, djq, djv, es, em, wv_depth=model%wv_depth, & wv_dir=model%wv_dir, wv_t=t_eval, wvc_amp=model%wv_ampc, & wvc_om=model%wv_omc, wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & wvc_e2kd=model%wv_e2kd) ELSE IF (model%has_wave) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fload, djq, djv, es, em, wv_h=model%wv_h, wv_om=model%wv_om, & wv_k=model%wv_k, wv_depth=model%wv_depth, wv_dir=model%wv_dir, & wv_t=t_eval) @@ -11058,10 +11201,10 @@ SUBROUTINE evaluate_tangent_element(model, e, q_cfg, v_cfg, t_eval, Kstruct, Kdr CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), & model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), model%rho_w, & - model%diam(e), model%cdn(e), model%cdt(e), fload, djq, djv, es, em) + model%diam(e), elem_cdn(model, e), model%cdt(e), fload, djq, djv, es, em) ELSE CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & - model%rho_w, model%diam(e), model%cdn(e), model%cdt(e), & + model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fload, djq, djv, es, em) END IF IF (es /= CD_HCDYN_OK) THEN diff --git a/src/CableDyn_Model.f90 b/src/CableDyn_Model.f90 index c90536de..d12a2778 100644 --- a/src/CableDyn_Model.f90 +++ b/src/CableDyn_Model.f90 @@ -57,7 +57,9 @@ MODULE CableDyn_Model CD_Added_Mass_Element, CD_Added_Mass_Element_Matrix, CD_Added_Mass_Element_Force, & CD_Submerged_Fraction USE CableDyn_VIV, ONLY: CD_VIV_Node_Lift, CD_VIV_Crossflow_Motion, CD_VIV_Phase_Rate, CD_VIV_Mean_Square, & - CD_VIV_Wrap_Phase, CD_VIV_NM, CD_VIV_TWO_PI, CD_VIV_Node_Inline, CD_VIV_Inline_Phase_Rate + CD_VIV_Wrap_Phase, CD_VIV_NM, CD_VIV_TWO_PI, CD_VIV_Node_Inline, CD_VIV_Inline_Phase_Rate, & + CD_VIV_NMS, CD_VIV_NMS_AMP, CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, & + CD_VIV_Check_Amp_Table, CD_VIV_Ambient_Crossflow_Rate USE CableDyn_Dynamic, ONLY: GenAlphaConfig, CD_CableGenAlphaWorkspace, CD_Clear_GenAlpha_Workspace, & CD_Cable_Initial_Acceleration, CD_Cable_Gen_Alpha_Step, CD_Cable_Step_Loads, & CD_DYN_OK, CD_DYN_ALLOCFAIL, & @@ -97,7 +99,8 @@ MODULE CableDyn_Model PUBLIC :: CD_Set_Model_Syrope_State PUBLIC :: CD_Set_Model_VIV PUBLIC :: CD_Latch_Model_VIV_Window - PUBLIC :: CD_Get_Model_VIV_State, CD_Set_Model_VIV_State, CD_Model_Has_VIV, CD_Get_Model_VIV_Lift + PUBLIC :: CD_Get_Model_VIV_State, CD_Set_Model_VIV_State, CD_Model_Has_VIV, CD_Get_Model_VIV_Lift, & + CD_Model_VIV_NMS, CD_Get_Model_VIV_Amplitude PUBLIC :: CD_Model_Has_VIV_Inline PUBLIC :: CD_Get_Model_Load_Power PUBLIC :: CD_Get_Model_Tension @@ -426,6 +429,15 @@ MODULE CableDyn_Model REAL(wp), ALLOCATABLE :: vil_phi(:), vil_ms(:, :), vil_phi_rollback(:), vil_ms_rollback(:, :) REAL(wp), ALLOCATABLE :: recovery_vil_phi(:), recovery_vil_ms(:, :) REAL(wp), ALLOCATABLE :: vil_phi_eval(:), vil_rate(:), vil_ms_next(:, :), vil_phi_next(:) + ! Amplitude-dependent VIV coefficients (CD_Set_Model_VIV amp, amp_n; VIV AMPLITUDE section): + ! per element a table of amp_n rows (A/D, C_v, drag factor) in viv_amp(:, 1:amp_n, e) (amp_n 0 + ! = none). With it viv_ms carries CD_VIV_NMS_AMP rows: after the mean squares, the amplitude + ! estimate of Thorsen et al. (2016) per node (CD_VIV_Amplitude_Update, row 5 the smoothed + ! amplitude). An element takes C_v and the factor of its normal drag coefficient from its table + ! at the mean smoothed amplitude of its VIV nodes over its diameter. + LOGICAL :: has_viv_amp = .FALSE. + REAL(wp), ALLOCATABLE :: viv_amp(:, :, :) + INTEGER, ALLOCATABLE :: viv_amp_n(:) TYPE(GenAlphaConfig) :: cfg ! Run audit of the committed host steps (CD_Audit_Model_Step), diagnostics only: never part ! of the state, of a copy, or of a result. audit_t holds the segment tensions of the last two @@ -2272,6 +2284,7 @@ LOGICAL FUNCTION sub_alloc(model, has_pres) RESULT(ok) TYPE(CD_ModelType), INTENT(INOUT) :: model LOGICAL, INTENT(IN) :: has_pres INTEGER :: istat, k + LOGICAL :: reuse ok = .FALSE. istat = 0 DO k = 1, 2 @@ -2311,9 +2324,15 @@ LOGICAL FUNCTION sub_alloc(model, has_pres) RESULT(ok) END IF END IF IF (model%has_viv) THEN - IF (.NOT. sized(s%viv_phi, SIZE(model%viv_phi))) THEN - IF (ALLOCATED(s%viv_phi)) DEALLOCATE (s%viv_phi, s%viv_ms) - ALLOCATE (s%viv_phi(SIZE(model%viv_phi)), s%viv_ms(2, SIZE(model%viv_phi)), STAT=istat) + ! the motion statistics change rows with amplitude tables (CD_Model_VIV_NMS) on a line + ! whose VIV is set again after it has stepped: the slot follows both dimensions + reuse = sized(s%viv_phi, SIZE(model%viv_phi)) + IF (reuse) reuse = ALLOCATED(s%viv_ms) + IF (reuse) reuse = SIZE(s%viv_ms, 1) == SIZE(model%viv_ms, 1) .AND. SIZE(s%viv_ms, 2) == SIZE(model%viv_ms, 2) + IF (.NOT. reuse) THEN + IF (ALLOCATED(s%viv_phi)) DEALLOCATE (s%viv_phi) + IF (ALLOCATED(s%viv_ms)) DEALLOCATE (s%viv_ms) + ALLOCATE (s%viv_phi(SIZE(model%viv_phi)), s%viv_ms(SIZE(model%viv_ms, 1), SIZE(model%viv_phi)), STAT=istat) IF (istat /= 0) RETURN END IF END IF @@ -3928,7 +3947,7 @@ SUBROUTINE CD_Set_Model_Syrope_State(model, slow, tmax, ErrStat, ErrMsg) END SUBROUTINE CD_Set_Model_Syrope_State SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, ErrMsg, phase_seed, & - tangent_reversed, clx, il_alpha, chh) + tangent_reversed, clx, il_alpha, chh, amp, amp_n) !! Install the cross-flow VIV model (CableDyn_VIV) on an initialised line. Per element: !! the lift coefficient cl (0 = no lift on that element), hydrodynamic diameter, and the !! synchronisation centre cf and half-range df of the non-dimensional shedding frequency; @@ -3950,6 +3969,11 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, !! twice its cross-flow phase. chh (optional, with clx), per element, the coefficient C_hh >= 0 !! of the higher-harmonic force of Ulveseter et al. (2019), the lift's form at the phase sum !! phi_y + phi_x (0: none; > 0 only where clx > 0). + !! Amplitude-dependent coefficients (both or neither): amp (3, CD_VIV_AMP_MAXP, n_elem) and + !! amp_n (n_elem), per element a table of amp_n rows (0: none; only where cl > 0) of the + !! amplitude ratio A/D >= 0 (strictly increasing), the cross-flow coefficient C_v >= 0 that + !! replaces cl, and the factor > 0 of the element's normal drag coefficient, at the smoothed + !! amplitude estimate of Thorsen et al. (2016); piecewise linear, held beyond the end rows. TYPE(CD_ModelType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: rho, cl(:), diameter(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -3960,9 +3984,12 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, !! .FALSE. on a line the reader turned around, whose tangent runs as MoorDyn's LOGICAL, INTENT(IN), OPTIONAL :: tangent_reversed REAL(wp), INTENT(IN), OPTIONAL :: clx(:), il_alpha(:), chh(:) - INTEGER :: n_nodes, n_elem, e, nd, istat, k + REAL(wp), INTENT(IN), OPTIONAL :: amp(:, :, :) + INTEGER, INTENT(IN), OPTIONAL :: amp_n(:) + INTEGER :: n_nodes, n_elem, e, nd, istat, k, nms REAL(wp) :: wsum - LOGICAL :: want_il + LOGICAL :: want_il, want_amp + CHARACTER(160) :: amsg ErrStat = CD_MODEL_OK ErrMsg = '' @@ -4036,6 +4063,19 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, RETURN END IF END IF + IF (PRESENT(amp) .NEQV. PRESENT(amp_n)) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV amplitude tables amp and amp_n go together') + RETURN + END IF + want_amp = .FALSE. + IF (PRESENT(amp)) THEN + CALL CD_VIV_Check_Amp_Table(amp, amp_n, cl, amsg) + IF (LEN_TRIM(amsg) > 0) THEN + CALL fail(ErrStat, ErrMsg, TRIM(amsg)) + RETURN + END IF + want_amp = ANY(amp_n > 0) + END IF CALL clear_viv(model) IF (.NOT. ANY(cl > CD_ZERO)) RETURN IF (.NOT. (CD_Is_Finite(rho) .AND. rho > CD_ZERO)) THEN @@ -4060,17 +4100,29 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, RETURN END IF END DO + nms = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, want_amp) ALLOCATE (model%viv_cl(n_elem), model%viv_d(n_elem), model%viv_node(n_nodes), model%viv_cf(n_nodes), & - model%viv_df(n_nodes), model%viv_dn(n_nodes), model%viv_phi(n_nodes), model%viv_ms(2, n_nodes), & - model%viv_phi_rollback(n_nodes), model%viv_ms_rollback(2, n_nodes), & - model%recovery_viv_phi(n_nodes), model%recovery_viv_ms(2, n_nodes), & - model%viv_phi_eval(n_nodes), model%viv_rate(n_nodes), model%viv_ms_next(2, n_nodes), & + model%viv_df(n_nodes), model%viv_dn(n_nodes), model%viv_phi(n_nodes), model%viv_ms(nms, n_nodes), & + model%viv_phi_rollback(n_nodes), model%viv_ms_rollback(nms, n_nodes), & + model%recovery_viv_phi(n_nodes), model%recovery_viv_ms(nms, n_nodes), & + model%viv_phi_eval(n_nodes), model%viv_rate(n_nodes), model%viv_ms_next(nms, n_nodes), & model%viv_phi_next(n_nodes), STAT=istat) IF (istat /= 0) THEN CALL clear_viv(model) CALL alloc_fail(ErrStat, ErrMsg, 'VIV storage allocation failed') RETURN END IF + IF (want_amp) THEN + ALLOCATE (model%viv_amp(3, CD_VIV_AMP_MAXP, n_elem), model%viv_amp_n(n_elem), STAT=istat) + IF (istat /= 0) THEN + CALL clear_viv(model) + CALL alloc_fail(ErrStat, ErrMsg, 'VIV amplitude table allocation failed') + RETURN + END IF + model%viv_amp = amp + model%viv_amp_n = amp_n + model%has_viv_amp = .TRUE. + END IF model%viv_rho = rho model%viv_tw = t_window model%viv_cl = MERGE(cl, CD_ZERO, cl > CD_ZERO) @@ -4190,8 +4242,8 @@ SUBROUTINE CD_Get_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi ErrMsg = 'CableDyn_Model: model is not initialized' RETURN END IF - IF (SIZE(phi) /= model%n_dof/3 .OR. SIZE(ms, 1) /= 2 .OR. SIZE(ms, 2) /= model%n_dof/3) THEN - CALL fail(ErrStat, ErrMsg, 'VIV state outputs must have shapes (n_nodes) and (2, n_nodes)') + IF (SIZE(phi) /= model%n_dof/3 .OR. SIZE(ms, 1) /= CD_Model_VIV_NMS(model) .OR. SIZE(ms, 2) /= model%n_dof/3) THEN + CALL fail(ErrStat, ErrMsg, 'VIV state outputs must have shapes (n_nodes) and (CD_Model_VIV_NMS, n_nodes)') RETURN END IF IF (PRESENT(phi_x) .NEQV. PRESENT(ms_x)) THEN @@ -4217,13 +4269,14 @@ END SUBROUTINE CD_Get_Model_VIV_State SUBROUTINE CD_Set_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi_x, ms_x) !! Overwrite the committed VIV state from a checkpoint (see CD_Get_Model_VIV_State). !! Fails closed on a model without VIV, a shape mismatch, non-finite values, a negative - !! mean square or averaging time. A model with in-line VIV needs phi_x and ms_x, one without - !! refuses them. + !! mean square, amplitude or averaging time. A model with in-line VIV needs phi_x and ms_x, + !! one without refuses them. TYPE(CD_ModelType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: phi(:), ms(:, :), t_window INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg REAL(wp), INTENT(IN), OPTIONAL :: phi_x(:), ms_x(:, :) + LOGICAL :: neg ErrStat = CD_MODEL_OK ErrMsg = '' IF (.NOT. model%initialized) THEN @@ -4235,16 +4288,20 @@ SUBROUTINE CD_Set_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi CALL fail(ErrStat, ErrMsg, 'model carries no VIV state to set') RETURN END IF - IF (SIZE(phi) /= model%n_dof/3 .OR. SIZE(ms, 1) /= 2 .OR. SIZE(ms, 2) /= model%n_dof/3) THEN - CALL fail(ErrStat, ErrMsg, 'VIV state inputs must have shapes (n_nodes) and (2, n_nodes)') + IF (SIZE(phi) /= model%n_dof/3 .OR. SIZE(ms, 1) /= CD_Model_VIV_NMS(model) .OR. SIZE(ms, 2) /= model%n_dof/3) THEN + CALL fail(ErrStat, ErrMsg, 'VIV state inputs must have shapes (n_nodes) and (CD_Model_VIV_NMS, n_nodes)') RETURN END IF IF (.NOT. (CD_All_Finite(phi) .AND. CD_All_Finite(ms) .AND. CD_Is_Finite(t_window))) THEN CALL fail(ErrStat, ErrMsg, 'VIV state mirror must be finite') RETURN END IF - IF (ANY(ms < CD_ZERO) .OR. t_window < CD_ZERO) THEN - CALL fail(ErrStat, ErrMsg, 'VIV mean squares and averaging time must be non-negative') + ! the mean squares (rows 1:2) and the amplitudes y0, y0s (rows 4:5) cannot be negative; the + ! travel and the last cross-flow velocity of the amplitude estimate (rows 3, 6) are signed + neg = ANY(ms(1:2, :) < CD_ZERO) + IF (SIZE(ms, 1) >= 5) neg = neg .OR. ANY(ms(4:5, :) < CD_ZERO) + IF (neg .OR. t_window < CD_ZERO) THEN + CALL fail(ErrStat, ErrMsg, 'VIV mean squares, amplitudes and averaging time must be non-negative') RETURN END IF IF (((PRESENT(phi_x) .AND. PRESENT(ms_x)) .NEQV. model%has_viv_il) .OR. (PRESENT(phi_x) .NEQV. PRESENT(ms_x))) THEN @@ -4355,7 +4412,7 @@ SUBROUTINE CD_Get_Model_Load_Power(model, p_viv, p_drag, p_damp, ErrStat, ErrMsg CALL extract_nodal_scalar(model%drag_waterline_z, model, e, wl2) CALL CD_Morison_Drag_Element_Force(q2(1:3), q2(4:6), v2(1:3), v2(4:6), model%l0(e), & fluid2(:, 1), fluid2(:, 2), wl2(1), wl2(2), model%drag_rho, & - model%drag_diameter_elem(e), model%drag_cdn_elem(e), & + model%drag_diameter_elem(e), elem_cdn(model, e), & model%drag_cdt_elem(e), f2, ErrStat, ErrMsg(1:lk), inputs_validated=.TRUE.) IF (ErrStat /= 0) RETURN CALL add_shares(p_drag) @@ -4464,6 +4521,82 @@ PURE LOGICAL FUNCTION CD_Model_Has_VIV(model) RESULT(has) has = model%has_viv END FUNCTION CD_Model_Has_VIV + PURE INTEGER FUNCTION CD_Model_VIV_NMS(model) RESULT(n) + !! Rows of the VIV motion statistics of a node in the VIV state (CD_Get_Model_VIV_State ms): + !! CD_VIV_NMS_AMP with amplitude tables (the amplitude estimate after the mean squares), + !! CD_VIV_NMS otherwise. + TYPE(CD_ModelType), INTENT(IN) :: model + n = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp) + END FUNCTION CD_Model_VIV_NMS + + SUBROUTINE CD_Get_Model_VIV_Amplitude(model, amp, ErrStat, ErrMsg) + !! The smoothed cross-flow amplitude estimate of every node at the committed state [m] + !! (n_nodes; Thorsen et al. 2016, Eq. 9); zero on nodes without VIV and on a model without + !! amplitude tables. + TYPE(CD_ModelType), INTENT(IN) :: model + REAL(wp), INTENT(OUT) :: amp(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + amp = CD_ZERO + ErrStat = CD_MODEL_OK + ErrMsg = '' + IF (.NOT. model%initialized) THEN + ErrStat = CD_MODEL_NOT_INITIALIZED + ErrMsg = 'CableDyn_Model: model is not initialized' + RETURN + END IF + IF (SIZE(amp) /= model%n_dof/3) THEN + CALL fail(ErrStat, ErrMsg, 'VIV amplitude output must have shape (n_nodes)') + RETURN + END IF + IF (.NOT. model%has_viv_amp) RETURN + amp = MERGE(model%viv_ms(5, :), CD_ZERO, model%viv_node) + END SUBROUTINE CD_Get_Model_VIV_Amplitude + + PURE REAL(wp) FUNCTION viv_elem_amplitude(model, e) RESULT(y0) + !! The smoothed cross-flow amplitude of element e [m]: the mean over its VIV end nodes (zero + !! without amplitude tables or VIV nodes). + TYPE(CD_ModelType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + INTEGER :: k, n + y0 = CD_ZERO + IF (.NOT. model%has_viv_amp) RETURN + n = 0 + DO k = e, e + 1 + IF (.NOT. model%viv_node(k)) CYCLE + y0 = y0 + model%viv_ms(5, k) + n = n + 1 + END DO + IF (n > 1) y0 = y0/REAL(n, wp) + END FUNCTION viv_elem_amplitude + + PURE REAL(wp) FUNCTION viv_elem_cl(model, e) RESULT(cl) + !! The cross-flow coefficient of element e: its LINE TYPES Cl, or with an amplitude table the + !! table's C_v at the element's smoothed amplitude over its diameter. + TYPE(CD_ModelType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + INTEGER :: n + cl = model%viv_cl(e) + IF (.NOT. model%has_viv_amp) RETURN + n = model%viv_amp_n(e) + IF (n == 0) RETURN + cl = CD_VIV_Table(viv_elem_amplitude(model, e)/model%viv_d(e), model%viv_amp(1, 1:n, e), model%viv_amp(2, 1:n, e)) + END FUNCTION viv_elem_cl + + PURE REAL(wp) FUNCTION elem_cdn(model, e) RESULT(cdn) + !! The normal drag coefficient of element e: drag_cdn_elem, times the drag factor of its VIV + !! amplitude table at the element's smoothed amplitude where it has one. + TYPE(CD_ModelType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + INTEGER :: n + cdn = model%drag_cdn_elem(e) + IF (.NOT. model%has_viv_amp) RETURN + n = model%viv_amp_n(e) + IF (n == 0) RETURN + cdn = cdn*CD_VIV_Table(viv_elem_amplitude(model, e)/model%viv_d(e), model%viv_amp(1, 1:n, e), & + model%viv_amp(3, 1:n, e)) + END FUNCTION elem_cdn + SUBROUTINE viv_node_coef(model, q, nd, coef, uu, coefx, coefh) !! Lift scale of interior node nd at positions q, sum over its two elements of !! (1/2 l0_e w_e)(1/2 rho D_e Cl_e) with w_e the wetted fraction under the drag waterline @@ -4489,7 +4622,7 @@ SUBROUTINE viv_node_coef(model, q, nd, coef, uu, coefx, coefh) wlb = model%drag_waterline_z(e + 1) END IF CALL CD_Submerged_Fraction(q(3*e) - wla, q(3*e + 3) - wlb, frac) - coef = coef + 0.25_wp*model%viv_rho*model%viv_d(e)*model%viv_cl(e)*model%l0(e)*frac + coef = coef + 0.25_wp*model%viv_rho*model%viv_d(e)*viv_elem_cl(model, e)*model%l0(e)*frac IF (PRESENT(coefx)) coefx = coefx + 0.25_wp*model%viv_rho*model%viv_d(e)*model%vil_cx(e)*model%l0(e)*frac IF (PRESENT(coefh)) coefh = coefh + 0.25_wp*model%viv_rho*model%viv_d(e)*model%vhh_cx(e)*model%l0(e)*frac END DO @@ -4561,7 +4694,7 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: nd, ia - REAL(wp) :: w, yd, ydd, un, coef, uu(3), ms1, ms2, rate_end, xd, xdd, rate_end_x + REAL(wp) :: w, yd, ydd, un, coef, uu(3), ms1, ms2, rate_end, xd, xdd, rate_end_x, st(4) LOGICAL :: ok ErrStat = CD_MODEL_OK ErrMsg = '' @@ -4579,6 +4712,15 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) CALL fail(ErrStat, ErrMsg, 'VIV phase: the neighbours of a node coincide (no line tangent)') RETURN END IF + IF (model%has_viv_amp) THEN + ! the amplitude estimate over the step, from the committed one (repeatable), on the + ! cross-flow velocity across the ambient flow + st = model%viv_ms(3:6, nd) + CALL CD_VIV_Amplitude_Update(st, CD_VIV_Ambient_Crossflow_Rate(model%q_step(ia + 3:ia + 5) - & + model%q_step(ia - 3:ia - 1), & + smoothed(model%v_step, ia), uu), dt) + model%viv_ms_next(3:6, nd) = st + END IF ms1 = CD_VIV_Mean_Square(model%viv_ms_next(1, nd), yd, w) ms2 = CD_VIV_Mean_Square(model%viv_ms_next(2, nd), ydd, w) rate_end = CD_VIV_Phase_Rate(yd, ydd, ms1, ms2, model%viv_phi(nd) + dt*model%viv_rate(nd), un, & @@ -4652,6 +4794,9 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%vil_rate)) DEALLOCATE (model%vil_rate) IF (ALLOCATED(model%vil_ms_next)) DEALLOCATE (model%vil_ms_next) IF (ALLOCATED(model%vil_phi_next)) DEALLOCATE (model%vil_phi_next) + IF (ALLOCATED(model%viv_amp)) DEALLOCATE (model%viv_amp) + IF (ALLOCATED(model%viv_amp_n)) DEALLOCATE (model%viv_amp_n) + model%has_viv_amp = .FALSE. model%has_viv_il = .FALSE. model%has_viv = .FALSE. model%viv_rho = CD_ZERO @@ -7411,6 +7556,11 @@ SUBROUTINE CD_Copy_Model(src, dst, ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN CALL copy_real1(src%viv_phi_next, work%viv_phi_next, 'viv_phi_next', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN + work%has_viv_amp = src%has_viv_amp + CALL copy_real3(src%viv_amp, work%viv_amp, 'viv_amp', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_int1(src%viv_amp_n, work%viv_amp_n, 'viv_amp_n', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN work%has_viv_il = src%has_viv_il CALL copy_real1(src%vil_cx, work%vil_cx, 'vil_cx', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN @@ -7596,6 +7746,9 @@ SUBROUTINE commit_model_copy(from, to) CALL MOVE_ALLOC(from%viv_rate, to%viv_rate) CALL MOVE_ALLOC(from%viv_ms_next, to%viv_ms_next) CALL MOVE_ALLOC(from%viv_phi_next, to%viv_phi_next) + to%has_viv_amp = from%has_viv_amp + CALL MOVE_ALLOC(from%viv_amp, to%viv_amp) + CALL MOVE_ALLOC(from%viv_amp_n, to%viv_amp_n) to%has_viv_il = from%has_viv_il CALL MOVE_ALLOC(from%vil_cx, to%vil_cx) CALL MOVE_ALLOC(from%vhh_cx, to%vhh_cx) @@ -7740,6 +7893,22 @@ SUBROUTINE copy_real2(src, dst, label, ErrStat, ErrMsg) IF (istat /= 0) CALL copy_alloc_fail(label, ErrStat, ErrMsg) END SUBROUTINE copy_real2 + SUBROUTINE copy_real3(src, dst, label, ErrStat, ErrMsg) + REAL(wp), ALLOCATABLE, INTENT(IN) :: src(:, :, :) + REAL(wp), ALLOCATABLE, INTENT(INOUT) :: dst(:, :, :) + CHARACTER(*), INTENT(IN) :: label + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + + INTEGER :: istat + + ErrStat = CD_MODEL_OK + ErrMsg = '' + IF (.NOT. ALLOCATED(src)) RETURN + ALLOCATE (dst(SIZE(src, 1), SIZE(src, 2), SIZE(src, 3)), SOURCE=src, STAT=istat) + IF (istat /= 0) CALL copy_alloc_fail(label, ErrStat, ErrMsg) + END SUBROUTINE copy_real3 + SUBROUTINE copy_alloc_fail(label, ErrStat, ErrMsg) CHARACTER(*), INTENT(IN) :: label INTEGER, INTENT(OUT) :: ErrStat @@ -8528,7 +8697,7 @@ SUBROUTINE model_contributor_load_banded(model, q, v, free, kl, ku, force, jac_q CALL extract_nodal_scalar(model%drag_waterline_z, model, e, wl2) CALL CD_Morison_Drag_Element_Load(q2(1:3), q2(4:6), v2(1:3), v2(4:6), model%l0(e), & fluid2(:, 1), fluid2(:, 2), wl2(1), wl2(2), model%drag_rho, & - model%drag_diameter_elem(e), model%drag_cdn_elem(e), & + model%drag_diameter_elem(e), elem_cdn(model, e), & model%drag_cdt_elem(e), f2, jq2, jv2, ErrStat, ErrMsg(1:lk), & inputs_validated=.TRUE.) IF (ErrStat /= 0) RETURN @@ -8795,7 +8964,7 @@ SUBROUTINE model_contributor_force(model, q, v, force, ErrStat, ErrMsg, end_node CALL extract_nodal_scalar(model%drag_waterline_z, model, e, wl2) CALL CD_Morison_Drag_Element_Force(q2(1:3), q2(4:6), v2(1:3), v2(4:6), model%l0(e), & fluid2(:, 1), fluid2(:, 2), wl2(1), wl2(2), model%drag_rho, & - model%drag_diameter_elem(e), model%drag_cdn_elem(e), & + model%drag_diameter_elem(e), elem_cdn(model, e), & model%drag_cdt_elem(e), f2, ErrStat, ErrMsg(1:lk), inputs_validated=.TRUE.) IF (ErrStat /= 0) RETURN CALL scatter_element_vector(force, idx, f2) @@ -9362,7 +9531,7 @@ SUBROUTINE model_morison_drag_load(model, q, v, force, jac_q, jac_v, ErrStat, Er CALL extract_nodal_scalar(model%drag_waterline_z, model, e, wl2) l02(1) = model%l0(e) CALL CD_Cable_Morison_Drag_Load(q2, v2, conn1, l02, fluid2, wl2, model%drag_rho, & - model%drag_diameter_elem(e), model%drag_cdn_elem(e), & + model%drag_diameter_elem(e), elem_cdn(model, e), & model%drag_cdt_elem(e), f2, jq2, jv2, ErrStat, ErrMsg) IF (ErrStat /= 0) RETURN CALL scatter_element_vector(force, idx, f2) diff --git a/src/CableDyn_OpenFAST_HermiteFMF.f90 b/src/CableDyn_OpenFAST_HermiteFMF.f90 index 4de6294e..bb28e179 100644 --- a/src/CableDyn_OpenFAST_HermiteFMF.f90 +++ b/src/CableDyn_OpenFAST_HermiteFMF.f90 @@ -2250,14 +2250,15 @@ END FUNCTION CD_HFMF_ForceMirrorSize INTEGER FUNCTION CD_HFMF_VIVMirrorSize(self) RESULT(n) !! Mirror slots of the VIV state, before the torsion block: the cross-flow shedding phase - !! per node, the running mean squares of the cross-flow velocity and acceleration per node - !! (interleaved) and the averaging time (3 nn + 1 values); with in-line VIV then the in-line - !! phase and mean squares (3 nn more); with the wake oscillator its state (q, dq/dt) per node - !! (2 nn more); zero without VIV. + !! per node, the running mean squares of the cross-flow velocity and acceleration per node and, + !! with amplitude tables, the four values of the amplitude estimate after them (2 or 6 values a + !! node, interleaved), and the averaging time (3 nn + 1 values, 7 nn + 1 with amplitude tables); + !! with in-line VIV then the in-line phase and mean squares (3 nn more); with the wake + !! oscillator its state (q, dq/dt) per node (2 nn more); zero without VIV. TYPE(CD_HFMF_ModuleType), INTENT(IN) :: self n = 0 IF (.NOT. self%initialized) RETURN - IF (self%line%has_viv) n = 3*self%line%nn + 1 + IF (self%line%has_viv) n = (1 + SIZE(self%line%viv_ms, 1))*self%line%nn + 1 IF (self%line%has_viv_il) n = n + 3*self%line%nn IF (self%line%viv_wake) n = n + 2*self%line%nn END FUNCTION CD_HFMF_VIVMirrorSize @@ -2280,7 +2281,7 @@ SUBROUTINE CD_HFMF_PackMirror(self, buf, ErrStat, ErrMsg) REAL(wp), INTENT(OUT) :: buf(:) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - INTEGER :: i, nf, nh, k + INTEGER :: i, nf, nh, k, nv ErrStat = CD_HFMF_OK; ErrMsg = '' buf = CD_ZERO IF (.NOT. self%initialized) THEN @@ -2337,10 +2338,11 @@ SUBROUTINE CD_HFMF_PackMirror(self, buf, ErrStat, ErrMsg) k = k + 1 + self%line%ndof END IF IF (self%line%has_viv) THEN + nv = SIZE(self%line%viv_ms, 1) buf(k + 1:k + self%line%nn) = self%line%viv_phi - buf(k + self%line%nn + 1:k + 3*self%line%nn) = RESHAPE(self%line%viv_ms, [2*self%line%nn]) - buf(k + 3*self%line%nn + 1) = self%line%viv_tw - k = k + 3*self%line%nn + 1 + buf(k + self%line%nn + 1:k + (1 + nv)*self%line%nn) = RESHAPE(self%line%viv_ms, [nv*self%line%nn]) + buf(k + (1 + nv)*self%line%nn + 1) = self%line%viv_tw + k = k + (1 + nv)*self%line%nn + 1 END IF IF (self%line%has_viv_il) THEN buf(k + 1:k + self%line%nn) = self%line%vil_phi @@ -2374,7 +2376,8 @@ SUBROUTINE CD_HFMF_UnpackMirror(self, buf, t, ErrStat, ErrMsg) REAL(wp), INTENT(IN) :: t INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - INTEGER :: i, nf, nh, k, kb, es + INTEGER :: i, nf, nh, k, kb, es, nv + LOGICAL :: bad_viv CHARACTER(1024) :: em ErrStat = CD_HFMF_OK; ErrMsg = '' IF (.NOT. self%initialized) THEN @@ -2431,12 +2434,23 @@ SUBROUTINE CD_HFMF_UnpackMirror(self, buf, t, ErrStat, ErrMsg) RETURN END IF END IF - ! and the VIV block's mean squares and averaging time, which cannot be negative + ! and the VIV block's mean squares, amplitudes and averaging time, which cannot be negative + ! (per node the rows of the motion statistics: the mean squares, rows 1:2, and the amplitudes + ! y0, y0s of the amplitude estimate, rows 4:5; its travel and last cross-flow velocity, rows + ! 3 and 6, are signed) IF (self%line%has_viv) THEN + nv = SIZE(self%line%viv_ms, 1) kb = SIZE(buf) - CD_HFMF_TorsionMirrorSize(self) - CD_HFMF_VIVMirrorSize(self) + self%line%nn - IF (ANY(buf(kb + 1:kb + 2*self%line%nn + 1) < CD_ZERO)) THEN + bad_viv = buf(kb + nv*self%line%nn + 1) < CD_ZERO + DO i = 1, self%line%nn + IF (ANY(buf(kb + (i - 1)*nv + 1:kb + (i - 1)*nv + 2) < CD_ZERO)) bad_viv = .TRUE. + IF (nv >= 5) THEN + IF (ANY(buf(kb + (i - 1)*nv + 4:kb + (i - 1)*nv + 5) < CD_ZERO)) bad_viv = .TRUE. + END IF + END DO + IF (bad_viv) THEN ErrStat = CD_HFMF_BADINPUT - ErrMsg = 'CD_HFMF_UnpackMirror: the VIV mean squares and averaging time must be non-negative' + ErrMsg = 'CD_HFMF_UnpackMirror: the VIV mean squares, amplitudes and averaging time must be non-negative' RETURN END IF END IF @@ -2510,13 +2524,14 @@ SUBROUTINE CD_HFMF_UnpackMirror(self, buf, t, ErrStat, ErrMsg) ! the VIV state, with the step-start copy of a recovering step and the in-step phase IF (self%line%has_viv) THEN self%line%viv_phi = buf(k + 1:k + self%line%nn) - self%line%viv_ms = RESHAPE(buf(k + self%line%nn + 1:k + 3*self%line%nn), [2, self%line%nn]) - self%line%viv_tw = buf(k + 3*self%line%nn + 1) + nv = SIZE(self%line%viv_ms, 1) + self%line%viv_ms = RESHAPE(buf(k + self%line%nn + 1:k + (1 + nv)*self%line%nn), [nv, self%line%nn]) + self%line%viv_tw = buf(k + (1 + nv)*self%line%nn + 1) self%line%viv_phi_eval = self%line%viv_phi self%line%viv_ms_next = self%line%viv_ms self%line%ws_recovery_viv_phi = self%line%viv_phi self%line%ws_recovery_viv_ms = self%line%viv_ms - k = k + 3*self%line%nn + 1 + k = k + (1 + nv)*self%line%nn + 1 END IF IF (self%line%has_viv_il) THEN self%line%vil_phi = buf(k + 1:k + self%line%nn) diff --git a/src/CableDyn_System.f90 b/src/CableDyn_System.f90 index bb58dd14..f0416c45 100644 --- a/src/CableDyn_System.f90 +++ b/src/CableDyn_System.f90 @@ -18,7 +18,7 @@ MODULE CableDyn_System CD_Model_Has_Viscoelastic, CD_Get_Model_VE_Dl1, CD_Set_Model_VE_Dl1, & CD_Model_Has_Syrope, CD_Get_Model_Syrope_State, CD_Set_Model_Syrope_State, & CD_Model_Has_VIV, CD_Get_Model_VIV_State, CD_Set_Model_VIV_State, CD_Get_Model_VIV_Lift, & - CD_Model_Has_VIV_Inline, CD_Get_Model_Load_Power, & + CD_Model_Has_VIV_Inline, CD_Get_Model_Load_Power, CD_Model_VIV_NMS, & CD_Model_Has_Friction, CD_Get_Model_Friction_Anchors, CD_Set_Model_Friction_Anchors, & CD_Latch_Model_VIV_Window, & CD_Get_Model_EndNodeMassDiag, CD_Get_Model_EndNodeAddedMass, & @@ -36,6 +36,7 @@ MODULE CableDyn_System CD_MODEL_OK, CD_MODEL_BADINPUT, & CD_MODEL_SOLVEFAIL, CD_MODEL_NOT_INITIALIZED, CD_MODEL_ALLOCFAIL, CD_Copy_Model USE CableDyn_Line, ONLY: CD_Nodal_Seabed_Stiffness + USE CableDyn_VIV, ONLY: CD_VIV_NMS !$ USE OMP_LIB, ONLY: omp_get_max_threads IMPLICIT NONE PRIVATE @@ -958,28 +959,32 @@ END SUBROUTINE CD_Get_System_Line_Syrope_State PURE INTEGER FUNCTION CD_System_Line_VIV_MirrorSize(system, line_index) RESULT(n) !! Reals of one contained line's VIV checkpoint block (CD_Get_System_Line_VIV_State): - !! 3 per node plus the averaging time, 3 per node more with in-line VIV, or 0 for a line - !! without VIV. + !! 3 per node plus the averaging time, 3 per node more with in-line VIV, 4 per node more with + !! amplitude tables, or 0 for a line without VIV. TYPE(CD_SystemType), INTENT(IN) :: system INTEGER, INTENT(IN) :: line_index + INTEGER :: nn n = 0 IF (line_index < 1 .OR. line_index > system%n_lines) RETURN IF (.NOT. CD_Model_Has_VIV(system%lines(line_index))) RETURN - n = 3*SIZE(system%lines(line_index)%viv_phi) + 1 - IF (CD_Model_Has_VIV_Inline(system%lines(line_index))) n = n + 3*SIZE(system%lines(line_index)%viv_phi) + nn = SIZE(system%lines(line_index)%viv_phi) + n = 3*nn + 1 + IF (CD_Model_Has_VIV_Inline(system%lines(line_index))) n = n + 3*nn + n = n + (CD_Model_VIV_NMS(system%lines(line_index)) - CD_VIV_NMS)*nn END FUNCTION CD_System_Line_VIV_MirrorSize SUBROUTINE CD_Get_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg) !! One contained line's committed VIV state as a flat checkpoint block: the shedding !! phases (n_nodes), the cross-flow velocity and acceleration mean squares interleaved !! per node (2 n_nodes), then the averaging time; with in-line VIV then the in-line phases - !! and mean squares the same way (3 n_nodes). + !! and mean squares the same way (3 n_nodes); with amplitude tables then the four values of + !! the amplitude estimate interleaved per node (4 n_nodes). TYPE(CD_SystemType), INTENT(IN) :: system INTEGER, INTENT(IN) :: line_index REAL(wp), INTENT(OUT) :: buf(:) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - INTEGER :: nn, es + INTEGER :: nn, es, nms, k CHARACTER(160) :: em REAL(wp), ALLOCATABLE :: phi(:), ms(:, :), phx(:), msx(:, :) @@ -991,7 +996,8 @@ SUBROUTINE CD_Get_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg RETURN END IF nn = SIZE(system%lines(line_index)%viv_phi) - ALLOCATE (phi(nn), ms(2, nn), phx(nn), msx(2, nn)) + nms = CD_Model_VIV_NMS(system%lines(line_index)) + ALLOCATE (phi(nn), ms(nms, nn), phx(nn), msx(2, nn)) CALL CD_Get_Model_VIV_State(system%lines(line_index), phi, ms, buf(3*nn + 1), es, em, phi_x=phx, ms_x=msx) IF (es /= CD_MODEL_OK) THEN ErrStat = CD_SYSTEM_SOLVEFAIL @@ -999,11 +1005,15 @@ SUBROUTINE CD_Get_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg RETURN END IF buf(1:nn) = phi - buf(nn + 1:3*nn) = RESHAPE(ms, [2*nn]) + buf(nn + 1:3*nn) = RESHAPE(ms(1:2, :), [2*nn]) + k = 3*nn + 1 IF (CD_Model_Has_VIV_Inline(system%lines(line_index))) THEN - buf(3*nn + 2:4*nn + 1) = phx - buf(4*nn + 2:6*nn + 1) = RESHAPE(msx, [2*nn]) + buf(k + 1:k + nn) = phx + buf(k + nn + 1:k + 3*nn) = RESHAPE(msx, [2*nn]) + k = k + 3*nn END IF + IF (nms > CD_VIV_NMS) buf(k + 1:k + (nms - CD_VIV_NMS)*nn) = RESHAPE(ms(CD_VIV_NMS + 1:nms, :), & + [(nms - CD_VIV_NMS)*nn]) ErrStat = CD_SYSTEM_OK ErrMsg = '' END SUBROUTINE CD_Get_System_Line_VIV_State @@ -1016,8 +1026,9 @@ SUBROUTINE CD_Set_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg REAL(wp), INTENT(IN) :: buf(:) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - INTEGER :: nn, es + INTEGER :: nn, es, nms, k CHARACTER(160) :: em + REAL(wp), ALLOCATABLE :: ms(:, :) CALL validate_line_index(system, line_index, ErrStat, ErrMsg) IF (ErrStat /= CD_SYSTEM_OK) RETURN @@ -1026,13 +1037,19 @@ SUBROUTINE CD_Set_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg RETURN END IF nn = SIZE(system%lines(line_index)%viv_phi) + nms = CD_Model_VIV_NMS(system%lines(line_index)) + ALLOCATE (ms(nms, nn)) + ms(1:2, :) = RESHAPE(buf(nn + 1:3*nn), [2, nn]) + k = 3*nn + 1 + IF (CD_Model_Has_VIV_Inline(system%lines(line_index))) k = k + 3*nn + IF (nms > CD_VIV_NMS) ms(CD_VIV_NMS + 1:nms, :) = RESHAPE(buf(k + 1:k + (nms - CD_VIV_NMS)*nn), & + [nms - CD_VIV_NMS, nn]) IF (CD_Model_Has_VIV_Inline(system%lines(line_index))) THEN - CALL CD_Set_Model_VIV_State(system%lines(line_index), buf(1:nn), RESHAPE(buf(nn + 1:3*nn), [2, nn]), & + CALL CD_Set_Model_VIV_State(system%lines(line_index), buf(1:nn), ms, & buf(3*nn + 1), es, em, phi_x=buf(3*nn + 2:4*nn + 1), & ms_x=RESHAPE(buf(4*nn + 2:6*nn + 1), [2, nn])) ELSE - CALL CD_Set_Model_VIV_State(system%lines(line_index), buf(1:nn), RESHAPE(buf(nn + 1:3*nn), [2, nn]), & - buf(3*nn + 1), es, em) + CALL CD_Set_Model_VIV_State(system%lines(line_index), buf(1:nn), ms, buf(3*nn + 1), es, em) END IF IF (es /= CD_MODEL_OK) THEN ErrStat = CD_SYSTEM_SOLVEFAIL @@ -1468,7 +1485,7 @@ RECURSIVE SUBROUTINE CD_Step_System(system, dt, q_coupled, v_coupled, a_coupled, INTEGER, PARAMETER :: MAX_SUBDIV = 6 ! floor dt/64: resolves any benign line-search stall INTEGER :: i, j, lo, hi, nc, es, line_dof, sys_dof, depth, iter2, ntot, nve, nsy, lo_ve, lo_sy, ne, nfr, lo_fr - INTEGER :: n_team, nel, lo_el + INTEGER :: n_team, nel, lo_el, nvv, lo_vv LOGICAL :: conv2, stall2 CHARACTER(1024) :: em REAL(wp), ALLOCATABLE :: q0(:), v0(:), a0(:), qm(:), vm(:), am(:), qs(:), vs(:), as(:) @@ -1606,15 +1623,17 @@ RECURSIVE SUBROUTINE CD_Step_System(system, dt, q_coupled, v_coupled, a_coupled, nsy = 0 nfr = 0 nel = 0 + nvv = 0 DO i = 1, system%n_lines ntot = ntot + SIZE(system%lines(i)%q) nel = nel + SIZE(system%lines(i)%l0_c) + nvv = nvv + viv_pack_size(system%lines(i)) IF (system%lines(i)%has_viscoelastic) nve = nve + SIZE(system%lines(i)%ve_dl_1) IF (system%lines(i)%has_syrope) nsy = nsy + SIZE(system%lines(i)%syrope_slow) IF (CD_Model_Has_Friction(system%lines(i))) nfr = nfr + SIZE(system%lines(i)%fr_anchor, 2) END DO ALLOCATE (qs(ntot), vs(ntot), as(ntot), dl1s(nve), slows(nsy), tmaxs(nsy), frs(2, nfr), & - hmaxs(system%n_lines), subs(system%n_lines), l0cs(nel), l0dcs(nel), vivs(ntot), vils(ntot)) + hmaxs(system%n_lines), subs(system%n_lines), l0cs(nel), l0dcs(nel), vivs(nvv), vils(ntot)) vivs = CD_ZERO vils = CD_ZERO lo = 1 @@ -1622,6 +1641,7 @@ RECURSIVE SUBROUTINE CD_Step_System(system, dt, q_coupled, v_coupled, a_coupled, lo_sy = 1 lo_fr = 1 lo_el = 1 + lo_vv = 1 DO i = 1, system%n_lines hi = lo + SIZE(system%lines(i)%q) - 1 qs(lo:hi) = system%lines(i)%q @@ -1631,7 +1651,11 @@ RECURSIVE SUBROUTINE CD_Step_System(system, dt, q_coupled, v_coupled, a_coupled, ! states, so the halves of a fallback that does not complete leave no trace hmaxs(i) = system%lines(i)%audit_hmax subs(i) = system%lines(i)%sub_stats - IF (system%lines(i)%has_viv) CALL pack_viv(system%lines(i), vivs(lo:hi)) + IF (system%lines(i)%has_viv) THEN + ne = viv_pack_size(system%lines(i)) + CALL pack_viv(system%lines(i), vivs(lo_vv:lo_vv + ne - 1)) + lo_vv = lo_vv + ne + END IF IF (system%lines(i)%has_viv_il) CALL pack_vil(system%lines(i), vils(lo:hi)) lo = hi + 1 ne = SIZE(system%lines(i)%l0_c) @@ -1675,6 +1699,7 @@ RECURSIVE SUBROUTINE CD_Step_System(system, dt, q_coupled, v_coupled, a_coupled, lo_sy = 1 lo_fr = 1 lo_el = 1 + lo_vv = 1 DO i = 1, system%n_lines hi = lo + SIZE(system%lines(i)%q) - 1 system%lines(i)%q = qs(lo:hi) @@ -1682,7 +1707,11 @@ RECURSIVE SUBROUTINE CD_Step_System(system, dt, q_coupled, v_coupled, a_coupled, system%lines(i)%a = as(lo:hi) system%lines(i)%audit_hmax = hmaxs(i) system%lines(i)%sub_stats = subs(i) - IF (system%lines(i)%has_viv) CALL unpack_viv(system%lines(i), vivs(lo:hi)) + IF (system%lines(i)%has_viv) THEN + ne = viv_pack_size(system%lines(i)) + CALL unpack_viv(system%lines(i), vivs(lo_vv:lo_vv + ne - 1)) + lo_vv = lo_vv + ne + END IF IF (system%lines(i)%has_viv_il) CALL unpack_vil(system%lines(i), vils(lo:hi)) lo = hi + 1 ne = SIZE(system%lines(i)%l0_c) @@ -3441,25 +3470,49 @@ SUBROUTINE restore_line_states(system) END DO END SUBROUTINE restore_line_states + PURE INTEGER FUNCTION viv_pack_offset(system, i) RESULT(lo) + !! First index of line i's packed VIV state in a system-wide VIV snapshot, the lines packed + !! in order (viv_pack_size each); i = n_lines + 1 gives the total plus one. + TYPE(CD_SystemType), INTENT(IN) :: system + INTEGER, INTENT(IN) :: i + INTEGER :: j + lo = 1 + DO j = 1, MIN(i - 1, system%n_lines) + lo = lo + viv_pack_size(system%lines(j)) + END DO + END FUNCTION viv_pack_offset + + PURE INTEGER FUNCTION viv_pack_size(line) RESULT(n) + !! Reals of a line's packed VIV state (pack_viv): per node the phase and the rows of the + !! motion statistics (CD_Model_VIV_NMS), 0 without VIV. + TYPE(CD_ModelType), INTENT(IN) :: line + n = 0 + IF (.NOT. line%has_viv) RETURN + n = (1 + SIZE(line%viv_ms, 1))*SIZE(line%viv_phi) + END FUNCTION viv_pack_size + PURE SUBROUTINE pack_viv(line, buf) - !! A line's committed VIV state as 3 reals per node: the phases, then the two mean - !! squares per node (the size of the line's q). + !! A line's committed VIV state (viv_pack_size reals): the phases, then the motion + !! statistics per node (the two mean squares, and the amplitude estimate with amplitude + !! tables). TYPE(CD_ModelType), INTENT(IN) :: line REAL(wp), INTENT(OUT) :: buf(:) - INTEGER :: nn + INTEGER :: nn, nms nn = SIZE(line%viv_phi) + nms = SIZE(line%viv_ms, 1) buf(1:nn) = line%viv_phi - buf(nn + 1:3*nn) = RESHAPE(line%viv_ms, [2*nn]) + buf(nn + 1:(1 + nms)*nn) = RESHAPE(line%viv_ms, [nms*nn]) END SUBROUTINE pack_viv PURE SUBROUTINE unpack_viv(line, buf) !! Inverse of pack_viv; the in-step phase returns to the committed one. TYPE(CD_ModelType), INTENT(INOUT) :: line REAL(wp), INTENT(IN) :: buf(:) - INTEGER :: nn + INTEGER :: nn, nms nn = SIZE(line%viv_phi) + nms = SIZE(line%viv_ms, 1) line%viv_phi = buf(1:nn) - line%viv_ms = RESHAPE(buf(nn + 1:3*nn), [2, nn]) + line%viv_ms = RESHAPE(buf(nn + 1:(1 + nms)*nn), [nms, nn]) line%viv_phi_eval = line%viv_phi END SUBROUTINE unpack_viv @@ -3583,10 +3636,17 @@ SUBROUTINE CD_System_Snapshot(system, ErrStat, ErrMsg) ALLOCATE (system%snap_l0(netot), system%snap_l0_dot(netot), system%snap_fbase(ntot), & system%snap_l0_c(netot), system%snap_l0_dot_c(netot), & system%snap_ve_dl_1(netot), system%snap_syrope_slow(netot), & - system%snap_syrope_tmax(netot), system%snap_fr_anchor(ntot), system%snap_viv(ntot), & + system%snap_syrope_tmax(netot), system%snap_fr_anchor(ntot), & + system%snap_viv(viv_pack_offset(system, system%n_lines + 1) - 1), & system%snap_vil(ntot)) END BLOCK END IF + ! The packed VIV state is sized by the lines' VIV configuration (viv_pack_size), which a line + ! may change after the first snapshot (amplitude tables add rows): follow it. + IF (SIZE(system%snap_viv) /= viv_pack_offset(system, system%n_lines + 1) - 1) THEN + DEALLOCATE (system%snap_viv) + ALLOCATE (system%snap_viv(viv_pack_offset(system, system%n_lines + 1) - 1)) + END IF lo = 1 DO i = 1, system%n_lines hi = lo + SIZE(system%lines(i)%q) - 1 @@ -3598,7 +3658,8 @@ SUBROUTINE CD_System_Snapshot(system, ErrStat, ErrMsg) IF (CD_Model_Has_Friction(system%lines(i))) & system%snap_fr_anchor(lo:lo + 2*SIZE(system%lines(i)%fr_anchor, 2) - 1) = & RESHAPE(system%lines(i)%fr_anchor, [2*SIZE(system%lines(i)%fr_anchor, 2)]) - IF (system%lines(i)%has_viv) CALL pack_viv(system%lines(i), system%snap_viv(lo:hi)) + IF (system%lines(i)%has_viv) CALL pack_viv(system%lines(i), system%snap_viv(viv_pack_offset(system, i): & + viv_pack_offset(system, i + 1) - 1)) IF (system%lines(i)%has_viv_il) CALL pack_vil(system%lines(i), system%snap_vil(lo:hi)) lo = hi + 1 END DO @@ -3659,6 +3720,11 @@ SUBROUTINE CD_System_Restore(system, ErrStat, ErrMsg) ErrMsg = 'CableDyn_System: restore has no valid snapshot' RETURN END IF + IF (SIZE(system%snap_viv) /= viv_pack_offset(system, system%n_lines + 1) - 1) THEN + ErrStat = CD_SYSTEM_BADINPUT + ErrMsg = 'CableDyn_System: restore: the VIV configuration of a line changed since the snapshot' + RETURN + END IF lo = 1 DO i = 1, system%n_lines hi = lo + SIZE(system%lines(i)%q) - 1 @@ -3669,7 +3735,8 @@ SUBROUTINE CD_System_Restore(system, ErrStat, ErrMsg) IF (CD_Model_Has_Friction(system%lines(i))) & system%lines(i)%fr_anchor = RESHAPE(system%snap_fr_anchor(lo:lo + 2*SIZE(system%lines(i)%fr_anchor, 2) - 1), & [2, SIZE(system%lines(i)%fr_anchor, 2)]) - IF (system%lines(i)%has_viv) CALL unpack_viv(system%lines(i), system%snap_viv(lo:hi)) + IF (system%lines(i)%has_viv) CALL unpack_viv(system%lines(i), system%snap_viv(viv_pack_offset(system, i): & + viv_pack_offset(system, i + 1) - 1)) IF (system%lines(i)%has_viv_il) CALL unpack_vil(system%lines(i), system%snap_vil(lo:hi)) lo = hi + 1 END DO diff --git a/src/CableDyn_VIV.f90 b/src/CableDyn_VIV.f90 index f2e1189a..8029a5cc 100644 --- a/src/CableDyn_VIV.f90 +++ b/src/CableDyn_VIV.f90 @@ -62,6 +62,10 @@ MODULE CableDyn_VIV PUBLIC :: CD_VIV_Inline_Per_Length PUBLIC :: CD_VIV_Inline_Phase_Rate PUBLIC :: CD_VIV_Wake_Advance + PUBLIC :: CD_VIV_Amplitude_Update + PUBLIC :: CD_VIV_Table + PUBLIC :: CD_VIV_Check_Amp_Table + PUBLIC :: CD_VIV_Ambient_Crossflow_Rate !> MoorDyn's running-RMS window in time steps (Line%n_m): each step updates the stored !> mean square as ((n_m - 1) old + new) / n_m. @@ -80,6 +84,15 @@ MODULE CableDyn_VIV REAL(wp), PARAMETER, PUBLIC :: CD_VIV_WAKE_DEFAULT_CL0 = 0.3_wp REAL(wp), PARAMETER, PUBLIC :: CD_VIV_WAKE_DEFAULT_EPS = 0.3_wp REAL(wp), PARAMETER, PUBLIC :: CD_VIV_WAKE_DEFAULT_A = 12.0_wp + !> Rows of the per-node VIV motion statistics: the running mean squares of the cross-flow + !> velocity and acceleration (CD_VIV_NMS), and with an amplitude table (VIV AMPLITUDE section) + !> the four values of the amplitude estimate after them (CD_VIV_NMS_AMP; CD_VIV_Amplitude_Update). + INTEGER, PARAMETER, PUBLIC :: CD_VIV_NMS = 2 + INTEGER, PARAMETER, PUBLIC :: CD_VIV_NMS_AMP = 6 + !> The smoothing of the amplitude estimate per time step, k_a dt of Thorsen et al. (2016, Eq. 9). + REAL(wp), PARAMETER, PUBLIC :: CD_VIV_AMP_KDT = 0.1_wp + !> The most rows of one line type's amplitude table. + INTEGER, PARAMETER, PUBLIC :: CD_VIV_AMP_MAXP = 32 !> Chord below which a node tangent is undefined (a collapsed pair of neighbours). REAL(wp), PARAMETER :: TINY_CHORD = 1.0e-12_wp @@ -504,6 +517,134 @@ PURE FUNCTION rhs(x, tau) RESULT(d) END FUNCTION rhs END SUBROUTINE CD_VIV_Wake_Advance + PURE SUBROUTINE CD_VIV_Amplitude_Update(st, yd, dt) + !! One time step dt of the cross-flow amplitude estimate of Thorsen, Saevik and Larsen + !! (J. Fluids Struct. 61, 2016, Eq. 8 and 9) at a node, with the cross-flow velocity yd at the + !! end of the step. st = (s, y0, y0s, yd_last): + !! + !! s the travel since the last zero crossing of y', signed: int y' dt (trapezoidal), + !! which is +-int |y'| dt as y' keeps its sign between crossings, and whose sign + !! is that of the half cycle + !! y0 the amplitude |s|/2 of the last half cycle, set at each zero crossing of y' (the + !! node travels 2 y0 between two crossings of a narrow-band response, Eq. 8) + !! y0s the smoothed amplitude, y0s + k_a dt (y0 - y0s) per step (Eq. 9, k_a = 0.1/dt) + !! yd_last y' at the start of the step + !! + !! A crossing is a change of sign of y' from that of the running half cycle: of yd_last, or + !! after samples at y' = 0 the sign of s, so a reversal through a sample at zero (+1, 0, -1) + !! ends the half cycle there and a touch (+1, 0, +1) does not. A crossing inside the step is + !! placed by linear interpolation of y', and the travel splits there between the half cycle + !! it ends and the next. + REAL(wp), INTENT(INOUT) :: st(4) + REAL(wp), INTENT(IN) :: yd, dt + REAL(wp) :: y_old, theta, p + IF (.NOT. (dt > CD_ZERO)) RETURN + y_old = st(4) + p = y_old + IF (.NOT. (p /= CD_ZERO)) p = st(1) + IF ((p > CD_ZERO .AND. yd < CD_ZERO) .OR. (p < CD_ZERO .AND. yd > CD_ZERO)) THEN + ! theta = 0 when the step starts on the sample at zero that ends the half cycle + theta = y_old/(y_old - yd) + st(1) = st(1) + 0.5_wp*y_old*theta*dt + st(2) = 0.5_wp*ABS(st(1)) + st(1) = 0.5_wp*yd*(CD_ONE - theta)*dt + ELSE + st(1) = st(1) + 0.5_wp*(y_old + yd)*dt + END IF + st(3) = st(3) + CD_VIV_AMP_KDT*(st(2) - st(3)) + st(4) = yd + END SUBROUTINE CD_VIV_Amplitude_Update + + PURE REAL(wp) FUNCTION CD_VIV_Ambient_Crossflow_Rate(tdir, rd, u) RESULT(yd) + !! The cross-flow velocity of a node across the AMBIENT flow, the y' of the amplitude estimate + !! (Thorsen et al. 2016, Fig. 1: y across the incoming flow): rd . (t x u_n)/|u_n|, with t the + !! unit line tangent along tdir and u_n the ambient velocity u normal to it; 0 without ambient + !! normal flow or with a degenerate tangent. Unlike the cross-flow axis of the phase (across the + !! relative flow), this axis does not turn with the node's own velocity, which at a response + !! velocity comparable to the flow would shorten the projected velocity by U/|v_n|. + REAL(wp), INTENT(IN) :: tdir(3), rd(3), u(3) + REAL(wp) :: t(3), un(3), s, e(3) + yd = CD_ZERO + s = SQRT(tdir(1)*tdir(1) + tdir(2)*tdir(2) + tdir(3)*tdir(3)) + IF (.NOT. (s > TINY_CHORD)) RETURN + t = tdir/s + un = u - (t(1)*u(1) + t(2)*u(2) + t(3)*u(3))*t + s = SQRT(un(1)*un(1) + un(2)*un(2) + un(3)*un(3)) + IF (.NOT. (s > CD_ZERO)) RETURN + e = cross3(t, un)/s + yd = rd(1)*e(1) + rd(2)*e(2) + rd(3)*e(3) + END FUNCTION CD_VIV_Ambient_Crossflow_Rate + + PURE SUBROUTINE CD_VIV_Check_Amp_Table(amp, amp_n, cl, msg) + !! Check the per-element amplitude tables of a line (CD_VIV_Amplitude_Update): amp (3, + !! CD_VIV_AMP_MAXP, n_elem) holds amp_n(e) rows (A/D, C_v, drag factor) of element e, cl the + !! element lift coefficients. msg is blank when the tables are valid: amp_n in [0, + !! CD_VIV_AMP_MAXP], > 0 only where cl > 0, the used rows finite with A/D >= 0 strictly + !! increasing, C_v >= 0 and the drag factor > 0, each at most 1e15. + REAL(wp), INTENT(IN) :: amp(:, :, :), cl(:) + INTEGER, INTENT(IN) :: amp_n(:) + CHARACTER(*), INTENT(OUT) :: msg + INTEGER :: e, n, i + REAL(wp), PARAMETER :: big = 1.0e15_wp + msg = '' + IF (SIZE(amp, 1) /= 3 .OR. SIZE(amp, 2) /= CD_VIV_AMP_MAXP .OR. SIZE(amp, 3) /= SIZE(cl) .OR. & + SIZE(amp_n) /= SIZE(cl)) THEN + msg = 'VIV amplitude tables must have shapes (3, 32, n_elem) and (n_elem)' + RETURN + END IF + DO e = 1, SIZE(cl) + n = amp_n(e) + IF (n < 0 .OR. n > CD_VIV_AMP_MAXP) THEN + msg = 'a VIV amplitude table holds 0 to 32 rows' + RETURN + END IF + IF (n == 0) CYCLE + IF (.NOT. (cl(e) > CD_ZERO)) THEN + msg = 'a VIV amplitude table needs the cross-flow lift (cl > 0) on its element' + RETURN + END IF + DO i = 1, n + IF (.NOT. (amp(1, i, e) >= CD_ZERO .AND. amp(1, i, e) <= big .AND. amp(2, i, e) >= CD_ZERO .AND. & + amp(2, i, e) <= big .AND. amp(3, i, e) > CD_ZERO .AND. amp(3, i, e) <= big)) THEN + msg = 'VIV amplitude table rows need finite A/D >= 0, C_v >= 0 and drag factor > 0, each at most 1e15' + RETURN + END IF + IF (i > 1) THEN + IF (.NOT. (amp(1, i, e) > amp(1, i - 1, e))) THEN + msg = 'the A/D of a VIV amplitude table must increase strictly' + RETURN + END IF + END IF + END DO + END DO + END SUBROUTINE CD_VIV_Check_Amp_Table + + PURE REAL(wp) FUNCTION CD_VIV_Table(x, xs, ys) RESULT(y) + !! Piecewise-linear interpolation of the table (xs, ys) at x, xs strictly increasing, held + !! at the end values outside [xs(1), xs(n)]; a one-row table is constant. + REAL(wp), INTENT(IN) :: x, xs(:), ys(:) + INTEGER :: n, i + n = SIZE(xs) + IF (n < 1) THEN + y = CD_ZERO + RETURN + END IF + IF (n == 1 .OR. x <= xs(1)) THEN + y = ys(1) + RETURN + END IF + IF (x >= xs(n)) THEN + y = ys(n) + RETURN + END IF + ! The search stops at the last segment (i = n) also for an x that compares false with + ! every row (NaN), which then propagates instead of indexing past the table. + DO i = 2, n - 1 + IF (x <= xs(i)) EXIT + END DO + y = ys(i - 1) + (ys(i) - ys(i - 1))*(x - xs(i - 1))/(xs(i) - xs(i - 1)) + END FUNCTION CD_VIV_Table + ELEMENTAL REAL(wp) FUNCTION CD_VIV_Wrap_Phase(phi) RESULT(wrapped) !! The phase mapped to [0, 2 pi); the model only uses cos(phi) and sin(. - phi). REAL(wp), INTENT(IN) :: phi diff --git a/tests/test_model.f90 b/tests/test_model.f90 index 35e48fe0..e0dc7d22 100644 --- a/tests/test_model.f90 +++ b/tests/test_model.f90 @@ -9,6 +9,7 @@ PROGRAM test_model !! at rest, prescribed fairlead motion advances through the model boundary, and !! End releases the model cleanly. USE CableDyn_Precision, ONLY: wp + USE CableDyn_VIV, ONLY: CD_VIV_AMP_MAXP USE CableDyn_Bathymetry, ONLY: CD_BathymetryType, CD_Init_Bathymetry, CD_End_Bathymetry, CD_BATHY_OK USE CableDyn_Dynamic, ONLY: GenAlphaConfig, CD_EI0_SUBSTEPS_OFF USE CableDyn_SeabedContact, ONLY: CD_SEABED_CONTACT_BLEND @@ -1740,6 +1741,8 @@ SUBROUTINE case_substeps_restore_viv_state(inline) INTEGER :: conn(2, NE), fixed(6), es, k, n_iter REAL(wp) :: q0(3*NN), v0(3*NN), f_ext(3*NN), pq(3*NN), pv(3*NN), pa(3*NN), fluid(3, NN), wl(NN) REAL(wp) :: l0(NE), ea(NE), rho_a(NE), cl(NE), dia(NE), cf(NE), df(NE), phi0(NN), w, t, phx0(NN) + REAL(wp) :: tab(3, CD_VIV_AMP_MAXP, NE) + INTEGER :: tab_n(NE), ev0 LOGICAL :: conv, stalled, all_conv CHARACTER(200) :: em @@ -1825,6 +1828,37 @@ SUBROUTINE case_substeps_restore_viv_state(inline) CALL require(ALL(fb_m%vil_phi == off_m%vil_phi) .AND. ALL(fb_m%vil_ms == off_m%vil_ms), & 'substep-viv:in-line-fallback-is-the-plain-step') END IF + IF (.NOT. inline) THEN + ! amplitude tables set after the line has stepped grow its VIV motion statistics from 2 to 6 + ! rows per node at the same node count: the sub-step slots follow on the next sub-stepped steps + ! (100 more steps, to t = 3.2 s: the heave repeats the turning of the first 1.2 s) + tab = 0.0_wp + tab_n = 2 + DO k = 1, NE + tab(:, 1, k) = [0.0_wp, 0.8_wp, 1.0_wp] + tab(:, 2, k) = [0.5_wp, 0.4_wp, 1.5_wp] + END DO + ev0 = auto_m%sub_stats%events + CALL CD_Set_Model_VIV(auto_m, 1025.0_wp, cl, dia, cf, df, 0.25_wp, es, em, amp=tab, amp_n=tab_n) + CALL require(es == CD_MODEL_OK, 'substep-viv:tables-after-stepping: '//TRIM(em)) + all_conv = es == CD_MODEL_OK + DO k = NSTEP + 1, NSTEP + 100 + t = REAL(k, wp)*DT + pq = q0 + pv = 0.0_wp + pa = 0.0_wp + pq(3*NN) = q0(3*NN) + AMP*(1.0_wp - COS(w*t)) + pv(3*NN) = AMP*w*SIN(w*t) + pa(3*NN) = AMP*w*w*COS(w*t) + CALL CD_Step_Model(auto_m, DT, conv, stalled, n_iter, es, em, prescribed_q=pq, prescribed_v=pv, prescribed_a=pa) + all_conv = all_conv .AND. es == CD_MODEL_OK .AND. conv + END DO + WRITE (*, '(A,I0,A,L1)') ' sub-stepped steps with tables: ', auto_m%sub_stats%events - ev0, & + ', converged ', all_conv + CALL require(all_conv .AND. auto_m%sub_stats%events > ev0, 'substep-viv:tables-after-stepping-sub-steps') + CALL require(SIZE(auto_m%sub_slot(1)%viv_ms, 1) == 6 .AND. SIZE(auto_m%sub_slot(2)%viv_ms, 1) == 6, & + 'substep-viv:slots-follow-the-statistics-rows') + END IF CALL CD_End_Model(auto_m, es, em) CALL CD_End_Model(rep_m, es, em) CALL CD_End_Model(fb_m, es, em) diff --git a/tests/test_system.f90 b/tests/test_system.f90 index f9c35a18..b269dd13 100644 --- a/tests/test_system.f90 +++ b/tests/test_system.f90 @@ -9,7 +9,8 @@ PROGRAM test_system USE CableDyn_Precision, ONLY: wp USE CableDyn_Dynamic, ONLY: GenAlphaConfig USE CableDyn_Model, ONLY: CD_ModelType, CD_Init_Model, CD_End_Model, CD_MODEL_OK, & - CD_Get_Model_EndNodeMassDiag + CD_Get_Model_EndNodeMassDiag, CD_Set_Model_VIV, CD_Model_VIV_NMS + USE CableDyn_VIV, ONLY: CD_VIV_AMP_MAXP USE CableDyn_System, ONLY: CD_SystemType, CD_SystemPointType, CD_LineEndpointBinding, & CD_Init_System_From_Models, CD_Init_System_From_Points, CD_End_System, & CD_System_NLines, CD_System_NCoupledDOF, CD_System_Line_NDOF, & @@ -47,6 +48,7 @@ PROGRAM test_system CALL case_dynamic_free_point_zero_density_no_hydro() CALL case_zero_coupled_map() CALL case_system_fail_closed() + CALL case_viv_layout_snapshot() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' @@ -1113,6 +1115,77 @@ SUBROUTINE case_system_fail_closed() CALL require(es == CD_SYSTEM_OK, 'fail:end') END SUBROUTINE case_system_fail_closed + SUBROUTINE case_viv_layout_snapshot() + !! The packed VIV state of a line grows with amplitude tables (CD_Model_VIV_NMS rows per + !! node): a snapshot taken after a line gains them follows the new size, and a restore of a + !! snapshot taken before is refused, with nothing restored. + INTEGER, PARAMETER :: NN = 5, NE = 4 + TYPE(CD_ModelType) :: models(1) + TYPE(CD_SystemType) :: system + TYPE(GenAlphaConfig) :: cfg + INTEGER :: conn(2, NE), fixed(6), es, k, amp_n(NE) + REAL(wp) :: q0(3*NN), v0(3*NN), f_ext(3*NN), fluid(3, NN), wl(NN), q_moved(3*NN) + REAL(wp) :: l0(NE), ea(NE), rho_a(NE), cl(NE), dia(NE), cf(NE), df(NE), amp(3, CD_VIV_AMP_MAXP, NE) + CHARACTER(240) :: em + + DO k = 1, NE + conn(:, k) = [k, k + 1] + END DO + q0 = 0.0_wp + DO k = 1, NN + q0(3*k - 2) = REAL(k - 1, wp) + q0(3*k) = -5.0_wp + END DO + v0 = 0.0_wp + f_ext = 0.0_wp + fixed = [1, 2, 3, 3*NN - 2, 3*NN - 1, 3*NN] + l0 = 0.99_wp + ea = 1.0e6_wp + rho_a = 10.0_wp + fluid = 0.0_wp + fluid(2, :) = 0.5_wp + wl = 0.0_wp + cl = 0.8_wp + dia = 0.1_wp + cf = 0.18_wp + df = 0.08_wp + amp = 0.0_wp + amp_n = 2 + DO k = 1, NE + amp(:, 1, k) = [0.0_wp, 0.8_wp, 1.0_wp] + amp(:, 2, k) = [0.5_wp, 0.4_wp, 1.5_wp] + END DO + CALL CD_Init_Model(models(1), q0, v0, conn, l0, ea, rho_a, .TRUE., f_ext, fixed, cfg, es, em, & + fluid_velocity=fluid, drag_waterline_z=wl, drag_rho=1025.0_wp, & + drag_diameter=0.1_wp, drag_cdn=1.2_wp, drag_cdt=0.0_wp) + CALL require(es == CD_MODEL_OK, 'viv-layout:init-line: '//TRIM(em)) + CALL CD_Set_Model_VIV(models(1), 1025.0_wp, cl, dia, cf, df, 0.25_wp, es, em) + CALL require(es == CD_MODEL_OK, 'viv-layout:viv: '//TRIM(em)) + CALL CD_Init_System_From_Models(system, models, es, em) + CALL require(es == CD_SYSTEM_OK, 'viv-layout:init-system: '//TRIM(em)) + CALL CD_End_Model(models(1), es, em) + IF (.NOT. CD_System_Is_Initialized(system)) RETURN + + CALL CD_System_Snapshot(system, es, em) + CALL require(es == CD_SYSTEM_OK, 'viv-layout:snapshot-without-tables: '//TRIM(em)) + CALL CD_Set_Model_VIV(system%lines(1), 1025.0_wp, cl, dia, cf, df, 0.25_wp, es, em, amp=amp, amp_n=amp_n) + CALL require(es == CD_MODEL_OK .AND. CD_Model_VIV_NMS(system%lines(1)) == 6, 'viv-layout:tables: '//TRIM(em)) + q_moved = system%lines(1)%q + q_moved(8) = q_moved(8) + 0.01_wp + system%lines(1)%q = q_moved + CALL CD_System_Restore(system, es, em) + CALL require(es == CD_SYSTEM_BADINPUT .AND. INDEX(em, 'VIV configuration') > 0, & + 'viv-layout:restore-across-layouts-refused: '//TRIM(em)) + CALL require(ALL(system%lines(1)%q == q_moved), 'viv-layout:nothing-restored') + CALL CD_System_Snapshot(system, es, em) + CALL require(es == CD_SYSTEM_OK .AND. SIZE(system%snap_viv) == 7*NN, 'viv-layout:snapshot-resized: '//TRIM(em)) + system%lines(1)%viv_ms(5, 3) = 0.25_wp + CALL CD_System_Restore(system, es, em) + CALL require(es == CD_SYSTEM_OK .AND. system%lines(1)%viv_ms(5, 3) == 0.0_wp, & + 'viv-layout:restore-with-tables: '//TRIM(em)) + CALL CD_End_System(system, es, em) + END SUBROUTINE case_viv_layout_snapshot + SUBROUTINE require(cond, label) LOGICAL, INTENT(IN) :: cond CHARACTER(*), INTENT(IN) :: label diff --git a/tests/test_viv_amplitude_deck.f90 b/tests/test_viv_amplitude_deck.f90 new file mode 100644 index 00000000..6f2af922 --- /dev/null +++ b/tests/test_viv_amplitude_deck.f90 @@ -0,0 +1,300 @@ +! File: tests/test_viv_amplitude_deck.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_amplitude_deck + !! Amplitude-dependent VIV coefficients on a deck (the optional VIV AMPLITUDE section, rows + !! TypeName AD Cv [CdAmp]; the amplitude estimate of Thorsen et al. 2016, Eq. 8 and 9): the taut + !! cable of the wake-oscillator gate (100 m, D 0.1 m, 50 kN, pinned at 50 m depth, 50 elements) + !! with the synchronisation lift Cl 0.8 in a uniform 0.15 m/s current along y, as a finite-EI + !! cable (EI 1 N m^2) and as an EI = 0 line, each run checked on both line kinds: + !! A1 a table that gives Cv = Cl and CdAmp = 1 at every amplitude is the deck without the + !! section, to the printed digits; + !! A2 the amplitude channel VIVAmp1N26 at mid-span follows the half peak-to-peak cross-flow + !! displacement of the steady response there within 1 % (it projects the velocity across + !! the ambient flow, as Thorsen et al.: across the relative flow, which turns with the + !! response velocity, it read 16 % low at this A/D of 0.68); + !! A3 a table whose Cv falls from Cl at A/D 0.1 to zero at A/D AD_ZERO, below the free response + !! of the constant-Cl deck, holds the steady response between those two amplitudes; + !! A4 a table with Cv 0 and CdAmp 2 at every amplitude (no lift, twice the drag) settles at the + !! static in-line mid-span offset of the deck with Cd 2.4, within 0.5 %, at rest; + !! A5 refusals by name: a malformed or non-numeric row, an unknown type, a type without the + !! synchronisation lift, rows of different columns, A/D not increasing, values out of range, + !! a one-row table, more than 32 rows, and the VIVAmp channel on a line without a table. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: D = 0.1_wp, AD_ZERO = 0.3_wp + INTEGER :: nfail = 0 + + CALL write_current('vad_current.dat') + CALL check_kind('1.0', 'finite-EI') + CALL check_kind('0.0', 'EI = 0') + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: VIV amplitude deck gates' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE write_current(path) + CHARACTER(*), INTENT(IN) :: path + INTEGER :: u + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') 'MoorDyn v2 water kinematics file' + WRITE (u, '(A)') 'uniform current along y for the VIV amplitude deck gate' + WRITE (u, '(A)') '--------------------------- WAVES -------------------------------------' + WRITE (u, '(A)') '0 WaveKinMod - type of wave input' + WRITE (u, '(A)') '"" WaveKinFile - file containing wave elevation time series' + WRITE (u, '(A)') '0.000000E+00 dtWave - time step to use in setting up wave kinematics grid (s)' + WRITE (u, '(A)') '0 WaveDir - wave heading (deg)' + WRITE (u, '(A)') '2 - X wave input type' + WRITE (u, '(A)') '-10, 110, 2 - X wave grid point data' + WRITE (u, '(A)') '2 - Y wave input type' + WRITE (u, '(A)') '-10, 10, 2 - Y wave grid point data' + WRITE (u, '(A)') '2 - Z wave input type' + WRITE (u, '(A)') '-100, 0, 2 - Z wave grid point data' + WRITE (u, '(A)') '--------------------------- CURRENT -------------------------------------' + WRITE (u, '(A)') '1 CurrentMod - type of current input' + WRITE (u, '(A)') 'z-depth x-current y-current' + WRITE (u, '(A)') '(m) (m/s) (m/s)' + WRITE (u, '(A)') '0.0 0.0 0.15' + WRITE (u, '(A)') '-100.0 0.0 0.15' + WRITE (u, '(A)') '--------------------- need this line ------------------' + CLOSE (u) + END SUBROUTINE write_current + + SUBROUTINE write_deck(path, amp_rows, tmax, ei, cl, amp_channel, cd) + !! amp_rows: the VIV AMPLITUDE section's data rows, ';'-separated ('' for no section); ei the + !! type's EI, cl its LINE TYPES Cl (default 0.8), cd its Cd (default 1.2); amp_channel adds + !! VIVAmp1N26 to the outputs (default: with a section). + CHARACTER(*), INTENT(IN) :: path, amp_rows, ei + REAL(wp), INTENT(IN) :: tmax + CHARACTER(*), INTENT(IN), OPTIONAL :: cl, cd + LOGICAL, INTENT(IN), OPTIONAL :: amp_channel + CHARACTER(32) :: cl_col, cd_col + INTEGER :: u, i0, i1 + LOGICAL :: with_amp + cl_col = '0.8' + IF (PRESENT(cl)) cl_col = cl + cd_col = '1.2' + IF (PRESENT(cd)) cd_col = cd + with_amp = LEN_TRIM(amp_rows) > 0 + IF (PRESENT(amp_channel)) with_amp = amp_channel + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' + WRITE (u, '(A)') 'VIV amplitude deck gate: taut cable in a uniform current' + WRITE (u, '(A)') '----------------------- LINE TYPES ------------------------------------------' + WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//TRIM(ei)//' '//TRIM(cd_col)// & + ' 1.0 0.0 0.0 '//TRIM(cl_col)//' 0.08 0.18' + WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' + WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' + WRITE (u, '(A)') '1 Coupled 0.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '2 Fixed 100.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '----------------------- LINES -----------------------------------------------' + WRITE (u, '(A)') 'ID NodeA NodeB Outputs' + WRITE (u, '(A)') '1 1 2 -' + WRITE (u, '(A)') '----------------------- SECTIONS --------------------------------------------' + WRITE (u, '(A)') 'LineID LineType Length NumSegs' + WRITE (u, '(A)') '1 riser 99.900100 50' + IF (LEN_TRIM(amp_rows) > 0) THEN + WRITE (u, '(A)') '----------------------- VIV AMPLITUDE ---------------------------------------' + WRITE (u, '(A)') 'TypeName AD Cv CdAmp' + WRITE (u, '(A)') '(-) (-) (-) (-)' + i0 = 1 + DO + i1 = INDEX(amp_rows(i0:), ';') + IF (i1 == 0) THEN + WRITE (u, '(A)') TRIM(amp_rows(i0:)) + EXIT + END IF + WRITE (u, '(A)') amp_rows(i0:i0 + i1 - 2) + i0 = i0 + i1 + END DO + END IF + WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' + WRITE (u, '(A)') '0.01 dtM' + WRITE (u, '(A)') '100.0 WtrDpth' + WRITE (u, '(A)') '1025.0 rhoW' + WRITE (u, '(A)') '9.80665 g' + WRITE (u, '(A)') 'vad_current.dat WaterKin' + WRITE (u, '(A,F8.3,A)') ' ', tmax, ' TMax' + WRITE (u, '(A)') '---------------------- OUTPUTS -----------------------------------------------' + WRITE (u, '(A)') 'L1N26PZ' + WRITE (u, '(A)') 'L1N26PY' + IF (with_amp) WRITE (u, '(A)') 'VIVAmp1N26' + WRITE (u, '(A)') 'END' + WRITE (u, '(A)') '------------------------- need this line --------------------------------------' + CLOSE (u) + END SUBROUTINE write_deck + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK .AND. conv + END SUBROUTINE run + + SUBROUTINE read_out(path, ncol, tab, n) + !! The rows (time and ncol - 1 channels) of a deck's main output file. + CHARACTER(*), INTENT(IN) :: path + INTEGER, INTENT(IN) :: ncol + REAL(wp), ALLOCATABLE, INTENT(OUT) :: tab(:, :) + INTEGER, INTENT(OUT) :: n + CHARACTER(1024) :: rec + INTEGER :: u, ios + ALLOCATE (tab(ncol, 20000)) + n = 0 + OPEN (NEWUNIT=u, FILE=path, STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (u, '(A)') rec + READ (u, '(A)') rec + DO + READ (u, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + IF (n == SIZE(tab, 2)) EXIT + n = n + 1 + READ (rec, *) tab(:, n) + END DO + CLOSE (u) + END SUBROUTINE read_out + + REAL(wp) FUNCTION window_mean(tab, n, row, t0) RESULT(m) + REAL(wp), INTENT(IN) :: tab(:, :), t0 + INTEGER, INTENT(IN) :: n, row + LOGICAL :: keep(n) + keep = tab(1, 1:n) >= t0 + m = SUM(PACK(tab(row, 1:n), keep))/REAL(MAX(1, COUNT(keep)), wp) + END FUNCTION window_mean + + REAL(wp) FUNCTION window_ad(tab, n, t0) RESULT(ad) + !! Half peak-to-peak mid-span cross-flow displacement over D from t0 on. + REAL(wp), INTENT(IN) :: tab(:, :), t0 + INTEGER, INTENT(IN) :: n + LOGICAL :: keep(n) + REAL(wp), ALLOCATABLE :: z(:) + keep = tab(1, 1:n) >= t0 + z = PACK(tab(2, 1:n), keep) + ad = 0.5_wp*(MAXVAL(z) - MINVAL(z))/D + END FUNCTION window_ad + + SUBROUTINE check_kind(ei, label) + CHARACTER(*), INTENT(IN) :: ei, label + CHARACTER(16) :: tag + REAL(wp), ALLOCATABLE :: tn(:, :), ti(:, :), tl(:, :), tg(:, :), tc(:, :) + INTEGER :: nn, ni, nl, ng, nc + REAL(wp) :: ad_n, ad_i, amp_i, ad_l, amp_l, y_g, y_static, amp_g + LOGICAL :: ok + CHARACTER(1024) :: msg + tag = MERGE('fe', 'e0', ei /= '0.0') + CALL write_deck('vad_'//TRIM(tag)//'_none.dat', '', 100.0_wp, ei) + CALL run('vad_'//TRIM(tag)//'_none.dat', 'vad_'//TRIM(tag)//'_none', ok, msg) + CALL require(ok, 'A1 ('//label//'): the deck without the section runs: '//TRIM(msg)) + CALL write_deck('vad_'//TRIM(tag)//'_ident.dat', 'riser 0.0 0.8 1.0;riser 1.0 0.8 1.0', 100.0_wp, ei) + CALL run('vad_'//TRIM(tag)//'_ident.dat', 'vad_'//TRIM(tag)//'_ident', ok, msg) + CALL require(ok, 'A1 ('//label//'): the identity-table deck runs: '//TRIM(msg)) + CALL write_deck('vad_'//TRIM(tag)//'_limit.dat', 'riser 0.0 0.8;riser 0.1 0.8;riser 0.3 0.0', 100.0_wp, ei) + CALL run('vad_'//TRIM(tag)//'_limit.dat', 'vad_'//TRIM(tag)//'_limit', ok, msg) + CALL require(ok, 'A3 ('//label//'): the falling-Cv deck runs: '//TRIM(msg)) + CALL write_deck('vad_'//TRIM(tag)//'_drag.dat', 'riser 0.0 0.0 2.0;riser 1.0 0.0 2.0', 100.0_wp, ei) + CALL run('vad_'//TRIM(tag)//'_drag.dat', 'vad_'//TRIM(tag)//'_drag', ok, msg) + CALL require(ok, 'A4 ('//label//'): the Cv 0, CdAmp 2 deck runs: '//TRIM(msg)) + CALL write_deck('vad_'//TRIM(tag)//'_cd24.dat', '', 0.1_wp, ei, cd='2.4') + CALL run('vad_'//TRIM(tag)//'_cd24.dat', 'vad_'//TRIM(tag)//'_cd24', ok, msg) + CALL require(ok, 'A4 ('//label//'): the Cd 2.4 deck runs: '//TRIM(msg)) + CALL read_out('vad_'//TRIM(tag)//'_cd24.out', 3, tc, nc) + CALL read_out('vad_'//TRIM(tag)//'_none.out', 3, tn, nn) + CALL read_out('vad_'//TRIM(tag)//'_ident.out', 4, ti, ni) + CALL read_out('vad_'//TRIM(tag)//'_limit.out', 4, tl, nl) + CALL read_out('vad_'//TRIM(tag)//'_drag.out', 4, tg, ng) + CALL require(nn > 5000 .AND. ni == nn .AND. nl == nn .AND. ng == nn, 'A1 ('//label//'): the runs wrote '// & + 'matching rows') + IF (.NOT. (nn > 5000 .AND. ni == nn .AND. nl == nn .AND. ng == nn)) RETURN + ! A1: the identity table + CALL require(ALL(ti(1:3, 1:ni) == tn(1:3, 1:nn)), 'A1 ('//label//'): Cv = Cl and CdAmp 1 is the deck '// & + 'without the section') + ! A2: the amplitude estimate against the response + ad_n = window_ad(tn, nn, 60.0_wp) + ad_i = window_ad(ti, ni, 60.0_wp) + amp_i = window_mean(ti, ni, 4, 60.0_wp)/D + WRITE (*, '(A,3F8.4)') 'A2 ('//label//'): A/D constant Cl, identity table, its VIVAmp/D: ', ad_n, ad_i, amp_i + CALL require(ad_i > 0.05_wp .AND. ABS(amp_i/ad_i - 1.0_wp) <= 0.01_wp, 'A2 ('//label//'): VIVAmp follows '// & + 'the response amplitude within 1 %') + ! A3: self-limiting + ad_l = window_ad(tl, nl, 60.0_wp) + amp_l = window_mean(tl, nl, 4, 60.0_wp)/D + WRITE (*, '(A,2F8.4)') 'A3 ('//label//'): falling-Cv A/D and VIVAmp/D: ', ad_l, amp_l + CALL require(ad_n > AD_ZERO, 'A3 ('//label//'): the constant-Cl response exceeds the zero of the table') + CALL require(ABS(amp_l/ad_l - 1.0_wp) <= 0.01_wp, 'A3 ('//label//'): VIVAmp follows it within 1 %') + CALL require(ad_l > 0.1_wp .AND. ad_l < AD_ZERO, 'A3 ('//label//'): the falling Cv holds the response '// & + 'inside its falling range') + ! A4: the drag factor, on the mid-span in-line offset from the line between the ends (y = 0) + CALL require(nc >= 1, 'A4 ('//label//'): the Cd 2.4 deck wrote its static row') + IF (nc < 1) RETURN + y_static = tc(3, 1) + y_g = window_mean(tg, ng, 3, 80.0_wp) + amp_g = window_mean(tg, ng, 4, 80.0_wp)/D + WRITE (*, '(A,2F10.6,ES11.3)') 'A4 ('//label//'): Cd 2.4 static, Cv 0 CdAmp 2 final offsets [m], '// & + 'VIVAmp/D: ', y_static, y_g, amp_g + CALL require(y_static > 0.0_wp .AND. ABS(y_g/y_static - 1.0_wp) <= 0.005_wp, 'A4 ('//label//'): CdAmp 2 '// & + 'settles at the offset of Cd 2.4') + CALL require(window_ad(tg, ng, 80.0_wp) < 1.0e-3_wp .AND. amp_g < 1.0e-2_wp, 'A4 ('//label//'): at rest, '// & + 'without lift') + END SUBROUTINE check_kind + + SUBROUTINE check_refusals() + CHARACTER(2048) :: many + INTEGER :: k + CALL refused('riser 0.0 0.8 1.0 2.0', 'TypeName AD Cv [CdAmp]', 'a row of five columns') + CALL refused('riser 0.0;riser 1.0', 'TypeName AD Cv [CdAmp]', 'a row of two columns') + CALL refused('riser 0.0 x;riser 1.0 0.8', 'plain numbers', 'a non-numeric Cv') + CALL refused('cable 0.0 0.8;cable 1.0 0.8', 'undefined LINE TYPE', 'an unknown type') + CALL refused('riser 0.0 0.8;riser 1.0 0.8', 'give the type LINE TYPES Cl > 0', 'a type without lift', & + cl='0.0') + CALL refused('riser 0.0 0.8 1.0;riser 1.0 0.8', 'same columns', 'rows of different columns') + CALL refused('riser 0.5 0.8;riser 0.5 0.6', 'increase strictly in AD', 'a repeated AD') + CALL refused('riser -0.1 0.8;riser 1.0 0.8', 'AD >= 0, Cv >= 0 and CdAmp > 0', 'a negative AD') + CALL refused('riser 0.0 -0.8;riser 1.0 0.8', 'AD >= 0, Cv >= 0 and CdAmp > 0', 'a negative Cv') + CALL refused('riser 0.0 0.8 0.0;riser 1.0 0.8 1.0', 'AD >= 0, Cv >= 0 and CdAmp > 0', 'a zero CdAmp') + CALL refused('riser 0.0 0.8', 'at least two', 'a one-row table') + many = '' + DO k = 0, 32 + WRITE (many(LEN_TRIM(many) + 1:), '(A,F5.2,A)') 'riser ', 0.01_wp*REAL(k, wp), ' 0.8;' + END DO + many(LEN_TRIM(many):LEN_TRIM(many)) = ' ' + CALL refused(TRIM(many), 'more than 32', 'a table of 33 rows') + CALL refused('', 'has no VIV AMPLITUDE table', 'VIVAmp on a line without a table', amp_channel=.TRUE.) + END SUBROUTINE check_refusals + + SUBROUTINE refused(rows, needle, what, cl, amp_channel) + CHARACTER(*), INTENT(IN) :: rows, needle, what + CHARACTER(*), INTENT(IN), OPTIONAL :: cl + LOGICAL, INTENT(IN), OPTIONAL :: amp_channel + LOGICAL :: ok + CHARACTER(1024) :: msg + IF (PRESENT(cl)) THEN + CALL write_deck('vad_bad.dat', rows, 1.0_wp, '1.0', cl=cl) + ELSE IF (PRESENT(amp_channel)) THEN + CALL write_deck('vad_bad.dat', rows, 1.0_wp, '1.0', amp_channel=amp_channel) + ELSE + CALL write_deck('vad_bad.dat', rows, 1.0_wp, '1.0') + END IF + CALL run('vad_bad.dat', 'vad_bad', ok, msg) + CALL require(.NOT. ok .AND. INDEX(msg, needle) > 0, 'A5: '//what//' is refused: '//TRIM(msg)) + END SUBROUTINE refused + +END PROGRAM test_viv_amplitude_deck diff --git a/tests/test_viv_amplitude_kernel.f90 b/tests/test_viv_amplitude_kernel.f90 new file mode 100644 index 00000000..385b60c3 --- /dev/null +++ b/tests/test_viv_amplitude_kernel.f90 @@ -0,0 +1,241 @@ +! File: tests/test_viv_amplitude_kernel.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_amplitude_kernel + !! The cross-flow amplitude estimate of Thorsen et al. (2016, Eq. 8 and 9; CD_VIV_Amplitude_Update) + !! and the amplitude tables (CD_VIV_Table, CD_VIV_Check_Amp_Table): + !! K1 a sinusoidal cross-flow velocity y' = om y0 cos(om t + p) with a step that does not divide + !! the period: after the first half cycle the half-cycle amplitude is y0 within 3e-6 relative + !! (the trapezoidal (om dt)^2/12 is 1.9e-6), + !! halving the step cuts the error about four times (trapezoidal travel, interpolated + !! crossings), and the smoothed amplitude follows Eq. 9 (within 1e-9 of y0 after 400 steps); + !! K2 a velocity that touches zero without changing sign ends no half cycle, a velocity that + !! changes sign does, also through a sample at exactly zero (the travel is signed); + !! K3 a growing oscillation y0(t) = a t: each half-cycle value is the mean amplitude of its half + !! cycle (within 0.1 % from the sixth period, the extremes then within that of a t); + !! K4 the table interpolates linearly and holds its end values; a one-row table is constant; + !! a NaN argument stays inside the table (NaN back, or the one row); + !! K5 the table check refuses each bad table by name and accepts a good one. + USE, INTRINSIC :: IEEE_ARITHMETIC, ONLY: IEEE_VALUE, IEEE_QUIET_NAN, IEEE_IS_NAN + USE CableDyn_Precision, ONLY: wp + USE CableDyn_VIV, ONLY: CD_VIV_Amplitude_Update, CD_VIV_Table, CD_VIV_Check_Amp_Table, CD_VIV_AMP_MAXP, & + CD_VIV_AMP_KDT + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp + INTEGER :: nfail = 0 + + CALL check_sinusoid() + CALL check_touch() + CALL check_growth() + CALL check_table() + CALL check_tables_validated() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: VIV amplitude estimate and tables' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE run_sinusoid(dt, nstep, y0, err, smooth_err) + !! The largest relative error of the half-cycle amplitude over the run after the first two + !! crossings, and the final error of the smoothed one. + REAL(wp), INTENT(IN) :: dt, y0 + INTEGER, INTENT(IN) :: nstep + REAL(wp), INTENT(OUT) :: err, smooth_err + REAL(wp), PARAMETER :: om = 2.0_wp*PI/1.3_wp, ph = 0.4_wp + REAL(wp) :: st(4), y_half + INTEGER :: i, ncross + st = 0.0_wp + st(4) = om*y0*COS(ph) + err = 0.0_wp + ncross = 0 + y_half = 0.0_wp + DO i = 1, nstep + CALL CD_VIV_Amplitude_Update(st, om*y0*COS(om*REAL(i, wp)*dt + ph), dt) + IF (st(2) /= y_half) THEN + ncross = ncross + 1 + y_half = st(2) + IF (ncross > 1) err = MAX(err, ABS(st(2)/y0 - 1.0_wp)) + END IF + END DO + smooth_err = ABS(st(3)/y0 - 1.0_wp) + CALL require(ncross > 10, 'K1: the sinusoid crosses zero') + END SUBROUTINE run_sinusoid + + SUBROUTINE check_sinusoid() + REAL(wp) :: e1, e2, s1, s2 + CALL run_sinusoid(1.0e-3_wp, 13000, 0.07_wp, e1, s1) + CALL run_sinusoid(0.5e-3_wp, 26000, 0.07_wp, e2, s2) + WRITE (*, '(A,2ES11.3,A,F6.2)') 'K1: half-cycle error at dt, dt/2: ', e1, e2, '; ratio ', e1/e2 + CALL require(e1 <= 3.0e-6_wp, 'K1: the half-cycle amplitude is y0 within 3e-6') + CALL require(e1/e2 > 3.0_wp .AND. e1/e2 < 5.0_wp, 'K1: the error is second order in the step') + CALL require(s1 <= 1.0e-5_wp .AND. s2 <= 1.0e-5_wp, 'K1: the smoothed amplitude settles on y0') + CALL check_smoothing() + END SUBROUTINE check_sinusoid + + SUBROUTINE check_smoothing() + !! Eq. 9 per step: y0s_n+1 = y0s_n + k_a dt (y0 - y0s_n) with the half-cycle amplitude held. + REAL(wp) :: st(4), expect + INTEGER :: i + st = [0.0_wp, 0.5_wp, 0.0_wp, 1.0_wp] + expect = 0.0_wp + DO i = 1, 400 + CALL CD_VIV_Amplitude_Update(st, 1.0_wp, 1.0e-3_wp) + expect = expect + CD_VIV_AMP_KDT*(0.5_wp - expect) + END DO + CALL require(st(3) == expect, 'K1: the smoothing is Eq. 9 step by step') + CALL require(ABS(st(3) - 0.5_wp) <= 1.0e-9_wp, 'K1: and reaches the held amplitude') + CALL require(st(2) == 0.5_wp, 'K1: no crossing, the half-cycle amplitude is held') + END SUBROUTINE check_smoothing + + SUBROUTINE check_touch() + REAL(wp) :: st(4) + st = [0.0_wp, 0.25_wp, 0.25_wp, 1.0_wp] + CALL CD_VIV_Amplitude_Update(st, 0.0_wp, 0.1_wp) + CALL CD_VIV_Amplitude_Update(st, 1.0_wp, 0.1_wp) + CALL require(st(2) == 0.25_wp, 'K2: touching zero without a sign change ends no half cycle') + CALL require(ABS(st(1) - 0.1_wp) <= 1.0e-15_wp, 'K2: the travel keeps accumulating') + CALL CD_VIV_Amplitude_Update(st, -1.0_wp, 0.1_wp) + ! the crossing halfway through the step: travel 0.1 + 0.025 before it, half of it the amplitude + CALL require(ABS(st(2) - 0.0625_wp) <= 1.0e-15_wp, 'K2: a sign change ends the half cycle at the crossing') + CALL require(ABS(st(1) + 0.025_wp) <= 1.0e-15_wp, 'K2: the rest of the step starts the next one, signed') + CALL check_zero_samples() + END SUBROUTINE check_touch + + SUBROUTINE check_zero_samples() + !! A triangular velocity sampled on its zeros, 0 1 2 1 0 -1 -2 -1 0 ... with dt 0.5: every + !! reversal passes through a sample at zero, and each half cycle travels 2 (exact for the + !! trapezoidal rule on a piecewise-linear velocity), so y0 = 1; a touch (1 0 1) ends none. + REAL(wp), PARAMETER :: wave(8) = [1.0_wp, 2.0_wp, 1.0_wp, 0.0_wp, -1.0_wp, -2.0_wp, -1.0_wp, 0.0_wp] + REAL(wp) :: st(4), s_before + INTEGER :: i, n_half + LOGICAL :: all_one + st = 0.0_wp + n_half = 0 + all_one = .TRUE. + DO i = 1, 8*5 + s_before = st(1) + CALL CD_VIV_Amplitude_Update(st, wave(MOD(i - 1, 8) + 1), 0.5_wp) + ! a half cycle ends where the signed travel changes sign + IF (s_before*st(1) < 0.0_wp) THEN + n_half = n_half + 1 + all_one = all_one .AND. st(2) == 1.0_wp + END IF + END DO + CALL require(n_half == 9 .AND. all_one, 'K2: each reversal through a sample at zero ends a half cycle, y0 = 1') + CALL require(st(1) == -2.0_wp .AND. st(4) == 0.0_wp, 'K2: the run ends on a zero sample, its half cycle open') + st = [0.75_wp, 0.5_wp, 0.5_wp, 0.0_wp] + CALL CD_VIV_Amplitude_Update(st, 1.0_wp, 0.5_wp) + CALL require(st(2) == 0.5_wp .AND. st(1) == 1.0_wp, 'K2: a touch through a zero sample (+, 0, +) ends none') + st = [0.75_wp, 0.5_wp, 0.5_wp, 0.0_wp] + CALL CD_VIV_Amplitude_Update(st, -1.0_wp, 0.5_wp) + CALL require(st(2) == 0.375_wp .AND. st(1) == -0.25_wp, 'K2: a reversal through it (+, 0, -) ends one there') + END SUBROUTINE check_zero_samples + + SUBROUTINE check_growth() + !! y = a t sin(om t): y' = a sin(om t) + a t om cos(om t). Between crossings of y' the travel + !! is |y(t2) - y(t1)|, half of which is the mean of the two extreme amplitudes. + REAL(wp), PARAMETER :: om = 2.0_wp*PI, a = 0.01_wp, dt = 1.0e-4_wp + REAL(wp) :: st(4), y_half, t, yd, t_prev_cross, y_prev_ext, err + INTEGER :: i, ncross + st = 0.0_wp + st(4) = 0.0_wp + y_half = 0.0_wp + ncross = 0 + err = 0.0_wp + t_prev_cross = 0.0_wp + y_prev_ext = 0.0_wp + DO i = 1, 100000 + t = REAL(i, wp)*dt + yd = a*SIN(om*t) + a*t*om*COS(om*t) + CALL CD_VIV_Amplitude_Update(st, yd, dt) + IF (st(2) /= y_half) THEN + ncross = ncross + 1 + y_half = st(2) + ! the extreme just passed is at about the crossing time; its |y| = a t + IF (ncross > 10) err = MAX(err, ABS(st(2)/(0.5_wp*(a*t + y_prev_ext)) - 1.0_wp)) + y_prev_ext = a*t + END IF + END DO + WRITE (*, '(A,ES11.3)') 'K3: growing oscillation, largest error of the half-cycle mean amplitude: ', err + CALL require(ncross > 15 .AND. err <= 1.0e-3_wp, & + 'K3: each half-cycle value is the mean amplitude of the half cycle') + END SUBROUTINE check_growth + + SUBROUTINE check_table() + REAL(wp) :: xs(3), ys(3), nan, y + xs = [0.0_wp, 0.4_wp, 0.8_wp] + ys = [0.5_wp, 1.0_wp, 0.0_wp] + CALL require(CD_VIV_Table(-1.0_wp, xs, ys) == 0.5_wp, 'K4: held below the first row') + CALL require(CD_VIV_Table(0.0_wp, xs, ys) == 0.5_wp, 'K4: the first row') + CALL require(ABS(CD_VIV_Table(0.2_wp, xs, ys) - 0.75_wp) <= 1.0e-15_wp, 'K4: linear between rows') + CALL require(CD_VIV_Table(0.4_wp, xs, ys) == 1.0_wp, 'K4: an interior row') + CALL require(ABS(CD_VIV_Table(0.7_wp, xs, ys) - 0.25_wp) <= 1.0e-15_wp, 'K4: linear on the falling side') + CALL require(CD_VIV_Table(5.0_wp, xs, ys) == 0.0_wp, 'K4: held beyond the last row') + CALL require(CD_VIV_Table(3.0_wp, xs(1:1), ys(1:1)) == 0.5_wp, 'K4: a one-row table is constant') + ! A NaN amplitude (a diverged run) stays inside the table: NaN back, or the one row. + nan = IEEE_VALUE(nan, IEEE_QUIET_NAN) + y = CD_VIV_Table(nan, xs, ys) + CALL require(IEEE_IS_NAN(y), 'K4: a NaN amplitude gives NaN') + CALL require(CD_VIV_Table(nan, xs(1:1), ys(1:1)) == 0.5_wp, 'K4: a one-row table is constant at NaN') + END SUBROUTINE check_table + + SUBROUTINE check_tables_validated() + REAL(wp) :: amp(3, CD_VIV_AMP_MAXP, 2), cl(2) + INTEGER :: n(2) + CHARACTER(160) :: msg + CALL good(amp, n, cl) + CALL CD_VIV_Check_Amp_Table(amp, n, cl, msg) + CALL require(LEN_TRIM(msg) == 0, 'K5: a good table passes: '//TRIM(msg)) + CALL good(amp, n, cl) + amp(1, 2, 1) = 0.0_wp + CALL bad(amp, n, cl, 'increase strictly', 'a repeated A/D') + CALL good(amp, n, cl) + amp(1, 1, 1) = -0.1_wp + CALL bad(amp, n, cl, 'A/D >= 0', 'a negative A/D') + CALL good(amp, n, cl) + amp(2, 2, 1) = -0.1_wp + CALL bad(amp, n, cl, 'C_v >= 0', 'a negative C_v') + CALL good(amp, n, cl) + amp(3, 1, 1) = 0.0_wp + CALL bad(amp, n, cl, 'drag factor > 0', 'a zero drag factor') + CALL good(amp, n, cl) + cl(1) = 0.0_wp + CALL bad(amp, n, cl, 'needs the cross-flow lift', 'a table on an element without lift') + CALL good(amp, n, cl) + n(1) = CD_VIV_AMP_MAXP + 1 + CALL bad(amp, n, cl, '0 to 32 rows', 'too many rows') + CALL good(amp, n, cl) + CALL CD_VIV_Check_Amp_Table(amp(:, 1:4, :), n, cl, msg) + CALL require(INDEX(msg, 'shapes') > 0, 'K5: a table of the wrong shape is refused: '//TRIM(msg)) + END SUBROUTINE check_tables_validated + + SUBROUTINE good(amp, n, cl) + REAL(wp), INTENT(OUT) :: amp(:, :, :), cl(:) + INTEGER, INTENT(OUT) :: n(:) + amp = 0.0_wp + amp(:, 1, 1) = [0.0_wp, 0.8_wp, 1.0_wp] + amp(:, 2, 1) = [0.5_wp, 0.0_wp, 2.0_wp] + n = [2, 0] + cl = [0.8_wp, 0.0_wp] + END SUBROUTINE good + + SUBROUTINE bad(amp, n, cl, needle, what) + REAL(wp), INTENT(IN) :: amp(:, :, :), cl(:) + INTEGER, INTENT(IN) :: n(:) + CHARACTER(*), INTENT(IN) :: needle, what + CHARACTER(160) :: msg + CALL CD_VIV_Check_Amp_Table(amp, n, cl, msg) + CALL require(INDEX(msg, needle) > 0, 'K5: '//what//' is refused: '//TRIM(msg)) + END SUBROUTINE bad + +END PROGRAM test_viv_amplitude_kernel diff --git a/tests/test_viv_coupled.f90 b/tests/test_viv_coupled.f90 index bc078835..81320a6d 100644 --- a/tests/test_viv_coupled.f90 +++ b/tests/test_viv_coupled.f90 @@ -33,7 +33,11 @@ PROGRAM test_viv_coupled !! * wake oscillator (a WAKE OSCILLATOR row, C_L0 0.3, on the cable, whose type has Cl 0; the !! EI = 0 riser keeps its synchronisation lift): the cable's checkpoint block grows by the wake !! state (2 per node), the restarted run continues bit for bit with it, a rebuild without the - !! VIV state does not, and a rewound step repeats. + !! VIV state does not, and a rewound step repeats; + !! * amplitude tables (a VIV AMPLITUDE table on both types, Cv falling from 0.8 at A/D 0 to 0.4 at + !! 1, CdAmp from 1 to 1.5): both checkpoint blocks grow by the amplitude estimate (4 per node), + !! the restarted run continues bit for bit with it, a rebuild without the VIV state does not, + !! and a rewound step repeats. USE CableDyn_Precision, ONLY: wp USE CableDyn_OpenFAST_Aggregate, ONLY: CD_AGG_ModuleType, CD_AGG_Init_From_Deck, CD_AGG_End, CD_AGG_OK, & CD_AGG_NMovingPoints, CD_AGG_GetMovingPointMesh, CD_AGG_Step_Moving, & @@ -53,13 +57,14 @@ PROGRAM test_viv_coupled INTEGER :: nfail ! the deck of the restart and rewind cases, and whether its lines carry in-line VIV CHARACTER(32) :: deck_name = 'viv_coupled.dat' - LOGICAL :: il_case = .FALSE., wake_case = .FALSE. + LOGICAL :: il_case = .FALSE., wake_case = .FALSE., amp_case = .FALSE. nfail = 0 CALL write_deck('viv_coupled.dat', 0.8_wp) CALL write_deck('viv_coupled_nolift.dat', 0.0_wp) CALL write_deck('viv_coupled_il.dat', 0.8_wp, inline=.TRUE.) CALL write_deck('viv_coupled_wake.dat', 0.8_wp, wake=.TRUE.) + CALL write_deck('viv_coupled_amp.dat', 0.8_wp, amp=.TRUE.) CALL case_lockin() CALL case_restart() CALL case_rewind() @@ -74,6 +79,11 @@ PROGRAM test_viv_coupled wake_case = .TRUE. CALL case_restart() CALL case_rewind() + deck_name = 'viv_coupled_amp.dat' + wake_case = .FALSE. + amp_case = .TRUE. + CALL case_restart() + CALL case_rewind() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' coupled VIV check(s) failed' ERROR STOP 1 @@ -361,7 +371,7 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) a_interior=aL(4:ndof - 3)) ok = ok .AND. es == CD_SYSTEM_OK nv = CD_System_Line_VIV_MirrorSize(a%sys%fast%system, il) - ok = ok .AND. nv == MERGE(6, 3, il_case)*(ndof/3) + 1 + ok = ok .AND. nv == (MERGE(6, 3, il_case) + MERGE(4, 0, amp_case))*(ndof/3) + 1 IF (with_viv .AND. nv > 0) THEN ALLOCATE (buf(nv)) CALL CD_Get_System_Line_VIV_State(a%sys%fast%system, il, buf, es, em) @@ -374,7 +384,8 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) ALLOCATE (buf(CD_HFMF_MirrorSize(a%cables(1))), fresh(CD_HFMF_MirrorSize(b%cables(1)))) CALL CD_HFMF_PackMirror(a%cables(1), buf, es, em) nvc = CD_HFMF_VIVMirrorSize(a%cables(1)) - ok = ok .AND. nvc == (MERGE(6, 3, il_case) + MERGE(2, 0, wake_case))*a%cables(1)%line%nn + 1 + ok = ok .AND. nvc == (MERGE(6, 3, il_case) + MERGE(2, 0, wake_case) + MERGE(4, 0, amp_case))* & + a%cables(1)%line%nn + 1 IF (.NOT. with_viv) THEN ! the cable's VIV block as the fresh build has it (the torsion-free cable ends with it) CALL CD_HFMF_PackMirror(b%cables(1), fresh, es, em) @@ -394,6 +405,13 @@ LOGICAL FUNCTION identical(a, b) RESULT(same) MAXVAL(ABS(a%cables(1)%line%viv_phi - b%cables(1)%line%viv_phi)) <= 0.0_wp IF (same .AND. wake_case) same = a%cables(1)%line%viv_wake .AND. & MAXVAL(ABS(a%cables(1)%line%wo_s - b%cables(1)%line%wo_s)) <= 0.0_wp + IF (same .AND. amp_case) THEN + ! the motion statistics with the amplitude estimate (rows 3-6) on both lines + same = a%sys%fast%system%lines(1)%has_viv_amp .AND. a%cables(1)%line%has_viv_amp .AND. & + SIZE(a%cables(1)%line%viv_ms, 1) == 6 .AND. & + MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_ms - b%sys%fast%system%lines(1)%viv_ms)) <= 0.0_wp .AND. & + MAXVAL(ABS(a%cables(1)%line%viv_ms - b%cables(1)%line%viv_ms)) <= 0.0_wp + END IF IF (.NOT. (same .AND. il_case)) RETURN same = a%sys%fast%system%lines(1)%has_viv_il .AND. a%cables(1)%line%has_viv_il .AND. & MAXVAL(ABS(a%sys%fast%system%lines(1)%vil_phi - b%sys%fast%system%lines(1)%vil_phi)) <= 0.0_wp .AND. & @@ -422,15 +440,16 @@ SUBROUTINE response(z, ad, f) IF (n > 1) f = REAL(n - 1, wp)/(t1 - t0) END SUBROUTINE response - SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake) + SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp) !! The EI = 0 riser (line 1) and the finite-EI cable (line 2), 20 m apart across the current; !! VIVrmsWindow 0.25 s unless window is given (0: none), and a deck dtM when dtm is given; !! inline adds the in-line VIV of both types (a VIV section, ClX 0.85); wake gives the cable - !! the wake oscillator instead of its lift (Cl 0 and a WAKE OSCILLATOR row, C_L0 0.3). + !! the wake oscillator instead of its lift (Cl 0 and a WAKE OSCILLATOR row, C_L0 0.3); amp a VIV + !! AMPLITUDE table on both types. CHARACTER(*), INTENT(IN) :: path REAL(wp), INTENT(IN) :: cl REAL(wp), INTENT(IN), OPTIONAL :: window, dtm - LOGICAL, INTENT(IN), OPTIONAL :: anchor_first, inline, wake + LOGICAL, INTENT(IN), OPTIONAL :: anchor_first, inline, wake, amp INTEGER :: u LOGICAL :: stock, wo REAL(wp) :: tw @@ -483,6 +502,16 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake) WRITE (u, '(A)') 'TypeName CL0 St eps A' WRITE (u, '(A)') 'cable 0.3 0.2 0.3 12' END IF + IF (PRESENT(amp)) THEN + IF (amp) THEN + WRITE (u, '(A)') '--------------------- VIV AMPLITUDE ---' + WRITE (u, '(A)') 'TypeName AD Cv CdAmp' + WRITE (u, '(A)') 'riser 0.0 0.8 1.0' + WRITE (u, '(A)') 'riser 1.0 0.4 1.5' + WRITE (u, '(A)') 'cable 0.0 0.8 1.0' + WRITE (u, '(A)') 'cable 1.0 0.4 1.5' + END IF + END IF WRITE (u, '(A)') '--------------------- OPTIONS ---' WRITE (u, '(A)') '100.0 WtrDpth' WRITE (u, '(A)') '1025.0 rhoW' From 025cbad09d1815ab019e383e3c6a433eacda5788 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 13 Nov 2026 20:56:11 +0900 Subject: [PATCH 13/47] feat: diameter of the VIV model apart from the hydrodynamic one (VIV DIAMETER section) (#156) A lazy-wave cable's buoyancy modules are ATTACHMENTS rows on the bare cable: their mass, volume and drag are point loads, and the cable's line type keeps its own diameter for its drag, added mass and buoyancy. Its VIV then also took that diameter, while the shedding of a module zone is set by the larger module diameter. An optional VIV DIAMETER section row TypeName Dviv gives the VIV model of a line type a diameter of its own: the shedding frequency and band (or the wake frequency and its coupling A/D), the lift, in-line and higher-harmonic forces and the amplitude ratio of a VIV AMPLITUDE table take Dviv, the drag, added mass, buoyancy and contact keep Diam. A module zone is a section with a copy of the cable's type, Dviv the module diameter and its own coefficients; the docs say how, and that the shedding of alternating modules and bare cable has no established model. The type needs VIV (Cl > 0 or a WAKE OSCILLATOR row); one row a type. EI = 0 lines take it through the diameter CD_Set_Model_VIV already has; finite-EI cables through Set_VIV dviv (per element, 0 = the drag diameter, kept across a later Set_Drag), which viv_drag_terms and the amplitude-table helpers read. The Python deck reader mirrors the checks, the builder writes the row (LineType.viv_diameter). Checks: - tests/test_viv_diameter_deck.f90, on the taut gate line as an EI = 0 line and a finite-EI cable: Dviv = Diam is the deck without the section bit for bit; with the synchronisation lift the line locks in at 0.287 Hz, and with Dviv 0.2 m its band (0.075-0.195 Hz) lies below the mode and the phase runs at its top, 0.196 Hz; an uncoupled wake oscillator drives the cable at 0.149 Hz against St U/Dviv = 0.15 Hz; six refusals; - Python: rows read, kept and refused as natively, the builder writes them, six native/Python parity decks agree. Full ctest under both BLAS kernels, Debug -fcheck=all on the VIV tests, pytest, ruff, mypy, Sphinx -W, pre-commit. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 5 + CMakeLists.txt | 7 + doc/capabilities.rst | 4 + doc/driver_format.md | 39 +++- doc/theory.rst | 24 +++ python/cabledyn/builder.py | 25 +++ python/cabledyn/deck_file.py | 39 ++++ python/tests/test_builder.py | 13 ++ python/tests/test_deck_file.py | 40 ++++ python/tests/test_end_to_end.py | 31 +++ src/CableDyn_DeckDriver.f90 | 116 +++++++++++- src/CableDyn_HermiteCableDynamic.f90 | 60 +++++- tests/test_viv_diameter_deck.f90 | 270 +++++++++++++++++++++++++++ 13 files changed, 654 insertions(+), 19 deletions(-) create mode 100644 tests/test_viv_diameter_deck.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ef04ae8..e2020632 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,11 @@ All notable changes to CableDyn are recorded in this file. The format follows response inside its falling range, and a table with `Cv = Cl` and `CdAmp = 1` is the line without it, bit for bit. The estimate is in the step-recovery, snapshot and checkpoint state; the Python deck reader and builder take the section. +- VIV diameter: an optional `VIV DIAMETER` section row `TypeName Dviv` gives the VIV model of a + line type (shedding frequency, wake frequency and coupling, VIV forces, amplitude ratio) a + diameter apart from the `Diam` its drag, added mass and buoyancy keep, for buoyancy-module zones + with ATTACHMENTS, on `EI = 0` lines and finite-EI cables, standalone and coupled. `Dviv` equal to + `Diam` is the type without it, bit for bit; the Python deck reader and builder take the section. - Load power channels `VIVPow`, `DragPow` and `DampPow` [W], and `N` per unit length about a node [W/m]: the power the VIV loads, the drag and the structural damping (`BA`, `Bb`) deliver to a line at the committed state, on `EI = 0` lines and finite-EI cables, diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c134aff..e1c98930 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1344,6 +1344,13 @@ target_link_libraries(test_viv_amplitude_deck PRIVATE cabledyn_core) add_test(NAME viv_amplitude_deck COMMAND test_viv_amplitude_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_tests_properties(viv_amplitude_deck PROPERTIES LABELS "fortran;integration;dynamic;viv" TIMEOUT 1200) +# The diameter of the VIV model on a deck (VIV DIAMETER section), both line kinds: Dviv = Diam as +# no section, the shedding band and the uncoupled wake frequency following Dviv, and the refusals. +add_executable(test_viv_diameter_deck tests/test_viv_diameter_deck.f90) +target_link_libraries(test_viv_diameter_deck PRIVATE cabledyn_core) +add_test(NAME viv_diameter_deck COMMAND test_viv_diameter_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(viv_diameter_deck PROPERTIES LABELS "fortran;integration;dynamic;viv" TIMEOUT 1200) + add_executable(test_hermite_viv tests/test_hermite_viv.f90) target_link_libraries(test_hermite_viv PRIVATE cabledyn_core) add_test(NAME hermite_viv COMMAND test_hermite_viv) diff --git a/doc/capabilities.rst b/doc/capabilities.rst index 28b3690a..d52124bb 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -161,6 +161,10 @@ Line and constitutive capability factor, read at the amplitude estimate of Thorsen et al. (2016) (``VIVAmp`` channel), on ``EI = 0`` lines and finite-EI cables (:ref:`theory-viv-amplitude`), its state in the checkpoint + * - VIV diameter (``VIV DIAMETER`` section ``Dviv``) + - Standalone and coupled + - a diameter of the VIV model apart from the hydrodynamic one, for buoyancy-module zones and + other sections shedding at a larger outer diameter (:ref:`theory-viv-diameter`) Loads and environment --------------------- diff --git a/doc/driver_format.md b/doc/driver_format.md index 97d81fb5..53d5289c 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -298,8 +298,9 @@ the half-range and centre of its band in non-dimensional frequency (MoorDyn's `d `0 <= dF < cF`, and the line's drag in water. It acts in the dynamics on `EI = 0` lines and finite-EI cables (see [Cross-flow VIV](theory.rst)). The in-line force of a type is a [VIV](#viv-optional) section row; a [WAKE OSCILLATOR](#wake-oscillator-optional) row replaces the -lift by a wake oscillator, and a [VIV AMPLITUDE](#viv-amplitude-optional) table makes `Cl` (and -`Cd`) depend on the cross-flow amplitude. +lift by a wake oscillator, a [VIV AMPLITUDE](#viv-amplitude-optional) table makes `Cl` (and +`Cd`) depend on the cross-flow amplitude, and a [VIV DIAMETER](#viv-diameter-optional) row gives +the VIV a diameter of its own. **Viscoelastic axial stiffness (MoorDyn `ElasticMod`).** The EA and BA columns accept bar-separated parts: @@ -1289,6 +1290,40 @@ Behaviour: (`Cl = 0`, as a wake-oscillator type), holds a value out of range, does not increase in `AD`, or has other columns than the type's earlier rows; a type takes 2 to 32 rows. +### VIV DIAMETER (optional) + +The diameter of the VIV model of a line type, apart from the hydrodynamic diameter `Diam` that +its drag, added mass and buoyancy keep (see [VIV diameter](theory.rst)). + +```text +--------------------- VIV DIAMETER ------------------------------------- +TypeName Dviv +(-) (m) +zone 0.9 +``` + +| Column | Meaning | +|--------|---------| +| `TypeName` | an existing LINE TYPES name (case-insensitive) with VIV (`Cl > 0`, or a WAKE OSCILLATOR row), at most one row each | +| `Dviv` | diameter > 0 of its VIV model [m], at most 1e15 | + +Behaviour: + +- The VIV of the type takes `Dviv` wherever it takes the diameter: the shedding frequency + `cF U/Dviv` and its band (or the wake frequency `2 pi St U/Dviv` and the coupling `A/Dviv`), the + lift, in-line and higher-harmonic forces `1/2 rho Dviv C U^2`, and the amplitude ratio of a + [VIV AMPLITUDE](#viv-amplitude-optional) table. The drag, added mass, buoyancy and seabed + contact keep `Diam`; so do the stiffener and attachment loads. +- A buoyancy-module zone of a cable whose modules are ATTACHMENTS rows can be given its own VIV: + split the line into SECTIONS at the zone, give the zone a copy of the cable's line type with + `Dviv` the module diameter and its own `Cl`, `dF` and `cF` (or `Cl 0` for no VIV there), and + keep the modules' mass, volume and drag in ATTACHMENTS. CableDyn models no shedding + interaction between modules and bare cable; the coefficients of such a zone are the user's + choice. +- A row with `Dviv` equal to `Diam` runs as the type without it. It acts on `EI = 0` lines and + finite-EI cables, standalone and coupled. A row fails if it is not `TypeName Dviv`, names an + undefined or already named type or one without VIV, or holds a value out of range. + ### FAILURE (optional, EI = 0 decks) A FAILURE row detaches line ends from a point during a dynamic run, with MoorDyn's trigger rules. diff --git a/doc/theory.rst b/doc/theory.rst index cff755e8..d3c09616 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1336,6 +1336,30 @@ at 0.3 holds the response at A/D 0.28; :math:`C_v = 0` with a drag factor 2 sett offset of ``Cd`` 2.4 to six digits; and a table with :math:`C_v` = ``Cl`` and factor 1 is the line without it, bit for bit. +.. _theory-viv-diameter: + +VIV diameter +~~~~~~~~~~~~ + +A ``VIV DIAMETER`` row gives the VIV model of a line type a diameter :math:`D_v` of its own. The +shedding frequency :math:`2\pi(c_F + d_F\sin(\phi_y - \phi))U/D_v` (or the wake frequency +:math:`2\pi\,\mathrm{St}\,U_a/D_v` with the coupling :math:`A/D_v`), the VIV forces +:math:`\tfrac12\rho D_v C U^2` and the amplitude ratio :math:`y_0^*/D_v` of a ``VIV AMPLITUDE`` +table take it, while the drag, added mass, buoyancy and contact keep the type's ``Diam``. It +serves a section whose shedding is set by a larger outer diameter than its hydrodynamic one, as a +buoyancy-module zone whose modules are ATTACHMENTS on the bare cable: a copy of the cable's type +with :math:`D_v` the module diameter and its own synchronisation coefficients. The shedding of +such a zone, where modules and bare cable alternate, has no established model; :math:`D_v` and +the coefficients are the user's. + +On the taut line of the wake-oscillator gate (``Diam`` 0.1 m) the synchronisation model locks in +near the first mode, at 0.287 Hz; with :math:`D_v` = 0.2 m its band, +0.075-0.195 Hz, lies below the mode, where the motion lags the lift by less than a quarter period +and the phase runs at the top of the band, 0.196 Hz, on ``EI = 0`` lines and finite-EI cables +alike; an uncoupled wake oscillator (:math:`A` = 0) drives the cable at 0.149 Hz against +:math:`\mathrm{St}\,U/D_v` = 0.15 Hz; and :math:`D_v` equal to ``Diam`` is the line without the row, +bit for bit. + .. _theory-dry-buoyancy: Buoyancy and wetting diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 518a3fa9..bc61f0d8 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -236,6 +236,11 @@ class LineType: length, 2 to 32 of them in increasing amplitude ratio ``AD``: ``Cv`` replaces ``cl`` at that amplitude (so ``cl`` must be set) and ``CdAmp`` multiplies the normal drag coefficient ``cdn`` (1 when left out). + viv_diameter : float | None + Optional diameter of the type's VIV model, a ``VIV DIAMETER`` section row + ``Name Dviv``: the shedding frequency, the VIV forces and the amplitude + ratio take it in place of ``diam`` (which the drag, added mass and + buoyancy keep); it needs ``cl`` or ``wake_cl0``. """ name: str @@ -263,6 +268,7 @@ class LineType: wake_eps: float | None = None wake_a: float | None = None viv_amplitude: list[tuple[float, ...]] | None = None + viv_diameter: float | None = None @dataclass(eq=False) @@ -1687,6 +1693,7 @@ def add_line_type( wake_eps: float | None = None, wake_a: float | None = None, viv_amplitude: list[tuple[float, ...]] | None = None, + viv_diameter: float | None = None, ) -> LineType: """Add a ``LINE TYPES`` row; see :class:`LineType` for the fields. @@ -1728,6 +1735,7 @@ def add_line_type( wake_eps, wake_a, None if viv_amplitude is None else [tuple(row) for row in viv_amplitude], + viv_diameter, ) self._line_types.append(item) return item @@ -2621,6 +2629,7 @@ def to_text(self, *, validate: bool = True) -> str: _emit(out, "VIV", *self._viv_table()) _emit(out, "WAKE OSCILLATOR", *self._wake_table()) _emit(out, "VIV AMPLITUDE", *self._viv_amp_table()) + _emit(out, "VIV DIAMETER", *self._viv_diam_table()) _emit(out, "FAILURE", *self._failure_table()) _emit(out, "CONTROL", *self._control_table()) _emit(out, "EXTERNAL LOADS", *self._external_load_table()) @@ -3041,6 +3050,19 @@ def _viv_amp_table(self) -> tuple[str, str, list[list[str]]]: rows.append([_text(item.name, what), *(_num(value, what) for value in row)]) return "Name AD Cv CdAmp", "(-) (-) (-) (-)", rows + def _viv_diam_table(self) -> tuple[str, str, list[list[str]]]: + rows: list[list[str]] = [] + for item in self._line_types: + if item.viv_diameter is None: + continue + what = f"line type {item.name!r}" + if item.cl is None and item.wake_cl0 is None: + raise ValueError( + f"{what}: viv_diameter is the diameter of its VIV, set cl or wake_cl0" + ) + rows.append([_text(item.name, what), _num(item.viv_diameter, what)]) + return "Name Dviv", "(-) (m)", rows + def _syrope_table(self) -> tuple[str, str, list[list[str]]]: rows = [ [_line_list(row.lines), _num(row.tmax0, "SYROPE IC"), _num(row.tmean0, "SYROPE IC")] @@ -3258,6 +3280,9 @@ def load(self) -> None: if item.viv_amplitude is None: item.viv_amplitude = [] item.viv_amplitude.append(tuple(_f(token) for token in t[1:])) + for row in self.rows("VIV DIAMETER"): + t = row.tokens + model.line_types[t[0]].viv_diameter = _f(t[1]) for row in self.rows("ATTACHMENTS"): t = row.tokens arc: float | tuple[float, float, float] diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index 292cd911..b01fe0f6 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -84,6 +84,8 @@ "WAKE": "WAKE OSCILLATOR", "VIV AMPLITUDE": "VIV AMPLITUDE", "VIV AMPLITUDES": "VIV AMPLITUDE", + "VIV DIAMETER": "VIV DIAMETER", + "VIV DIAMETERS": "VIV DIAMETER", } # Table sections whose rows the native reader takes through a Fortran # list-directed READ. Their descriptive and units rows are recognized by the @@ -115,6 +117,7 @@ "VIV", "WAKE OSCILLATOR", "VIV AMPLITUDE", + "VIV DIAMETER", } ) _TABLE_SECTIONS = _LIST_DIRECTED_SECTIONS | _WHITESPACE_TABLE_SECTIONS @@ -3344,6 +3347,41 @@ def _check_wake_section(self, lift_type_names: set[str]) -> set[str]: wake.add(name) return wake + def _check_viv_diam_section(self, viv_type_names: set[str]) -> None: + """Native ``apply_type_viv_diam`` for the VIV DIAMETER section. + + A row ``TypeName Dviv`` sets the diameter of a line type's VIV model, ``Dviv > 0`` (at + most 1e15). The type needs VIV (LINE TYPES ``Cl > 0`` or a WAKE OSCILLATOR row with + ``CL0 > 0``); a type takes one row. + """ + types = {row.tokens[0].lower(): row.tokens[0] for row in self.line_types} + named: set[str] = set() + for row in self._rows("VIV DIAMETER"): + where = self._at(row) + if len(row.tokens) != 2: + raise DeckFormatError(f"{where}: VIV DIAMETER rows must be: TypeName Dviv") + name = row.tokens[0].lower() + if name not in types: + raise DeckFormatError( + f'{where}: VIV DIAMETER row names undefined LINE TYPE "{row.tokens[0]}"' + ) + if name in named: + raise DeckFormatError( + f'{where}: VIV DIAMETER names LINE TYPE "{types[name]}" twice' + ) + named.add(name) + try: + value = _native_float(row.tokens[1]) + except ValueError as exc: + raise DeckFormatError(f"{where}: VIV DIAMETER Dviv must be a plain number") from exc + if not (math.isfinite(value) and 0.0 < value <= _NATIVE_MAX_COEFFICIENT): + raise DeckFormatError(f"{where}: VIV DIAMETER needs Dviv > 0, at most 1e15") + if name not in viv_type_names: + raise DeckFormatError( + f'{where}: VIV DIAMETER of LINE TYPE "{types[name]}" sets the diameter of its ' + "VIV: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row" + ) + def _check_viv_amp_section(self, lift_type_names: set[str]) -> set[str]: """Native ``apply_type_viv_amp`` for the VIV AMPLITUDE section; the types with a table. @@ -4598,6 +4636,7 @@ def end_key(token: str) -> str: self._check_viv_section(line_type_meta, viv_type_names) wake_type_names = self._check_wake_section(viv_type_names) amp_type_names = self._check_viv_amp_section(viv_type_names) + self._check_viv_diam_section(viv_type_names | wake_type_names) amp_lines = { line_id for line_id, section_types in section_types_by_line.items() diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index c46fb843..520d3be8 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -281,6 +281,19 @@ def test_viv_amplitude_rows_are_written_with_the_values_given(tmp_path: Path) -> model.to_text(validate=False) +def test_viv_diameter_rows_are_written(tmp_path: Path) -> None: + model = _chain_model(tmp_path) + model.add_line_type( + "zone", diam=0.1, mass=10.0, ea=5.0e7, cdn=1.2, can=1.0, cl=0.4, viv_diameter=0.9 + ) + deck = DeckFile.from_text(model.to_text(validate=False), path=tmp_path / "deck.dat") + rows = [row.tokens for row in deck._rows("VIV DIAMETER")] + assert rows == [("zone", "0.9")] + model.add_line_type("plain", diam=0.1, mass=10.0, ea=5.0e7, viv_diameter=0.9) + with pytest.raises(ValueError, match="set cl or wake_cl0"): + model.to_text(validate=False) + + def test_build_spread_mooring_with_multi_section_lines() -> None: import math diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index 346b1050..b0d2bfd6 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -4951,6 +4951,46 @@ def test_viv_amplitude_rows_follow_the_native_checks(lift, rows, message): DeckFile.from_text(_with_section(text, "VIV AMPLITUDE", *rows)) +def test_viv_diameter_rows_are_read_and_kept(tmp_path): + from cabledyn import DeckModel + + text = _with_section( + _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")), + "VIV DIAMETER", + "TypeName Dviv", + "chain 0.9", + ) + DeckFile.from_text(text) + path = tmp_path / "dia.dat" + path.write_text(text, encoding="utf-8") + assert DeckModel.load(path).line_types["chain"].viv_diameter == 0.9 + saved = tmp_path / "saved.dat" + DeckModel.load(path).save(saved) + assert DeckModel.load(saved).line_types["chain"].viv_diameter == 0.9 + + +@pytest.mark.parametrize( + "lift, rows, message", + [ + (True, ("chain 0.9 1.0",), "rows must be: TypeName Dviv"), + (True, ("cable 0.9",), 'undefined LINE TYPE "cable"'), + (True, ("chain 0.9", "chain 0.8"), 'names LINE TYPE "chain" twice'), + (True, ("chain 0.0",), "Dviv > 0, at most 1e15"), + (True, ("chain -0.9",), "Dviv > 0, at most 1e15"), + (False, ("chain 0.9",), "give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row"), + ], +) +def test_viv_diameter_rows_follow_the_native_checks(lift, rows, message): + text = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) if lift else _DYNAMIC + with pytest.raises(DeckFormatError, match=re.escape(message)): + DeckFile.from_text(_with_section(text, "VIV DIAMETER", *rows)) + + +def test_viv_diameter_takes_a_wake_oscillator_type(): + text = _with_section(_DYNAMIC, "WAKE OSCILLATOR", "chain 0.3") + DeckFile.from_text(_with_section(text, "VIV DIAMETER", "chain 0.9")) + + def test_viv_amplitude_channel_needs_a_table(): text = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) text = _edit(text, ("FairTen1\n", "FairTen1\nVIVAmp1N2\n")) diff --git a/python/tests/test_end_to_end.py b/python/tests/test_end_to_end.py index 5ed655df..bc9f5183 100644 --- a/python/tests/test_end_to_end.py +++ b/python/tests/test_end_to_end.py @@ -314,6 +314,37 @@ def _amp_table(*rows: str) -> tuple[str, str]: ] +def _dia_rows(*rows: str) -> tuple[str, str]: + """The edit that puts a VIV DIAMETER section with ``rows`` before OPTIONS.""" + block = "--------------------- VIV DIAMETER -----\n" + "".join(f"{row}\n" for row in rows) + return _AMP_OPTIONS, block + _AMP_OPTIONS + + +_DIA_PARITY = [ + ("dia-accepted", [_dia_rows("riser 0.3")], True), + ("dia-zero", [_dia_rows("riser 0.0")], False), + ("dia-repeated", [_dia_rows("riser 0.3", "riser 0.2")], False), + ("dia-three-columns", [_dia_rows("riser 0.3 1.0")], False), + ( + "dia-wake-type", + [ + _WAKE_LIFT, + _WAKE_SECTION, + ("riser 0.85 0.15", "riser 0.3"), + _dia_rows("riser 0.3"), + ], + True, + ), + ( + "dia-no-viv", + [_WAKE_LIFT, ("riser 0.85 0.15", ""), _dia_rows("riser 0.3")], + False, + ), +] + +_AMP_PARITY += _DIA_PARITY + + @pytest.mark.parametrize( ("label", "edits", "accepted"), _AMP_PARITY, ids=[item[0] for item in _AMP_PARITY] ) diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index fa58aca2..22053d30 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -467,6 +467,10 @@ MODULE CableDyn_DeckDriver ! token count of the type's rows (3 or 4, the drag factor 1 with 3). INTEGER :: amp_n = 0, amp_cols = 0 REAL(wp) :: amp_tab(3, CD_VIV_AMP_MAXP) = CD_ZERO + ! The diameter of the VIV model (the optional VIV DIAMETER section, a row per type: TypeName + ! Dviv): 0 takes the type's Diam; has_vivd_row marks a type the section names. + REAL(wp) :: viv_dv = CD_ZERO + LOGICAL :: has_vivd_row = .FALSE. ! Deck file line of the row (0 when not read from a file), for error messages. INTEGER :: deck_line = 0 END TYPE @@ -1900,7 +1904,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(wp), ALLOCATABLE :: q_sequence(:) REAL(wp), ALLOCATABLE :: curv(:), cdn(:), cdt(:), can(:), cat(:), catenary_pos(:) REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:), viv_hh(:) - REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :) + REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :), viv_dva(:) INTEGER, ALLOCATABLE :: viv_ampn(:) REAL(wp), ALLOCATABLE :: wo_cl0(:), wo_st(:), wo_eps(:), wo_a(:) REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:) @@ -3305,8 +3309,11 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL finite_wake_arrays(ln, sections, types, wo_cl0, wo_st, wo_eps, wo_a) ALLOCATE (viv_tix(SIZE(l0))) CALL viv_amp_type_index(ln, sections, types, viv_tix) + ALLOCATE (viv_dva(SIZE(l0))) + CALL finite_viv_diameters(ln, sections, types, viv_dva) IF (SIZE(l0_am) /= SIZE(l0)) THEN CALL remap_elem_by_reference_arc(viv_tix, l0, l0_am) + CALL remap_elem_by_reference_arc(viv_dva, l0, l0_am) CALL remap_elem_by_reference_arc(wo_cl0, l0, l0_am) CALL remap_elem_by_reference_arc(wo_st, l0, l0_am) CALL remap_elem_by_reference_arc(wo_eps, l0, l0_am) @@ -3644,20 +3651,22 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(CD_VIV_NM, wp)*MERGE(opts%dtM, dt, opts%has_dtm), & opts%viv_rms_window > CD_ZERO), es, em, phase_seed=seed, & tangent_reversed=.NOT. ln%ends_swapped, & - wake=RESHAPE([wo_st, wo_eps, wo_a], [3, SIZE(wo_st)], ORDER=[2, 1])) + wake=RESHAPE([wo_st, wo_eps, wo_a], [3, SIZE(wo_st)], ORDER=[2, 1]), & + dviv=viv_dva) ELSE IF (ANY(viv_clx > 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, 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) + chh=viv_hh, amp=viv_amp3, amp_n=viv_ampn, dviv=viv_dva) 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, phase_seed=seed, & - tangent_reversed=.NOT. ln%ends_swapped, amp=viv_amp3, amp_n=viv_ampn) + tangent_reversed=.NOT. ln%ends_swapped, amp=viv_amp3, amp_n=viv_ampn, & + dviv=viv_dva) END IF END BLOCK IF (es /= CD_HCDYN_OK) THEN @@ -10415,7 +10424,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er REAL(wp), ALLOCATABLE :: hydro_diam(:), hydro_cdn(:), hydro_cdt(:), hydro_can(:), hydro_cat(:) 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(:, :, :) + REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :), viv_dia(:) INTEGER, ALLOCATABLE :: viv_ampn(:) LOGICAL, ALLOCATABLE :: syr_el(:) REAL(wp) :: anchor(3), fairlead(3), mode1_omega @@ -10456,8 +10465,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_tix(SIZE(l0)), viv_dia(SIZE(l0))) viv_tix = CD_ZERO + viv_dia = CD_ZERO viv_cl = CD_ZERO viv_cf = CD_ZERO viv_df = CD_ZERO @@ -10531,6 +10541,9 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er viv_hh(e) = types(line_section_type(sections, ln%id, i))%chh IF (types(line_section_type(sections, ln%id, i))%amp_n > 0) viv_tix(e) = REAL(line_section_type(sections, & ln%id, i), wp) + ! the VIV DIAMETER of the type, else its Diam + viv_dia(e) = MERGE(types(line_section_type(sections, ln%id, i))%viv_dv, hydro_diam(e), & + types(line_section_type(sections, ln%id, i))%viv_dv > CD_ZERO) syr_el(e) = types(line_section_type(sections, ln%id, i))%is_syrope END DO END DO @@ -10542,6 +10555,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er viv_al = viv_al(SIZE(viv_al):1:-1) 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) ba = ba(SIZE(ba):1:-1) ve_ead = ve_ead(SIZE(ve_ead):1:-1) ve_bas = ve_bas(SIZE(ve_bas):1:-1) @@ -10835,11 +10849,11 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er 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 - CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em, & + 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) ELSE - CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em, & + 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, amp=viv_amp3, & amp_n=viv_ampn) END IF @@ -11730,6 +11744,25 @@ SUBROUTINE viv_amp_type_index(ln, sections, types, tix) tix = tix(SIZE(tix):1:-1) END SUBROUTINE viv_amp_type_index + SUBROUTINE finite_viv_diameters(ln, sections, types, dv) + !! The VIV DIAMETER of every element's line type (0 where the type has none, the drag diameter + !! then), in the element order of finite_hydro_arrays (the deck order reversed). + TYPE(DeckLine), INTENT(IN) :: ln + TYPE(DeckSection), INTENT(IN) :: sections(:) + TYPE(DeckLineType), INTENT(IN) :: types(:) + REAL(wp), INTENT(OUT) :: dv(:) + INTEGER :: i, j, e + e = 0 + DO i = 1, SIZE(sections) + IF (sections(i)%line_id /= ln%id) CYCLE + DO j = 1, sections(i)%nsegs + e = e + 1 + dv(e) = types(sections(i)%ltype)%viv_dv + END DO + END DO + dv = dv(SIZE(dv):1:-1) + END SUBROUTINE finite_viv_diameters + SUBROUTINE viv_amp_tables(types, tix, amp, ampn) !! Allocate and fill the per-element amplitude tables (CD_Set_Model_VIV and !! CD_HermiteCable_Dyn_Set_VIV amp, amp_n) from the element type indices of @@ -13886,6 +13919,9 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti CHARACTER(DECK_RECLEN), ALLOCATABLE :: vamp_rows(:) INTEGER, ALLOCATABLE :: vamp_lines(:) INTEGER :: n_vamp + CHARACTER(DECK_RECLEN), ALLOCATABLE :: vdia_rows(:) + INTEGER, ALLOCATABLE :: vdia_lines(:) + INTEGER :: n_vdia CHARACTER(2*NAMELEN), ALLOCATABLE :: channel_keys(:) LOGICAL :: ext_march, types_stock_cols, rodtypes_legacy_cols, turb_ok, static_finite_ok, tors_marched INTEGER :: unit, ios, section, nt, nb, nrt, nr, np, nlin, nsec, neq, nch, nfl, nct, nec, lineno @@ -13903,7 +13939,7 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti SEC_SECTIONS = 5, SEC_OPTIONS = 6, SEC_OUTPUTS = 7, SEC_RODTYPES = 8, SEC_RODS = 9, & SEC_EQUIV = 10, SEC_FAILURE = 11, SEC_CONTROL = 12, SEC_SYROPE_IC = 13, & SEC_ENDCONN = 14, SEC_TURBINES = 15, SEC_EXTLOADS = 16, SEC_ATTACH = 17, & - SEC_STIFF = 18, SEC_VIV = 19, SEC_WAKE = 20, SEC_VIVAMP = 21 + SEC_STIFF = 18, SEC_VIV = 19, SEC_WAKE = 20, SEC_VIVAMP = 21, SEC_VIVDIA = 22 ErrStat = 0; ErrMsg = '' ext_march = .FALSE. @@ -13930,6 +13966,8 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti ALLOCATE (wake_rows(0), wake_lines(0)) ALLOCATE (vamp_rows(0), vamp_lines(0)) n_vamp = 0 + ALLOCATE (vdia_rows(0), vdia_lines(0)) + n_vdia = 0 n_wake = 0 nt = 0; nb = 0; nrt = 0; nr = 0; np = 0; nlin = 0; nsec = 0; neq = 0; nch = 0; nfl = 0; nct = 0; nec = 0 section = SEC_NONE @@ -14083,6 +14121,15 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti END IF vamp_rows(n_vamp) = line(1:MIN(LEN(line), DECK_RECLEN)) vamp_lines(n_vamp) = lineno + CASE (SEC_VIVDIA) + IF (.NOT. has_numeric_token(line)) CYCLE + n_vdia = n_vdia + 1 + IF (n_vdia > SIZE(vdia_rows)) THEN + vdia_rows = [vdia_rows, [(REPEAT(' ', DECK_RECLEN), i_ch=1, 8)]] + vdia_lines = [vdia_lines, [(0, i_ch=1, 8)]] + END IF + vdia_rows(n_vdia) = line(1:MIN(LEN(line), DECK_RECLEN)) + vdia_lines(n_vdia) = lineno CASE (SEC_OPTIONS) CALL apply_option(line, opts, ErrStat, ErrMsg) CASE (SEC_OUTPUTS) @@ -14201,6 +14248,13 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti RETURN END IF END DO + DO i_ch = 1, n_vdia + CALL apply_type_viv_diam(vdia_rows(i_ch), types, ErrStat, ErrMsg) + IF (ErrStat /= 0) THEN + CALL add_row_context('deck', vdia_lines(i_ch), vdia_rows(i_ch), ErrMsg) + RETURN + END IF + END DO DO i_ch = 1, SIZE(types) IF (types(i_ch)%amp_n == 1) THEN CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE gives LINE TYPE "'//TRIM(types(i_ch)%name)//'" one row: a '// & @@ -15877,6 +15931,8 @@ SUBROUTINE set_section(secname, section, ErrStat, ErrMsg) section = 19 CASE ('VIV AMPLITUDE', 'VIV AMPLITUDES') section = 21 + CASE ('VIV DIAMETER', 'VIV DIAMETERS') + section = 22 CASE ('WAKE OSCILLATOR', 'WAKE OSCILLATORS', 'WAKE') section = 20 CASE DEFAULT @@ -17606,6 +17662,48 @@ SUBROUTINE apply_type_viv_amp(row, types, ErrStat, ErrMsg) types(it)%amp_tab(:, n + 1) = v END SUBROUTINE apply_type_viv_amp + SUBROUTINE apply_type_viv_diam(row, types, ErrStat, ErrMsg) + !! One VIV DIAMETER row: TypeName Dviv -- the diameter of a line type's VIV model, Dviv > 0 (at + !! most 1e15), which the shedding frequency, the lift and in-line forces and the amplitude ratio + !! take in place of the type's Diam (which the drag, added mass and buoyancy keep). The type + !! needs VIV (LINE TYPES Cl > 0, or a WAKE OSCILLATOR row). A type takes one row. + CHARACTER(*), INTENT(IN) :: row + TYPE(DeckLineType), INTENT(INOUT) :: types(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + CHARACTER(DECK_RECLEN) :: tok + INTEGER :: it + REAL(wp) :: v + LOGICAL :: found, ok + + ErrStat = 0; ErrMsg = '' + IF (count_tokens(row) /= 2) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DIAMETER rows must be: TypeName Dviv'); RETURN + END IF + CALL get_token(row, 1, tok, found) + it = find_type(types, TRIM(tok)) + IF (it == 0) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DIAMETER row names undefined LINE TYPE "'//TRIM(tok)//'"'); RETURN + END IF + IF (types(it)%has_vivd_row) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DIAMETER names LINE TYPE "'//TRIM(types(it)%name)//'" twice'); RETURN + END IF + CALL get_token(row, 2, tok, found) + CALL parse_real_token(tok, v, ok) + IF (.NOT. ok) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DIAMETER Dviv must be a plain number'); RETURN + END IF + IF (.NOT. (IEEE_IS_FINITE(v) .AND. v > CD_ZERO .AND. v <= MAX_COEFFICIENT)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DIAMETER needs Dviv > 0, at most 1e15'); RETURN + END IF + IF (.NOT. (types(it)%cl > CD_ZERO .OR. types(it)%wo_cl0 > CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DIAMETER of LINE TYPE "'//TRIM(types(it)%name)//'" sets the diameter '// & + 'of its VIV: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row'); RETURN + END IF + types(it)%viv_dv = v + types(it)%has_vivd_row = .TRUE. + END SUBROUTINE apply_type_viv_diam + SUBROUTINE append_line_stiffener(row, lines, ErrStat, ErrMsg) !! One STIFFENERS row: LineID End Length RootOD TipOD InnerD E Density -- a conical segment of !! the bend stiffener sleeving End A or End B of a finite-EI line. The rows of one line end diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 23e309c0..8ebf5cc7 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -365,6 +365,10 @@ MODULE CableDyn_HermiteCableDynamic LOGICAL :: has_viv_amp = .FALSE. REAL(wp), ALLOCATABLE :: viv_amp(:, :, :) INTEGER, ALLOCATABLE :: viv_amp_n(:) + ! The diameter of the VIV model per element (Set_VIV dviv; VIV DIAMETER section): the shedding + ! frequency, lift scale and amplitude ratio take viv_dv(e) where it is positive, the drag + ! diameter diam(e) elsewhere and when it is unallocated (viv_diam). + REAL(wp), ALLOCATABLE :: viv_dv(:) REAL(wp), ALLOCATABLE :: Mgb(:, :) ! constant global mass (band) LOGICAL, ALLOCATABLE :: freemask(:), solve_mask(:) INTEGER, ALLOCATABLE :: fmap(:) ! free -> global DOF index @@ -1123,7 +1127,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial(model, mu_axial, ErrStat, ErrM END SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg, phase_seed, tangent_reversed, & - clx, il_alpha, chh, wake, amp, amp_n) + clx, il_alpha, chh, wake, amp, amp_n, dviv) !! 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 @@ -1159,6 +1163,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! C_v >= 0 that replaces cl, and the factor > 0 of the element's normal drag coefficient, at !! the smoothed amplitude estimate of Thorsen et al. (2016); piecewise linear, held beyond the !! end rows. + !! + !! dviv (optional), per element, the diameter of the VIV model (> 0), which the shedding + !! frequency, the lift and in-line scales and the amplitude ratio take in place of the drag + !! diameter (0: the drag diameter, also after a later Set_Drag). TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: cl(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -1172,11 +1180,13 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err REAL(wp), INTENT(IN), OPTIONAL :: wake(:, :) REAL(wp), INTENT(IN), OPTIONAL :: amp(:, :, :) INTEGER, INTENT(IN), OPTIONAL :: amp_n(:) + REAL(wp), INTENT(IN), OPTIONAL :: dviv(:) INTEGER :: e, k, ne, nn, es, nms REAL(wp) :: wsum, tw_old, rest_old LOGICAL :: had_viv, had_il, want_il, had_wake, want_wake, bad_band, had_amp, want_amp CHARACTER(LEN=1024) :: em REAL(wp), ALLOCATABLE :: p_amp(:, :, :) + REAL(wp), ALLOCATABLE :: p_dv(:) INTEGER, ALLOCATABLE :: p_ampn(:) REAL(wp), ALLOCATABLE :: a_old(:), o_cl(:), o_k(:), o_cf(:), o_df(:), o_dn(:), o_phi(:), o_phi_eval(:), & o_rate(:), o_ms(:, :), o_ms_next(:, :), o_rec_phi(:), o_rec_ms(:, :), & @@ -1306,6 +1316,19 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err 'wake oscillator'; RETURN END IF END IF + IF (PRESENT(dviv)) THEN + IF (SIZE(dviv) /= ne) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: dviv must have one value per element'; RETURN + END IF + IF (.NOT. CD_All_Finite(dviv)) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: dviv must be finite'; RETURN + END IF + IF (ANY(dviv < CD_ZERO)) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: dviv must be non-negative (0 = the drag diameter)'; RETURN + END IF + END IF ! the previous configuration and state, kept for a rollback had_viv = model%has_viv had_il = model%has_viv_il @@ -1336,6 +1359,12 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err model%viv_amp_n = amp_n model%has_viv_amp = .TRUE. END IF + IF (PRESENT(dviv)) THEN + IF (ANY(dviv > CD_ZERO)) THEN + ALLOCATE (model%viv_dv(ne)) + model%viv_dv = dviv + END IF + END IF model%viv_cl = cl model%viv_cf = CD_ZERO model%viv_df = CD_ZERO @@ -1482,6 +1511,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(w_om, model%wo_om0); CALL MOVE_ALLOC(w_rec, model%ws_recovery_wo_s) CALL MOVE_ALLOC(w_snap, model%snap_wo_s) CALL MOVE_ALLOC(p_amp, model%viv_amp); CALL MOVE_ALLOC(p_ampn, model%viv_amp_n) + CALL MOVE_ALLOC(p_dv, model%viv_dv) ELSE CALL MOVE_ALLOC(model%viv_cl, o_cl); CALL MOVE_ALLOC(model%viv_k, o_k) CALL MOVE_ALLOC(model%viv_cf, o_cf); CALL MOVE_ALLOC(model%viv_df, o_df) @@ -1505,6 +1535,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(model%wo_om0, w_om); CALL MOVE_ALLOC(model%ws_recovery_wo_s, w_rec) CALL MOVE_ALLOC(model%snap_wo_s, w_snap) CALL MOVE_ALLOC(model%viv_amp, p_amp); CALL MOVE_ALLOC(model%viv_amp_n, p_ampn) + CALL MOVE_ALLOC(model%viv_dv, p_dv) END IF END SUBROUTINE move_viv END SUBROUTINE CD_HermiteCable_Dyn_Set_VIV @@ -1527,6 +1558,7 @@ SUBROUTINE clear_viv(model) model%wo_ydd0, model%wo_om0, model%ws_recovery_wo_s, model%snap_wo_s) IF (ALLOCATED(model%viv_amp)) DEALLOCATE (model%viv_amp) IF (ALLOCATED(model%viv_amp_n)) DEALLOCATE (model%viv_amp_n) + IF (ALLOCATED(model%viv_dv)) DEALLOCATE (model%viv_dv) model%has_viv_amp = .FALSE. model%has_viv = .FALSE. model%has_viv_il = .FALSE. @@ -1542,9 +1574,11 @@ SUBROUTINE viv_drag_terms(model) TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model INTEGER :: e, k REAL(wp) :: wsum - model%viv_k = 0.5_wp*model%rho_w*model%diam*model%viv_cl - IF (model%has_viv_il) model%vil_k = 0.5_wp*model%rho_w*model%diam*model%vil_cx - IF (model%has_viv_il) model%vhh_k = 0.5_wp*model%rho_w*model%diam*model%vhh_cx + DO e = 1, model%ne + model%viv_k(e) = 0.5_wp*model%rho_w*viv_diam(model, e)*model%viv_cl(e) + IF (model%has_viv_il) model%vil_k(e) = 0.5_wp*model%rho_w*viv_diam(model, e)*model%vil_cx(e) + IF (model%has_viv_il) model%vhh_k(e) = 0.5_wp*model%rho_w*viv_diam(model, e)*model%vhh_cx(e) + END DO model%viv_dn = CD_ZERO DO k = 1, model%nn IF (.NOT. model%viv_node(k)) CYCLE @@ -1552,12 +1586,22 @@ SUBROUTINE viv_drag_terms(model) DO e = MAX(1, k - 1), MIN(model%ne, k) IF (.NOT. (model%viv_cl(e) > CD_ZERO)) CYCLE wsum = wsum + model%l0(e) - model%viv_dn(k) = model%viv_dn(k) + model%l0(e)*model%diam(e) + model%viv_dn(k) = model%viv_dn(k) + model%l0(e)*viv_diam(model, e) END DO model%viv_dn(k) = model%viv_dn(k)/wsum END DO END SUBROUTINE viv_drag_terms + PURE REAL(wp) FUNCTION viv_diam(model, e) RESULT(d) + !! The diameter of the VIV model on element e: viv_dv(e) where it is set (> 0), else the drag + !! diameter. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + d = model%diam(e) + IF (.NOT. ALLOCATED(model%viv_dv)) RETURN + IF (model%viv_dv(e) > CD_ZERO) d = model%viv_dv(e) + END FUNCTION viv_diam + PURE REAL(wp) FUNCTION viv_elem_amplitude(model, e) RESULT(y0) !! The smoothed cross-flow amplitude of element e [m]: the mean over its VIV end nodes (zero !! without amplitude tables). @@ -1585,8 +1629,8 @@ PURE REAL(wp) FUNCTION elem_viv_k(model, e) RESULT(k) IF (.NOT. model%has_viv_amp) RETURN n = model%viv_amp_n(e) IF (n == 0) RETURN - k = 0.5_wp*model%rho_w*model%diam(e)*CD_VIV_Table(viv_elem_amplitude(model, e)/model%diam(e), & - model%viv_amp(1, 1:n, e), model%viv_amp(2, 1:n, e)) + k = 0.5_wp*model%rho_w*viv_diam(model, e)*CD_VIV_Table(viv_elem_amplitude(model, e)/viv_diam(model, e), & + model%viv_amp(1, 1:n, e), model%viv_amp(2, 1:n, e)) END FUNCTION elem_viv_k PURE REAL(wp) FUNCTION elem_cdn(model, e) RESULT(cdn) @@ -1599,7 +1643,7 @@ PURE REAL(wp) FUNCTION elem_cdn(model, e) RESULT(cdn) IF (.NOT. model%has_viv_amp) RETURN n = model%viv_amp_n(e) IF (n == 0) RETURN - cdn = cdn*CD_VIV_Table(viv_elem_amplitude(model, e)/model%diam(e), model%viv_amp(1, 1:n, e), & + cdn = cdn*CD_VIV_Table(viv_elem_amplitude(model, e)/viv_diam(model, e), model%viv_amp(1, 1:n, e), & model%viv_amp(3, 1:n, e)) END FUNCTION elem_cdn diff --git a/tests/test_viv_diameter_deck.f90 b/tests/test_viv_diameter_deck.f90 new file mode 100644 index 00000000..c9a6eb48 --- /dev/null +++ b/tests/test_viv_diameter_deck.f90 @@ -0,0 +1,270 @@ +! File: tests/test_viv_diameter_deck.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_diameter_deck + !! The diameter of the VIV model on a deck (the optional VIV DIAMETER section, rows TypeName + !! Dviv): the taut gate line (100 m, Diam 0.1 m, 50 kN, pinned at 50 m depth, 50 elements) in a + !! uniform 0.15 m/s current along y, as a finite-EI cable + !! (EI 1 N m^2) and as an EI = 0 line: + !! D1 Dviv equal to the type's Diam is the deck without the section, to the printed digits; + !! D2 with the synchronisation lift (Cl 0.8, cF 0.18, dF 0.08) the deck locks in near the first + !! mode (cF U/Diam = 0.27 Hz, the lock-in at 0.287 Hz); with Dviv 0.2 m the shedding band + !! (cF -+ dF) U/Dviv, 0.075-0.195 Hz, lies below that mode, where the motion lags the lift by + !! less than a quarter period and the phase runs at the top of the band, 0.195 Hz (within + !! 0.005 Hz), on both line kinds; + !! D3 a wake oscillator uncoupled from the cable (A 0, St 0.2) drives the finite-EI cable at + !! St U/Dviv = 0.15 Hz with Dviv 0.2 m (within 0.005 Hz), half the 0.30 Hz of Diam; + !! D4 refusals by name: a malformed row, an unknown or repeated type, a value out of range, and a + !! type without VIV (a row with no number is a header row, as in every table section). + USE CableDyn_Precision, ONLY: wp + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp, D = 0.1_wp + INTEGER :: nfail = 0 + + CALL write_current('vdd_current.dat') + CALL check_kind('1.0', 'finite-EI') + CALL check_kind('0.0', 'EI = 0') + CALL check_wake() + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: VIV diameter deck gates' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE write_current(path) + CHARACTER(*), INTENT(IN) :: path + INTEGER :: u + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') 'MoorDyn v2 water kinematics file' + WRITE (u, '(A)') 'uniform current along y for the VIV diameter deck gate' + WRITE (u, '(A)') '--------------------------- WAVES -------------------------------------' + WRITE (u, '(A)') '0 WaveKinMod - type of wave input' + WRITE (u, '(A)') '"" WaveKinFile - file containing wave elevation time series' + WRITE (u, '(A)') '0.000000E+00 dtWave - time step to use in setting up wave kinematics grid (s)' + WRITE (u, '(A)') '0 WaveDir - wave heading (deg)' + WRITE (u, '(A)') '2 - X wave input type' + WRITE (u, '(A)') '-10, 110, 2 - X wave grid point data' + WRITE (u, '(A)') '2 - Y wave input type' + WRITE (u, '(A)') '-10, 10, 2 - Y wave grid point data' + WRITE (u, '(A)') '2 - Z wave input type' + WRITE (u, '(A)') '-100, 0, 2 - Z wave grid point data' + WRITE (u, '(A)') '--------------------------- CURRENT -------------------------------------' + WRITE (u, '(A)') '1 CurrentMod - type of current input' + WRITE (u, '(A)') 'z-depth x-current y-current' + WRITE (u, '(A)') '(m) (m/s) (m/s)' + WRITE (u, '(A)') '0.0 0.0 0.15' + WRITE (u, '(A)') '-100.0 0.0 0.15' + WRITE (u, '(A)') '--------------------- need this line ------------------' + CLOSE (u) + END SUBROUTINE write_current + + SUBROUTINE write_deck(path, dia_rows, tmax, ei, cl, wake_row) + !! dia_rows: the VIV DIAMETER section's data rows, ';'-separated ('' for no section); ei the + !! type's EI, cl its LINE TYPES Cl (default 0.8); wake_row a WAKE OSCILLATOR row. + CHARACTER(*), INTENT(IN) :: path, dia_rows, ei + REAL(wp), INTENT(IN) :: tmax + CHARACTER(*), INTENT(IN), OPTIONAL :: cl, wake_row + CHARACTER(32) :: cl_col + INTEGER :: u, i0, i1 + cl_col = '0.8' + IF (PRESENT(cl)) cl_col = cl + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' + WRITE (u, '(A)') 'VIV diameter deck gate: taut cable in a uniform current' + WRITE (u, '(A)') '----------------------- LINE TYPES ------------------------------------------' + WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//TRIM(ei)//' 1.2 1.0 0.0 0.0 '// & + TRIM(cl_col)//' 0.08 0.18' + WRITE (u, '(A)') 'bare 0.10 10.0 5.0e7 -0.8 '//TRIM(ei)//' 1.2 1.0 0.0 0.0 0.0' + WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' + WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' + WRITE (u, '(A)') '1 Coupled 0.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '2 Fixed 100.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '----------------------- LINES -----------------------------------------------' + WRITE (u, '(A)') 'ID NodeA NodeB Outputs' + WRITE (u, '(A)') '1 1 2 -' + WRITE (u, '(A)') '----------------------- SECTIONS --------------------------------------------' + WRITE (u, '(A)') 'LineID LineType Length NumSegs' + WRITE (u, '(A)') '1 riser 99.900100 50' + IF (PRESENT(wake_row)) THEN + WRITE (u, '(A)') '----------------------- WAKE OSCILLATOR -------------------------------------' + WRITE (u, '(A)') 'TypeName CL0 St eps A' + WRITE (u, '(A)') wake_row + END IF + IF (LEN_TRIM(dia_rows) > 0) THEN + WRITE (u, '(A)') '----------------------- VIV DIAMETER ----------------------------------------' + WRITE (u, '(A)') 'TypeName Dviv' + WRITE (u, '(A)') '(-) (m)' + i0 = 1 + DO + i1 = INDEX(dia_rows(i0:), ';') + IF (i1 == 0) THEN + WRITE (u, '(A)') TRIM(dia_rows(i0:)) + EXIT + END IF + WRITE (u, '(A)') dia_rows(i0:i0 + i1 - 2) + i0 = i0 + i1 + END DO + END IF + WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' + WRITE (u, '(A)') '0.01 dtM' + WRITE (u, '(A)') '100.0 WtrDpth' + WRITE (u, '(A)') '1025.0 rhoW' + WRITE (u, '(A)') '9.80665 g' + WRITE (u, '(A)') 'vdd_current.dat WaterKin' + WRITE (u, '(A,F8.3,A)') ' ', tmax, ' TMax' + WRITE (u, '(A)') '---------------------- OUTPUTS -----------------------------------------------' + WRITE (u, '(A)') 'L1N26PZ' + WRITE (u, '(A)') 'END' + WRITE (u, '(A)') '------------------------- need this line --------------------------------------' + CLOSE (u) + END SUBROUTINE write_deck + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK .AND. conv + END SUBROUTINE run + + SUBROUTINE read_out(path, tab, n) + !! The rows (time, L1N26PZ) of a deck's main output file. + CHARACTER(*), INTENT(IN) :: path + REAL(wp), ALLOCATABLE, INTENT(OUT) :: tab(:, :) + INTEGER, INTENT(OUT) :: n + CHARACTER(1024) :: rec + INTEGER :: u, ios + ALLOCATE (tab(2, 20000)) + n = 0 + OPEN (NEWUNIT=u, FILE=path, STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (u, '(A)') rec + READ (u, '(A)') rec + DO + READ (u, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + IF (n == SIZE(tab, 2)) EXIT + n = n + 1 + READ (rec, *) tab(:, n) + END DO + CLOSE (u) + END SUBROUTINE read_out + + REAL(wp) FUNCTION peak_frequency(tt, x) RESULT(fpk) + !! The frequency of the largest Fourier amplitude of x - mean(x) on 0.05-1 Hz (0.001 Hz grid). + REAL(wp), INTENT(IN) :: tt(:), x(:) + REAL(wp) :: xm(SIZE(x)), f, best, re, im + INTEGER :: j + xm = x - SUM(x)/REAL(SIZE(x), wp) + best = -1.0_wp + fpk = 0.0_wp + DO j = 0, 950 + f = 0.05_wp + 0.001_wp*REAL(j, wp) + re = SUM(xm*COS(2.0_wp*PI*f*tt)) + im = SUM(xm*SIN(2.0_wp*PI*f*tt)) + IF (re*re + im*im > best) THEN + best = re*re + im*im + fpk = f + END IF + END DO + END FUNCTION peak_frequency + + SUBROUTINE window_stats(tab, n, t0, ad, f) + !! Half peak-to-peak mid-span cross-flow amplitude over D and dominant frequency from t0 on. + REAL(wp), INTENT(IN) :: tab(:, :), t0 + INTEGER, INTENT(IN) :: n + REAL(wp), INTENT(OUT) :: ad, f + LOGICAL :: keep(n) + REAL(wp), ALLOCATABLE :: tt(:), z(:) + keep = tab(1, 1:n) >= t0 + tt = PACK(tab(1, 1:n), keep) + z = PACK(tab(2, 1:n), keep) + ad = 0.5_wp*(MAXVAL(z) - MINVAL(z))/D + f = peak_frequency(tt, z) + END SUBROUTINE window_stats + + SUBROUTINE check_kind(ei, label) + CHARACTER(*), INTENT(IN) :: ei, label + CHARACTER(16) :: tag + REAL(wp), ALLOCATABLE :: tn(:, :), ts(:, :), tb(:, :) + INTEGER :: nn, ns, nb + REAL(wp) :: ad_n, f_n, ad_b, f_b + LOGICAL :: ok + CHARACTER(1024) :: msg + tag = MERGE('fe', 'e0', ei /= '0.0') + CALL write_deck('vdd_'//TRIM(tag)//'_none.dat', '', 100.0_wp, ei) + CALL run('vdd_'//TRIM(tag)//'_none.dat', 'vdd_'//TRIM(tag)//'_none', ok, msg) + CALL require(ok, 'D1 ('//label//'): the deck without the section runs: '//TRIM(msg)) + CALL write_deck('vdd_'//TRIM(tag)//'_same.dat', 'riser 0.10', 100.0_wp, ei) + CALL run('vdd_'//TRIM(tag)//'_same.dat', 'vdd_'//TRIM(tag)//'_same', ok, msg) + CALL require(ok, 'D1 ('//label//'): the Dviv = Diam deck runs: '//TRIM(msg)) + CALL write_deck('vdd_'//TRIM(tag)//'_big.dat', 'riser 0.2', 100.0_wp, ei) + CALL run('vdd_'//TRIM(tag)//'_big.dat', 'vdd_'//TRIM(tag)//'_big', ok, msg) + CALL require(ok, 'D2 ('//label//'): the Dviv 0.2 deck runs: '//TRIM(msg)) + CALL read_out('vdd_'//TRIM(tag)//'_none.out', tn, nn) + CALL read_out('vdd_'//TRIM(tag)//'_same.out', ts, ns) + CALL read_out('vdd_'//TRIM(tag)//'_big.out', tb, nb) + CALL require(nn > 5000 .AND. ns == nn .AND. nb == nn, 'D1 ('//label//'): the runs wrote matching rows') + IF (.NOT. (nn > 5000 .AND. ns == nn .AND. nb == nn)) RETURN + CALL require(ALL(ts(:, 1:ns) == tn(:, 1:nn)), 'D1 ('//label//'): Dviv = Diam is the deck without the section') + CALL window_stats(tn, nn, 60.0_wp, ad_n, f_n) + CALL window_stats(tb, nb, 60.0_wp, ad_b, f_b) + WRITE (*, '(A,2F8.4,A,2F8.4)') 'D2 ('//label//'): A/D, f [Hz] with Diam ', ad_n, f_n, '; with Dviv 0.2 ', & + ad_b, f_b + CALL require(ABS(f_n - 0.28_wp) <= 0.02_wp, 'D2 ('//label//'): with Diam the line locks in near its first mode') + CALL require(ABS(f_b - 0.195_wp) <= 0.005_wp, 'D2 ('//label//'): with Dviv 0.2 the phase runs at the top of '// & + 'its band, (cF + dF) U/Dviv') + END SUBROUTINE check_kind + + SUBROUTINE check_wake() + REAL(wp), ALLOCATABLE :: tw(:, :) + INTEGER :: nw + REAL(wp) :: ad, f + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('vdd_wake.dat', 'riser 0.2', 100.0_wp, '1.0', cl='0.0', wake_row='riser 0.3 0.2 0.3 0.0') + CALL run('vdd_wake.dat', 'vdd_wake', ok, msg) + CALL require(ok, 'D3: the uncoupled wake-oscillator deck with Dviv 0.2 runs: '//TRIM(msg)) + CALL read_out('vdd_wake.out', tw, nw) + CALL require(nw > 5000, 'D3: the run wrote its rows') + IF (nw <= 5000) RETURN + CALL window_stats(tw, nw, 50.0_wp, ad, f) + WRITE (*, '(A,2F8.4)') 'D3: uncoupled wake, Dviv 0.2: A/D, f [Hz] ', ad, f + CALL require(ABS(f - 0.15_wp) <= 0.005_wp, 'D3: the wake drives the cable at St U/Dviv') + END SUBROUTINE check_wake + + SUBROUTINE check_refusals() + CALL refused('riser 0.2 0.3', 'TypeName Dviv', 'a row of three columns') + CALL refused('cable 0.2', 'undefined LINE TYPE', 'an unknown type') + CALL refused('riser 0.2;riser 0.3', 'twice', 'a repeated type') + CALL refused('riser 0.0', 'Dviv > 0', 'a zero Dviv') + CALL refused('riser -0.2', 'Dviv > 0', 'a negative Dviv') + CALL refused('bare 0.2', 'give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row', 'a type without VIV') + END SUBROUTINE check_refusals + + SUBROUTINE refused(rows, needle, what) + CHARACTER(*), INTENT(IN) :: rows, needle, what + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('vdd_bad.dat', rows, 1.0_wp, '1.0') + CALL run('vdd_bad.dat', 'vdd_bad', ok, msg) + CALL require(.NOT. ok .AND. INDEX(msg, needle) > 0, 'D4: '//what//' is refused: '//TRIM(msg)) + END SUBROUTINE refused + +END PROGRAM test_viv_diameter_deck From 281b02197960b44808a65b1de2fdd8530f6db9c0 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Sat, 14 Nov 2026 00:07:22 +0900 Subject: [PATCH 14/47] feat: cross-flow damping on finite-EI cables (VIV DAMPING section) (#157) An optional VIV DAMPING section row "TypeName a b [c]" splits the normal drag of a finite-EI line type in the frame of the ambient normal flow: Morison's drag in line (with the VIV AMPLITUDE drag factor) and, across it, 1/2 rho D [C_dy |w_y| + c Cdn |w|] w_y with C_dy = a + b y0/D, the cross-flow hydrodynamic damping of Thorsen et al. (2016, Eq. 1; 0.31 0.89 is their fit) at the amplitude estimate y0. Below an ambient normal flow of 0.01 m/s the force blends to Morison's, where the axes are undefined. CD_Morison_Drag_Split_Per_Length_Jac computes the split force with exact Jacobians in the relative velocity and the tangent. The dynamic finite-EI drag element takes it in the residual, the tangent and the element drag load. Statics is unchanged: at rest in the flow the split force is Morison's. Set_VIV takes cdy (2 or 3, n_elem), checks it and rolls it back with the rest of the VIV state. "0 0 1" is Morison's drag with the drag factor on the in-line part alone, so an amplified drag no longer damps the cross-flow VIV motion twice. Thorsen's quadratic form drops the linear U y' part of Morison's cross-flow damping and suits cross-flow-only VIV. The section needs Cl > 0 and a VIV AMPLITUDE table; EI = 0 lines are refused. The Python deck reader and builder take the section, with parity tests against the native reader. Tests: test_viv_cf_damping_kernel (Morison limits, the cross-flow law, the blend, Jacobians against central differences, refusals) and test_viv_cf_damping_deck (0 0 1 equals the line without the row, 1.5e-8 in Release and checked to 1e-4; the in-line-only factor gives the Cd 2.4 static offset; Thorsen's form raises A/D 0.68 to 1.02; power balance within 0.2 %; six refusals). Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 9 + CMakeLists.txt | 13 ++ doc/capabilities.rst | 7 + doc/driver_format.md | 56 +++++- doc/theory.rst | 41 ++++ python/cabledyn/builder.py | 26 +++ python/cabledyn/deck_file.py | 51 ++++- python/tests/test_builder.py | 23 +++ python/tests/test_deck_file.py | 52 +++++ python/tests/test_end_to_end.py | 28 +++ src/CableDyn_DeckDriver.f90 | 119 +++++++++++- src/CableDyn_HermiteCableDynamic.f90 | 148 ++++++++++++-- src/CableDyn_Hydro.f90 | 168 ++++++++++++++++ tests/test_viv_cf_damping_deck.f90 | 280 +++++++++++++++++++++++++++ tests/test_viv_cf_damping_kernel.f90 | 150 ++++++++++++++ 15 files changed, 1143 insertions(+), 28 deletions(-) create mode 100644 tests/test_viv_cf_damping_deck.f90 create mode 100644 tests/test_viv_cf_damping_kernel.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index e2020632..e9ad96ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,15 @@ All notable changes to CableDyn are recorded in this file. The format follows response inside its falling range, and a table with `Cv = Cl` and `CdAmp = 1` is the line without it, bit for bit. The estimate is in the step-recovery, snapshot and checkpoint state; the Python deck reader and builder take the section. +- Cross-flow damping: an optional `VIV DAMPING` section row `TypeName a b [c]` splits the drag + of a finite-EI line type about the ambient normal flow: Morison's drag in line, and across it + the hydrodynamic damping `C_dy = a + b y0/D` of Thorsen et al. (2016) (Eq. 1, `0.31 0.89`) at + the `VIV AMPLITUDE` estimate `y0`, plus a Morison-form term `c Cdn |w| w_y`, blended to + Morison's drag in still water, with exact Jacobians. `0 0 1` is Morison's drag + with the `CdAmp` drag factor on the in-line part alone (the cross-flow VIV motion is not + damped twice); the quadratic form of Thorsen et al. suits cross-flow-only VIV models. Needs a + `VIV AMPLITUDE` table; `EI = 0` lines refused; the Python deck reader and builder take the + section. - VIV diameter: an optional `VIV DIAMETER` section row `TypeName Dviv` gives the VIV model of a line type (shedding frequency, wake frequency and coupling, VIV forces, amplitude ratio) a diameter apart from the `Diam` its drag, added mass and buoyancy keep, for buoyancy-module zones diff --git a/CMakeLists.txt b/CMakeLists.txt index e1c98930..8b2474f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1336,6 +1336,19 @@ target_link_libraries(test_viv_amplitude_kernel PRIVATE cabledyn_core) add_test(NAME viv_amplitude_kernel COMMAND test_viv_amplitude_kernel) set_tests_properties(viv_amplitude_kernel PROPERTIES LABELS "fortran;unit;dynamic;viv") +# The split cross-flow drag of Thorsen et al. (2016) per unit length: Morison at rest, the +# quadratic cross-flow damping across the flow, Morison without ambient flow, exact Jacobians. +add_executable(test_viv_cf_damping_kernel tests/test_viv_cf_damping_kernel.f90) +target_link_libraries(test_viv_cf_damping_kernel PRIVATE cabledyn_core) +add_test(NAME viv_cf_damping_kernel COMMAND test_viv_cf_damping_kernel) +set_tests_properties(viv_cf_damping_kernel PROPERTIES LABELS "fortran;unit;dynamic;viv") +# The split drag on a deck (VIV DAMPING section): Morison recombined, the in-line drag alone +# amplified, Thorsen's quadratic cross-flow damping, the energy ledger and the refusals. +add_executable(test_viv_cf_damping_deck tests/test_viv_cf_damping_deck.f90) +target_link_libraries(test_viv_cf_damping_deck PRIVATE cabledyn_core) +add_test(NAME viv_cf_damping_deck COMMAND test_viv_cf_damping_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(viv_cf_damping_deck PROPERTIES LABELS "fortran;integration;dynamic;viv;driver") + # Amplitude-dependent VIV coefficients on a deck (VIV AMPLITUDE section), both line kinds: the # identity table, the amplitude channel against the response, self-limiting, drag amplification # and the refusals. diff --git a/doc/capabilities.rst b/doc/capabilities.rst index d52124bb..7bcb038e 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -165,6 +165,13 @@ Line and constitutive capability - Standalone and coupled - a diameter of the VIV model apart from the hydrodynamic one, for buoyancy-module zones and other sections shedding at a larger outer diameter (:ref:`theory-viv-diameter`) + * - Cross-flow damping (``VIV DAMPING`` section ``a``, ``b``, ``c``) + - Standalone and coupled + - the drag split into its in-line and cross-flow parts about the ambient flow, the + cross-flow part ``C_dy = a + b y0/D`` of Thorsen et al. (2016) read at the amplitude + estimate plus a Morison-form term ``c``; ``0 0 1`` keeps Morison's drag and lets the + ``VIV AMPLITUDE`` drag factor act on the in-line part alone; finite-EI cables + (:ref:`theory-viv-cf-damping`) Loads and environment --------------------- diff --git a/doc/driver_format.md b/doc/driver_format.md index 53d5289c..538fb973 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -133,8 +133,8 @@ except that `SYROPE IC` must come **after** `LINES`, because its rows name lines exist. A conventional layout is: LINE TYPES → BODIES → EXTERNAL LOADS → ROD TYPES → RODS → POINTS → TURBINES → LINES → SYROPE IC → -SECTIONS → END CONNECTIONS / EQUIVALENT BUOYANCY / ATTACHMENTS / STIFFENERS / VIV / FAILURE / -CONTROL → OPTIONS → OUTPUTS +SECTIONS → END CONNECTIONS / EQUIVALENT BUOYANCY / ATTACHMENTS / STIFFENERS / VIV / WAKE OSCILLATOR / +VIV AMPLITUDE / VIV DIAMETER / VIV DAMPING / FAILURE / CONTROL → OPTIONS → OUTPUTS Within LINE TYPES, the header row must precede the data rows because it selects their column order. @@ -211,6 +211,10 @@ are collapsed. It must match one of the spellings below; any other name fails wi | ATTACHMENTS | `ATTACHMENTS`, `LINE ATTACHMENTS`, `CLUMPS` | | STIFFENERS | `STIFFENERS`, `STIFFENER`, `BEND STIFFENERS`, `BEND STIFFENER` | | VIV | `VIV`, `VORTEX-INDUCED VIBRATION`, `VORTEX INDUCED VIBRATION` | +| WAKE OSCILLATOR | `WAKE OSCILLATOR`, `WAKE OSCILLATORS`, `WAKE` | +| VIV AMPLITUDE | `VIV AMPLITUDE`, `VIV AMPLITUDES` | +| VIV DIAMETER | `VIV DIAMETER`, `VIV DIAMETERS` | +| VIV DAMPING | `VIV DAMPING` | | FAILURE | `FAILURE`, `FAILURES` | | CONTROL | `CONTROL`, `CONTROLS` | | TURBINES | `TURBINES`, `TURBINE` | @@ -299,8 +303,9 @@ the half-range and centre of its band in non-dimensional frequency (MoorDyn's `d finite-EI cables (see [Cross-flow VIV](theory.rst)). The in-line force of a type is a [VIV](#viv-optional) section row; a [WAKE OSCILLATOR](#wake-oscillator-optional) row replaces the lift by a wake oscillator, a [VIV AMPLITUDE](#viv-amplitude-optional) table makes `Cl` (and -`Cd`) depend on the cross-flow amplitude, and a [VIV DIAMETER](#viv-diameter-optional) row gives -the VIV a diameter of its own. +`Cd`) depend on the cross-flow amplitude, a [VIV DIAMETER](#viv-diameter-optional) row gives +the VIV a diameter of its own, and a [VIV DAMPING](#viv-damping-optional-finite-ei-lines) row splits +the drag into an in-line and a cross-flow part with its own law. **Viscoelastic axial stiffness (MoorDyn `ElasticMod`).** The EA and BA columns accept bar-separated parts: @@ -1324,6 +1329,49 @@ Behaviour: finite-EI cables, standalone and coupled. A row fails if it is not `TypeName Dviv`, names an undefined or already named type or one without VIV, or holds a value out of range. +### VIV DAMPING (optional, finite-EI lines) + +Splits the normal Morison drag of a line type into an in-line and a cross-flow part in the frame +of the ambient flow, and gives the cross-flow part its own law: the quadratic damping of +Thorsen et al. (2016) and, optionally, a Morison-form term (see +[Cross-flow damping](theory.rst)). + +```text +--------------------- VIV DAMPING -------------------------------------- +TypeName a b c +(-) (-) (-) (-) +riser 0 0 1 +``` + +| Column | Meaning | +|--------|---------| +| `TypeName` | an existing LINE TYPES name (case-insensitive) with a [VIV AMPLITUDE](#viv-amplitude-optional) table, at most one row each | +| `a`, `b` | the cross-flow damping coefficient `C_dy = a + b y0/D` >= 0, `y0/D` the type's amplitude estimate; Thorsen et al. (2016, Eq. 1) give `0.31 0.89` | +| `c` | optional factor >= 0 of a Morison-form cross-flow term `c Cdn \|w\| w_y`, `Cdn` the type's own (unamplified) normal drag coefficient (default 0) | + +Behaviour: + +- At each point of the line, with `e_x` along the ambient flow normal to the line and `e_y` + across it, the relative normal velocity `w` splits into `w_x` and `w_y`. The normal drag per + unit length becomes `1/2 rho D [Cdn CdAmp |w| w_x e_x + (C_dy |w_y| + c Cdn |w|) w_y e_y]`: + Morison's in-line part, with the drag factor `CdAmp` of the type's amplitude table, and the + cross-flow law of the row. Where the ambient normal flow falls below 0.01 m/s the axes are + undefined and the drag blends smoothly back to Morison's. +- **`0 0 1` amplifies the in-line drag alone.** With an amplitude table's `CdAmp` (for example + Chaplin et al. 2005, Eq. 4), the mean in-line drag of a vibrating cable rises while its + cross-flow drag stays Morison's. A `CdAmp` without this row multiplies the whole normal drag, + the cross-flow damping included. +- **`0.31 0.89` is the published cross-flow-only model** of Thorsen et al. (2016), fitted to + still-water decay tests for `y0/D` up to about 0.6. It removes the linear part of Morison's + cross-flow damping (`1/2 rho D Cdn U y'`), so use it without in-line VIV: with a `VIV` section + row the in-line force turns with the relative flow and can drive a low-frequency cross-flow + motion that nothing damps. +- `0 0 1` with `CdAmp` 1 is Morison's drag (to round-off). The split acts in the dynamics; the + static solve keeps Morison's drag, which is the same at rest. `DragPow` reports the split drag. +- Finite-EI cables only, standalone and coupled; an `EI = 0` line with the row is refused by name. + A row fails if it is not `TypeName a b [c]`, names an undefined or already named type or one + without an amplitude table, or holds a value out of range. + ### FAILURE (optional, EI = 0 decks) A FAILURE row detaches line ends from a point during a dynamic run, with MoorDyn's trigger rules. diff --git a/doc/theory.rst b/doc/theory.rst index d3c09616..19c6a685 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1360,6 +1360,47 @@ alike; an uncoupled wake oscillator (:math:`A` = 0) drives the cable at 0.149 Hz :math:`\mathrm{St}\,U/D_v` = 0.15 Hz; and :math:`D_v` equal to ``Diam`` is the line without the row, bit for bit. +.. _theory-viv-cf-damping: + +Cross-flow damping +~~~~~~~~~~~~~~~~~~ + +A ``VIV DAMPING`` row splits the normal Morison drag of a finite-EI line type in the frame of the +ambient flow. With :math:`\mathbf t` the tangent, :math:`\mathbf u_n` the ambient flow normal to +it, :math:`\mathbf e_x = \mathbf u_n/|\mathbf u_n|` and :math:`\mathbf e_y = \mathbf t\times\mathbf e_x`, +the relative normal velocity :math:`\mathbf w` splits into :math:`w_x` and :math:`w_y`, and + +.. math:: + + \mathbf f_n = \tfrac12\rho D\left[C_{dn}A_d\,|\mathbf w|\,w_x\,\mathbf e_x + + \left(C_{dy}|w_y| + c\,C_{dn}|\mathbf w|\right)w_y\,\mathbf e_y\right],\qquad + C_{dy} = a + b\,\frac{y_0^*}{D}, + +with :math:`A_d` the drag factor of the type's amplitude table and :math:`y_0^*` its amplitude +estimate (:ref:`theory-viv-amplitude`). The quadratic term is the cross-flow hydrodynamic damping of +:ref:`Thorsen et al. (2016) ` (their Eq. 1, :math:`a = 0.31`, :math:`b = 0.89` +from the still-water decay tests of Vikestad et al. 2000, valid for :math:`y_0/D` up to about +0.6). The :math:`c` term is Morison's own cross-flow drag. Where :math:`|\mathbf u_n|` falls below +:math:`u_{ref} = 0.01` m/s the axes are undefined, and :math:`\mathbf f_n` blends to Morison's as +:math:`\beta\,\mathbf f_s + (1-\beta)\,\mathbf f_M` with :math:`\beta = U^2/(U^2 + u_{ref}^2)`. +The force and its Jacobians in the relative velocity and in the tangent are exact, and the +tangential drag is unchanged. + +The row serves two uses: + +- With :math:`(0, 0, 1)` and the drag factor of :ref:`Chaplin et al. (2005) `, + the amplification acts on the mean in-line drag alone, as measured, while the cross-flow drag + stays Morison's. +- :math:`(0.31, 0.89, 0)` is Thorsen's cross-flow model. It drops the linear part + :math:`\tfrac12\rho D C_{dn}U\dot y` of Morison's cross-flow damping, so it is consistent with + cross-flow VIV alone. An in-line force that turns with the relative flow can then drive an + undamped low-frequency cross-flow motion. + +On the taut gate line, :math:`(0, 0, 1)` with factor 1 is the line without the row to round-off; +with :math:`C_v = 0` and factor 2 the line settles at the static in-line offset of ``Cd`` 2.4 to the +printed digits; Thorsen's form raises the steady cross-flow amplitude from :math:`A/D` 0.68 to 1.02; +and the drag, damping and VIV powers balance within 0.2 %. + .. _theory-dry-buoyancy: Buoyancy and wetting diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index bc61f0d8..4e28bdb3 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -236,6 +236,12 @@ class LineType: length, 2 to 32 of them in increasing amplitude ratio ``AD``: ``Cv`` replaces ``cl`` at that amplitude (so ``cl`` must be set) and ``CdAmp`` multiplies the normal drag coefficient ``cdn`` (1 when left out). + viv_damping : tuple[float, float] | tuple[float, float, float] | None + Optional ``VIV DAMPING`` row ``(a, b[, c])``: the cross-flow damping + ``C_dy = a + b y0/D`` of Thorsen et al. (2016) in place of the cross-flow part of the + type's Morison drag, plus a Morison-form term ``c Cdn |w| w_y``; ``(0.31, 0.89)`` is + their published fit, ``(0, 0, 1)`` amplifies the in-line drag alone (with a + ``viv_amplitude`` drag factor). Needs ``viv_amplitude``. viv_diameter : float | None Optional diameter of the type's VIV model, a ``VIV DIAMETER`` section row ``Name Dviv``: the shedding frequency, the VIV forces and the amplitude @@ -269,6 +275,7 @@ class LineType: wake_a: float | None = None viv_amplitude: list[tuple[float, ...]] | None = None viv_diameter: float | None = None + viv_damping: tuple[float, ...] | None = None @dataclass(eq=False) @@ -1694,6 +1701,7 @@ def add_line_type( wake_a: float | None = None, viv_amplitude: list[tuple[float, ...]] | None = None, viv_diameter: float | None = None, + viv_damping: tuple[float, ...] | None = None, ) -> LineType: """Add a ``LINE TYPES`` row; see :class:`LineType` for the fields. @@ -1736,6 +1744,7 @@ def add_line_type( wake_a, None if viv_amplitude is None else [tuple(row) for row in viv_amplitude], viv_diameter, + None if viv_damping is None else tuple(viv_damping), ) self._line_types.append(item) return item @@ -2630,6 +2639,7 @@ def to_text(self, *, validate: bool = True) -> str: _emit(out, "WAKE OSCILLATOR", *self._wake_table()) _emit(out, "VIV AMPLITUDE", *self._viv_amp_table()) _emit(out, "VIV DIAMETER", *self._viv_diam_table()) + _emit(out, "VIV DAMPING", *self._viv_damp_table()) _emit(out, "FAILURE", *self._failure_table()) _emit(out, "CONTROL", *self._control_table()) _emit(out, "EXTERNAL LOADS", *self._external_load_table()) @@ -3050,6 +3060,19 @@ def _viv_amp_table(self) -> tuple[str, str, list[list[str]]]: rows.append([_text(item.name, what), *(_num(value, what) for value in row)]) return "Name AD Cv CdAmp", "(-) (-) (-) (-)", rows + def _viv_damp_table(self) -> tuple[str, str, list[list[str]]]: + rows: list[list[str]] = [] + for item in self._line_types: + if item.viv_damping is None: + continue + what = f"line type {item.name!r}" + if len(item.viv_damping) not in (2, 3): + raise ValueError(f"{what}: viv_damping is (a, b) or (a, b, c)") + if item.viv_amplitude is None: + raise ValueError(f"{what}: viv_damping takes its amplitude from viv_amplitude") + rows.append([_text(item.name, what)] + [_num(v, what) for v in item.viv_damping]) + return "Name a b c", "(-) (-) (-) (-)", rows + def _viv_diam_table(self) -> tuple[str, str, list[list[str]]]: rows: list[list[str]] = [] for item in self._line_types: @@ -3280,6 +3303,9 @@ def load(self) -> None: if item.viv_amplitude is None: item.viv_amplitude = [] item.viv_amplitude.append(tuple(_f(token) for token in t[1:])) + for row in self.rows("VIV DAMPING"): + t = row.tokens + model.line_types[t[0]].viv_damping = tuple(_f(v) for v in t[1:]) for row in self.rows("VIV DIAMETER"): t = row.tokens model.line_types[t[0]].viv_diameter = _f(t[1]) diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index b01fe0f6..2e0aaa08 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -86,6 +86,7 @@ "VIV AMPLITUDES": "VIV AMPLITUDE", "VIV DIAMETER": "VIV DIAMETER", "VIV DIAMETERS": "VIV DIAMETER", + "VIV DAMPING": "VIV DAMPING", } # Table sections whose rows the native reader takes through a Fortran # list-directed READ. Their descriptive and units rows are recognized by the @@ -118,6 +119,7 @@ "WAKE OSCILLATOR", "VIV AMPLITUDE", "VIV DIAMETER", + "VIV DAMPING", } ) _TABLE_SECTIONS = _LIST_DIRECTED_SECTIONS | _WHITESPACE_TABLE_SECTIONS @@ -3382,6 +3384,45 @@ def _check_viv_diam_section(self, viv_type_names: set[str]) -> None: "VIV: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row" ) + def _check_viv_damp_section(self, amp_type_names: set[str]) -> set[str]: + """Native ``apply_type_viv_damp`` for the VIV DAMPING section; the types it names. + + A row ``TypeName a b [c]`` gives a line type the cross-flow hydrodynamic damping + ``C_dy = a + b y0/D`` of Thorsen et al. (2016) in place of the cross-flow part of its + Morison drag, plus a Morison-form term ``c Cdn |w| w_y`` (default 0); ``a, b, c >= 0``, + each at most 1e15. ``y0`` is the amplitude estimate of the type's VIV AMPLITUDE table, + so the type needs one. A type takes one row. + """ + types = {row.tokens[0].lower(): row.tokens[0] for row in self.line_types} + named: set[str] = set() + for row in self._rows("VIV DAMPING"): + where = self._at(row) + if len(row.tokens) not in (3, 4): + raise DeckFormatError(f"{where}: VIV DAMPING rows must be: TypeName a b [c]") + name = row.tokens[0].lower() + if name not in types: + raise DeckFormatError( + f'{where}: VIV DAMPING row names undefined LINE TYPE "{row.tokens[0]}"' + ) + if name in named: + raise DeckFormatError(f'{where}: VIV DAMPING names LINE TYPE "{types[name]}" twice') + try: + values = [_native_float(token) for token in row.tokens[1:]] + except ValueError as exc: + raise DeckFormatError( + f"{where}: VIV DAMPING a, b and c must be plain numbers" + ) from exc + if not all(math.isfinite(v) and 0.0 <= v <= _NATIVE_MAX_COEFFICIENT for v in values): + raise DeckFormatError(f"{where}: VIV DAMPING needs a, b and c >= 0, at most 1e15") + if name not in amp_type_names: + raise DeckFormatError( + f'{where}: VIV DAMPING of LINE TYPE "{types[name]}" takes the amplitude ' + "estimate of its VIV AMPLITUDE table: give the type Cl > 0 and a VIV " + "AMPLITUDE table" + ) + named.add(name) + return named + def _check_viv_amp_section(self, lift_type_names: set[str]) -> set[str]: """Native ``apply_type_viv_amp`` for the VIV AMPLITUDE section; the types with a table. @@ -4637,15 +4678,21 @@ def end_key(token: str) -> str: wake_type_names = self._check_wake_section(viv_type_names) amp_type_names = self._check_viv_amp_section(viv_type_names) self._check_viv_diam_section(viv_type_names | wake_type_names) + damp_type_names = self._check_viv_damp_section(amp_type_names) amp_lines = { line_id 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 acts - # on finite-EI cables only, and a cable takes one VIV model + # 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 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: + raise DeckFormatError( + f"{self._label}: line {line_id}: the cross-flow damping (VIV DAMPING " + "section) acts on finite-EI cables (EI > 0) only" + ) if not types_used & wake_type_names: continue if line_id not in finite_line_ids: diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index 520d3be8..99e82805 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -294,6 +294,29 @@ def test_viv_diameter_rows_are_written(tmp_path: Path) -> None: model.to_text(validate=False) +def test_viv_damping_rows_are_written(tmp_path: Path) -> None: + model = _chain_model(tmp_path) + model.add_line_type( + "riser", + diam=0.1, + mass=10.0, + ea=5.0e7, + cl=0.8, + viv_amplitude=[(0.0, 0.8, 1.0), (1.0, 0.4, 2.0)], + viv_damping=(0.0, 0.0, 1.0), + ) + deck = DeckFile.from_text(model.to_text(validate=False), path=tmp_path / "deck.dat") + rows = [row.tokens for row in deck._rows("VIV DAMPING")] + assert rows == [("riser", "0.0", "0.0", "1.0")] + model.line_types["riser"].viv_damping = (0.31,) + with pytest.raises(ValueError, match=r"viv_damping is \(a, b\) or \(a, b, c\)"): + model.to_text(validate=False) + model.line_types["riser"].viv_damping = (0.31, 0.89) + model.line_types["riser"].viv_amplitude = None + with pytest.raises(ValueError, match="takes its amplitude from viv_amplitude"): + model.to_text(validate=False) + + def test_build_spread_mooring_with_multi_section_lines() -> None: import math diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index b0d2bfd6..4399e9c3 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -4991,6 +4991,58 @@ def test_viv_diameter_takes_a_wake_oscillator_type(): DeckFile.from_text(_with_section(text, "VIV DIAMETER", "chain 0.9")) +_DAMP_BASE = _with_section( + _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")), + "VIV AMPLITUDE", + "chain 0.0 0.8", + "chain 1.0 0.4", +) + + +@pytest.mark.parametrize( + "rows, expected", + [ + (("chain 0.31 0.89",), (0.31, 0.89)), + (("TypeName a b c", "chain 0 0 1"), (0.0, 0.0, 1.0)), + ], +) +def test_viv_damping_rows_are_read_and_kept(tmp_path, rows, expected): + from cabledyn import DeckModel + + text = _with_section(_DAMP_BASE, "VIV DAMPING", *rows) + DeckFile.from_text(text) + path = tmp_path / "damp.dat" + path.write_text(text, encoding="utf-8") + assert DeckModel.load(path).line_types["chain"].viv_damping == expected + saved = tmp_path / "saved.dat" + DeckModel.load(path).save(saved) + assert DeckModel.load(saved).line_types["chain"].viv_damping == expected + + +@pytest.mark.parametrize( + "base, rows, message", + [ + (None, ("chain 0.31",), "rows must be: TypeName a b [c]"), + (None, ("chain 0.31 0.89 0.0 1.0",), "rows must be: TypeName a b [c]"), + (None, ("chain 0.31 x",), "a, b and c must be plain numbers"), + (None, ("cable 0.31 0.89",), 'undefined LINE TYPE "cable"'), + (None, ("chain 0.31 0.89", "chain 0 0 1"), 'names LINE TYPE "chain" twice'), + (None, ("chain -0.1 0.89",), "a, b and c >= 0, at most 1e15"), + (None, ("chain 0.31 0.89 -1",), "a, b and c >= 0, at most 1e15"), + ("no-table", ("chain 0.31 0.89",), "give the type Cl > 0 and a VIV AMPLITUDE table"), + ("ei0", ("chain 0.31 0.89",), "acts on finite-EI cables (EI > 0) only"), + ], +) +def test_viv_damping_rows_follow_the_native_checks(base, rows, message): + text = _DAMP_BASE + if base == "no-table": + text = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) + elif base == "ei0": + 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, "VIV DAMPING", *rows)) + + def test_viv_amplitude_channel_needs_a_table(): text = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) text = _edit(text, ("FairTen1\n", "FairTen1\nVIVAmp1N2\n")) diff --git a/python/tests/test_end_to_end.py b/python/tests/test_end_to_end.py index bc9f5183..496f4be9 100644 --- a/python/tests/test_end_to_end.py +++ b/python/tests/test_end_to_end.py @@ -345,6 +345,34 @@ def _dia_rows(*rows: str) -> tuple[str, str]: _AMP_PARITY += _DIA_PARITY +def _damp_rows(*rows: str) -> tuple[str, str]: + """The edit that puts a VIV DAMPING section with ``rows`` before OPTIONS.""" + block = "--------------------- VIV DAMPING -----\n" + "".join(f"{row}\n" for row in rows) + return _AMP_OPTIONS, block + _AMP_OPTIONS + + +_DAMP_TABLE = _amp_table("riser 0.0 0.8 1.0", "riser 0.5 0.4 1.5") +_DAMP_PARITY = [ + ("damp-accepted", [_DAMP_TABLE, _damp_rows("riser 0.31 0.89")], True), + ("damp-inline-only", [_DAMP_TABLE, _damp_rows("riser 0 0 1")], True), + ("damp-no-table", [_damp_rows("riser 0.31 0.89")], False), + ("damp-negative", [_DAMP_TABLE, _damp_rows("riser 0.31 -0.89")], False), + ("damp-one-value", [_DAMP_TABLE, _damp_rows("riser 0.31")], False), + ("damp-repeated", [_DAMP_TABLE, _damp_rows("riser 0.31 0.89", "riser 0 0 1")], False), + ( + "damp-ei0-line", + [ + ("-0.8 1.0 1.2", "-0.8 0.0 1.2"), + _DAMP_TABLE, + _damp_rows("riser 0.31 0.89"), + ], + False, + ), +] + +_AMP_PARITY += _DAMP_PARITY + + @pytest.mark.parametrize( ("label", "edits", "accepted"), _AMP_PARITY, ids=[item[0] for item in _AMP_PARITY] ) diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 22053d30..372f8d0a 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -471,6 +471,9 @@ MODULE CableDyn_DeckDriver ! Dviv): 0 takes the type's Diam; has_vivd_row marks a type the section names. REAL(wp) :: viv_dv = CD_ZERO LOGICAL :: has_vivd_row = .FALSE. + ! The cross-flow hydrodynamic damping of Thorsen et al. (2016) (the optional VIV DAMPING section, + ! a row per type: TypeName a b [c]), C_dy = a + b y0/D; cdy_a < 0 without a row. + REAL(wp) :: cdy_a = -1.0_wp, cdy_b = CD_ZERO, cdy_c = CD_ZERO ! Deck file line of the row (0 when not read from a file), for error messages. INTEGER :: deck_line = 0 END TYPE @@ -1904,7 +1907,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(wp), ALLOCATABLE :: q_sequence(:) REAL(wp), ALLOCATABLE :: curv(:), cdn(:), cdt(:), can(:), cat(:), catenary_pos(:) REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:), viv_hh(:) - REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :), viv_dva(:) + REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :), viv_dva(:), cdy_a(:), cdy_b(:), cdy_c(:) INTEGER, ALLOCATABLE :: viv_ampn(:) REAL(wp), ALLOCATABLE :: wo_cl0(:), wo_st(:), wo_eps(:), wo_a(:) REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:) @@ -3311,9 +3314,14 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL viv_amp_type_index(ln, sections, types, viv_tix) ALLOCATE (viv_dva(SIZE(l0))) CALL finite_viv_diameters(ln, sections, types, viv_dva) + ALLOCATE (cdy_a(SIZE(l0)), cdy_b(SIZE(l0)), cdy_c(SIZE(l0))) + CALL finite_viv_cdy(ln, sections, types, cdy_a, cdy_b, cdy_c) IF (SIZE(l0_am) /= SIZE(l0)) THEN CALL remap_elem_by_reference_arc(viv_tix, l0, l0_am) CALL remap_elem_by_reference_arc(viv_dva, l0, l0_am) + CALL remap_elem_by_reference_arc(cdy_a, l0, l0_am) + CALL remap_elem_by_reference_arc(cdy_b, l0, l0_am) + CALL remap_elem_by_reference_arc(cdy_c, l0, l0_am) CALL remap_elem_by_reference_arc(wo_cl0, l0, l0_am) CALL remap_elem_by_reference_arc(wo_st, l0, l0_am) CALL remap_elem_by_reference_arc(wo_eps, l0, l0_am) @@ -3659,14 +3667,16 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(CD_VIV_NM, wp)*MERGE(opts%dtM, dt, opts%has_dtm), & opts%viv_rms_window > CD_ZERO), 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, dviv=viv_dva) + chh=viv_hh, amp=viv_amp3, amp_n=viv_ampn, dviv=viv_dva, & + cdy=RESHAPE([cdy_a, cdy_b, cdy_c], [3, SIZE(cdy_a)], ORDER=[2, 1])) 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, phase_seed=seed, & tangent_reversed=.NOT. ln%ends_swapped, amp=viv_amp3, amp_n=viv_ampn, & - dviv=viv_dva) + dviv=viv_dva, & + cdy=RESHAPE([cdy_a, cdy_b, cdy_c], [3, SIZE(cdy_a)], ORDER=[2, 1])) END IF END BLOCK IF (es /= CD_HCDYN_OK) THEN @@ -10534,6 +10544,10 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er 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 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 '// & + 'DAMPING section) acts on finite-EI cables (EI > 0) only'); RETURN + END IF viv_cf(e) = types(line_section_type(sections, ln%id, i))%viv_cf viv_df(e) = types(line_section_type(sections, ln%id, i))%viv_df viv_clx(e) = types(line_section_type(sections, ln%id, i))%clx @@ -11744,6 +11758,29 @@ SUBROUTINE viv_amp_type_index(ln, sections, types, tix) tix = tix(SIZE(tix):1:-1) END SUBROUTINE viv_amp_type_index + SUBROUTINE finite_viv_cdy(ln, sections, types, ca, cb, cc) + !! The VIV DAMPING (a, b, c) of every element's line type (a = -1 where the type has none), in the + !! element order of finite_hydro_arrays (the deck order reversed). + TYPE(DeckLine), INTENT(IN) :: ln + TYPE(DeckSection), INTENT(IN) :: sections(:) + TYPE(DeckLineType), INTENT(IN) :: types(:) + REAL(wp), INTENT(OUT) :: ca(:), cb(:), cc(:) + INTEGER :: i, j, e + e = 0 + DO i = 1, SIZE(sections) + IF (sections(i)%line_id /= ln%id) CYCLE + DO j = 1, sections(i)%nsegs + e = e + 1 + ca(e) = types(sections(i)%ltype)%cdy_a + cb(e) = types(sections(i)%ltype)%cdy_b + cc(e) = types(sections(i)%ltype)%cdy_c + END DO + END DO + ca = ca(SIZE(ca):1:-1) + cb = cb(SIZE(cb):1:-1) + cc = cc(SIZE(cc):1:-1) + END SUBROUTINE finite_viv_cdy + SUBROUTINE finite_viv_diameters(ln, sections, types, dv) !! The VIV DIAMETER of every element's line type (0 where the type has none, the drag diameter !! then), in the element order of finite_hydro_arrays (the deck order reversed). @@ -13920,6 +13957,9 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti INTEGER, ALLOCATABLE :: vamp_lines(:) INTEGER :: n_vamp CHARACTER(DECK_RECLEN), ALLOCATABLE :: vdia_rows(:) + CHARACTER(DECK_RECLEN), ALLOCATABLE :: vdmp_rows(:) + INTEGER, ALLOCATABLE :: vdmp_lines(:) + INTEGER :: n_vdmp INTEGER, ALLOCATABLE :: vdia_lines(:) INTEGER :: n_vdia CHARACTER(2*NAMELEN), ALLOCATABLE :: channel_keys(:) @@ -13939,7 +13979,8 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti SEC_SECTIONS = 5, SEC_OPTIONS = 6, SEC_OUTPUTS = 7, SEC_RODTYPES = 8, SEC_RODS = 9, & SEC_EQUIV = 10, SEC_FAILURE = 11, SEC_CONTROL = 12, SEC_SYROPE_IC = 13, & SEC_ENDCONN = 14, SEC_TURBINES = 15, SEC_EXTLOADS = 16, SEC_ATTACH = 17, & - SEC_STIFF = 18, SEC_VIV = 19, SEC_WAKE = 20, SEC_VIVAMP = 21, SEC_VIVDIA = 22 + SEC_STIFF = 18, SEC_VIV = 19, SEC_WAKE = 20, SEC_VIVAMP = 21, SEC_VIVDIA = 22, & + SEC_VIVDAMP = 23 ErrStat = 0; ErrMsg = '' ext_march = .FALSE. @@ -13967,6 +14008,8 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti ALLOCATE (vamp_rows(0), vamp_lines(0)) n_vamp = 0 ALLOCATE (vdia_rows(0), vdia_lines(0)) + ALLOCATE (vdmp_rows(0), vdmp_lines(0)) + n_vdmp = 0 n_vdia = 0 n_wake = 0 nt = 0; nb = 0; nrt = 0; nr = 0; np = 0; nlin = 0; nsec = 0; neq = 0; nch = 0; nfl = 0; nct = 0; nec = 0 @@ -14121,6 +14164,15 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti END IF vamp_rows(n_vamp) = line(1:MIN(LEN(line), DECK_RECLEN)) vamp_lines(n_vamp) = lineno + CASE (SEC_VIVDAMP) + IF (.NOT. has_numeric_token(line)) CYCLE + n_vdmp = n_vdmp + 1 + IF (n_vdmp > SIZE(vdmp_rows)) THEN + vdmp_rows = [vdmp_rows, [(REPEAT(' ', DECK_RECLEN), i_ch=1, 8)]] + vdmp_lines = [vdmp_lines, [(0, i_ch=1, 8)]] + END IF + vdmp_rows(n_vdmp) = line(1:MIN(LEN(line), DECK_RECLEN)) + vdmp_lines(n_vdmp) = lineno CASE (SEC_VIVDIA) IF (.NOT. has_numeric_token(line)) CYCLE n_vdia = n_vdia + 1 @@ -14255,6 +14307,13 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti RETURN END IF END DO + DO i_ch = 1, n_vdmp + CALL apply_type_viv_damp(vdmp_rows(i_ch), types, ErrStat, ErrMsg) + IF (ErrStat /= 0) THEN + CALL add_row_context('deck', vdmp_lines(i_ch), vdmp_rows(i_ch), ErrMsg) + RETURN + END IF + END DO DO i_ch = 1, SIZE(types) IF (types(i_ch)%amp_n == 1) THEN CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE gives LINE TYPE "'//TRIM(types(i_ch)%name)//'" one row: a '// & @@ -15933,6 +15992,8 @@ SUBROUTINE set_section(secname, section, ErrStat, ErrMsg) section = 21 CASE ('VIV DIAMETER', 'VIV DIAMETERS') section = 22 + CASE ('VIV DAMPING') + section = 23 CASE ('WAKE OSCILLATOR', 'WAKE OSCILLATORS', 'WAKE') section = 20 CASE DEFAULT @@ -17662,6 +17723,56 @@ SUBROUTINE apply_type_viv_amp(row, types, ErrStat, ErrMsg) types(it)%amp_tab(:, n + 1) = v END SUBROUTINE apply_type_viv_amp + SUBROUTINE apply_type_viv_damp(row, types, ErrStat, ErrMsg) + !! One VIV DAMPING row: TypeName a b [c] -- the cross-flow hydrodynamic damping of a line type, + !! C_dy = a + b y0/D (Thorsen et al. 2016, Eq. 1: a = 0.31 and b = 0.89, their fit to the + !! still-water decays of Vikestad et al. 2000), which replaces the cross-flow part of the type's + !! Morison drag while the in-line part stays. y0 is the amplitude estimate of the type's VIV + !! AMPLITUDE table, so the type needs one (and so the synchronisation lift, Cl > 0). c adds a + !! Morison-form cross-flow term c Cdn |w| w_y (default 0): (0, 0, 1) amplifies the in-line drag + !! alone. a, b, c >= 0, at most 1e15. A type takes one row. + CHARACTER(*), INTENT(IN) :: row + TYPE(DeckLineType), INTENT(INOUT) :: types(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + CHARACTER(DECK_RECLEN) :: tok + INTEGER :: it, n, k + REAL(wp) :: v(3) + LOGICAL :: found, ok + + ErrStat = 0; ErrMsg = '' + n = count_tokens(row) + IF (n < 3 .OR. n > 4) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DAMPING rows must be: TypeName a b [c]'); RETURN + END IF + CALL get_token(row, 1, tok, found) + it = find_type(types, TRIM(tok)) + IF (it == 0) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DAMPING row names undefined LINE TYPE "'//TRIM(tok)//'"'); RETURN + END IF + IF (types(it)%cdy_a >= CD_ZERO) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DAMPING names LINE TYPE "'//TRIM(types(it)%name)//'" twice'); RETURN + END IF + v = CD_ZERO + DO k = 2, n + CALL get_token(row, k, tok, found) + CALL parse_real_token(tok, v(k - 1), ok) + IF (.NOT. ok) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DAMPING a, b and c must be plain numbers'); RETURN + END IF + END DO + IF (.NOT. (ALL(IEEE_IS_FINITE(v)) .AND. ALL(v >= CD_ZERO) .AND. ALL(v <= MAX_COEFFICIENT))) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DAMPING needs a, b and c >= 0, at most 1e15'); RETURN + END IF + IF (.NOT. (types(it)%cl > CD_ZERO) .OR. types(it)%amp_n <= 0) THEN + CALL fail(ErrStat, ErrMsg, 'VIV DAMPING of LINE TYPE "'//TRIM(types(it)%name)//'" takes the amplitude '// & + 'estimate of its VIV AMPLITUDE table: give the type Cl > 0 and a VIV AMPLITUDE table'); RETURN + END IF + types(it)%cdy_a = v(1) + types(it)%cdy_b = v(2) + types(it)%cdy_c = v(3) + END SUBROUTINE apply_type_viv_damp + SUBROUTINE apply_type_viv_diam(row, types, ErrStat, ErrMsg) !! One VIV DIAMETER row: TypeName Dviv -- the diameter of a line type's VIV model, Dviv > 0 (at !! most 1e15), which the shedding frequency, the lift and in-line forces and the amplitude ratio diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 8ebf5cc7..68c153a5 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -71,6 +71,7 @@ MODULE CableDyn_HermiteCableDynamic CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, CD_VIV_Check_Amp_Table, & CD_VIV_Ambient_Crossflow_Rate USE CableDyn_Hydro, ONLY: CD_Morison_Drag_Per_Length_Jac, CD_Airy_Wave_Kinematics_Precomputed, & + CD_Morison_Drag_Split_Per_Length_Jac, & CD_Component_Wave_Kinematics, CD_Solve_Dispersion_Wavenumber, CD_HYDRO_OK USE CableDyn_SeabedContact, ONLY: CD_Seabed_Normal_Law, CD_Seabed_Contact_Gate, CD_SEABED_CONTACT_BLEND, & CD_Seabed_Friction_Stick_Slip, CD_Seabed_Friction_Aniso, & @@ -163,6 +164,9 @@ MODULE CableDyn_HermiteCableDynamic PUBLIC :: CD_HermiteCable_Dyn_Reset_Profile, CD_HermiteCable_Dyn_Disable_Profile, & CD_HermiteCable_Dyn_Get_Profile, CD_HermiteCable_Dyn_Get_Assembly_Profile PUBLIC :: CD_HermiteCable_Dyn_Profile_Enabled + ! Ambient normal flow speed [m/s] below which the split cross-flow drag blends to Morison's + ! (CD_Morison_Drag_Split_Per_Length_Jac u_ref): its axes are undefined in still water. + REAL(wp), PARAMETER, PUBLIC :: CD_HCDYN_CDY_UREF = 0.01_wp INTEGER, PARAMETER, PUBLIC :: CD_HCDYN_OK = 0, CD_HCDYN_BADINPUT = 1, CD_HCDYN_NOCONVERGE = 2 INTEGER, PARAMETER, PUBLIC :: CD_HCDYN_TENSILE_OFF = 0 INTEGER, PARAMETER, PUBLIC :: CD_HCDYN_TENSILE_WARN = 1 @@ -369,6 +373,12 @@ MODULE CableDyn_HermiteCableDynamic ! frequency, lift scale and amplitude ratio take viv_dv(e) where it is positive, the drag ! diameter diam(e) elsewhere and when it is unallocated (viv_diam). REAL(wp), ALLOCATABLE :: viv_dv(:) + ! Cross-flow hydrodynamic damping of Thorsen et al. (2016) (Set_VIV cdy; VIV DAMPING section): + ! viv_cdy(:, e) = (a, b, c), the element's normal drag split into Morison in line and the + ! cross-flow damping 1/2 rho D [C_dy |w_y| + c Cdn |w|] w_y, C_dy = a + b y0/D, across the ambient + ! flow (elem_cdy, elem_cdy_lin; c Cdn with the element's unamplified Cdn); a < 0, or the array + ! unallocated, keeps the element's Morison drag. + REAL(wp), ALLOCATABLE :: viv_cdy(:, :) REAL(wp), ALLOCATABLE :: Mgb(:, :) ! constant global mass (band) LOGICAL, ALLOCATABLE :: freemask(:), solve_mask(:) INTEGER, ALLOCATABLE :: fmap(:) ! free -> global DOF index @@ -1127,7 +1137,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial(model, mu_axial, ErrStat, ErrM END SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg, phase_seed, tangent_reversed, & - clx, il_alpha, chh, wake, amp, amp_n, dviv) + clx, il_alpha, chh, wake, amp, amp_n, dviv, cdy) !! 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 @@ -1167,6 +1177,14 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! dviv (optional), per element, the diameter of the VIV model (> 0), which the shedding !! frequency, the lift and in-line scales and the amplitude ratio take in place of the drag !! diameter (0: the drag diameter, also after a later Set_Drag). + !! + !! cdy (optional, (2 or 3, ne)), per element (a, b[, c]) of the cross-flow hydrodynamic damping of + !! Thorsen et al. (2016, Eq. 1), C_dy = a + b y0/D (a < 0: none on that element): the element's + !! normal drag keeps Morison's in-line part (with any amplitude-table drag factor) and takes + !! 1/2 rho D [C_dy |w_y| + c Cdn |w|] w_y across the ambient flow (c = 0 without the third row; + !! CD_Morison_Drag_Split_Per_Length_Jac), y0 the smoothed amplitude estimate, so an element with + !! it needs an amplitude table (amp_n > 0); a, b, c >= 0, finite. (0, 0, 1) amplifies the in-line + !! drag alone and keeps Morison's cross-flow drag. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: cl(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -1181,12 +1199,13 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err REAL(wp), INTENT(IN), OPTIONAL :: amp(:, :, :) INTEGER, INTENT(IN), OPTIONAL :: amp_n(:) REAL(wp), INTENT(IN), OPTIONAL :: dviv(:) + REAL(wp), INTENT(IN), OPTIONAL :: cdy(:, :) INTEGER :: e, k, ne, nn, es, nms REAL(wp) :: wsum, tw_old, rest_old LOGICAL :: had_viv, had_il, want_il, had_wake, want_wake, bad_band, had_amp, want_amp CHARACTER(LEN=1024) :: em REAL(wp), ALLOCATABLE :: p_amp(:, :, :) - REAL(wp), ALLOCATABLE :: p_dv(:) + REAL(wp), ALLOCATABLE :: p_dv(:), p_cdy(:, :) INTEGER, ALLOCATABLE :: p_ampn(:) REAL(wp), ALLOCATABLE :: a_old(:), o_cl(:), o_k(:), o_cf(:), o_df(:), o_dn(:), o_phi(:), o_phi_eval(:), & o_rate(:), o_ms(:, :), o_ms_next(:, :), o_rec_phi(:), o_rec_ms(:, :), & @@ -1329,6 +1348,32 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: dviv must be non-negative (0 = the drag diameter)'; RETURN END IF END IF + IF (PRESENT(cdy)) THEN + IF ((SIZE(cdy, 1) /= 2 .AND. SIZE(cdy, 1) /= 3) .OR. SIZE(cdy, 2) /= ne) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: cdy must have shape (2 or 3, n_elem)'; RETURN + END IF + IF (.NOT. CD_All_Finite(cdy)) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: cdy must be finite'; RETURN + END IF + DO e = 1, ne + IF (cdy(1, e) < CD_ZERO) CYCLE + IF (ANY(cdy(2:, e) < CD_ZERO)) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the cross-flow damping b and c must be non-negative'; RETURN + END IF + IF (.NOT. want_amp) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the cross-flow damping takes its amplitude from an amplitude '// & + 'table (amp, amp_n)'; RETURN + END IF + IF (amp_n(e) <= 0) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: an element with cross-flow damping needs an amplitude table' + RETURN + END IF + END DO + END IF ! the previous configuration and state, kept for a rollback had_viv = model%has_viv had_il = model%has_viv_il @@ -1365,6 +1410,13 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err model%viv_dv = dviv END IF END IF + IF (PRESENT(cdy)) THEN + IF (ANY(cdy(1, :) >= CD_ZERO)) THEN + ALLOCATE (model%viv_cdy(3, ne)) + model%viv_cdy = CD_ZERO + model%viv_cdy(1:SIZE(cdy, 1), :) = cdy + END IF + END IF model%viv_cl = cl model%viv_cf = CD_ZERO model%viv_df = CD_ZERO @@ -1512,6 +1564,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(w_snap, model%snap_wo_s) CALL MOVE_ALLOC(p_amp, model%viv_amp); CALL MOVE_ALLOC(p_ampn, model%viv_amp_n) CALL MOVE_ALLOC(p_dv, model%viv_dv) + CALL MOVE_ALLOC(p_cdy, model%viv_cdy) ELSE CALL MOVE_ALLOC(model%viv_cl, o_cl); CALL MOVE_ALLOC(model%viv_k, o_k) CALL MOVE_ALLOC(model%viv_cf, o_cf); CALL MOVE_ALLOC(model%viv_df, o_df) @@ -1536,6 +1589,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(model%snap_wo_s, w_snap) CALL MOVE_ALLOC(model%viv_amp, p_amp); CALL MOVE_ALLOC(model%viv_amp_n, p_ampn) CALL MOVE_ALLOC(model%viv_dv, p_dv) + CALL MOVE_ALLOC(model%viv_cdy, p_cdy) END IF END SUBROUTINE move_viv END SUBROUTINE CD_HermiteCable_Dyn_Set_VIV @@ -1559,6 +1613,7 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%viv_amp)) DEALLOCATE (model%viv_amp) IF (ALLOCATED(model%viv_amp_n)) DEALLOCATE (model%viv_amp_n) IF (ALLOCATED(model%viv_dv)) DEALLOCATE (model%viv_dv) + IF (ALLOCATED(model%viv_cdy)) DEALLOCATE (model%viv_cdy) model%has_viv_amp = .FALSE. model%has_viv = .FALSE. model%has_viv_il = .FALSE. @@ -1647,6 +1702,28 @@ PURE REAL(wp) FUNCTION elem_cdn(model, e) RESULT(cdn) model%viv_amp(3, 1:n, e)) END FUNCTION elem_cdn + PURE REAL(wp) FUNCTION elem_cdy(model, e) RESULT(cdy) + !! The cross-flow damping coefficient C_dy = a + b y0/D of element e (Thorsen et al. 2016, Eq. 1), + !! at the element's smoothed amplitude over its VIV diameter; -1 where the element keeps the + !! Morison drag (the drag kernel's switch). + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + cdy = -CD_ONE + IF (.NOT. ALLOCATED(model%viv_cdy)) RETURN + IF (model%viv_cdy(1, e) < CD_ZERO) RETURN + cdy = model%viv_cdy(1, e) + model%viv_cdy(2, e)*viv_elem_amplitude(model, e)/viv_diam(model, e) + END FUNCTION elem_cdy + + PURE REAL(wp) FUNCTION elem_cdy_lin(model, e) RESULT(cl) + !! The Morison-form cross-flow coefficient c Cdn of element e (its unamplified Cdn), 0 without. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + cl = CD_ZERO + IF (.NOT. ALLOCATED(model%viv_cdy)) RETURN + IF (model%viv_cdy(1, e) < CD_ZERO) RETURN + cl = model%viv_cdy(3, e)*model%cdn(e) + END FUNCTION elem_cdy_lin + REAL(wp) FUNCTION viv_node_ambient_yd(model, k) RESULT(yd) !! Cross-flow velocity of node k across the ambient flow (current plus a held field) normal to !! its tangent (the slope DOFs) at the committed state, the y' of the amplitude estimate @@ -1921,23 +1998,28 @@ SUBROUTINE element_drag_load(model, e, qe, ve, l0, t_eval, fdrag, ErrStat, ErrMs wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval, & wvc_amp=model%wv_ampc, wvc_om=model%wv_omc, & wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & - wvc_e2kd=model%wv_e2kd) + wvc_e2kd=model%wv_e2kd, cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) ELSE IF (model%has_wave) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, ErrStat=es, ErrMsg=ErrMsg, & wv_h=model%wv_h, wv_om=model%wv_om, wv_k=model%wv_k, & - wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval) + wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval, & + cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) ELSE IF (model%has_held_field) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, l0, & model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & - fdrag, ErrStat=es, ErrMsg=ErrMsg) + fdrag, ErrStat=es, ErrMsg=ErrMsg, cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) ELSE CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & - fdrag, ErrStat=es, ErrMsg=ErrMsg) + fdrag, ErrStat=es, ErrMsg=ErrMsg, cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) END IF ErrStat = es END SUBROUTINE element_drag_load @@ -9690,13 +9772,16 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval, & wvc_amp=model%wv_ampc, wvc_om=model%wv_omc, & wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & - wvc_e2kd=model%wv_e2kd) + wvc_e2kd=model%wv_e2kd, cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) ELSE IF (model%has_wave) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, djq, djv, es, em_e, & wv_h=model%wv_h, wv_om=model%wv_om, wv_k=model%wv_k, & - wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval) + wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval, & + cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) ELSE IF (model%has_held_field) THEN ! HELD host field: the element's ambient velocity = the drag config's constant ! current + the two end nodes' held-velocity average; the element waterline = @@ -9705,11 +9790,13 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & - fdrag, djq, djv, es, em_e) + fdrag, djq, djv, es, em_e, cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) ELSE CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & - fdrag, djq, djv, es, em_e) + fdrag, djq, djv, es, em_e, cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) END IF ELSE CALL element_drag_load(model, e, qe, ve, model%l0(e), t_eval, fdrag, es, em_e) @@ -11234,22 +11321,27 @@ SUBROUTINE evaluate_tangent_element(model, e, q_cfg, v_cfg, t_eval, Kstruct, Kdr fload, djq, djv, es, em, wv_depth=model%wv_depth, & wv_dir=model%wv_dir, wv_t=t_eval, wvc_amp=model%wv_ampc, & wvc_om=model%wv_omc, wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & - wvc_e2kd=model%wv_e2kd) + wvc_e2kd=model%wv_e2kd, cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) ELSE IF (model%has_wave) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fload, djq, djv, es, em, wv_h=model%wv_h, wv_om=model%wv_om, & wv_k=model%wv_k, wv_depth=model%wv_depth, wv_dir=model%wv_dir, & - wv_t=t_eval) + wv_t=t_eval, cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) ELSE IF (model%has_held_field) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), & model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), model%rho_w, & - model%diam(e), elem_cdn(model, e), model%cdt(e), fload, djq, djv, es, em) + model%diam(e), elem_cdn(model, e), model%cdt(e), fload, djq, djv, es, em, & + cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) ELSE CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & - fload, djq, djv, es, em) + fload, djq, djv, es, em, cdy=elem_cdy(model, e), & + cdy_lin=elem_cdy_lin(model, e)) END IF IF (es /= CD_HCDYN_OK) THEN ErrStat = es; ErrMsg = TRIM(em); RETURN @@ -11515,7 +11607,7 @@ END SUBROUTINE CD_HermiteCable_Axial_Damping_Element SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, diam, cdn, cdt, & fdrag, djq, djv, ErrStat, ErrMsg, & wv_h, wv_om, wv_k, wv_depth, wv_dir, wv_t, & - wvc_amp, wvc_om, wvc_k, wvc_ph, wvc_e2kd) + wvc_amp, wvc_om, wvc_k, wvc_ph, wvc_e2kd, cdy, cdy_lin) !! Consistent Gauss-integrated Morison quadratic drag on one cubic-Hermite bending-cable element. !! qe(12), ve(12) = [r1, m1, r2, m2] nodal positions and velocities; the interior velocity and !! tangent use the SAME cubic-Hermite interpolation as the geometry, so the material-tangent (m) @@ -11541,6 +11633,13 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia !! the standard explicit-field treatment (the residual is exact; the tangent omits a term of !! order k*H*omega, far below the structural stiffness), so Newton convergence is preserved. REAL(wp), INTENT(IN) :: qe(12), ve(12), l0, fluid(3), waterline_z, rho, diam, cdn, cdt + ! cross-flow damping coefficient C_dy >= 0 of Thorsen et al. (2016): the normal drag splits into + ! Morison in line and 1/2 rho D C_dy |w_y| w_y across the ambient flow (fluid plus the waves at the + ! point), CD_Morison_Drag_Split_Per_Length_Jac with u_ref CD_HCDYN_CDY_UREF; absent or negative: + ! Morison's drag + REAL(wp), INTENT(IN), OPTIONAL :: cdy + ! with cdy: the Morison-form cross-flow coefficient (CD_Morison_Drag_Split_Per_Length_Jac cdy_lin) + REAL(wp), INTENT(IN), OPTIONAL :: cdy_lin REAL(wp), INTENT(OUT) :: fdrag(12) ! djq/djv are OPTIONAL as a pair: a residual-only evaluation (a line-search trial, which ! never solves with a tangent) omits both and skips the 12x12 Jacobian accumulation -- @@ -11557,8 +11656,8 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia REAL(wp), PARAMETER :: G3 = 0.7745966692414834_wp ! sqrt(3/5) REAL(wp) :: gp(NGP), gw(NGP), H(4), dH(4) REAL(wp) :: rpos(3), vvel(3), rp(3), speed, tangent(3), urel(3), fpl(3), Jrel(3, 3), Jtan(3, 3) - REAL(wp) :: jq3(3, 3), scale, eta_w, uw(3), aw(3) - LOGICAL :: has_wv, has_shared, has_trio, has_cmp, any_wv_arg, want_jac + REAL(wp) :: jq3(3, 3), scale, eta_w, uw(3), aw(3), uamb(3) + LOGICAL :: has_wv, has_shared, has_trio, has_cmp, any_wv_arg, want_jac, split INTEGER :: g, s, c, sp, cp, a, b, es ! the message of a per-Gauss-point CableDyn_Hydro kinematics or Morison call (at most 154 ! characters): a short buffer, as these calls reset it at every Gauss point @@ -11574,6 +11673,9 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia IF (want_jac) THEN djq = CD_ZERO; djv = CD_ZERO END IF + split = PRESENT(cdy) + IF (split) split = cdy >= CD_ZERO + uw = CD_ZERO has_shared = PRESENT(wv_depth) .AND. PRESENT(wv_dir) .AND. PRESENT(wv_t) has_trio = PRESENT(wv_h) .AND. PRESENT(wv_om) .AND. PRESENT(wv_k) has_cmp = PRESENT(wvc_amp) .AND. PRESENT(wvc_om) .AND. PRESENT(wvc_k) .AND. PRESENT(wvc_ph) @@ -11663,7 +11765,17 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia ! Pass the raw dr/dxi as the tangent vector: the primitive normalises it and returns Jtan = ! d f_perlen / d(dr/dxi), so d f_perlen/d qe folds in through d(dr/dxi)/d qe = dH directly. ! rho, diam, cdn and cdt were validated above, before the Gauss loop. - IF (want_jac) THEN + IF (split) THEN + uamb = fluid + IF (has_wv) uamb = uamb + uw + IF (want_jac) THEN + CALL CD_Morison_Drag_Split_Per_Length_Jac(urel, uamb, rp, rho, diam, cdn, cdy, cdt, CD_HCDYN_CDY_UREF, & + fpl, Jrel, Jtan, es, em2, cdy_lin=cdy_lin) + ELSE + CALL CD_Morison_Drag_Split_Per_Length_Jac(urel, uamb, rp, rho, diam, cdn, cdy, cdt, CD_HCDYN_CDY_UREF, & + fpl, ErrStat=es, ErrMsg=em2, cdy_lin=cdy_lin) + END IF + ELSE IF (want_jac) THEN CALL CD_Morison_Drag_Per_Length_Jac(urel, rp, rho, diam, cdn, cdt, fpl, Jrel, Jtan, es, em2, & scalars_validated=.TRUE.) ELSE diff --git a/src/CableDyn_Hydro.f90 b/src/CableDyn_Hydro.f90 index 45514fc9..6d6f238f 100644 --- a/src/CableDyn_Hydro.f90 +++ b/src/CableDyn_Hydro.f90 @@ -23,6 +23,7 @@ MODULE CableDyn_Hydro PUBLIC :: CD_Split_Normal_Tangential PUBLIC :: CD_Morison_Drag_Per_Length PUBLIC :: CD_Morison_Drag_Per_Length_Jac + PUBLIC :: CD_Morison_Drag_Split_Per_Length_Jac PUBLIC :: CD_Morison_Added_Mass_Per_Length PUBLIC :: CD_Froude_Krylov_Per_Length PUBLIC :: CD_Solve_Dispersion_Wavenumber @@ -1459,6 +1460,167 @@ SUBROUTINE CD_Morison_Drag_Per_Length_Jac(rel_velocity, tangent, rho, diameter, END IF END SUBROUTINE CD_Morison_Drag_Per_Length_Jac + SUBROUTINE CD_Morison_Drag_Split_Per_Length_Jac(rel_velocity, ambient, tangent, rho, diameter, cdn, cdy, cdt, & + u_ref, force, jac_rel, jac_tan, ErrStat, ErrMsg, scalars_validated, & + cdy_lin) + !! Drag per unit length [N/m] with the cross-flow part of Thorsen, Saevik and Larsen (J. Fluids + !! Struct. 61, 2016, Eq. 1): in the frame of the AMBIENT normal flow u_n = P u (P = I - t t^T), + !! e_x = u_n/|u_n| in line and e_y = t x e_x across, the relative normal velocity w = P rel splits + !! into w_x = w . e_x and w_y = w . e_y, and the normal drag + !! + !! f_s = 1/2 rho D [cdn |w| w_x e_x + cdy |w_y| w_y e_y] + !! + !! keeps Morison's in-line part and replaces its cross-flow part by the quadratic cross-flow + !! damping cdy |w_y| w_y (w_y = -y', the node's cross-flow velocity reversed). Where the ambient + !! normal flow vanishes the axes are undefined, so the normal drag blends to Morison's, + !! f_n = beta f_s + (1 - beta) f_M, f_M = 1/2 rho D cdn |w| w, beta = U^2/(U^2 + u_ref^2) with + !! U = |u_n|; below U = 1e-9 u_ref (beta < 1e-18) the result is CD_Morison_Drag_Per_Length_Jac's + !! own, bit for bit. The tangential drag is CD_Morison_Drag_Per_Length_Jac's. ambient is the + !! undisturbed fluid velocity at the point (rel_velocity = ambient - structure velocity). Jacobians as in + !! CD_Morison_Drag_Per_Length_Jac: jac_rel = d force/d rel_velocity at fixed ambient, jac_tan = + !! d force/d tangent (the input vector, normalised inside), both exact; OPTIONAL as a pair, the + !! force identical with or without them. cdy >= 0 and u_ref > 0 are checked with the scalars. + !! cdy_lin (optional, >= 0, default 0) adds a Morison-form cross-flow term 1/2 rho D cdy_lin |w| w_y + !! e_y: with cdy = 0 and cdy_lin the unamplified Morison coefficient, a drag amplification passed + !! in cdn acts on the in-line drag alone while the cross-flow drag stays Morison's. + REAL(wp), INTENT(IN) :: rel_velocity(3), ambient(3), tangent(3), rho, diameter, cdn, cdy, cdt, u_ref + REAL(wp), INTENT(OUT) :: force(3) + REAL(wp), INTENT(OUT), OPTIONAL :: jac_rel(3, 3), jac_tan(3, 3) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + LOGICAL, INTENT(IN), OPTIONAL :: scalars_validated + REAL(wp), INTENT(IN), OPTIONAL :: cdy_lin + REAL(wp) :: tnorm, tu(3), pm(3, 3), w(3), wm, un(3), ua, ex(3), ey(3), wx, wy, fm(3), fs(3), beta, cn, cy, cl + REAL(wp) :: dfm(3, 3), dfs(3, 3), dt(3), dw(3), dun(3), dua, dex(3), dey(3), dwx, dwy, dwm, dfmv(3), dfsv(3) + REAL(wp) :: dbeta, ft(3), jrt(3, 3), jtt(3, 3) + INTEGER :: k + LOGICAL :: want_jac, check_scalars, split + + want_jac = PRESENT(jac_rel) + force = CD_ZERO + IF (want_jac .NEQV. PRESENT(jac_tan)) THEN + CALL fail(ErrStat, ErrMsg, 'jac_rel and jac_tan must be supplied together (or neither)') + RETURN + END IF + IF (want_jac) THEN + jac_rel = CD_ZERO; jac_tan = CD_ZERO + END IF + ErrStat = CD_HYDRO_OK; ErrMsg = '' + check_scalars = .TRUE. + IF (PRESENT(scalars_validated)) check_scalars = .NOT. scalars_validated + IF (check_scalars) THEN + IF (.NOT. (CD_Is_Finite(cdy) .AND. cdy >= CD_ZERO .AND. CD_Is_Finite(u_ref) .AND. u_ref > CD_ZERO .AND. & + CD_Is_Finite(cdn) .AND. cdn >= CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'the drag coefficients must be finite and non-negative and u_ref positive') + RETURN + END IF + END IF + IF (.NOT. CD_All_Finite(ambient)) THEN + CALL fail(ErrStat, ErrMsg, 'the ambient fluid velocity must be finite') + RETURN + END IF + ! tangential drag (and every other input check) from the Morison primitive with cdn = 0 + IF (want_jac) THEN + CALL CD_Morison_Drag_Per_Length_Jac(rel_velocity, tangent, rho, diameter, CD_ZERO, cdt, ft, jrt, jtt, & + ErrStat, ErrMsg, scalars_validated) + ELSE + CALL CD_Morison_Drag_Per_Length_Jac(rel_velocity, tangent, rho, diameter, CD_ZERO, cdt, ft, ErrStat=ErrStat, & + ErrMsg=ErrMsg, scalars_validated=scalars_validated) + END IF + IF (ErrStat /= CD_HYDRO_OK) RETURN + tnorm = SQRT(DOT_PRODUCT(tangent, tangent)) + tu = tangent/tnorm + pm = identity3() - outer3(tu, tu) + cn = 0.5_wp*rho*diameter*cdn + cy = 0.5_wp*rho*diameter*cdy + cl = CD_ZERO + IF (PRESENT(cdy_lin)) THEN + IF (.NOT. (CD_Is_Finite(cdy_lin) .AND. cdy_lin >= CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'the linear cross-flow drag coefficient must be finite and non-negative') + RETURN + END IF + cl = 0.5_wp*rho*diameter*cdy_lin + END IF + un = MATMUL(pm, ambient) + ua = SQRT(DOT_PRODUCT(un, un)) + split = ua > 1.0e-9_wp*u_ref + IF (.NOT. split) THEN + ! no ambient normal flow: Morison's drag, from its own primitive (bit for bit) + IF (want_jac) THEN + CALL CD_Morison_Drag_Per_Length_Jac(rel_velocity, tangent, rho, diameter, cdn, cdt, force, jac_rel, jac_tan, & + ErrStat, ErrMsg, scalars_validated) + ELSE + CALL CD_Morison_Drag_Per_Length_Jac(rel_velocity, tangent, rho, diameter, cdn, cdt, force, ErrStat=ErrStat, & + ErrMsg=ErrMsg, scalars_validated=scalars_validated) + END IF + RETURN + END IF + w = MATMUL(pm, rel_velocity) + wm = SQRT(DOT_PRODUCT(w, w)) + fm = cn*wm*w + beta = CD_ZERO + fs = fm + ex = CD_ZERO; ey = CD_ZERO; wx = CD_ZERO; wy = CD_ZERO + IF (split) THEN + ex = un/ua + ey = cross3(tu, ex) + wx = DOT_PRODUCT(w, ex) + wy = DOT_PRODUCT(w, ey) + fs = cn*wm*wx*ex + cy*ABS(wy)*wy*ey + cl*wm*wy*ey + beta = ua*ua/(ua*ua + u_ref*u_ref) + END IF + force = ft + beta*fs + (CD_ONE - beta)*fm + IF (want_jac) THEN + ! d/d rel at fixed ambient and tangent: d w/d rel = P + dfm = CD_ZERO + dfs = CD_ZERO + IF (wm > MIN_TANGENT_NORM) THEN + dfm = cn*(wm*identity3() + outer3(w, w)/wm) + IF (split) dfs = cn*outer3(ex, wx*w/wm + wm*ex) + cl*outer3(ey, wy*w/wm + wm*ey) + END IF + IF (split) dfs = dfs + cy*2.0_wp*ABS(wy)*outer3(ey, ey) + jac_rel = jrt + MATMUL(beta*dfs + (CD_ONE - beta)*dfm, pm) + ! d/d tangent: directional derivatives along dt = P e_k/|tangent| (the unit-tangent change of + ! the input vector's k-th component), through P (so w and u_n), e_x, e_y and beta + jac_tan = jtt + DO k = 1, 3 + dt = pm(:, k)/tnorm + dw = -(dt*DOT_PRODUCT(tu, rel_velocity) + tu*DOT_PRODUCT(dt, rel_velocity)) + dwm = CD_ZERO + IF (wm > MIN_TANGENT_NORM) dwm = DOT_PRODUCT(w, dw)/wm + dfmv = cn*(dwm*w + wm*dw) + dfsv = dfmv + dbeta = CD_ZERO + IF (split) THEN + dun = -(dt*DOT_PRODUCT(tu, ambient) + tu*DOT_PRODUCT(dt, ambient)) + dua = DOT_PRODUCT(ex, dun) + dex = (dun - ex*dua)/ua + dey = cross3(dt, ex) + cross3(tu, dex) + dwx = DOT_PRODUCT(dw, ex) + DOT_PRODUCT(w, dex) + dwy = DOT_PRODUCT(dw, ey) + DOT_PRODUCT(w, dey) + dfsv = cn*(dwm*wx*ex + wm*dwx*ex + wm*wx*dex) + cy*(2.0_wp*ABS(wy)*dwy*ey + ABS(wy)*wy*dey) + & + cl*(dwm*wy*ey + wm*dwy*ey + wm*wy*dey) + dbeta = 2.0_wp*ua*dua*u_ref*u_ref/(ua*ua + u_ref*u_ref)**2 + END IF + jac_tan(:, k) = jac_tan(:, k) + dbeta*(fs - fm) + beta*dfsv + (CD_ONE - beta)*dfmv + END DO + END IF + IF (.NOT. CD_All_Finite(force)) THEN + force = CD_ZERO + IF (want_jac) THEN + jac_rel = CD_ZERO; jac_tan = CD_ZERO + END IF + CALL fail(ErrStat, ErrMsg, 'split drag result or Jacobian overflowed') + RETURN + END IF + IF (want_jac) THEN + IF (.NOT. CD_All_Finite(jac_rel) .OR. .NOT. CD_All_Finite(jac_tan)) THEN + force = CD_ZERO; jac_rel = CD_ZERO; jac_tan = CD_ZERO + CALL fail(ErrStat, ErrMsg, 'split drag result or Jacobian overflowed') + END IF + END IF + END SUBROUTINE CD_Morison_Drag_Split_Per_Length_Jac + SUBROUTINE CD_Morison_Added_Mass_Per_Length(tangent, rho, diameter, can, cat, M_a, ErrStat, ErrMsg) !! Morison added-mass matrix per unit length [kg/m]: !! M_a = rho A (Can (I - qq^T) + Cat qq^T), A = pi d^2 / 4. @@ -3453,6 +3615,12 @@ PURE FUNCTION outer3(a, b) RESULT(out) END DO END FUNCTION outer3 + PURE FUNCTION cross3(a, b) RESULT(c) + REAL(wp), INTENT(IN) :: a(3), b(3) + REAL(wp) :: c(3) + c = [a(2)*b(3) - a(3)*b(2), a(3)*b(1) - a(1)*b(3), a(1)*b(2) - a(2)*b(1)] + END FUNCTION cross3 + PURE REAL(wp) FUNCTION deterministic_phase(i) RESULT(phase) INTEGER, INTENT(IN) :: i REAL(wp), PARAMETER :: GOLDEN = 0.618033988749894848204586834365638118_wp diff --git a/tests/test_viv_cf_damping_deck.f90 b/tests/test_viv_cf_damping_deck.f90 new file mode 100644 index 00000000..19447922 --- /dev/null +++ b/tests/test_viv_cf_damping_deck.f90 @@ -0,0 +1,280 @@ +! File: tests/test_viv_cf_damping_deck.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_cf_damping_deck + !! The split drag of a VIV DAMPING row (TypeName a b [c]: Morison in line, 1/2 rho D [C_dy |w_y| + + !! c Cdn |w|] w_y across the ambient flow, C_dy = a + b y0/D of Thorsen et al. 2016) on the taut + !! finite-EI cable of the VIV amplitude gate (100 m, D 0.1 m, 50 kN, Cl 0.8, 0.15 m/s along y): + !! D1 `0 0 1` with a table of Cv = Cl and drag factor 1 is the deck without the section (the + !! split recombines Morison's drag to round-off, test_viv_cf_damping_kernel K3), to 1e-4 of + !! the response: the VIV phase carries the round-off over 40 s, 1.5e-8 in a Release build and + !! 1.5e-5 in a Debug one; + !! D2 `0 0 1` with Cv 0 and drag factor 2 (no lift, the in-line drag doubled, the cross-flow + !! drag Morison's) settles at the static in-line offset of the deck with Cd 2.4, within 0.5 %; + !! D3 Thorsen's form `0.31 0.89` replaces the cross-flow drag by the quadratic damping, weaker at + !! this amplitude: the steady cross-flow response is larger than with Morison's drag; + !! D4 the energy ledger closes with the split: over the steady window the mean of VIVPow1 + + !! DragPow1 + DampPow1 is within 1 % of the mean VIV power; + !! D5 refusals by name: a row without its table, an EI = 0 line, a malformed row, a negative + !! coefficient, a type named twice, an undefined type. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: D = 0.1_wp + CHARACTER(*), PARAMETER :: NEUTRAL = 'riser 0.0 0.8 1.0;riser 1.0 0.8 1.0' + INTEGER :: nfail = 0 + + CALL write_current('vcd_current.dat') + CALL check_identity() + CALL check_inline_amplification() + CALL check_thorsen() + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: VIV cross-flow damping deck gates' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE write_current(path) + CHARACTER(*), INTENT(IN) :: path + INTEGER :: u + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') 'MoorDyn v2 water kinematics file' + WRITE (u, '(A)') 'uniform current along y for the VIV cross-flow damping deck gate' + WRITE (u, '(A)') '--------------------------- WAVES -------------------------------------' + WRITE (u, '(A)') '0 WaveKinMod - type of wave input' + WRITE (u, '(A)') '"" WaveKinFile - file containing wave elevation time series' + WRITE (u, '(A)') '0.000000E+00 dtWave - time step to use in setting up wave kinematics grid (s)' + WRITE (u, '(A)') '0 WaveDir - wave heading (deg)' + WRITE (u, '(A)') '2 - X wave input type' + WRITE (u, '(A)') '-10, 110, 2 - X wave grid point data' + WRITE (u, '(A)') '2 - Y wave input type' + WRITE (u, '(A)') '-10, 10, 2 - Y wave grid point data' + WRITE (u, '(A)') '2 - Z wave input type' + WRITE (u, '(A)') '-100, 0, 2 - Z wave grid point data' + WRITE (u, '(A)') '--------------------------- CURRENT -------------------------------------' + WRITE (u, '(A)') '1 CurrentMod - type of current input' + WRITE (u, '(A)') 'z-depth x-current y-current' + WRITE (u, '(A)') '(m) (m/s) (m/s)' + WRITE (u, '(A)') '0.0 0.0 0.15' + WRITE (u, '(A)') '-100.0 0.0 0.15' + WRITE (u, '(A)') '--------------------- need this line ------------------' + CLOSE (u) + END SUBROUTINE write_current + + SUBROUTINE write_rows(u, rows) + INTEGER, INTENT(IN) :: u + CHARACTER(*), INTENT(IN) :: rows + INTEGER :: i0, i1 + i0 = 1 + DO + i1 = INDEX(rows(i0:), ';') + IF (i1 == 0) THEN + WRITE (u, '(A)') TRIM(rows(i0:)) + EXIT + END IF + WRITE (u, '(A)') rows(i0:i0 + i1 - 2) + i0 = i0 + i1 + END DO + END SUBROUTINE write_rows + + SUBROUTINE write_deck(path, amp_rows, damp_rows, tmax, ei, cd, power) + !! amp_rows/damp_rows: the VIV AMPLITUDE and VIV DAMPING data rows, ';'-separated ('' for no + !! section); ei the type's EI (default 1.0), cd its Cd (default 1.2); power adds the load-power + !! channels. + CHARACTER(*), INTENT(IN) :: path, amp_rows, damp_rows + REAL(wp), INTENT(IN) :: tmax + CHARACTER(*), INTENT(IN), OPTIONAL :: ei, cd + LOGICAL, INTENT(IN), OPTIONAL :: power + CHARACTER(32) :: ei_col, cd_col + INTEGER :: u + ei_col = '1.0' + IF (PRESENT(ei)) ei_col = ei + cd_col = '1.2' + IF (PRESENT(cd)) cd_col = cd + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' + WRITE (u, '(A)') 'VIV cross-flow damping deck gate: taut cable in a uniform current' + WRITE (u, '(A)') '----------------------- LINE TYPES ------------------------------------------' + WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//TRIM(ei_col)//' '//TRIM(cd_col)// & + ' 1.0 0.0 0.0 0.8 0.08 0.18' + WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' + WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' + WRITE (u, '(A)') '1 Coupled 0.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '2 Fixed 100.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '----------------------- LINES -----------------------------------------------' + WRITE (u, '(A)') 'ID NodeA NodeB Outputs' + WRITE (u, '(A)') '1 1 2 -' + WRITE (u, '(A)') '----------------------- SECTIONS --------------------------------------------' + WRITE (u, '(A)') 'LineID LineType Length NumSegs' + WRITE (u, '(A)') '1 riser 99.900100 50' + IF (LEN_TRIM(amp_rows) > 0) THEN + WRITE (u, '(A)') '----------------------- VIV AMPLITUDE ---------------------------------------' + WRITE (u, '(A)') 'TypeName AD Cv CdAmp' + WRITE (u, '(A)') '(-) (-) (-) (-)' + CALL write_rows(u, amp_rows) + END IF + IF (LEN_TRIM(damp_rows) > 0) THEN + WRITE (u, '(A)') '----------------------- VIV DAMPING -----------------------------------------' + WRITE (u, '(A)') 'TypeName a b c' + WRITE (u, '(A)') '(-) (-) (-) (-)' + CALL write_rows(u, damp_rows) + END IF + WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' + WRITE (u, '(A)') '0.01 dtM' + WRITE (u, '(A)') '100.0 WtrDpth' + WRITE (u, '(A)') '1025.0 rhoW' + WRITE (u, '(A)') '9.80665 g' + WRITE (u, '(A)') 'vcd_current.dat WaterKin' + WRITE (u, '(A,F8.3,A)') ' ', tmax, ' TMax' + WRITE (u, '(A)') '---------------------- OUTPUTS -----------------------------------------------' + WRITE (u, '(A)') 'L1N26PZ' + WRITE (u, '(A)') 'L1N26PY' + IF (PRESENT(power)) THEN + IF (power) THEN + WRITE (u, '(A)') 'VIVPow1' + WRITE (u, '(A)') 'DragPow1' + WRITE (u, '(A)') 'DampPow1' + END IF + END IF + WRITE (u, '(A)') 'END' + WRITE (u, '(A)') '------------------------- need this line --------------------------------------' + CLOSE (u) + END SUBROUTINE write_deck + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK .AND. conv + END SUBROUTINE run + + SUBROUTINE read_out(path, tab, n, ncol) + CHARACTER(*), INTENT(IN) :: path + REAL(wp), ALLOCATABLE, INTENT(OUT) :: tab(:, :) + INTEGER, INTENT(OUT) :: n + INTEGER, INTENT(IN) :: ncol + CHARACTER(1024) :: rec + INTEGER :: u, ios + ALLOCATE (tab(ncol, 40000)) + n = 0 + OPEN (NEWUNIT=u, FILE=path, STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (u, '(A)') rec + READ (u, '(A)') rec + DO + READ (u, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + n = n + 1 + READ (rec, *) tab(:, n) + END DO + CLOSE (u) + END SUBROUTINE read_out + + SUBROUTINE check_identity() + REAL(wp), ALLOCATABLE :: ta(:, :), tb(:, :) + INTEGER :: na, nb + LOGICAL :: ok + CHARACTER(1024) :: msg + REAL(wp) :: dz + CALL write_deck('vcd_morison.dat', NEUTRAL, '', 40.0_wp) + CALL run('vcd_morison.dat', 'vcd_morison', ok, msg) + CALL require(ok, 'D1: the Morison deck runs: '//TRIM(msg)) + CALL write_deck('vcd_split.dat', NEUTRAL, 'riser 0 0 1', 40.0_wp) + CALL run('vcd_split.dat', 'vcd_split', ok, msg) + CALL require(ok, 'D1: the split deck runs: '//TRIM(msg)) + CALL read_out('vcd_morison.out', ta, na, 3) + CALL read_out('vcd_split.out', tb, nb, 3) + IF (na /= nb .OR. na < 100) THEN + CALL require(.FALSE., 'D1: both runs wrote the same rows'); RETURN + END IF + dz = MAXVAL(ABS(ta(2:3, :na) - tb(2:3, :nb)))/MAXVAL(ABS(ta(2, :na) - ta(2, 1))) + WRITE (*, '(A,ES10.2)') 'D1 0 0 1 against Morison: max response difference / CF range ', dz + ! the split and recombined drag differ by round-off, which the VIV phase dynamics carry over 40 s + CALL require(dz <= 1.0e-4_wp, 'D1: the split with c = 1 recombines Morison''s drag') + END SUBROUTINE check_identity + + SUBROUTINE check_inline_amplification() + REAL(wp), ALLOCATABLE :: ta(:, :), tb(:, :) + INTEGER :: na, nb + LOGICAL :: ok + CHARACTER(1024) :: msg + REAL(wp) :: ya, yb + CALL write_deck('vcd_amp2.dat', 'riser 0.0 0.0 2.0;riser 1.0 0.0 2.0', 'riser 0 0 1', 30.0_wp) + CALL run('vcd_amp2.dat', 'vcd_amp2', ok, msg) + CALL require(ok, 'D2: the in-line amplification deck runs: '//TRIM(msg)) + CALL write_deck('vcd_cd24.dat', 'riser 0.0 0.0 1.0;riser 1.0 0.0 1.0', '', 30.0_wp, cd='2.4') + CALL run('vcd_cd24.dat', 'vcd_cd24', ok, msg) + CALL require(ok, 'D2: the Cd 2.4 deck runs: '//TRIM(msg)) + CALL read_out('vcd_amp2.out', ta, na, 3) + CALL read_out('vcd_cd24.out', tb, nb, 3) + IF (na < 10 .OR. nb < 10) RETURN + ya = ta(3, na) - 0.0_wp + yb = tb(3, nb) - 0.0_wp + WRITE (*, '(A,2ES14.6)') 'D2 in-line offset, split with CdAmp 2 and Cd 2.4: ', ya, yb + CALL require(ABS(ya - yb) <= 5.0e-3_wp*ABS(yb), 'D2: the in-line drag alone is amplified') + END SUBROUTINE check_inline_amplification + + SUBROUTINE check_thorsen() + REAL(wp), ALLOCATABLE :: ta(:, :), tb(:, :) + INTEGER :: na, nb, i0 + LOGICAL :: ok + CHARACTER(1024) :: msg + REAL(wp) :: am, aq, pv, ps + CALL write_deck('vcd_q.dat', NEUTRAL, 'riser 0.31 0.89', 90.0_wp, power=.TRUE.) + CALL run('vcd_q.dat', 'vcd_q', ok, msg) + CALL require(ok, 'D3: the Thorsen deck runs: '//TRIM(msg)) + CALL read_out('vcd_q.out', ta, na, 6) + CALL read_out('vcd_morison.out', tb, nb, 3) + IF (na < 100 .OR. nb < 100) RETURN + i0 = na - 2000 + aq = 0.5_wp*(MAXVAL(ta(2, i0:na)) - MINVAL(ta(2, i0:na)))/D + am = 0.5_wp*(MAXVAL(tb(2, nb - 1000:nb)) - MINVAL(tb(2, nb - 1000:nb)))/D + WRITE (*, '(A,F8.4,A,F8.4)') 'D3 steady A/D with Thorsen''s damping ', aq, ', with Morison''s ', am + CALL require(aq > 1.02_wp*am, 'D3: the quadratic cross-flow damping is weaker at this amplitude') + pv = SUM(ta(4, i0:na))/REAL(na - i0 + 1, wp) + ps = SUM(ta(4, i0:na) + ta(5, i0:na) + ta(6, i0:na))/REAL(na - i0 + 1, wp) + WRITE (*, '(A,2ES12.4)') 'D4 mean VIV power and mean VIV + drag + damping power: ', pv, ps + CALL require(pv > 0.0_wp .AND. ABS(ps) <= 1.0e-2_wp*pv, 'D4: the load powers balance with the split drag') + END SUBROUTINE check_thorsen + + SUBROUTINE refuse(label, amp_rows, damp_rows, expect, ei) + CHARACTER(*), INTENT(IN) :: label, amp_rows, damp_rows, expect + CHARACTER(*), INTENT(IN), OPTIONAL :: ei + LOGICAL :: ok + CHARACTER(1024) :: msg + IF (PRESENT(ei)) THEN + CALL write_deck('vcd_refuse.dat', amp_rows, damp_rows, 0.0_wp, ei=ei) + ELSE + CALL write_deck('vcd_refuse.dat', amp_rows, damp_rows, 0.0_wp) + END IF + CALL run('vcd_refuse.dat', 'vcd_refuse', ok, msg) + WRITE (*, '(A)') 'D5 '//label//': '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, expect) > 0, 'D5: '//label) + END SUBROUTINE refuse + + SUBROUTINE check_refusals() + CALL refuse('no amplitude table', '', 'riser 0.31 0.89', 'give the type Cl > 0 and a VIV AMPLITUDE table') + CALL refuse('an EI = 0 line', NEUTRAL, 'riser 0.31 0.89', 'acts on finite-EI cables (EI > 0) only', ei='0.0') + CALL refuse('a malformed row', NEUTRAL, 'riser 0.31', 'rows must be: TypeName a b [c]') + CALL refuse('a negative coefficient', NEUTRAL, 'riser -0.1 0.89', 'needs a, b and c >= 0') + CALL refuse('a type named twice', NEUTRAL, 'riser 0.31 0.89;riser 0 0 1', 'twice') + CALL refuse('an undefined type', NEUTRAL, 'cable 0.31 0.89', 'undefined LINE TYPE') + END SUBROUTINE check_refusals + +END PROGRAM test_viv_cf_damping_deck diff --git a/tests/test_viv_cf_damping_kernel.f90 b/tests/test_viv_cf_damping_kernel.f90 new file mode 100644 index 00000000..e23bb4c5 --- /dev/null +++ b/tests/test_viv_cf_damping_kernel.f90 @@ -0,0 +1,150 @@ +! File: tests/test_viv_cf_damping_kernel.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_cf_damping_kernel + !! The split drag of Thorsen et al. (2016) per unit length (CD_Morison_Drag_Split_Per_Length_Jac): + !! K1 a point at rest in a steady flow: the split force is Morison's, whatever cdy (w = U e_x); + !! K2 a cross-flow velocity y' across the flow: the cross-flow force is + !! 1/2 rho D cdy |w_y| w_y (w_y = -y'), the in-line force Morison's with the full |w|, and + !! the blend beta = U^2/(U^2 + u_ref^2) mixes it with Morison's; + !! K3 no ambient normal flow (still water, or a flow along the tangent): Morison's drag, bit for + !! bit; and with cdy = 0 and cdy_lin = cdn, the split recombines Morison's drag in a flow; + !! K4 the Jacobians against central differences of the force: in the relative velocity and in + !! the (non-unit) tangent vector, with tangential relative flow, cdy /= cdn, a Morison-form + !! cross-flow term (cdy_lin) and U ~ u_ref; + !! K5 bad inputs refused by name. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_Hydro, ONLY: CD_Morison_Drag_Split_Per_Length_Jac, CD_Morison_Drag_Per_Length_Jac, CD_HYDRO_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: RHO = 1025.0_wp, DIAM = 0.1_wp, CDN = 1.2_wp, CDT = 0.3_wp, CDY = 0.55_wp + INTEGER :: nfail = 0 + + CALL check_at_rest() + CALL check_crossflow() + CALL check_no_flow() + CALL check_jacobians() + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: split cross-flow drag kernel' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE check_at_rest() + REAL(wp) :: amb(3), tg(3), fs(3), fm(3) + INTEGER :: es + CHARACTER(200) :: em + amb = [0.3_wp, 0.8_wp, 0.1_wp] + tg = [1.0_wp, 0.2_wp, -0.1_wp] + CALL CD_Morison_Drag_Split_Per_Length_Jac(amb, amb, tg, RHO, DIAM, CDN, CDY, CDT, 0.01_wp, fs, & + ErrStat=es, ErrMsg=em) + CALL require(es == CD_HYDRO_OK, 'K1: split call: '//TRIM(em)) + CALL CD_Morison_Drag_Per_Length_Jac(amb, tg, RHO, DIAM, CDN, CDT, fm, ErrStat=es, ErrMsg=em) + WRITE (*, '(A,ES10.2)') 'K1 at rest: |split - Morison|/|Morison| ', NORM2(fs - fm)/NORM2(fm) + CALL require(NORM2(fs - fm) <= 1.0e-13_wp*NORM2(fm), 'K1: a point at rest feels Morison drag') + END SUBROUTINE check_at_rest + + SUBROUTINE check_crossflow() + REAL(wp) :: amb(3), tg(3), v(3), rel(3), f(3), ex(3), ey(3), w(3), wm, beta, fy, fx, uref, u + INTEGER :: es + CHARACTER(200) :: em + u = 0.6_wp + amb = [0.0_wp, u, 0.0_wp] + tg = [2.0_wp, 0.0_wp, 0.0_wp] + ex = [0.0_wp, 1.0_wp, 0.0_wp] + ey = [0.0_wp, 0.0_wp, 1.0_wp] ! t x e_x = x x y = z + v = [0.0_wp, 0.1_wp, 0.35_wp] ! in-line 0.1, cross-flow 0.35 + rel = amb - v + uref = 0.2_wp + CALL CD_Morison_Drag_Split_Per_Length_Jac(rel, amb, tg, RHO, DIAM, CDN, CDY, CDT, uref, f, ErrStat=es, ErrMsg=em) + CALL require(es == CD_HYDRO_OK, 'K2: split call: '//TRIM(em)) + w = [0.0_wp, rel(2), rel(3)] + wm = NORM2(w) + beta = u*u/(u*u + uref*uref) + fy = beta*0.5_wp*RHO*DIAM*CDY*ABS(rel(3))*rel(3) + (1.0_wp - beta)*0.5_wp*RHO*DIAM*CDN*wm*rel(3) + fx = 0.5_wp*RHO*DIAM*CDN*wm*rel(2) + WRITE (*, '(A,2ES12.4,A,2ES12.4)') 'K2 cross-flow: force (in line, across) ', DOT_PRODUCT(f, ex), & + DOT_PRODUCT(f, ey), ' expected ', fx, fy + CALL require(ABS(DOT_PRODUCT(f, ey) - fy) <= 1.0e-13_wp*ABS(fy), & + 'K2: the cross-flow force is the blended cdy |w_y| w_y') + CALL require(ABS(DOT_PRODUCT(f, ex) - fx) <= 1.0e-13_wp*ABS(fx), 'K2: the in-line force is Morison''s') + CALL require(ABS(f(1)) <= 1.0e-12_wp, 'K2: no tangential force without tangential flow') + END SUBROUTINE check_crossflow + + SUBROUTINE check_no_flow() + REAL(wp) :: tg(3), rel(3), fs(3), fm(3), amb(3) + INTEGER :: es + CHARACTER(200) :: em + tg = [0.3_wp, -1.0_wp, 0.4_wp] + rel = [0.2_wp, 0.1_wp, -0.3_wp] + amb = 0.0_wp + CALL CD_Morison_Drag_Split_Per_Length_Jac(rel, amb, tg, RHO, DIAM, CDN, CDY, CDT, 0.01_wp, fs, ErrStat=es, ErrMsg=em) + CALL CD_Morison_Drag_Per_Length_Jac(rel, tg, RHO, DIAM, CDN, CDT, fm, ErrStat=es, ErrMsg=em) + CALL require(ALL(fs == fm), 'K3: no ambient flow, Morison drag bit for bit') + amb = 0.7_wp*tg + CALL CD_Morison_Drag_Split_Per_Length_Jac(rel, amb, tg, RHO, DIAM, CDN, CDY, CDT, 0.01_wp, fs, ErrStat=es, ErrMsg=em) + CALL require(ALL(fs == fm), 'K3: a flow along the tangent, Morison drag bit for bit') + amb = [0.1_wp, 0.6_wp, -0.2_wp] + CALL CD_Morison_Drag_Split_Per_Length_Jac(rel, amb, tg, RHO, DIAM, CDN, 0.0_wp, CDT, 0.01_wp, fs, ErrStat=es, & + ErrMsg=em, cdy_lin=CDN) + WRITE (*, '(A,ES10.2)') 'K3 cdy 0, cdy_lin cdn: |split - Morison|/|Morison| ', NORM2(fs - fm)/NORM2(fm) + CALL require(es == CD_HYDRO_OK .AND. NORM2(fs - fm) <= 1.0e-13_wp*NORM2(fm), & + 'K3: cdy 0 and cdy_lin cdn recombine Morison''s drag') + END SUBROUTINE check_no_flow + + SUBROUTINE check_jacobians() + REAL(wp) :: rel(3), amb(3), tg(3), f(3), fp(3), fmn(3), jr(3, 3), jt(3, 3), h, err_r, err_t, scale, d(3) + INTEGER :: es, k + CHARACTER(200) :: em + rel = [0.21_wp, 0.13_wp, -0.37_wp] + amb = [0.05_wp, 0.18_wp, 0.02_wp] + tg = [1.3_wp, -0.4_wp, 0.25_wp] + CALL CD_Morison_Drag_Split_Per_Length_Jac(rel, amb, tg, RHO, DIAM, CDN, CDY, CDT, 0.12_wp, f, jr, jt, es, em, & + cdy_lin=0.7_wp) + CALL require(es == CD_HYDRO_OK, 'K4: split call with Jacobians: '//TRIM(em)) + h = 1.0e-6_wp + err_r = 0.0_wp; err_t = 0.0_wp + scale = MAX(MAXVAL(ABS(jr)), MAXVAL(ABS(jt))) + DO k = 1, 3 + d = 0.0_wp; d(k) = h + CALL CD_Morison_Drag_Split_Per_Length_Jac(rel + d, amb, tg, RHO, DIAM, CDN, CDY, CDT, 0.12_wp, fp, ErrStat=es, & + ErrMsg=em, cdy_lin=0.7_wp) + CALL CD_Morison_Drag_Split_Per_Length_Jac(rel - d, amb, tg, RHO, DIAM, CDN, CDY, CDT, 0.12_wp, fmn, ErrStat=es, & + ErrMsg=em, cdy_lin=0.7_wp) + err_r = MAX(err_r, MAXVAL(ABS((fp - fmn)/(2.0_wp*h) - jr(:, k)))) + CALL CD_Morison_Drag_Split_Per_Length_Jac(rel, amb, tg + d, RHO, DIAM, CDN, CDY, CDT, 0.12_wp, fp, ErrStat=es, & + ErrMsg=em, cdy_lin=0.7_wp) + CALL CD_Morison_Drag_Split_Per_Length_Jac(rel, amb, tg - d, RHO, DIAM, CDN, CDY, CDT, 0.12_wp, fmn, ErrStat=es, & + ErrMsg=em, cdy_lin=0.7_wp) + err_t = MAX(err_t, MAXVAL(ABS((fp - fmn)/(2.0_wp*h) - jt(:, k)))) + END DO + WRITE (*, '(A,2ES10.2,A,ES10.2)') 'K4 Jacobians against central differences: rel, tangent ', err_r, err_t, & + ' (scale ', scale, ')' + CALL require(err_r <= 1.0e-7_wp*scale .AND. err_t <= 1.0e-7_wp*scale, 'K4: exact Jacobians') + END SUBROUTINE check_jacobians + + SUBROUTINE check_refusals() + REAL(wp) :: f(3) + INTEGER :: es + CHARACTER(200) :: em + CALL CD_Morison_Drag_Split_Per_Length_Jac([0.1_wp, 0.0_wp, 0.0_wp], [0.0_wp, 0.5_wp, 0.0_wp], & + [1.0_wp, 0.0_wp, 0.0_wp], & + RHO, DIAM, CDN, -0.1_wp, CDT, 0.01_wp, f, ErrStat=es, ErrMsg=em) + CALL require(es /= CD_HYDRO_OK .AND. INDEX(em, 'non-negative') > 0, 'K5: a negative cdy refused') + CALL CD_Morison_Drag_Split_Per_Length_Jac([0.1_wp, 0.0_wp, 0.0_wp], [0.0_wp, 0.5_wp, 0.0_wp], & + [1.0_wp, 0.0_wp, 0.0_wp], & + RHO, DIAM, CDN, CDY, CDT, 0.0_wp, f, ErrStat=es, ErrMsg=em) + CALL require(es /= CD_HYDRO_OK .AND. INDEX(em, 'u_ref positive') > 0, 'K5: a zero u_ref refused') + END SUBROUTINE check_refusals + +END PROGRAM test_viv_cf_damping_kernel From 1847a0da2e9d53eac706662d64a929c16177140d Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Sat, 14 Nov 2026 04:47:18 +0900 Subject: [PATCH 15/47] fix: bending forces in the round-off floor of the dynamic tolerance (#158) A finite-EI dynamic step with bending damping (EI|Bb) could fail on a soft line: Newton stagnated just above the tolerance and the step recovery's smaller steps made it worse. Found on a 20 m riser on a 20 kN/m tensioner (EA_eff 4e5 N, 80 elements, Bb 500 N m^2 s, dt 1e-3 s) in VIV: the residual stopped at 1.06 times the tolerance. The bending damping takes the curvature rate from the Newmark velocity, whose rounding is gamma/(beta dt) times that of the coordinates, so its nodal forces round at about Bb gamma/(beta dt) eps |r|/l0^3. The force scale's round-off floor covered the axial forces alone, (EA + BA gamma/(beta dt)) eps |r|/l0. It now takes the bending forces, (EI + Bb gamma/(beta dt)) eps |r|/l0^3, too; that term binds only where it is the larger, so every example and test deck gives bit-identical outputs (1685 arrays over 70 decks). Test: test_hermite_bending_damping_dynamic B6, a soft line (EA 4e5 N) with Bb 1e4 N m^2 s at dt 1e-4 s. On the old floor its first step stagnates at 2.2e-7 against the tolerance 1e-8; now 200 steps converge and the motion stays bounded. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 8 ++++ doc/theory.rst | 10 +++-- src/CableDyn_HermiteCableDynamic.f90 | 13 ++++++- .../test_hermite_bending_damping_dynamic.f90 | 37 +++++++++++++++++++ 4 files changed, 63 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9ad96ed..1d5118d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -163,6 +163,14 @@ All notable changes to CableDyn are recorded in this file. The format follows ### Fixed +- A finite-EI dynamic step with bending damping (`EI|Bb`) could fail to converge on a soft line: + the Newton residual stagnated just above the tolerance (1.06 times it on a 20 m riser on a + 20 kN/m tensioner, EA_eff 4e5 N, 80 elements, Bb 500 N m^2 s, dt 1e-3 s, in VIV), and the + step recovery's smaller steps only made it worse. The bending damping takes the curvature rate + from the Newmark velocity, so its forces round at about `Bb gamma/(beta dt) eps |r|/l0^3`, + which the tolerance's round-off floor (the axial forces' `(EA + BA gamma/(beta dt)) eps + |r|/l0`) did not cover. The floor now takes the bending forces, `(EI + Bb gamma/(beta dt)) + eps |r|/l0^3`, as well; it binds only where that term is the larger. - Finite-EI node tension, curvature and bend moment next to the touchdown point: the floor reaction of the first grounded node was spread over its grounded half-element alone, wherever the touchdown point lay in the touchdown element. The local tension error there fell only at diff --git a/doc/theory.rst b/doc/theory.rst index 19c6a685..97f6de38 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -2671,10 +2671,12 @@ residual decreases; its convergence norm divides each translational residual by frozen at the predictor and each tangent-DOF residual additionally by the nodal tributary length. The force scale is the largest inertial or residual entry, bounded below by 1 N, by the peak element weight, and by the round-off floor -:math:`16\,\epsilon\,\max\big((EA + BA\,\gamma/(\beta\,\Delta t))/L_0\big)\,x_\text{ref}/\text{tol}` -of the axial forces (:math:`x_\text{ref}` the largest coordinate magnitude or element length; -the axial damping takes the strain rate from the Newmark velocity, whose rounding is -:math:`\gamma/(\beta\,\Delta t)` times that of the coordinates). The +:math:`16\,\epsilon\,\max\big((EA + BA\,\gamma/(\beta\,\Delta t))/L_0,\ (EI + B_b\,\gamma/(\beta\,\Delta t))/L_0^3\big)\,x_\text{ref}/\text{tol}` +of the axial and bending forces (:math:`x_\text{ref}` the largest coordinate magnitude or element +length; the axial and bending damping take the strain and curvature rates from the Newmark +velocity, whose rounding is :math:`\gamma/(\beta\,\Delta t)` times that of the coordinates). The +bending term is the larger on a soft line (a tensioner in series, a fine mesh) with bending +damping at a small time step. The deck defaults are relative tolerance :math:`10^{-8}`, absolute tolerance :math:`10^{-14}`, 30 iterations, and 12 backtracks (option ``dynamic_solver``). Option ``modified_newton`` reuses the factorised tangent within a step while each iterate reduces the residual to at most a quarter diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 68c153a5..1bb731e6 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -5746,7 +5746,7 @@ SUBROUTINE eval_res(qcur, use_trial, rn, esx, emx, stash) REAL(wp), POINTER :: Gout(:) INTEGER :: ii, nd INTEGER(INT64) :: ec0, ec1 - REAL(wp) :: xref, xd, xc, ea_r, ka, kt, tw_round + REAL(wp) :: xref, xd, xc, ea_r, ka, kb, kt, tw_round REAL(wp), PARAMETER :: RESID_ROUNDOFF = 16.0_wp REAL(wp), PARAMETER :: STATE_DIVERGED = 1.0e12_wp ec0 = 0_INT64 ! defined even with profiling off (see the step-entry note) @@ -5873,6 +5873,14 @@ SUBROUTINE eval_res(qcur, use_trial, rn, esx, emx, stash) ! held line damped near its first axial mode (BA = 2 zeta EA/omega_1, which at small dt ! puts the damping term well above EA) stagnated at a residual of a few times the ! tolerance and failed its step. + ! Bending takes the curvature from the same coordinate differences over l0^2, and its nodal + ! forces are the moment over l0, so an element's bending rounding is about eps*|r|/l0^3 + ! times EI, plus Bb gamma/(beta dt) for the bending damping (the curvature rate from the + ! Newmark velocity). Where EA/l0 is small (a soft tensioner in series with the line, a + ! fine mesh) this term is the larger: without it a 20 m riser on a 20 kN/m tensioner + ! (EA_eff 4e5 N, 80 elements, Bb 500 N m^2 s, dt 1e-3 s) stagnated at 1.06 times the + ! tolerance and failed its step, and the step recovery's smaller steps only raised the + ! damping term further. xref = MAXVAL(model%l0) DO ii = 1, ndof IF (MOD(ii - 1, 6) < 3) xref = MAX(xref, ABS(qcur(ii))) @@ -5884,6 +5892,9 @@ SUBROUTINE eval_res(qcur, use_trial, rn, esx, emx, stash) ka = ka + model%torsion%couple(ii)**2*model%torsion%gj(ii) IF (model%has_axial_damping) ka = ka + ABS(model%BA(ii))*gm/(bt*dt) ea_r = MAX(ea_r, ka/model%l0(ii)) + kb = ABS(model%EI(ii)) + IF (model%has_bend_damping) kb = kb + ABS(model%Bb(ii))*gm/(bt*dt) + ea_r = MAX(ea_r, kb/model%l0(ii)**3) END DO fscale = MAX(fscale, RESID_ROUNDOFF*EPSILON(CD_ONE)*ea_r*xref/tol) ! Nodal twist: the torque scale of the angle rows, frozen with fscale and formed like it diff --git a/tests/test_hermite_bending_damping_dynamic.f90 b/tests/test_hermite_bending_damping_dynamic.f90 index 39ab0911..bdbb14b4 100644 --- a/tests/test_hermite_bending_damping_dynamic.f90 +++ b/tests/test_hermite_bending_damping_dynamic.f90 @@ -16,6 +16,12 @@ PROGRAM test_hermite_bending_damping_dynamic !! B5 a straight cable moving in its first bending mode with zero acceleration has no elastic !! curvature: the node recovery reports none although the bending damping acts (its viscous !! moment is not EI kappa), while the end force carries the damping. + !! B6 the residual's round-off floor: a soft line (EA 4e5 N, as a tensioner in series) with a + !! stiff bending damping (Bb 1e4 N m^2 s) at dt 1e-4 s. The damping takes the curvature + !! rate from the Newmark velocity, whose rounding is gamma/(beta dt) times the coordinates', + !! so its force rounds at about Bb gamma/(beta dt) eps |r|/l0^3, far above the axial floor + !! EA eps |r|/l0 the tolerance scale allowed: every step stagnated just above the + !! tolerance and failed. Every step converges and the motion stays bounded. USE CableDyn_Precision, ONLY: wp USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Set_Bending_Damping, & @@ -32,6 +38,7 @@ PROGRAM test_hermite_bending_damping_dynamic CALL decay_case('B3 undamped', 1.0e4_wp, 0.0_wp) CALL check_refusals() CALL check_recovery() + CALL check_roundoff_floor() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' ERROR STOP 1 @@ -156,4 +163,34 @@ SUBROUTINE check_recovery() CALL require(NORM2(f_damped - f_plain) > 0.0_wp, 'B5: the end force carries the damping') END SUBROUTINE check_recovery + SUBROUTINE check_roundoff_floor() + TYPE(CD_HermiteCableDynType) :: model + REAL(wp), PARAMETER :: EA_SOFT = 4.0e5_wp, TENS = 6.0e3_wp, A0 = 1.0e-3_wp, BB = 1.0e4_wp, DT = 1.0e-4_wp + REAL(wp) :: l0(NE), ea_(NE), ei_(NE), rho(NE), w(NE), q(NDOF), eps, lt, x, res, zmax + INTEGER :: k, n, es, it + CHARACTER(512) :: em + eps = TENS/EA_SOFT; lt = (1.0_wp + eps)*LL + l0 = LL/REAL(NE, wp); ea_ = EA_SOFT; ei_ = EI; rho = RHOA; w = 0.0_wp + DO k = 1, NN + x = lt*REAL(k - 1, wp)/REAL(NE, wp) + q(6*k - 5:6*k) = [x, 0.0_wp, A0*SIN(PI*x/lt), (1.0_wp + eps), 0.0_wp, (1.0_wp + eps)*A0*PI/lt*COS(PI*x/lt)] + END DO + CALL CD_HermiteCable_Dyn_Init(model, l0, ea_, ei_, rho, w, q, [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3], & + -1.0e4_wp, 0.0_wp, 1.0_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'B6 init: '//TRIM(em)) + CALL CD_HermiteCable_Dyn_Set_Bending_Damping(model, [(BB, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK, 'B6 set damping: '//TRIM(em)) + zmax = 0.0_wp + DO n = 1, 200 + CALL CD_HermiteCable_Dyn_Step(model, DT, 50, 1.0e-8_wp, es, em, it, res) + IF (es /= CD_HCDYN_OK) THEN + CALL require(.FALSE., 'B6 round-off floor: step failed: '//TRIM(em)); RETURN + END IF + zmax = MAX(zmax, ABS(model%q(6*(MID - 1) + 3))) + END DO + WRITE (*, '(A,ES11.4,A,ES11.4)') 'B6 round-off floor: 200 steps converged, last residual ', res, & + ', largest midspan deflection ', zmax + CALL require(zmax <= A0*(1.0_wp + 1.0e-6_wp), 'B6 round-off floor: the damped motion stays bounded') + END SUBROUTINE check_roundoff_floor + END PROGRAM test_hermite_bending_damping_dynamic From 43fcba491129da24a6d1edd5b9b82a9cb1476be2 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Sat, 14 Nov 2026 20:44:01 +0900 Subject: [PATCH 16/47] feat: a finite-EI line may end on a Free point (a free cable end) (#159) A finite-EI line could not end on a Free point: the single-cable route held both end positions and refused the point's loads, and with a Free point the deck went to the multibody march, which holds cable ends. A free-hanging cable or riser with a clump weight (forced-oscillation and tow tests of power cables, installation, a dropped line) had no deck. A Free point that ends exactly one finite-EI line as its End B, from a Coupled or Vessel End A, on a standalone deck whose lines are all finite-EI and that has no BODIES, RODS or other Connect/Free point, is now that line's free end: - the point's Mass, Vol, CdA and CA act on the End B node as an end attachment (weight and buoyancy, added mass, fluid inertia, drag); - the static solve holds the end first on the chord from End A towards the deck position, at the line's length stretched by its hanging weight (the taut seed; a vertical span of exactly the line's length has no catenary seed), then releases it with the attachment polish's warm-started Newton solve (new option release), so the run starts at the end's rest position; - the dynamics hold End A alone; - Point

p channels read the line's End B node. The line must be pinned in bending at both ends and the end net heavy; a torsion restraint at one end is noted and not solved. A deck in which any Free point is not such an end, and a host-driven deck, keeps its behaviour and its refusal messages. The Python deck reader takes the same rule. Checks (tests/test_free_end_deck.f90, a 7 m cable with a 200 kg clump): - still water: top tension = submerged weight to 1e-6 relative, the end one stretched length below the top to 1e-7 m, nothing moves; - 0.5 m/s current: the end rests where the EI = 0 route puts the same deck's Free point, within 2e-5 m at EI 3 N m^2 (0.134357 against 0.134353 m), converging as EI falls; - 0.05 m sway of the top at 0.05 Hz: the end follows in phase, the amplitude ratio within 1 % of the Rayleigh estimate (1.106 against 1.104); - a clamped end, a buoyant end and a second Free point keep their refusal messages; - python/tests/test_deck_native_parity.py: the reader and the driver agree on the accepted and refused decks. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 8 + CMakeLists.txt | 3 + doc/capabilities.rst | 6 + doc/driver_format.md | 28 +- doc/theory.rst | 36 +++ python/cabledyn/deck_file.py | 107 +++++++ python/tests/test_deck_native_parity.py | 89 +++++- src/CableDyn_DeckDriver.f90 | 243 +++++++++++++++- src/CableDyn_HermiteCableDynamic.f90 | 74 ++++- src/CableDyn_OpenFAST_HermiteFMF.f90 | 6 +- tests/test_free_end_deck.f90 | 357 ++++++++++++++++++++++++ 11 files changed, 931 insertions(+), 26 deletions(-) create mode 100644 tests/test_free_end_deck.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d5118d5..4308e252 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ All notable changes to CableDyn are recorded in this file. The format follows ### Added +- A finite-EI line may end on a `Free` point: the line's free End B, its position free in the + static equilibrium and the dynamics, with the point's Mass/Vol/CdA/Ca acting on the end node as + an attachment (a free-hanging cable or riser with a clump). The static solve holds the end on + the stretched chord first and then releases it; `Point

p…` channels read the end node. + Standalone decks of finite-EI lines without bodies, rods or Connect points, every Free point + such an end (pinned in bending at both ends, net heavy, from a Coupled/Vessel End A; a torsion + restraint at one end is noted and not solved); any other deck, + and host-driven decks, keep their behaviour. The Python deck reader takes the same rule. - Bending damping of finite-EI cables: the LINE TYPES EI column takes `EI|Bb`, a Kelvin-Voigt damping moment `Bb` [N m^2 s] times the curvature rate (in the frame carried with the tangent), or `EI|-zeta|f`, the damping ratio of a pure bending mode of frequency `f` (Bb = zeta EI/(pi f)). diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b2474f6..24c5931a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1362,6 +1362,9 @@ set_tests_properties(viv_amplitude_deck PROPERTIES LABELS "fortran;integration;d add_executable(test_viv_diameter_deck tests/test_viv_diameter_deck.f90) target_link_libraries(test_viv_diameter_deck PRIVATE cabledyn_core) add_test(NAME viv_diameter_deck COMMAND test_viv_diameter_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_executable(test_free_end_deck tests/test_free_end_deck.f90) +target_link_libraries(test_free_end_deck PRIVATE cabledyn_core) +add_test(NAME free_end_deck COMMAND test_free_end_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_tests_properties(viv_diameter_deck PROPERTIES LABELS "fortran;integration;dynamic;viv" TIMEOUT 1200) add_executable(test_hermite_viv tests/test_hermite_viv.f90) diff --git a/doc/capabilities.rst b/doc/capabilities.rst index 7bcb038e..f1526d53 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -128,6 +128,12 @@ Line and constitutive capability - Supported - lumped at nodes of a finite-EI cable, standalone and coupled, also on a line restrained in torsion (they add no polar inertia to its twist) + * - Free end of a finite-EI cable (a ``Free`` End B) + - Supported with limits + - a free-hanging cable or riser with a clump or a bare end, its static rest position solved + before the march, on a standalone deck of finite-EI lines without bodies, rods or + Connect points, from a Coupled/Vessel End A; host-driven decks refuse it + (:ref:`theory-free-cable-end`) * - Bend stiffeners (``STIFFENERS``) - Supported with limits - tapered linear-elastic sleeve over a finite-EI line end, adding bending stiffness, mass, diff --git a/doc/driver_format.md b/doc/driver_format.md index 538fb973..51a9812c 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -727,7 +727,7 @@ A POINTS row has 9 columns, `ID Type X Y Z Mass Vol CdA Ca`, or the short 5-colu | `Body` | line end on body N; (X,Y,Z) is the attachment offset in the body frame | X,Y,Z offset; the body supplies Mass/Vol/CdA/Ca | | `RodA` / `RodB` | line end on rod N End A / End B; coordinates come from the `RODS` row | X,Y,Z placeholders; zero Mass/Vol/CdA/Ca | | `Connect` | free internal point where ≥ 2 lines meet; its static position is solved from force balance (lines, weight/buoyancy, current drag) starting at the deck seed, and the march starts there | X,Y,Z seed; Mass, Vol, CdA, Ca ≥ 0 | -| `Free` | free line end (clump or float terminal); a one-line `Connect`, solved the same way | X,Y,Z seed; Mass, Vol, CdA, Ca ≥ 0 | +| `Free` | free line end (clump or float terminal); a one-line `Connect`, solved the same way; as the End B of a finite-EI line, that line's free end ([below](#free-cable-end)) | X,Y,Z seed; Mass, Vol, CdA, Ca ≥ 0 | | `Turbine` / `T` | FAST.Farm coupled point on turbine J (turbine-local coordinates) | X,Y,Z; zero Mass/Vol/CdA/Ca | For dynamic `Connect`/`Free` points, `Mass` is inertial mass and `(rhoW·Vol − Mass)·g` is a @@ -742,6 +742,30 @@ of its BODY `Mass`/`Vol` (see the theory manual, Seabed contact). standalone driver. Non-zero `Mass`/`Vol`/`CdA`/`Ca` on `Fixed`, `Coupled`, `Vessel`, `Body`, `RodA/B`, or `Turbine` points is rejected. +(free-cable-end)= +**A free finite-EI cable end.** A `Free` point that ends exactly one finite-EI line, as its End B +with a `Coupled` or `Vessel` End A (a still hang-off is a `Coupled` point without motion), is that +line's free end on a standalone deck whose lines are all finite-EI and that has no BODIES, +RODS or other `Connect`/`Free` point (a free-hanging cable or riser with a clump or a bare end). +The point's `Mass`, `Vol`, `CdA` and `Ca` act on the line's End B node as an +[ATTACHMENTS](#attachments-optional-finite-ei-lines) row at the line's full arc length (weight +and buoyancy, added mass, and drag against current and waves), with the point's isotropic drag +`½ rhoW CdA ‖w‖ w` on the whole relative velocity rather than the attachment's normal/axial split. The static equilibrium is solved +with the end first held on the chord from End A towards the deck position, at the line's length +stretched by its hanging weight, then released, so the run starts at the end's rest position +(the theory manual, Free cable ends); the dynamics leave the end's position free. `Point

p…` +channels read the line's End B node, and the End B force (`AnchTen`, `Point

F…`) is the line load +the point balances, without the point's own loads (a clump at rest reads its submerged weight). The line must be pinned in bending at both ends (no +non-pinned `END CONNECTIONS` row), with at most one end restrained in torsion, which is then not +solved (a free end carries no moment or torque; the initialisation note says why), and the point +and the line must be net heavy (the end hangs). A deck in which any `Free` point is not such an end +(a clamped or buoyant end, a second `Free` point, a `Connect` point), and a host-driven deck +(OpenFAST, the C API) or a `bathymetryFile` deck, is left as it was: the routes that take `Free` +points run it or refuse a finite-EI cable on a `Free` point by name. On a flat seabed a seed below +the seabed is placed on it at the same stretched length; an end that comes to rest on the seabed +with a net-heavy point is refused by name (the point has no seabed contact of its own on a +finite-EI line), while a bare end rests on the line's own contact. + `Turbine` points (J ≥ 1) need the turbine reference positions from one of two sources: the OpenFAST/FAST.Farm aggregate route, where the host supplies them, or a [TURBINES](#turbines-standalone-farm-decks) section, with which the standalone driver runs the @@ -789,6 +813,8 @@ rod end, and `Free`/`Connect`-to-`Coupled` lines are left as written. fails with `LINE End A fairlead (NodeA) must not be below End B anchor (NodeB)`. The exceptions are a FAST.Farm shared line with both ends on `Turbine` points and a finite-EI line whose End B is also a `Coupled`/`Vessel` point (a line between two moving points, driven at both ends). +- A finite-EI line may end on a `Free` point as its End B on a standalone deck of finite-EI lines + (its [free end](#free-cable-end)); that point does not count as a dynamic point. - In a deck with dynamic points, line ends may be `Fixed`, `Coupled`, `Vessel`, `Connect`, `Free`, `Body`, or `RodA/B`. diff --git a/doc/theory.rst b/doc/theory.rst index 97f6de38..0ad2c0a6 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -229,6 +229,42 @@ as closely. The local value is floored at 0.1 % of the root curvature, as the cu sign near the tip. On the same hang-off, the curvature along the stiffener follows OrcaFlex 11.6d with its stiffener given as a line attachment within 0.5 % of the root curvature. +.. _theory-free-cable-end: + +Free cable ends +~~~~~~~~~~~~~~~ + +A finite-EI line whose End B is a ``Free`` point (:doc:`driver_format`) has that end's position +free: the dynamic march holds only End A's three positions, and the point's mass, volume, drag +area and added-mass coefficient act on the End B node as a discrete attachment (the weight +:math:`(M - \rho V)g`, the added mass :math:`C_a \rho V`, the fluid inertia), with the point's +isotropic drag :math:`\tfrac12 \rho\, C_dA\, |\mathbf w|\,\mathbf w` on the whole relative velocity, +as a ``Free`` point carries it, rather than the attachment's normal/axial split. The point's loads +stay out of the End B force (``AnchTen``, ``Point

F``): it is the force the line exerts on the +point, the line load the point balances, as on the ``EI = 0`` route. The end carries no moment (it is pinned, a natural boundary condition of the +cubic-Hermite element) and no torque: the line is pinned in bending at both ends, and a torsion +restraint at its other end is not solved (it is noted, as for a line with two moving ends). + +The static equilibrium starts from a held seed: the end is placed on the chord from End A towards +the point's deck position, at the line's length stretched by its hanging weight, +:math:`L\,(1 + (W_B + \sum w_i L_i)/EA_{\min})`, so that the seed is the taut straight line (a +vertical span of exactly the line's length has no catenary seed). The line's static solve (with +its attachments' homotopy) runs with that end held; the end is then released and the full-load +equilibrium is solved again with its position free, by the attachment polish's warm-started +Newton solve with its fallbacks, repeated to the drag and surface fixed point. The run starts at +that rest position. The line and the point must be net heavy, so that the end hangs. On a flat +seabed a seed that would lie below the seabed (a line longer than the depth below End A) is placed +on the seabed at the same stretched length, out along the deck chord's horizontal direction; an end +whose point is net heavy and that comes to rest on the seabed is refused, since an attachment has no +seabed contact of its own on a finite-EI line (a bare end rests on the line's contact). + +On a 7 m cable (2.8 kg/m, EA 1e8 N) with a 200 kg clump the top tension is the submerged weight +of both to 1e-6 relative and the end hangs one stretched length below the top to 1e-7 m; in a +0.5 m/s current the end rests where the ``EI = 0`` route puts the same deck's ``Free`` point +(within 2e-5 m at EI 3 N m², and converging to it as EI falls); and a 0.05 m sway of the top at +0.05 Hz moves the end in phase with an amplitude ratio within 1 % of the Rayleigh estimate of the +hanging string with its end mass (``tests/test_free_end_deck.f90``). + .. _theory-output-recovery: Node tension, curvature and bend moment diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index 2e0aaa08..b59704e3 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -3720,6 +3720,102 @@ def validate(self) -> None: raise DeckFormatError(f"{exc}{_STATIC_CHECK_HINT}") from None raise + def _free_cable_ends( + self, + point_types: dict[str, str], + line_type_meta: dict[str, tuple[float, float, float, float]], + effective: Callable[[str, float], float], + ) -> set[str]: + """The Free points native promote_free_cable_ends makes free finite-EI cable ends.""" + if ( + self.caller_driven + or self._rows("BODIES") + or any(segments != 0 for _, segments in self._rod_rows_by_id().values()) + or any(_option_key(option.keyword) == "bathymetry" for option in self.options) + ): + return set() + sections: dict[str, list[tuple[str, float]]] = {} + ends: dict[str, tuple[str, str]] = {} + try: + for section in self._rows("SECTIONS"): + sections.setdefault(str(_native_int(section.tokens[0])), []).append( + (section.tokens[1].lower(), _native_float(section.tokens[2])) + ) + for row in self.lines: + line_key = str(_native_int(row.tokens[0])) + a_tok, b_tok = ( + (row.tokens[2], row.tokens[3]) if len(row.tokens) == 7 else row.tokens[1:3] + ) + ends[line_key] = (str(_native_int(a_tok)), str(_native_int(b_tok))) + if len(row.tokens) == 7: + sections[line_key] = [(row.tokens[1].lower(), _native_float(row.tokens[4]))] + except (ValueError, IndexError): + return set() + if not ends or not all( + any( + line_type_meta.get(name, (0.0, 0.0, 0.0, 0.0))[3] > 0.0 + for name, _ in sections.get(k, []) + ) + for k in ends + ): + return set() + + # pinned in bending at both ends, at most one end restrained in torsion; a numeric zero + # stiffness is pinned / free, as native append_end_connection reads it + def zero_or(token: str, keywords: frozenset[str]) -> bool: + word = _strip_quotes(token).lower() + if word in keywords: + return True + try: + return _native_float(word) == 0.0 + except ValueError: + return False + + clamped: set[str] = set() + twisted: dict[str, int] = {} + for row in self.end_connections: + with contextlib.suppress(ValueError, IndexError): + line_key = str(_native_int(row.tokens[0])) + if not zero_or(row.tokens[2], _PINNED_END_CONNECTIONS): + clamped.add(line_key) + if len(row.tokens) >= 10 and not zero_or(row.tokens[6], _FREE_TORSION_KEYWORDS): + twisted[line_key] = twisted.get(line_key, 0) + 1 + clamped |= {line_key for line_key, count in twisted.items() if count > 1} + rho_w, grav = effective("water_density", 1025.0), effective("gravity", 9.80665) + rows = {str(_native_int(row.tokens[0])): row for row in self.points} + promoted: set[str] = set() + for point_id, point_type in point_types.items(): + if point_type == "connect": + return set() + if point_type != "free": + continue + refs = [k for k, pair in ends.items() if point_id in pair] + if len(refs) != 1 or ends[refs[0]][1] != point_id: + return set() + line_key = refs[0] + if ( + point_types.get(ends[line_key][0], "") not in {"coupled", "vessel"} + or line_key in clamped + ): + return set() + if any(name not in line_type_meta for name, _ in sections.get(line_key, [])): + return set() + values = [_native_float(tok) for tok in rows[point_id].tokens[2:]] + mass, vol = (values[3], values[4]) if len(values) == 7 else (0.0, 0.0) + w_line = sum( + (line_type_meta[name][1] - rho_w * 0.25 * math.pi * line_type_meta[name][0] ** 2) + * grav + * length + for name, length in sections.get(line_key, []) + ) + w_point = (mass - rho_w * vol) * grav + if not (w_line + w_point > 0.0 and w_point >= 0.0): + return set() + if not any(line_type_meta[name][2] > 0.0 for name, _ in sections.get(line_key, [])): + return set() + promoted.add(point_id) + return promoted + def _validate(self) -> None: required = {"LINE TYPES", "POINTS", "LINES"} if not self._rows("LINES") and (self._rows("RODS") or self._rows("BODIES")): @@ -4383,6 +4479,15 @@ def end_key(token: str) -> str: f"z = -WtrDpth = {z_floor:.10g} m by more than the {tolerance:.2e} m " "seabed tolerance; place the anchor on (or above) the seabed" ) + # Native promote_free_cable_ends: a Free point that ends exactly one finite-EI line as its + # End B (from a Coupled/Vessel End A, pinned and free in torsion, net heavy), on a + # standalone deck of finite-EI lines with no BODIES, RODS or Connect point, is the line's + # free End B (its loads an end attachment) and reads Fixed from here on, when every Free + # point of the deck is such an end; otherwise the deck is left as it is. + free_cable_ends = self._free_cable_ends(point_types, line_type_meta, effective) + self._free_cable_end_points = free_cable_ends + for point_id in free_cable_ends: + point_types[point_id] = "fixed" has_dynamic_points = any( point_type in {"connect", "free"} or point_type.startswith(("body", "rod")) for point_type in point_types.values() @@ -6379,6 +6484,8 @@ def _check_torsion_lines( "its LINE TYPES rows give no GJ (the 14-column row; torsion has no " "EI/1.3 default)" ) + elif end_b in getattr(self, "_free_cable_end_points", set()): + note = "its End B is a free end (a Free point)" elif point_types[end_b] != "fixed": note = "it has two moving ends (torsion needs a Fixed End B)" elif dynamic and not force_blend: diff --git a/python/tests/test_deck_native_parity.py b/python/tests/test_deck_native_parity.py index 8cd87439..47bfe11e 100644 --- a/python/tests/test_deck_native_parity.py +++ b/python/tests/test_deck_native_parity.py @@ -2141,7 +2141,8 @@ def test_torsion_scope_rules_follow_the_native_checks(): 'point; line 1 ends on a "free" point', ) # one restrained end only, or none, is ignored: the same verdict as the six-column rows (here - # the multibody march's, which ends no finite-EI cable on a Free point) + # both run: the Free End B is the line's free end, promote_free_cable_ends, and the one-end + # restraint is noted, not solved) one_end = _edit(_torsion_two_moving("1 A Pinned 1 0 0 Free 0 0 1 0\n"), _NO_TORSION_OUTPUTS) six = _edit( _torsion_two_moving("1 A Pinned 1 0 0\n"), @@ -2149,7 +2150,7 @@ def test_torsion_scope_rules_follow_the_native_checks(): _NO_TORSION_OUTPUTS, ) for deck in (six, one_end): - _rejects(deck, "a cable end on a Free/Connect point or a Point3 buoy") + DeckFile.from_text(deck) both_free = _edit( _TORSION, (_TORSION_ROW_A, "1 A Rigid 1 0 0 Free 0 0 1 0\n"), @@ -2985,3 +2986,87 @@ def test_dtm_bound_matches_the_driver(dt, accepted, ei, tmp_path): assert _accepted(deck) == accepted if not accepted: assert "dtM must be at least 1e-100 s" in completed.stderr + + +# ------------------------------------------------------------------ a free cable end + +_FREE_END_DECK = """--------------------- CableDyn Input File --------------------------------- +free cable end +----------------------- LINE TYPES ------------------------------------------ +TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t +(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) +cable 0.048 2.8 1.0e8 0.0 3000 1.2 0.0 1.0 0.0 +----------------------- POINTS ---------------------------------------------- +ID Attachment X Y Z M V CdA CA +(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) +1 Coupled 0.0 0.0 -0.5 0 0 0 0 +2 Free 0.0 0.0 -7.5 {clump} +{extra}----------------------- LINES ----------------------------------------------- +ID LineType AttachA AttachB UnstrLen NumSegs Outputs +(-) (-) (-) (-) (m) (-) (-) +1 cable 1 2 7.0 70 - +{endconn}---------------------- OPTIONS ---------------------------------------------- +1025 rhoW +9.80665 g +20 WtrDpth +0.005 dtM +0.1 TMax +---------------------- OUTPUTS ----------------------------------------------- +FairTen1 +Point2pz +END +------------------------- need this line -------------------------------------- +""" +_CLAMPED_B = ( + "--------------------- END CONNECTIONS ----------------------------------\n" + "LineID End Stiffness EzX EzY EzZ\n(-) (-) (N-m/rad) (-) (-) (-)\n1 B Rigid 0 0 1\n" +) + + +@pytest.mark.parametrize( + ("clump", "extra", "endconn", "message"), + [ + ("200 0.02548 0.06 1.0", "", "", None), + ("0 0 0 0", "", "", None), + ( + "200 0.02548 0.06 1.0", + "", + _CLAMPED_B.replace("1 B Rigid 0 0 1", "1 B 0.0 0 0 1"), + None, + ), + ("200 0.02548 0.06 1.0", "", _CLAMPED_B, "non-pinned END CONNECTIONS need End B"), + ("10 0.5 0.06 1.0", "", "", "not supported on the multibody march"), + ( + "200 0.02548 0.06 1.0", + "3 Free 5.0 0.0 -5.0 10 0 0 0\n", + "", + "not supported on the multibody march", + ), + ], +) +def test_free_cable_end_matches_the_driver(clump, extra, endconn, message, tmp_path): + # a finite-EI line on a Free End B: the line's free end, the point's loads an end attachment + text = _FREE_END_DECK.format(clump=clump, extra=extra, endconn=endconn) + if message is None: + DeckFile.from_text(text) + else: + _rejects(text, message) + if not _PARITY_DRIVER or not Path(_PARITY_DRIVER).is_file(): + return + deck = tmp_path / "free_end.dat" + deck.write_text(text, encoding="utf-8") + completed = subprocess.run( + [_PARITY_DRIVER, str(deck), str(tmp_path / "free_end")], + capture_output=True, + text=True, + errors="replace", + cwd=tmp_path, + timeout=600, + env={**os.environ, "OMP_NUM_THREADS": "1", "OPENBLAS_NUM_THREADS": "1"}, + check=False, + ) + if message is None: + assert completed.returncode == 0, completed.stderr[-600:] + else: + assert completed.returncode == 1, completed.stderr[-600:] + assert message in completed.stderr diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 372f8d0a..ae0033a9 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -499,6 +499,10 @@ MODULE CableDyn_DeckDriver ! the Body attachment of a Point3 BODY: stepped as a Free point with the BODY Mass/Vol/CdA/Ca ! (copied into mass, vol, cda, ca above), its seabed contact included LOGICAL :: point3 = .FALSE. + ! a Free point that ends exactly one finite-EI line (its End B) on a standalone deck of + ! finite-EI lines: the line's End B is free and the point's Mass/Volume/CdA/CA ride on it as + ! an end attachment (promote_free_cable_ends); ptype reads 'fixed' for the static seed only + LOGICAL :: free_cable_end = .FALSE. INTEGER :: deck_line = 0 ! deck file line of the row, for error messages END TYPE @@ -596,6 +600,9 @@ MODULE CableDyn_DeckDriver ! the deck's written NodeB (MoorDyn's AttachB) is then End A, otherwise End B. Active line ! control reads it for a line with no single host-driven end. LOGICAL :: ends_swapped = .FALSE. + ! End B on a Free point (promote_free_cable_ends): its position is free in the static + ! equilibrium and the dynamics, the point's loads acting as an end attachment + LOGICAL :: free_end_b = .FALSE. ! ATTACHMENTS (finite-EI lines): one column per discrete attachment -- arc length from ! End A [m], mass [kg], displaced volume [m^3], drag area CdA [m^2], added-mass Ca [-], ! axial drag area CdAx [m^2] (rows 1-6). @@ -3385,8 +3392,14 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, ! collapse of the endpoint tangent norm. Release the interior and tangent DOFs at ! dynamic hand-off; only the two endpoint translations remain constrained. The ! planar equilibrium is still an exact three-dimensional initial state by symmetry. - ALLOCATE (dynamic_fixed_dofs(6)) - dynamic_fixed_dofs = [1, 2, 3, ndof - 5, ndof - 4, ndof - 3] + IF (ln%free_end_b) THEN + ! a free End B (a Free point, promote_free_cable_ends): End A alone is held + ALLOCATE (dynamic_fixed_dofs(3)) + dynamic_fixed_dofs = [ndof - 5, ndof - 4, ndof - 3] + ELSE + ALLOCATE (dynamic_fixed_dofs(6)) + dynamic_fixed_dofs = [1, 2, 3, ndof - 5, ndof - 4, ndof - 3] + END IF IF (has_att) THEN w_bare = w_bare_deck IF (SIZE(l0) /= SIZE(l0_deck_att)) CALL remap_elem_by_reference_arc(w_bare, l0_deck_att, l0) @@ -3475,6 +3488,45 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, ' attachment(s) lumped at the nearest nodes (largest arc offset ', att_offset, ' m)' CALL report_note(note_text) END IF + IF (ln%free_end_b) THEN + ! The static solve held End B at the Free point's deck position (the seed); release it: the + ! full-load equilibrium with End B's position free, its loads the end attachment's (the + ! point's weight, buoyancy and current drag) and the line's own. + BLOCK + INTEGER, ALLOCATABLE :: fixed_rel(:), node_rel(:) + REAL(wp), ALLOCATABLE :: att_rel(:, :) + REAL(wp) :: rel_floor + fixed_rel = PACK(fixed_dofs, fixed_dofs > 3) + IF (has_att) THEN + node_rel = att_node + att_rel = ln%att + ELSE + ALLOCATE (node_rel(0), att_rel(6, 0)) + END IF + CALL attachment_static_polish(l0, ea, ei, w, w, diam, node_rel, att_rel, q_static, fixed_rel, & + contact_enabled, contact_z, frame_cs, endconn_k, endconn_d0_local, & + endconn_mode, opts, static_tol, ErrStat, ErrMsg, bathymetry, cur_obj, & + tol_floor=COUPLED_STATIC_TOL, floor_res=rel_floor, release=.TRUE.) + IF (ErrStat /= CD_DECKDRV_OK) THEN + ErrMsg = 'CableDyn_DeckDriver: line '//TRIM(int_to_str(ln%id))//': static equilibrium of the free '// & + 'End B (released from the Free point''s deck position): '//TRIM(ErrMsg) + RETURN + END IF + fixed_dofs = fixed_rel + ! a net-heavy point at a free end that comes to rest on the seabed would sink into the line's + ! contact (an attachment has no seabed contact of its own): refused by name + IF (contact_enabled .AND. q_static(3) <= contact_z) THEN + IF (ANY(node_rel == 1 .AND. att_rel(2, :) - opts%rhoW*att_rel(3, :) > CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'line '//TRIM(int_to_str(ln%id))//': the free End B comes to rest on '// & + 'the seabed with the net weight of its Free point, which has no seabed contact of its '// & + 'own on a finite-EI line; shorten the line, or end it on a Fixed point there'); RETURN + END IF + END IF + WRITE (note_text, '(A,I0,A,3ES12.4,A)') 'line ', ln%id, ': free End B at rest at (', & + q_static(1:3), ') m in the line frame' + CALL report_note(note_text) + END BLOCK + END IF ! Dynamic step controls: the deck's dynamic_solver relative tolerance and iteration budget ! (default 1e-8 and 30) on every route, standalone or coupled, so that a cable driven by the ! same motion steps to the same state on each. The tolerance is not a coupling-force accuracy @@ -3689,8 +3741,9 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL fail(ErrStat, ErrMsg, 'finite-EI cable added-mass wiring failed: '//TRIM(em)); RETURN END IF IF (has_att) THEN - CALL CD_HFMF_Set_Attachments(cable, att_node, ln%att(2, :), ln%att(3, :), ln%att(4, :), ln%att(6, :), & - ln%att(5, :), opts%rhoW, opts%g, es, em) + CALL CD_HFMF_Set_Attachments(cable, att_node, ln%att(2, :), ln%att(3, :), ln%att(4, :), & + MAX(ln%att(6, :), CD_ZERO), ln%att(5, :), opts%rhoW, opts%g, es, em, & + isotropic=ln%att(6, :) < CD_ZERO, point_load=ln%att(6, :) < CD_ZERO) IF (es /= CD_HFMF_OK) THEN CALL fail(ErrStat, ErrMsg, 'finite-EI cable attachment wiring failed: '//TRIM(em)); RETURN END IF @@ -5722,14 +5775,15 @@ SUBROUTINE add_share(e, share) INTEGER, INTENT(IN) :: e REAL(wp), INTENT(IN) :: share cdn(e) = cdn(e) + share*att(4, k)/(diam(e)*l0(e)) - cdt(e) = cdt(e) + share*att(6, k)/(4.0_wp*QUARTER_PI*diam(e)*l0(e)) + ! (a point's isotropic drag, CdAx < 0, smears with CdAx = CdA for the continuation start) + cdt(e) = cdt(e) + share*MERGE(att(4, k), att(6, k), att(6, k) < CD_ZERO)/(4.0_wp*QUARTER_PI*diam(e)*l0(e)) END SUBROUTINE add_share END SUBROUTINE smear_attachment_drag SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att, q, fixed_dofs, & contact_enabled, contact_z, frame_cs, endconn_k, endconn_d0, endconn_mode, & opts, tol, ErrStat, ErrMsg, bathymetry, cur_obj, fell_back, cdn_bare, & - cdt_bare, tol_floor, floor_res) + cdt_bare, tol_floor, floor_res, release) !! Homotopy from the smeared-attachment equilibrium q to the discrete one: in warm-started !! Newton solves the element weights move from w_smear to w_bare while the lumped nodal !! forces -(m - rho V) g e_z (-m g e_z for an attachment above the still-water level, @@ -5771,6 +5825,9 @@ SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att !! the next update rule, as the line's own static solve accepts a floor at the coupled static !! tolerance; floor_res (optional out) is the relative residual of the returned state when it !! lies above tol, and 0 otherwise. + !! release (optional, default false) skips the homotopy: q is an equilibrium of the full loads + !! with more DOFs held than fixed_dofs holds (a free end seeded held), and the full-load solve + !! runs at once, at least once, then to the fixed point as above. REAL(wp), INTENT(IN) :: l0(:), ea(:), ei(:), w_bare(:), w_smear(:), diam(:), att(:, :) INTEGER, INTENT(IN) :: node(:), fixed_dofs(:), endconn_mode(2) REAL(wp), INTENT(INOUT) :: q(:) @@ -5784,6 +5841,7 @@ SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att LOGICAL, INTENT(OUT), OPTIONAL :: fell_back REAL(wp), INTENT(IN), OPTIONAL :: cdn_bare(:), cdt_bare(:), tol_floor REAL(wp), INTENT(OUT), OPTIONAL :: floor_res + LOGICAL, INTENT(IN), OPTIONAL :: release INTEGER, PARAMETER :: NSTEP = 8, MAX_FIXED_POINT = 60 ! the update rules of a solve (solve_with, static_solve) INTEGER, PARAMETER :: NEWTON = 1, PSEUDO_TRANSIENT = 2, MERIT = 3 @@ -5797,7 +5855,7 @@ SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att REAL(wp), ALLOCATABLE :: f_att(:), f_drag(:), dry(:), knnode(:), wl(:), q_out(:), curv(:) REAL(wp) :: lam, lam_done, dlam, res, change INTEGER :: i, ne, fp, n_failed, n_ok, grow_after - LOGICAL :: has_drag, converged, newton_failed, grown + LOGICAL :: has_drag, converged, newton_failed, grown, release_ ! which attachments are above the still-water level: in the state the last solve took its ! loads at, and in the state it returned LOGICAL, ALLOCATABLE :: att_dry(:), att_dry_now(:) @@ -5855,6 +5913,10 @@ SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att n_ok = 0 grow_after = 2 grown = .FALSE. + release_ = .FALSE. + IF (PRESENT(release)) release_ = release + IF (release_) lam_done = CD_ONE + wl = w_bare ! the full-load weights (the homotopy sets its own per step) DO WHILE (lam_done < CD_ONE) lam = MIN(CD_ONE, lam_done + dlam) wl = w_bare + (CD_ONE - lam)*(w_smear - w_bare) @@ -5902,7 +5964,7 @@ SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att ! the weight of the other side: the full-load solve is repeated (below) until none does. A ! line below the surface (or wholly above it) without attachment drag is done. CALL attachment_static_weight(q, node, att, opts, f_att, att_dry_now) - IF (.NOT. has_drag .AND. ALL(att_dry_now .EQV. att_dry)) RETURN + IF (.NOT. release_ .AND. .NOT. has_drag .AND. ALL(att_dry_now .EQV. att_dry)) RETURN DO fp = 1, MAX_FIXED_POINT CALL solve_with(CD_ONE, converged, change) IF (ErrStat /= CD_DECKDRV_OK) RETURN @@ -6071,7 +6133,8 @@ SUBROUTINE attachment_static_drag(q, node, att, opts, frame_cs, f, ErrStat, ErrM CALL fail(ErrStat, ErrMsg, TRIM(em)); RETURN END IF ul = [frame_cs(1)*ug(1) + frame_cs(2)*ug(2), -frame_cs(2)*ug(1) + frame_cs(1)*ug(2), ug(3)] - CALL CD_HermiteCable_Attachment_Drag(ul, q(base + 4:base + 6), opts%rhoW, att(4, k), att(6, k), fd, es, em) + CALL CD_HermiteCable_Attachment_Drag(ul, q(base + 4:base + 6), opts%rhoW, att(4, k), MAX(att(6, k), CD_ZERO), & + fd, es, em, isotropic=att(6, k) < CD_ZERO) IF (es /= CD_HCDYN_OK) THEN CALL fail(ErrStat, ErrMsg, TRIM(em)); RETURN END IF @@ -14403,6 +14466,7 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti END IF END DO CALL normalize_stock_endpoint_order(points, lines, sections, types) + CALL promote_free_cable_ends(points, lines, sections, types, opts, SIZE(bodies), SIZE(rods), ext_march) tors_marched = ext_march IF (PRESENT(static_run)) tors_marched = ext_march .AND. .NOT. static_run ! A static check marches no step, so it needs no dtM: on the routes no caller marches @@ -19309,6 +19373,139 @@ LOGICAL FUNCTION finite_ei_by_name(line_id) RESULT(fin) END FUNCTION finite_ei_by_name END SUBROUTINE normalize_stock_endpoint_order + SUBROUTINE promote_free_cable_ends(points, lines, sections, types, opts, n_bodies, n_rods, caller_driven) + !! A Free point that ends exactly one finite-EI line, as its End B, from a Coupled or Vessel + !! End A, on a standalone deck whose lines are all finite-EI and that has no other dynamic + !! object (BODIES, RODS, other Free/Connect points), becomes the line's free End B: the line's + !! End B position is free in the static equilibrium and the dynamics, and the point's Mass, + !! Volume, CdA and CA ride on it as an end attachment (ATTACHMENTS at the line's full arc + !! length). The line must be pinned in bending at both ends with at most one end restrained in + !! torsion, which is then not solved (a free end carries no moment or torque), and the end must + !! hang (the point and the line net heavy). The point's type reads 'fixed' from here + !! on, so the builder seeds the static solve with the end held, then releases it + !! (build_one_hermite_cable): the seed is on the chord from End A towards the deck position, at + !! the line's length stretched by its hanging weight (the taut straight line; a vertical span of + !! exactly the line's length has no catenary seed). A deck with any Free point that is not such + !! an end is left as it is, to the routes that take Free points or refuse them by name. + TYPE(DeckPoint), INTENT(INOUT) :: points(:) + TYPE(DeckLine), INTENT(INOUT) :: lines(:) + TYPE(DeckSection), INTENT(IN) :: sections(:) + TYPE(DeckLineType), INTENT(IN) :: types(:) + TYPE(DeckOptions), INTENT(IN) :: opts + INTEGER, INTENT(IN) :: n_bodies, n_rods + LOGICAL, INTENT(IN) :: caller_driven + INTEGER :: ip, j, nref, jl, ia, k, it + INTEGER :: cand_line(SIZE(points)) + REAL(wp) :: seed(3, SIZE(points)), arc, wline, wpt, ea_min, chord(3), cl + REAL(wp), ALLOCATABLE :: att_new(:, :) + IF (caller_driven .OR. n_bodies > 0 .OR. n_rods > 0 .OR. SIZE(lines) < 1) RETURN + ! (a bathymetry deck keeps its behaviour: the seed is placed against the flat seabed only) + IF (opts%has_bathymetry_file) RETURN + DO j = 1, SIZE(lines) + IF (.NOT. finite_ei_line(lines(j)%id)) RETURN + END DO + cand_line = 0 + DO ip = 1, SIZE(points) + IF (TRIM(points(ip)%ptype) == 'connect') RETURN + IF (TRIM(points(ip)%ptype) /= 'free') CYCLE + nref = 0 + jl = 0 + DO j = 1, SIZE(lines) + IF (lines(j)%nodeA == points(ip)%id .OR. lines(j)%nodeB == points(ip)%id) THEN + nref = nref + 1 + jl = j + END IF + END DO + IF (nref /= 1) RETURN + IF (lines(jl)%nodeB /= points(ip)%id) RETURN + ia = find_point(points, lines(jl)%nodeA) + IF (ia < 1) RETURN + ! End A must be the driven (or still) fairlead of a deck without dynamic points + IF (TRIM(points(ia)%ptype) /= 'coupled' .AND. TRIM(points(ia)%ptype) /= 'vessel') RETURN + ! pinned in bending at both ends; a torsion restraint at one end is not solved (a free end + ! carries no torque; resolve_one_end_torsion notes it), at both ends the deck is left as it is + IF (ANY(lines(jl)%endconn_mode /= CD_ENDCONN_PINNED) .OR. COUNT(lines(jl)%tors_mode /= TORS_FREE) > 1) RETURN + ! the hanging weight (line and point, in water) and the softest section + wline = CD_ZERO + ea_min = HUGE(CD_ONE) + arc = CD_ZERO + DO k = 1, SIZE(sections) + IF (sections(k)%line_id /= lines(jl)%id) CYCLE + it = find_type(types, sections(k)%ltype_name) + IF (it < 1) RETURN + wline = wline + (types(it)%mass - opts%rhoW*QUARTER_PI*types(it)%diam**2)*opts%g*sections(k)%length + IF (types(it)%ea > CD_ZERO) ea_min = MIN(ea_min, types(it)%ea) + arc = arc + sections(k)%length + END DO + wpt = (points(ip)%mass - opts%rhoW*points(ip)%vol)*opts%g + IF (.NOT. (wline + wpt > CD_ZERO .AND. wpt >= CD_ZERO) .OR. .NOT. ea_min < HUGE(CD_ONE)) RETURN + chord = points(ip)%pos - points(ia)%pos + cl = NORM2(chord) + IF (cl > CD_ZERO) THEN + chord = chord/cl + ELSE + chord = [CD_ZERO, CD_ZERO, -CD_ONE] + END IF + seed(:, ip) = points(ia)%pos + chord*arc*(CD_ONE + (wline + wpt)/ea_min + 1.0e-9_wp) + ! a seed below a flat seabed (a line longer than the depth below End A) goes onto the seabed at + ! the same stretched length, out along the deck chord's horizontal direction (+x without one), + ! so the held seed is still the taut straight line; the release lays the end on the seabed + IF (opts%has_wtrdpth .AND. .NOT. opts%has_bathymetry_file) THEN + IF (seed(3, ip) < -opts%wtrdpth) THEN + BLOCK + REAL(wp) :: dlen, dz, hz(2), hn + dlen = NORM2(seed(:, ip) - points(ia)%pos) + dz = -opts%wtrdpth - points(ia)%pos(3) + hz = points(ip)%pos(1:2) - points(ia)%pos(1:2) + hn = NORM2(hz) + IF (hn > CD_ZERO) THEN + hz = hz/hn + ELSE + hz = [CD_ONE, CD_ZERO] + END IF + seed(1:2, ip) = points(ia)%pos(1:2) + hz*SQRT(MAX(dlen**2 - dz**2, CD_ZERO)) + seed(3, ip) = -opts%wtrdpth + END BLOCK + END IF + END IF + cand_line(ip) = jl + END DO + ! every Free point of the deck is a free cable end: promote them + DO ip = 1, SIZE(points) + jl = cand_line(ip) + IF (jl < 1) CYCLE + points(ip)%pos = seed(:, ip) + points(ip)%free_cable_end = .TRUE. + points(ip)%ptype = 'fixed' + lines(jl)%free_end_b = .TRUE. + IF (points(ip)%mass > CD_ZERO .OR. points(ip)%vol > CD_ZERO .OR. points(ip)%cda > CD_ZERO) THEN + arc = SUM(sections%length, MASK=sections%line_id == lines(jl)%id) + IF (ALLOCATED(lines(jl)%att)) THEN + ALLOCATE (att_new(6, SIZE(lines(jl)%att, 2) + 1)) + att_new(:, 1:SIZE(lines(jl)%att, 2)) = lines(jl)%att + ELSE + ALLOCATE (att_new(6, 1)) + END IF + ! CdAx -1: the internal marker of a point's isotropic drag rho CdA |w| w / 2 (a deck + ! ATTACHMENTS row cannot give a negative CdAx) + att_new(:, SIZE(att_new, 2)) = [arc, points(ip)%mass, points(ip)%vol, points(ip)%cda, points(ip)%ca, -CD_ONE] + CALL MOVE_ALLOC(att_new, lines(jl)%att) + END IF + END DO + CONTAINS + LOGICAL FUNCTION finite_ei_line(line_id) RESULT(fin) + INTEGER, INTENT(IN) :: line_id + INTEGER :: kk, itt + fin = .FALSE. + DO kk = 1, SIZE(sections) + IF (sections(kk)%line_id /= line_id) CYCLE + itt = find_type(types, sections(kk)%ltype_name) + IF (itt < 1) CYCLE + IF (types(itt)%ei > CD_ZERO) fin = .TRUE. + END DO + END FUNCTION finite_ei_line + END SUBROUTINE promote_free_cable_ends + SUBROUTINE reverse_line_sections(sections, line_id) !! Reverse the in-deck order of the SECTIONS rows belonging to one line (their !! positions in the global array are kept; only the payloads swap). @@ -19353,6 +19550,8 @@ SUBROUTINE check_fixed_point_above_seabed(pt, z_floor, what, ErrStat, ErrMsg, z_ REAL(wp) :: tol ErrStat = 0; ErrMsg = '' + ! a free cable end's position is a static seed, not an anchor (promote_free_cable_ends) + IF (pt%free_cable_end) RETURN tol = CD_Static_Anchor_Seabed_Tolerance(z_floor) ! (a relative round-off margin keeps an anchor written exactly one tolerance off inside) IF (ABS(pt%pos(3) - z_floor) <= tol*(CD_ONE + 1.0e-9_wp)) THEN @@ -20045,9 +20244,11 @@ SUBROUTINE finalize_checks(types, bodies, rod_types, rods, points, lines, sectio CASE ('fixed', 'coupled', 'vessel') ! Mass/Vol/CdA/Ca (clump weight, buoyancy, drag area, added mass) apply only to ! Connect/Free points; non-zero values on a held point would be silently ignored, - ! so fail closed rather than solve as if they were zero. - IF (ABS(points(i)%mass) > CD_ZERO .OR. ABS(points(i)%vol) > CD_ZERO .OR. & - ABS(points(i)%cda) > CD_ZERO .OR. ABS(points(i)%ca) > CD_ZERO) THEN + ! so fail closed rather than solve as if they were zero. (A free cable end keeps its Free + ! point's columns: they act as its end attachment, promote_free_cable_ends.) + IF ((ABS(points(i)%mass) > CD_ZERO .OR. ABS(points(i)%vol) > CD_ZERO .OR. & + ABS(points(i)%cda) > CD_ZERO .OR. ABS(points(i)%ca) > CD_ZERO) .AND. & + .NOT. points(i)%free_cable_end) THEN CALL fail(ErrStat, ErrMsg, 'POINT '//'(Fixed/Coupled/Vessel) must not carry '// & 'Mass/Vol/CdA/Ca load columns (those apply to Connect/Free points)'); RETURN END IF @@ -33892,6 +34093,22 @@ SUBROUTINE write_hermite_model_row(unit, time, channels, lines, points, cables, CALL fail(ErrStat, ErrMsg, 'Hermite motion OUTPUT is missing its point'); RETURN END IF val = motion%q(comp, mi, motion_time_index) + ELSE IF (points(pp)%free_cable_end) THEN + ! a free cable end (promote_free_cable_ends): the End B node of its line + BLOCK + INTEGER :: lf + CHARACTER(NAMELEN) :: chf + CHARACTER(3), PARAMETER :: AXES = 'xyz' + DO lf = 1, SIZE(lines) + IF (lines(lf)%free_end_b .AND. lines(lf)%nodeB == pidx) EXIT + END DO + IF (lf > SIZE(lines)) THEN + CALL fail(ErrStat, ErrMsg, 'Hermite Point OUTPUT: free cable end without its line'); RETURN + END IF + WRITE (chf, '(A,I0,A,I0,A)') 'L', lines(lf)%id, 'N', cables(lf)%line%nn, 'p'//AXES(comp:comp) + CALL eval_cable_channel(cables(lf), chf, val, ErrStat, ErrMsg, mesh_node=.TRUE.) + IF (ErrStat /= CD_DECKDRV_OK) RETURN + END BLOCK ELSE val = points(pp)%pos(comp) END IF @@ -41187,6 +41404,8 @@ SUBROUTINE resolve_one_end_torsion(types, bodies, rods, points, lines, sections, why = 'its LINE TYPES rows give no GJ (the 14-column row; torsion has no EI/1.3 default)' ELSE IF (j < 1) THEN why = 'its End B point is undefined' + ELSE IF (points(j)%free_cable_end) THEN + why = 'its End B is a free end (a Free point)' ELSE IF (TRIM(points(j)%ptype) /= 'fixed') THEN why = 'it has two moving ends (torsion needs a Fixed End B)' ELSE IF (.NOT. opts%alpha_force_blend .AND. (caller_driven .OR. (opts%has_tmax .AND. opts%tmax > CD_ZERO))) THEN diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 1bb731e6..75463237 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -506,6 +506,10 @@ MODULE CableDyn_HermiteCableDynamic LOGICAL :: a_restored = .FALSE. INTEGER, ALLOCATABLE :: att_node(:) REAL(wp), ALLOCATABLE :: att_w(:), att_b(:), att_fk(:), att_cda(:), att_cdax(:) + ! a point's isotropic drag (a Free point ending the line) in place of the normal/axial split + LOGICAL, ALLOCATABLE :: att_iso(:) + ! the point a free end carries: in the equations of motion, not in the end force + LOGICAL, ALLOCATABLE :: att_point(:) ! The two nodal mass terms each attachment adds to Mgb, the dry mass m and the added mass ! Ca rho V, kept so that a length change rebuilds Mgb in the order initialisation used. REAL(wp), ALLOCATABLE :: att_mass(:), att_madd(:) @@ -2218,7 +2222,7 @@ END SUBROUTINE fail_fr END SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Anchors SUBROUTINE CD_HermiteCable_Dyn_Set_Attachments(model, node, mass, volume, cda, cdax, ca, rho_w, gravity, & - ErrStat, ErrMsg) + ErrStat, ErrMsg, isotropic, point_load) !! Install discrete point attachments (clumps, buoyancy modules) lumped at nodes. Each !! carries its weight and buoyancy (m - rho V) g downward, isotropic added mass !! Ca rho V (with the dry mass m, a constant nodal mass on the translational DOFs), the @@ -2229,12 +2233,18 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Attachments(model, node, mass, volume, cda, c !! surface an attachment loses its buoyancy and fluid loads. Called once, after Init and !! never together with internal waves; the initial acceleration is refreshed. The !! kinetic energy (CD_HermiteCable_Dyn_Energy) then includes the attachment mass and its - !! added mass Ca rho V. + !! added mass Ca rho V. isotropic (optional, default false) makes an attachment's drag a + !! point's, rho CdA |w| w / 2 on the whole relative velocity (CdAx unused), as a Free point + !! that ends the line carries it. point_load (optional, default false) marks the attachment + !! that is the point itself on a free end: it stays in the equations of motion, but + !! CD_HermiteCable_Dyn_End_Force leaves its loads out, so the end force is the line load + !! the point balances (its submerged weight for a clump at rest). TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model INTEGER, INTENT(IN) :: node(:) REAL(wp), INTENT(IN) :: mass(:), volume(:), cda(:), cdax(:), ca(:), rho_w, gravity INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg + LOGICAL, INTENT(IN), OPTIONAL :: isotropic(:), point_load(:) INTEGER :: n, k, d, dof, es REAL(wp), ALLOCATABLE :: a_old(:), mgb_old(:, :) CHARACTER(1024) :: em @@ -2259,6 +2269,20 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Attachments(model, node, mass, volume, cda, c ErrMsg = 'CD_HermiteCable_Dyn_Set_Attachments: node/mass/volume/cda/ca must share one length >= 1' RETURN END IF + IF (PRESENT(isotropic)) THEN + IF (SIZE(isotropic) /= n) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_Attachments: isotropic must have one entry per attachment' + RETURN + END IF + END IF + IF (PRESENT(point_load)) THEN + IF (SIZE(point_load) /= n) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_Attachments: point_load must have one entry per attachment' + RETURN + END IF + END IF IF (ANY(node < 1) .OR. ANY(node > model%nn)) THEN ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_Attachments: node out of range'; RETURN END IF @@ -2279,7 +2303,12 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Attachments(model, node, mass, volume, cda, c a_old = model%a mgb_old = model%Mgb ALLOCATE (model%att_node(n), model%att_w(n), model%att_b(n), model%att_fk(n), model%att_cda(n), & - model%att_cdax(n), model%att_mass(n), model%att_madd(n)) + model%att_cdax(n), model%att_mass(n), model%att_madd(n), model%att_iso(n), & + model%att_point(n)) + model%att_iso = .FALSE. + IF (PRESENT(isotropic)) model%att_iso = isotropic + model%att_point = .FALSE. + IF (PRESENT(point_load)) model%att_point = point_load model%att_node = node model%att_w = (mass - rho_w*volume)*gravity model%att_b = rho_w*gravity*volume @@ -2299,7 +2328,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Attachments(model, node, mass, volume, cda, c CALL solve_consistent_acceleration(model, es, em) IF (es /= CD_HCDYN_OK) THEN DEALLOCATE (model%att_node, model%att_w, model%att_b, model%att_fk, model%att_cda, model%att_cdax, & - model%att_mass, model%att_madd) + model%att_mass, model%att_madd, model%att_iso, model%att_point) model%has_attach = .FALSE. model%Mgb = mgb_old model%a = a_old @@ -2309,17 +2338,40 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Attachments(model, node, mass, volume, cda, c END SUBROUTINE CD_HermiteCable_Dyn_Set_Attachments SUBROUTINE CD_HermiteCable_Attachment_Drag(rel_velocity, tangent, rho, cda, cdax, force, ErrStat, ErrMsg, & - jac_rel, jac_tan) + jac_rel, jac_tan, isotropic) !! Quadratic drag of a line attachment: f = rho [CdA |w_n| w_n + CdAx |w_t| w_t] / 2 with !! w the relative fluid velocity split normal and axial to the line tangent (any non-zero !! vector; normalised internally). Optional Jacobians d f/d w and d f/d tangent, as a pair. !! Shared by the dynamic residual and the deck static solve, so both use one law. + !! isotropic (optional, default false): a point's drag f = rho CdA |w| w / 2 on the whole + !! relative velocity (CdAx unused; d f/d tangent = 0), the law of a Free point. REAL(wp), INTENT(IN) :: rel_velocity(3), tangent(3), rho, cda, cdax REAL(wp), INTENT(OUT) :: force(3) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg REAL(wp), INTENT(OUT), OPTIONAL :: jac_rel(3, 3), jac_tan(3, 3) + LOGICAL, INTENT(IN), OPTIONAL :: isotropic REAL(wp), PARAMETER :: PI_A = 3.14159265358979323846_wp + REAL(wp) :: wn + INTEGER :: i + IF (PRESENT(isotropic)) THEN + IF (isotropic) THEN + ErrStat = CD_HCDYN_OK; ErrMsg = '' + wn = NORM2(rel_velocity) + force = 0.5_wp*rho*cda*wn*rel_velocity + IF (PRESENT(jac_rel) .AND. PRESENT(jac_tan)) THEN + jac_tan = CD_ZERO + jac_rel = CD_ZERO + IF (wn > CD_ZERO) THEN + jac_rel = 0.5_wp*rho*cda*SPREAD(rel_velocity, 2, 3)*SPREAD(rel_velocity, 1, 3)/wn + DO i = 1, 3 + jac_rel(i, i) = jac_rel(i, i) + 0.5_wp*rho*cda*wn + END DO + END IF + END IF + RETURN + END IF + END IF ! The Morison per-length primitive with unit diameter is 1/2 rho Cdn |w_n| w_n + ! 1/2 rho pi Cdt |w_t| w_t, so Cdn = CdA and Cdt = CdAx/pi. IF (PRESENT(jac_rel) .AND. PRESENT(jac_tan)) THEN @@ -2414,11 +2466,12 @@ SUBROUTINE attachment_residual(model, k, q_cfg, v_cfg, want_jac, rk, has_jac, jr wrel = u - v_cfg(base + 1:base + 3) IF (want_jac) THEN CALL CD_HermiteCable_Attachment_Drag(wrel, q_cfg(base + 4:base + 6), model%att_rho, model%att_cda(k), & - model%att_cdax(k), f, ErrStat, ErrMsg, jrel, jtan) + model%att_cdax(k), f, ErrStat, ErrMsg, jrel, jtan, & + isotropic=model%att_iso(k)) has_jac = .TRUE. ELSE CALL CD_HermiteCable_Attachment_Drag(wrel, q_cfg(base + 4:base + 6), model%att_rho, model%att_cda(k), & - model%att_cdax(k), f, ErrStat, ErrMsg) + model%att_cdax(k), f, ErrStat, ErrMsg, isotropic=model%att_iso(k)) END IF IF (ErrStat /= CD_HCDYN_OK) RETURN rk = rk - f @@ -7519,9 +7572,10 @@ SUBROUTINE CD_HermiteCable_Dyn_End_Force(model, node, force, ErrStat, ErrMsg) END IF IF (model%has_attach) THEN ! A clump or buoy on the end node loads the point holding it, exactly as it loads the - ! end node in the residual (assemble_attachments). + ! end node in the residual (assemble_attachments). The point a free end carries + ! (att_point) is the body this force acts on, so its own loads stay out. DO k = 1, SIZE(model%att_node) - IF (model%att_node(k) /= node) CYCLE + IF (model%att_node(k) /= node .OR. model%att_point(k)) CYCLE CALL attachment_residual(model, k, model%q, model%v, .FALSE., rk, has_jac, jrel, jtan, es, em2) IF (es /= CD_HCDYN_OK) THEN ErrStat = es; ErrMsg = 'CD_HermiteCable_Dyn_End_Force: '//TRIM(em2); RETURN @@ -9247,6 +9301,8 @@ SUBROUTINE CD_HermiteCable_Dyn_End(model) IF (ALLOCATED(model%att_node)) DEALLOCATE (model%att_node, model%att_w, model%att_b, model%att_fk, & model%att_cda, model%att_cdax) IF (ALLOCATED(model%att_mass)) DEALLOCATE (model%att_mass, model%att_madd) + IF (ALLOCATED(model%att_iso)) DEALLOCATE (model%att_iso) + IF (ALLOCATED(model%att_point)) DEALLOCATE (model%att_point) model%has_attach = .FALSE. IF (ALLOCATED(model%l0_dot)) DEALLOCATE (model%l0_dot, model%l0_c, model%l0_dot_c, model%ws_recovery_l0_c, & model%ws_recovery_l0_dot_c) diff --git a/src/CableDyn_OpenFAST_HermiteFMF.f90 b/src/CableDyn_OpenFAST_HermiteFMF.f90 index bb28e179..1dd2aca8 100644 --- a/src/CableDyn_OpenFAST_HermiteFMF.f90 +++ b/src/CableDyn_OpenFAST_HermiteFMF.f90 @@ -330,7 +330,8 @@ SUBROUTINE CD_HFMF_Set_Drag(self, rho_w, diam, cdn, cdt, waterline_z, current, E END IF END SUBROUTINE CD_HFMF_Set_Drag - SUBROUTINE CD_HFMF_Set_Attachments(self, node, mass, volume, cda, cdax, ca, rho_w, gravity, ErrStat, ErrMsg) + SUBROUTINE CD_HFMF_Set_Attachments(self, node, mass, volume, cda, cdax, ca, rho_w, gravity, ErrStat, ErrMsg, & + isotropic, point_load) !! Install discrete point attachments lumped at cable nodes (internal node order, !! anchor = node 1); see CD_HermiteCable_Dyn_Set_Attachments. TYPE(CD_HFMF_ModuleType), INTENT(INOUT) :: self @@ -338,6 +339,7 @@ SUBROUTINE CD_HFMF_Set_Attachments(self, node, mass, volume, cda, cdax, ca, rho_ REAL(wp), INTENT(IN) :: mass(:), volume(:), cda(:), cdax(:), ca(:), rho_w, gravity INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg + LOGICAL, INTENT(IN), OPTIONAL :: isotropic(:), point_load(:) INTEGER :: es CHARACTER(1024) :: em ErrStat = CD_HFMF_OK; ErrMsg = '' @@ -345,7 +347,7 @@ SUBROUTINE CD_HFMF_Set_Attachments(self, node, mass, volume, cda, cdax, ca, rho_ ErrStat = CD_HFMF_BADINPUT; ErrMsg = 'CD_HFMF_Set_Attachments: module not initialised'; RETURN END IF CALL CD_HermiteCable_Dyn_Set_Attachments(self%line, node, mass, volume, cda, cdax, ca, rho_w, gravity, & - es, em) + es, em, isotropic=isotropic, point_load=point_load) IF (es /= CD_HCDYN_OK) THEN ErrStat = CD_HFMF_BADINPUT; ErrMsg = TRIM(em) END IF diff --git a/tests/test_free_end_deck.f90 b/tests/test_free_end_deck.f90 new file mode 100644 index 00000000..ef2d6ddc --- /dev/null +++ b/tests/test_free_end_deck.f90 @@ -0,0 +1,357 @@ +! File: tests/test_free_end_deck.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_free_end_deck + !! A finite-EI line ending on a Free point (a free end): a 7 m cable (Diam 0.048 m, 2.8 kg/m, + !! EA 1e8 N) hanging from a Coupled point at z = -0.5 m with a 200 kg clump (0.02548 m^3, CdA + !! 0.06 m^2, CA 1) on its Free End B, 70 elements: + !! F1 in still water the run holds the static state: the top tension is the submerged weight of + !! the line and the clump (to 1e-6 relative), the end hangs one stretched line length below + !! the top (the stretch (W_B L + w L^2/2)/EA, to 1e-7 m), nothing moves over the run, and + !! the force the line exerts on the point (AnchTen1, Point2Fz) is the clump's submerged weight + !! (to 1e-6 relative), as the EI = 0 Free point reads it: the point's own loads stay out; + !! F2 in a 0.5 m/s current along x the end rests where the same deck as an EI = 0 line on the + !! point-system route puts its Free point (EI 3 N m^2: within 2e-5 m), and the Point + !! channels of the free end read its line's End B node; + !! F3 a prescribed 0.05 m sway of the top at 0.05 Hz moves the end in phase with an amplitude + !! ratio within 1 % of the Rayleigh estimate for a hanging string with a heavy end mass + !! (1.104: the end mass with its added mass, a third of the line's, the mean tension); + !! F6 the point keeps its isotropic drag rho CdA |w| w / 2: in a vertical 0.5 m/s current along + !! the hanging line (axial flow at the end) the top tension grows by the clump's drag + !! rho CdA w^2 / 2 = 7.69 N (to 1e-3 N; the line's own axial drag is zero here); + !! F5 on a flat seabed above which the vertical seed would lie (7.3 m deep, the line 7 m from + !! z = -0.5 m), a 5 kg end in a 0.8 m/s current rests above the seabed (the seed is placed on + !! it, the release lifts the end), and the 200 kg clump, which comes to rest on the seabed + !! (6 m deep), is refused by name (a Free point has no seabed contact on a finite-EI line); + !! F4 a Free point that is not such an end leaves the deck as it was, refused by the routes' + !! own messages: a clamped End B, a net-buoyant end, a second Free point. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp, G = 9.80665_wp, RHO = 1025.0_wp + REAL(wp), PARAMETER :: L = 7.0_wp, D = 0.048_wp, M = 2.8_wp, EA = 1.0e8_wp + REAL(wp), PARAMETER :: MB = 200.0_wp, VB = 0.02548_wp + INTEGER :: nfail = 0 + + CALL check_still() + CALL check_current() + CALL check_sway() + CALL check_refusals() + CALL check_seabed() + CALL check_axial_drag() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: free cable end deck gates' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE write_profile(path, u) + CHARACTER(*), INTENT(IN) :: path + REAL(wp), INTENT(IN) :: u + INTEGER :: k + OPEN (NEWUNIT=k, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (k, '(A)') 'z ux uy uz' + WRITE (k, '(A)') '(m) (m/s) (m/s) (m/s)' + WRITE (k, '(A,F6.3,A)') '-20 ', u, ' 0 0' + WRITE (k, '(A,F6.3,A)') '0 ', u, ' 0 0' + CLOSE (k) + END SUBROUTINE write_profile + + SUBROUTINE write_deck(path, ei, pt2, extra_pts, endconn, opts_extra, outs, dt, tmax) + !! ei: the type's EI; pt2: the Free point row of End B (after 'ID'); extra_pts: more POINTS rows + !! (';'-separated, '' for none); endconn: an END CONNECTIONS data row ('' for none); + !! opts_extra: more OPTIONS rows (';'-separated); outs: OUTPUTS channels (';'-separated). + CHARACTER(*), INTENT(IN) :: path, ei, pt2, extra_pts, endconn, opts_extra, outs + REAL(wp), INTENT(IN) :: dt, tmax + INTEGER :: u + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' + WRITE (u, '(A)') 'free cable end gate' + WRITE (u, '(A)') '----------------------- LINE TYPES ------------------------------------------' + WRITE (u, '(A)') 'TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t' + WRITE (u, '(A)') '(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-)' + WRITE (u, '(A)') 'cable 0.048 2.8 1.0e8 0.0 '//ei//' 1.2 0.0 1.0 0.0' + WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' + WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' + WRITE (u, '(A)') '(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-)' + WRITE (u, '(A)') '1 Coupled 0.0 0.0 -0.5 0 0 0 0' + WRITE (u, '(A)') '2 '//pt2 + CALL put_rows(u, extra_pts) + WRITE (u, '(A)') '----------------------- LINES -----------------------------------------------' + WRITE (u, '(A)') 'ID LineType AttachA AttachB UnstrLen NumSegs Outputs' + WRITE (u, '(A)') '(-) (-) (-) (-) (m) (-) (-)' + WRITE (u, '(A)') '1 cable 1 2 7.0 70 -' + IF (LEN_TRIM(endconn) > 0) THEN + WRITE (u, '(A)') '--------------------- END CONNECTIONS ----------------------------------' + WRITE (u, '(A)') 'LineID End Stiffness EzX EzY EzZ' + WRITE (u, '(A)') '(-) (-) (N-m/rad) (-) (-) (-)' + WRITE (u, '(A)') endconn + END IF + WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' + WRITE (u, '(A)') '1025 rhoW' + WRITE (u, '(A)') '9.80665 g' + IF (INDEX(opts_extra, 'WtrDpth') == 0) WRITE (u, '(A)') '20 WtrDpth' + WRITE (u, '(ES12.5,A)') dt, ' dtM' + WRITE (u, '(ES12.5,A)') tmax, ' TMax' + CALL put_rows(u, opts_extra) + WRITE (u, '(A)') '---------------------- OUTPUTS -----------------------------------------------' + CALL put_rows(u, outs) + WRITE (u, '(A)') 'END' + WRITE (u, '(A)') '------------------------- need this line --------------------------------------' + CLOSE (u) + END SUBROUTINE write_deck + + SUBROUTINE put_rows(u, rows) + INTEGER, INTENT(IN) :: u + CHARACTER(*), INTENT(IN) :: rows + INTEGER :: i0, i1 + i0 = 1 + DO WHILE (i0 <= LEN_TRIM(rows)) + i1 = INDEX(rows(i0:), ';') + IF (i1 == 0) THEN + WRITE (u, '(A)') TRIM(rows(i0:)) + EXIT + END IF + WRITE (u, '(A)') rows(i0:i0 + i1 - 2) + i0 = i0 + i1 + END DO + END SUBROUTINE put_rows + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK + END SUBROUTINE run + + SUBROUTINE read_out(path, ncol, tab, n) + CHARACTER(*), INTENT(IN) :: path + INTEGER, INTENT(IN) :: ncol + REAL(wp), ALLOCATABLE, INTENT(OUT) :: tab(:, :) + INTEGER, INTENT(OUT) :: n + CHARACTER(2048) :: rec + INTEGER :: u, ios + ALLOCATE (tab(ncol, 20000)) + n = 0 + OPEN (NEWUNIT=u, FILE=path, STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (u, '(A)') rec + READ (u, '(A)') rec + DO + READ (u, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + IF (n == SIZE(tab, 2)) EXIT + n = n + 1 + READ (rec, *) tab(:, n) + END DO + CLOSE (u) + END SUBROUTINE read_out + + SUBROUTINE check_still() + REAL(wp), ALLOCATABLE :: tab(:, :), t0(:, :) + REAL(wp) :: w, wb, stretch + INTEGER :: n, n0 + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('fed_still.dat', '3000', 'Free 0.0 0.0 -7.5 200 0.02548 0.06 1.0', '', '', '', & + 'FairTen1;Point2px;Point2pz;AnchTen1;Point2Fz;Point2Fx', 0.005_wp, 2.0_wp) + CALL run('fed_still.dat', 'fed_still', ok, msg) + CALL require(ok, 'F1 still-water run: '//TRIM(msg)) + IF (.NOT. ok) RETURN + CALL read_out('fed_still.out', 7, tab, n) + CALL require(n > 10, 'F1 output rows') + IF (n <= 10) RETURN + w = (M - RHO*0.25_wp*PI*D**2)*G + wb = (MB - RHO*VB)*G + stretch = (wb*L + 0.5_wp*w*L**2)/EA + CALL require(ABS(tab(2, 1)/(w*L + wb) - 1.0_wp) < 1.0e-6_wp, 'F1 top tension = submerged weight') + CALL require(ABS(tab(4, 1) - (-0.5_wp - L - stretch)) < 1.0e-7_wp, 'F1 end one stretched length below') + CALL require(MAXVAL(ABS(tab(3:4, 1:n) - SPREAD(tab(3:4, 1), 2, n))) < 1.0e-10_wp, 'F1 nothing moves') + CALL require(ABS(tab(5, n)/wb - 1.0_wp) < 1.0e-6_wp, 'F1 AnchTen = the clump''s submerged weight') + CALL require(ABS(tab(6, n)/wb - 1.0_wp) < 1.0e-6_wp .AND. ABS(tab(7, n)) < 1.0e-6_wp*wb, & + 'F1 Point2Fz = the clump''s submerged weight') + CALL write_deck('fed_still0.dat', '0', 'Free 0.0 0.0 -7.5 200 0.02548 0.06 1.0', '', '', '', & + 'AnchTen1;Point2Fz', 0.005_wp, 0.1_wp) + CALL run('fed_still0.dat', 'fed_still0', ok, msg) + CALL require(ok, 'F1 EI = 0 still-water run: '//TRIM(msg)) + IF (.NOT. ok) RETURN + CALL read_out('fed_still0.out', 3, t0, n0) + IF (n0 > 0) CALL require(ABS(tab(5, n) - t0(2, n0)) < 1.0e-6_wp*wb .AND. & + ABS(tab(6, n) - t0(3, n0)) < 1.0e-6_wp*wb, 'F1 the end force = the EI = 0 Free point''s') + END SUBROUTINE check_still + + SUBROUTINE check_current() + REAL(wp), ALLOCATABLE :: tf(:, :), t0(:, :) + INTEGER :: nf, n0 + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_profile('current_profile.txt', 0.5_wp) + CALL write_deck('fed_cur.dat', '3', 'Free 0.0 0.0 -7.5 200 0.02548 0.06 1.0', '', '', '1 Currents', & + 'Point2px;Con2pz;L1N71px;L1N71pz', 0.005_wp, 0.5_wp) + CALL run('fed_cur.dat', 'fed_cur', ok, msg) + CALL require(ok, 'F2 finite-EI free end in current: '//TRIM(msg)) + CALL write_deck('fed_cur0.dat', '0', 'Free 0.0 0.0 -7.5 200 0.02548 0.06 1.0', '', '', '1 Currents', & + 'Point2px;Point2pz', 0.005_wp, 0.5_wp) + CALL run('fed_cur0.dat', 'fed_cur0', ok, msg) + CALL require(ok, 'F2 EI = 0 Free point in current: '//TRIM(msg)) + CALL read_out('fed_cur.out', 5, tf, nf) + CALL read_out('fed_cur0.out', 3, t0, n0) + IF (nf < 1 .OR. n0 < 1) THEN + CALL require(.FALSE., 'F2 output rows') + RETURN + END IF + CALL require(ABS(tf(2, 1) - t0(2, 1)) < 2.0e-5_wp .AND. ABS(tf(3, 1) - t0(3, 1)) < 2.0e-5_wp, & + 'F2 rest position = the EI = 0 Free point''s') + CALL require(tf(2, 1) > 0.1_wp, 'F2 the end is carried downstream') + CALL require(ABS(tf(2, nf) - tf(4, nf)) < 1.0e-12_wp .AND. ABS(tf(3, nf) - tf(5, nf)) < 1.0e-12_wp, & + 'F2 Point channels read the End B node') + END SUBROUTINE check_current + + SUBROUTINE check_sway() + REAL(wp), PARAMETER :: A = 0.05_wp, F = 0.05_wp, DT = 0.01_wp, TMAX = 120.0_wp, TR = 20.0_wp + REAL(wp), ALLOCATABLE :: tab(:, :) + REAL(wp) :: t, r, dr, ddr, om, s, c, ata(3, 3), atb(3), coef(3), w, wb, ma, tmean, om2, ratio + INTEGER :: u, k, n, i + LOGICAL :: ok + CHARACTER(1024) :: msg + om = 2.0_wp*PI*F + OPEN (NEWUNIT=u, FILE='fed_motion.txt', STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '# time point x y z vx vy vz ax ay az' + DO k = 0, NINT(TMAX/DT) + t = REAL(k, wp)*DT + IF (t < TR) THEN + r = 0.5_wp*(1.0_wp - COS(PI*t/TR)) + dr = 0.5_wp*PI/TR*SIN(PI*t/TR) + ddr = 0.5_wp*(PI/TR)**2*COS(PI*t/TR) + ELSE + r = 1.0_wp; dr = 0.0_wp; ddr = 0.0_wp + END IF + s = SIN(om*t); c = COS(om*t) + WRITE (u, '(F12.6,A,3ES17.9,A,ES17.9,A,ES17.9,A)') t, ' 1', A*r*s, 0.0_wp, -0.5_wp, ' ', & + A*(dr*s + r*om*c), ' 0 0 ', A*(ddr*s + 2.0_wp*dr*om*c - r*om*om*s), ' 0 0' + END DO + CLOSE (u) + CALL write_deck('fed_sway.dat', '3000', 'Free 0.0 0.0 -7.5 200 0.02548 0.06 1.0', '', '', & + 'fed_motion.txt motionFile', 'Point2px', DT, TMAX) + CALL run('fed_sway.dat', 'fed_sway', ok, msg) + CALL require(ok, 'F3 prescribed sway: '//TRIM(msg)) + IF (.NOT. ok) RETURN + CALL read_out('fed_sway.out', 2, tab, n) + ata = 0.0_wp; atb = 0.0_wp + DO i = 1, n + IF (tab(1, i) < 40.0_wp) CYCLE + coef = [SIN(om*tab(1, i)), COS(om*tab(1, i)), 1.0_wp] + ata = ata + SPREAD(coef, 2, 3)*SPREAD(coef, 1, 3) + atb = atb + coef*tab(2, i) + END DO + CALL solve3(ata, atb, coef) + ! Rayleigh estimate, shape s/L from the top: omega_p^2 = (mean tension / L)/(end mass with + ! added mass + a third of the line's mass with added mass) + w = (M - RHO*0.25_wp*PI*D**2)*G + wb = (MB - RHO*VB)*G + tmean = wb + 0.5_wp*w*L + ma = (MB + RHO*VB) + (M + RHO*0.25_wp*PI*D**2)*L/3.0_wp + om2 = (tmean/L)/ma + ratio = 1.0_wp/(1.0_wp - om**2/om2) + CALL require(ABS(HYPOT(coef(1), coef(2))/A/ratio - 1.0_wp) < 0.01_wp, 'F3 sway amplitude ratio') + CALL require(ABS(coef(2)) < 0.05_wp*ABS(coef(1)) .AND. coef(1) > 0.0_wp, 'F3 the end moves in phase') + END SUBROUTINE check_sway + + SUBROUTINE solve3(a, b, x) + REAL(wp), INTENT(IN) :: a(3, 3), b(3) + REAL(wp), INTENT(OUT) :: x(3) + REAL(wp) :: m(3, 4), f + INTEGER :: i, j + m(:, 1:3) = a + m(:, 4) = b + DO i = 1, 3 + DO j = i + 1, 3 + f = m(j, i)/m(i, i) + m(j, :) = m(j, :) - f*m(i, :) + END DO + END DO + DO i = 3, 1, -1 + x(i) = (m(i, 4) - SUM(m(i, i + 1:3)*x(i + 1:3)))/m(i, i) + END DO + END SUBROUTINE solve3 + + SUBROUTINE check_axial_drag() + REAL(wp), ALLOCATABLE :: tab(:, :) + REAL(wp) :: w, wb + INTEGER :: n, k + LOGICAL :: ok + CHARACTER(1024) :: msg + OPEN (NEWUNIT=k, FILE='current_profile.txt', STATUS='REPLACE', ACTION='WRITE') + WRITE (k, '(A)') 'z ux uy uz' + WRITE (k, '(A)') '(m) (m/s) (m/s) (m/s)' + WRITE (k, '(A)') '-20 0 0 -0.5' + WRITE (k, '(A)') '0 0 0 -0.5' + CLOSE (k) + CALL write_deck('fed_axial.dat', '3000', 'Free 0.0 0.0 -7.5 200 0.02548 0.06 1.0', '', '', '1 Currents', & + 'FairTen1', 0.005_wp, 0.05_wp) + CALL run('fed_axial.dat', 'fed_axial', ok, msg) + CALL require(ok, 'F6 axial current: '//TRIM(msg)) + IF (.NOT. ok) RETURN + CALL read_out('fed_axial.out', 2, tab, n) + w = (M - RHO*0.25_wp*PI*D**2)*G + wb = (MB - RHO*VB)*G + IF (n > 0) CALL require(ABS(tab(2, 1) - (w*L + wb + 0.5_wp*RHO*0.06_wp*0.25_wp)) < 1.0e-3_wp, & + 'F6 the clump''s isotropic drag in axial flow') + END SUBROUTINE check_axial_drag + + SUBROUTINE check_seabed() + REAL(wp), ALLOCATABLE :: tab(:, :) + INTEGER :: n + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_profile('current_profile.txt', 0.8_wp) + CALL write_deck('fed_lift.dat', '3000', 'Free 0.0 0.0 -7.5 5 0.000637 0.01 1.0', '', '', & + '1 Currents;7.3 WtrDpth', 'Point2px;Point2pz', 0.005_wp, 0.2_wp) + CALL run('fed_lift.dat', 'fed_lift', ok, msg) + CALL require(ok, 'F5 a seed below the seabed, the end at rest above it: '//TRIM(msg)) + IF (ok) THEN + CALL read_out('fed_lift.out', 3, tab, n) + IF (n > 0) CALL require(tab(3, n) > -7.3_wp + 0.5_wp .AND. tab(2, n) > 1.0_wp, 'F5 the end lifted and carried') + END IF + CALL write_profile('current_profile.txt', 0.5_wp) + CALL write_deck('fed_ground.dat', '3000', 'Free 0.0 0.0 -7.5 200 0.02548 0.06 1.0', '', '', & + '1 Currents;6.0 WtrDpth', 'FairTen1', 0.005_wp, 0.1_wp) + CALL run('fed_ground.dat', 'fed_ground', ok, msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'comes to rest on the seabed') > 0, & + 'F5 a clump at rest on the seabed refused: '//TRIM(msg)) + END SUBROUTINE check_seabed + + SUBROUTINE check_refusals() + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('fed_r1.dat', '3000', 'Free 0.0 0.0 -7.5 200 0.02548 0.06 1.0', '', '1 B Rigid 0 0 -1', '', & + 'FairTen1', 0.005_wp, 0.1_wp) + CALL run('fed_r1.dat', 'fed_r1', ok, msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'non-pinned END CONNECTIONS need End B') > 0, & + 'F4 clamped End B refused: '//TRIM(msg)) + CALL write_deck('fed_r2.dat', '3000', 'Free 0.0 0.0 -7.5 10 0.5 0.06 1.0', '', '', '', 'FairTen1', & + 0.005_wp, 0.1_wp) + CALL run('fed_r2.dat', 'fed_r2', ok, msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'not supported on the multibody march') > 0, & + 'F4 net-buoyant end refused: '//TRIM(msg)) + CALL write_deck('fed_r3.dat', '3000', 'Free 0.0 0.0 -7.5 200 0.02548 0.06 1.0', & + '3 Free 5.0 0.0 -5.0 10 0 0 0', '', '', 'FairTen1', 0.005_wp, 0.1_wp) + CALL run('fed_r3.dat', 'fed_r3', ok, msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'not supported on the multibody march') > 0, & + 'F4 a second Free point refused: '//TRIM(msg)) + END SUBROUTINE check_refusals +END PROGRAM test_free_end_deck From befec353af38b21c046a43c9db4cbf55a273bf0d Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Sat, 14 Nov 2026 23:50:17 +0900 Subject: [PATCH 17/47] validation: cross-flow VIV of a steel catenary riser in uniform current (L3-W) (#160) The SJTU truncated steel catenary riser of Wang et al. (2014, Marine Structures 39, 131-156) in a 0.2 m/s uniform in-plane current is the case Thorsen et al. (2017, Marine Structures 51, 134-151) use to verify the time-domain synchronisation model that CableDyn's cross-flow VIV implements. It checks the VIV term on a curved, partly grounded riser with its own published coefficients, so no parameter is fitted. validation/experiments/wang_scr/wang_scr_uniform_current.py writes the deck (23.71 m riser between pinned joints, the top 21.0425 m out and 9 m up, D 0.024 m, 0.69 kg/m, EI 10.5 N m^2, EA 6.66e5 N; seabed 1 (kN/m)/m with friction 0.2; Cv 0.7, f0 0.18, df 0.08, CD 1.2, CM 2, cross-flow only), runs it and compares: - the r.m.s. dynamic cross-flow strain at the 25 stations of Thorsen et al. Fig. 17, read from the vector figure (axes calibrated on its tick marks; the figure's simulated maximum reads 99.6 % of the measured, as their text states); - the dominant strain frequency 8.25 m from the lower end. Result (200 elements, dt 0.005 s, 150 s): - frequency 0.992 Hz against the measured 1.00 Hz (their model 1.02 Hz, Davies et al. 2026 1.04 Hz); - largest r.m.s. strain 7.3 % above the measured largest (theirs 0.4 % below), the mean over the stations 3.6 % above; - one r.m.s. peak more along the span than the test (7 against 6), as theirs, so the station-by-station ratio scatters; - 400 elements and half the time step change the largest r.m.s. strain by 0.2 % and 0.1 % and leave the frequency unchanged. Added to VALIDATION.md as L3-W, to the experiments index and the references (Wang et al. 2014, Thorsen et al. 2017, Davies et al. 2026, checked against Crossref). Review fix: the script resolves a relative executable path against the invocation directory (or PATH) and stops with its name when missing. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 5 + VALIDATION.md | 13 ++ doc/references.rst | 19 ++ validation/README.md | 2 +- validation/experiments/README.md | 5 +- validation/experiments/wang_scr/README.md | 61 ++++++ .../wang_scr/measured_rms_strain.csv | 26 +++ .../experiments/wang_scr/provenance.json | 19 ++ .../wang_scr/rms_strain_comparison.csv | 26 +++ validation/experiments/wang_scr/summary.json | 17 ++ .../wang_scr/wang_scr_uniform_current.py | 207 ++++++++++++++++++ 11 files changed, 397 insertions(+), 3 deletions(-) create mode 100644 validation/experiments/wang_scr/README.md create mode 100644 validation/experiments/wang_scr/measured_rms_strain.csv create mode 100644 validation/experiments/wang_scr/provenance.json create mode 100644 validation/experiments/wang_scr/rms_strain_comparison.csv create mode 100644 validation/experiments/wang_scr/summary.json create mode 100644 validation/experiments/wang_scr/wang_scr_uniform_current.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 4308e252..8f2d0000 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,6 +95,11 @@ All notable changes to CableDyn are recorded in this file. The format follows the Delta Flume vertical riser of Chaplin et al. (2005), modes 1-7 at five top tensions, from CableDyn's modal analysis with no fitted parameter: 1.87 % high on average over 34 of the 35 measured values (largest 4.88 %), the 35th, an outlier in the measurements, reported apart. +- Validation case L3-W (`validation/experiments/wang_scr`): cross-flow VIV of the SJTU truncated + steel catenary riser of Wang et al. (2014) in a 0.2 m/s uniform current, with the coefficient set + Thorsen et al. (2017) use for it: dominant strain frequency 0.992 Hz against the measured + 1.00 Hz, largest r.m.s. strain 7.3 % above the measured largest, station mean 3.6 % above; + converged in mesh and time step to 0.2 %. ## [0.4.2] - 2026-11-09 diff --git a/VALIDATION.md b/VALIDATION.md index 00255e72..8ebb5fcc 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -82,6 +82,7 @@ article's methods, are compared in | **L3-H** | Holcombe static lazy-wave experiment | measured marker geometry | position RMSE 1.07–1.89% of suspended length; peak marker-curvature error 0.34–5.54% | end-restraint bracket | Pass | | **L3-B** | Bergdahl chain experiment, 30 orbit conditions | measured upper-end force | RMSE 1.58 N; MAPE 3.11%; Pearson 0.993; Lin concordance 0.989 | full published matrix | Pass | | **L3-C** | Chaplin Delta Flume riser, still-water natural frequencies | measured modes 1–7 at five tensions | mean error +1.87%, mean absolute 2.28%, largest 4.88% (34 of 35; one outlier reported) | full published table, no fitted parameter | Pass | +| **L3-W** | SJTU steel catenary riser in 0.2 m/s current, cross-flow VIV | measured r.m.s. strain (25 stations) and dominant frequency | frequency 0.992 vs 1.00 Hz; max r.m.s. strain +7.3%, station mean +3.6% | published coefficient set, no fitted parameter | Pass | | **L-fig** | Along-arc curvature overlay (CableDyn / OrcaFlex / MoorDyn-F ±4×) | 3-code committed record | CableDyn peak 0.11% from OrcaFlex | <0.5% | Pass | | **L4-1** | Coupled platform + mooring | synthetic reference | bit-for-bit | — | Pass | | **L4-1b** | VolturnUS-S coupled platform + power cable | OpenFAST v5.0.0 (CompMooring 5 vs 3) | platform DOFs <0.6% (3-seed DLC-1.1); fairlead and anchor <0.001% static | <3% platform | Pass | @@ -338,6 +339,18 @@ scripts, results, and source provenance are in separately. 128 elements and ten times the unpublished axial stiffness change no frequency by more than 3e-6 and 1.2e-4. +- **L3-W SJTU steel catenary riser, cross-flow VIV in uniform current** + ([Wang et al., 2014](https://cabledyn.readthedocs.io/en/latest/references.html#ref-wang2014); + [Thorsen et al., 2017](https://cabledyn.readthedocs.io/en/latest/references.html#ref-thorsen2017)): + the 23.71 m truncated catenary in a 0.2 m/s in-plane current, run with Thorsen et al.'s coefficient + set for this case (C_v 0.7, f̂0 0.18 ± 0.08, C_D 1.2, C_M 2). The dominant cross-flow strain + frequency 8.25 m from the lower end is 0.992 Hz against the measured 1.00 Hz (their model 1.02 Hz; + [Davies et al., 2026](https://cabledyn.readthedocs.io/en/latest/references.html#ref-davies2026), + 1.04 Hz). The largest r.m.s. strain is 7.3% above the measured largest (theirs 0.4% below) and the + mean over the 25 stations 3.6% above. The response has one r.m.s. peak more along the span than + the test, as theirs, so the station-by-station ratio scatters. 400 elements and half the time step + change the largest r.m.s. strain by 0.2% and 0.1%. + ## L4 coupled OpenFAST - **L4-1 synthetic** (`l4_platform_mooring`): 6-DOF platform moored by three taut diff --git a/doc/references.rst b/doc/references.rst index 5d1f666c..fd0781fc 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -89,6 +89,12 @@ Hydrodynamics and ocean environment vortex-induced vibrations in stationary and oscillating flows. *Journal of Fluids and Structures* **61**, 1–19. https://doi.org/10.1016/j.jfluidstructs.2015.11.006 +.. _ref-thorsen2017: + +- **Thorsen, M. J., Sævik, S. & Larsen, C. M. (2017).** Non-linear time domain analysis of + cross-flow vortex-induced vibrations. *Marine Structures* **51**, 134–151. + https://doi.org/10.1016/j.marstruc.2016.10.007 + .. _ref-ulveseter2018: - **Ulveseter, J. V., Thorsen, M. J., Sævik, S. & Larsen, C. M. (2018).** Time domain @@ -247,6 +253,19 @@ Verification and validation references experiment of a mooring cable. *Journal of Marine Science and Engineering* **4**\ (1), 5. https://doi.org/10.3390/jmse4010005 +.. _ref-wang2014: + +- **Wang, J., Fu, S., Baarholm, R., Wu, J. & Larsen, C. M. (2014).** Fatigue damage of a steel + catenary riser from vortex-induced vibration caused by vessel motions. *Marine Structures* + **39**, 131–156. https://doi.org/10.1016/j.marstruc.2014.07.002 + +.. _ref-davies2026: + +- **Davies, R., Lekkala, M. R., Michaloliakos, A., Wong, W.-Y., Hall, M., Vakakis, A. & Zuo, L. + (2026).** Time-domain vortex induced vibration modeling of reference dynamic power cable for the + Gulf of Maine. *Journal of Fluids and Structures* **146**, 104651. + https://doi.org/10.1016/j.jfluidstructs.2026.104651 + .. _ref-chaplin2005: - **Chaplin, J. R., Bearman, P. W., Huera Huarte, F. J. & Pattenden, R. J. (2005).** Laboratory diff --git a/validation/README.md b/validation/README.md index 46fe90ef..2e17086c 100644 --- a/validation/README.md +++ b/validation/README.md @@ -16,7 +16,7 @@ redistributed. | [`RELEASE_0_1_1.md`](RELEASE_0_1_1.md) | The same for v0.1.1 | | [`RELEASE_0_1_0.md`](RELEASE_0_1_0.md) | The same for v0.1.0 | | [`bodies/`](bodies/README.md) | Rigid-body, rod and shared-anchor cases with MoorDyn-C twins, stored references and pass limits | -| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain and Chaplin et al. (2005) riser natural-frequency comparisons | +| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and Wang et al. (2014) catenary-riser VIV comparisons | | [`PERFORMANCE_0_1_0.md`](PERFORMANCE_0_1_0.md) | Wall time of CableDyn 0.1.0, MoorDyn-C and MoorDyn-F at equal accuracy on five mooring, cable, buoy and coupled cases | | [`performance/`](performance/README.md) | Same-host wall-clock records of the L5 cases: the resolved lazy-wave spans, the one-hour VolturnUS-S mooring and the tension-only chain | | [`PAPER_REPRODUCTION.md`](PAPER_REPRODUCTION.md) | Every CableDyn result in the journal article, re-run with the release defaults and in paper mode | diff --git a/validation/experiments/README.md b/validation/experiments/README.md index eca23357..997d8c3c 100644 --- a/validation/experiments/README.md +++ b/validation/experiments/README.md @@ -2,7 +2,7 @@ # Experimental comparisons -This directory lets reviewers reproduce CableDyn's comparisons with three published physical +This directory lets reviewers reproduce CableDyn's comparisons with four published physical experiments. Each subdirectory gives the data source, the translation of the published parameters into a CableDyn model, the assessed quantity, the reproduction commands and the committed results. @@ -12,5 +12,6 @@ committed results. | [`holcombe/`](holcombe/README.md) | Holcombe et al. (2025), 1:70 static lazy-wave cable | Finite-EI power cable | | [`bergdahl/`](bergdahl/README.md) | Bergdahl et al. (2016), 33 m dynamically scaled chain | Tension-only mooring chain | | [`chaplin/`](chaplin/README.md) | Chaplin et al. (2005), 13.12 m vertical tension riser, still-water natural frequencies | Finite-EI riser, modal analysis | +| [`wang_scr/`](wang_scr/README.md) | Wang et al. (2014), truncated steel catenary riser in uniform current, cross-flow VIV | Finite-EI riser, synchronisation VIV | -The results are summarised as cases L3-H, L3-B and L3-C in [`VALIDATION.md`](../../VALIDATION.md). +The results are summarised as cases L3-H, L3-B, L3-C and L3-W in [`VALIDATION.md`](../../VALIDATION.md). diff --git a/validation/experiments/wang_scr/README.md b/validation/experiments/wang_scr/README.md new file mode 100644 index 00000000..c420ee21 --- /dev/null +++ b/validation/experiments/wang_scr/README.md @@ -0,0 +1,61 @@ + + +# Steel catenary riser in uniform current: cross-flow VIV + +This directory compares CableDyn's cross-flow VIV with the SJTU model test of a truncated steel +catenary riser in a 0.2 m/s uniform current: Wang et al. (2014), +, as Thorsen et al. (2017), +, use it to verify the time-domain synchronisation +model that CableDyn's cross-flow VIV implements. The model runs with their coefficient set for this +case; nothing is fitted to the measurements. + +## Model and data + +- **Riser (Thorsen et al. 2017, Table 1):** + - length 23.71 m, between universal joints (pinned); + - the top 21.0425 m horizontally and 9 m vertically from the lower end, with a 2.626 m flowline on + the seabed; + - D 0.024 m, 0.69 kg/m (a solid section: no internal water is added), EI 10.5 N m², EA 6.66e5 N. +- **Seabed:** 1 (kN/m)/m in compression (`kBot` = 1000/D), friction 0.2. +- **Current:** 0.2 m/s along the riser plane, from the lower end towards the top. +- **VIV (their set for this case):** C_v 0.7 (their choice for Re ≈ 3000), f̂0 0.18, Δf̂ 0.08, + cross-flow only; C_D 1.2, C_M 2. +- **Measurements:** `measured_rms_strain.csv` holds the 25 measured r.m.s. dynamic cross-flow strains + at the outer surface (Thorsen et al. 2017, Fig. 17), read from the vector figure. The axes are + calibrated on its tick marks; as a check, the simulated maximum of the same figure reads 99.6 % of + the measured one, as their text states. The measured dominant strain frequency 8.25 m from the + lower end is 1.00 Hz (their Fig. 18). +- **Assumed:** the top joint 0.5 m below the surface (not given; the current is uniform). +- **CableDyn:** 200 elements, dt 0.005 s, 150 s, statistics over t > 30 s. The cross-flow curvature + is the section component with no static mean (the in-plane one carries the catenary curvature); + strain = κ D/2. + +## Reproduce + +From the repository root, with `path/to/cabledyn.exe` the release executable or a local build: + +```powershell +python validation/experiments/wang_scr/wang_scr_uniform_current.py ` + path/to/cabledyn.exe validation/experiments/wang_scr/work ` + --summary validation/experiments/wang_scr +``` + +`--segments` and `--dt` change the mesh and the time step. + +## Results + +| | CableDyn | Measured | Thorsen et al. (2017) | Davies et al. (2026) | +| --- | --- | --- | --- | --- | +| Dominant cross-flow strain frequency, 8.25 m from the lower end | **0.992 Hz** (±0.008) | 1.00 Hz | 1.02 Hz | 1.04 Hz | +| Maximum r.m.s. strain / measured maximum | **1.073** | 1 | 0.996 | - | +| Mean ratio at the 25 stations | 1.036 | 1 | - | - | +| r.m.s. peaks along the span | 7 | 6 | 7 | - | + +- **Frequency:** within the 0.008 Hz resolution of the measured value. +- **Strain magnitude:** the largest r.m.s. strain is 7 % above the measured largest, and the mean + over the stations 4 % above. +- **Spatial pattern:** the predicted response has one r.m.s. peak more along the span than the test + (7 against 6), as in Thorsen et al. (2017). So the peaks and troughs fall at different stations, + and the station-by-station ratio scatters (`rms_strain_comparison.csv`, r.m.s. log error 0.34). +- **Convergence:** 400 elements and half the time step change the maximum ratio by 0.2 % and 0.1 % + and leave the frequency unchanged (`provenance.json`). diff --git a/validation/experiments/wang_scr/measured_rms_strain.csv b/validation/experiments/wang_scr/measured_rms_strain.csv new file mode 100644 index 00000000..6e123aaf --- /dev/null +++ b/validation/experiments/wang_scr/measured_rms_strain.csv @@ -0,0 +1,26 @@ +s_m,rms_strain +1.044,4.5870e-05 +1.9427,3.5715e-05 +2.8415,3.9650e-05 +3.7493,5.3852e-05 +4.6479,4.5683e-05 +5.5467,2.5858e-05 +6.4454,2.9980e-05 +7.3441,4.7144e-05 +8.2428,5.1266e-05 +9.1416,3.9199e-05 +10.0493,2.9081e-05 +10.9479,4.0136e-05 +11.8468,4.8156e-05 +12.7454,4.5607e-05 +13.6441,3.3653e-05 +14.5428,3.3615e-05 +15.4416,4.0436e-05 +16.3494,4.2572e-05 +17.2481,3.9012e-05 +18.1467,2.5709e-05 +19.0456,2.8369e-05 +19.9442,3.7176e-05 +20.8429,3.3653e-05 +21.7416,2.8107e-05 +22.6495,2.2223e-05 diff --git a/validation/experiments/wang_scr/provenance.json b/validation/experiments/wang_scr/provenance.json new file mode 100644 index 00000000..a719dbbd --- /dev/null +++ b/validation/experiments/wang_scr/provenance.json @@ -0,0 +1,19 @@ +{ + "source": "Wang, Fu, Baarholm, Wu & Larsen (2014), Marine Structures 39, 131-156 (the model riser, Table 2); Thorsen, Saevik & Larsen (2017), Marine Structures 51, 134-151 (Table 1, Sec. 5.1, Figs. 17-18)", + "doi": ["10.1016/j.marstruc.2014.07.002", "10.1016/j.marstruc.2016.10.007"], + "data_used": "the model riser properties; the 25 measured r.m.s. dynamic cross-flow strains of Fig. 17 (read from the vector figure, axes calibrated on its tick marks; the simulated maximum of the same figure reads 99.6 % of the measured one, as the text states); the measured dominant frequency 1.00 Hz 8.25 m from the lower end", + "coefficients": "Thorsen et al. (2017) for this case, not tuned: Cv 0.7, f0 0.18, df 0.08 (cross-flow only), CD 1.2, CM 2", + "CableDyn_commit": "1847a0d (dev)", + "validation_date": "2026-11-14", + "executable_name": "cabledyn.exe", + "executable_sha256": "see summary.json", + "compiler": "GNU Fortran 16.2.0", + "build_type": "Release", + "platform": "Windows 11 x86-64", + "segments": 200, + "dt_s": 0.005, + "sensitivity": { + "segments_400": {"max_ratio": 1.0753, "mean_ratio_at_stations": 1.0367, "dominant_frequency_hz": 0.9917}, + "dt_0p0025": {"max_ratio": 1.0742, "mean_ratio_at_stations": 1.0366, "dominant_frequency_hz": 0.9917} + } +} diff --git a/validation/experiments/wang_scr/rms_strain_comparison.csv b/validation/experiments/wang_scr/rms_strain_comparison.csv new file mode 100644 index 00000000..7d03e871 --- /dev/null +++ b/validation/experiments/wang_scr/rms_strain_comparison.csv @@ -0,0 +1,26 @@ +s_m,measured_rms_strain,cabledyn_rms_strain,ratio +1.0440,4.5870e-05,1.8708e-05,0.4079 +1.9427,3.5715e-05,4.0653e-05,1.1383 +2.8415,3.9650e-05,3.2249e-05,0.8134 +3.7493,5.3852e-05,4.7770e-05,0.8871 +4.6479,4.5683e-05,3.2998e-05,0.7223 +5.5467,2.5858e-05,1.8495e-05,0.7153 +6.4454,2.9980e-05,4.1456e-05,1.3828 +7.3441,4.7144e-05,4.9755e-05,1.0554 +8.2428,5.1266e-05,3.4480e-05,0.6726 +9.1416,3.9199e-05,2.6913e-05,0.6866 +10.0493,2.9081e-05,4.7323e-05,1.6273 +10.9479,4.0136e-05,5.3446e-05,1.3316 +11.8468,4.8156e-05,4.1079e-05,0.8531 +12.7454,4.5607e-05,4.0281e-05,0.8832 +13.6441,3.3653e-05,5.5683e-05,1.6546 +14.5428,3.3615e-05,5.4886e-05,1.6328 +15.4416,4.0436e-05,4.0594e-05,1.0039 +16.3494,4.2572e-05,3.8404e-05,0.9021 +17.2481,3.9012e-05,4.6681e-05,1.1966 +18.1467,2.5709e-05,4.3938e-05,1.7090 +19.0456,2.8369e-05,3.0334e-05,1.0693 +19.9442,3.7176e-05,2.5013e-05,0.6728 +20.8429,3.3653e-05,2.9946e-05,0.8899 +21.7416,2.8107e-05,2.9305e-05,1.0426 +22.6495,2.2223e-05,2.1199e-05,0.9539 diff --git a/validation/experiments/wang_scr/summary.json b/validation/experiments/wang_scr/summary.json new file mode 100644 index 00000000..4fd4d163 --- /dev/null +++ b/validation/experiments/wang_scr/summary.json @@ -0,0 +1,17 @@ +{ + "segments": 200, + "dt_s": 0.005, + "analysis_window_s": [ + 30.0, + 150.0 + ], + "frequency_resolution_hz": 0.00833333333332907, + "max_rms_strain": 5.777620876413861e-05, + "measured_max_rms_strain": 5.3852e-05, + "max_ratio": 1.072870251135308, + "mean_ratio_at_stations": 1.0361663237798966, + "rms_log_error_at_stations": 0.3385758147803219, + "dominant_frequency_hz": 0.9916666666661592, + "measured_dominant_frequency_hz": 1.0, + "executable_sha256": "dd80f0b2b0ba5a526b46da7961b8ea7e18ed8c650c42583107b4df6eee3a8a74" +} diff --git a/validation/experiments/wang_scr/wang_scr_uniform_current.py b/validation/experiments/wang_scr/wang_scr_uniform_current.py new file mode 100644 index 00000000..69b982b9 --- /dev/null +++ b/validation/experiments/wang_scr/wang_scr_uniform_current.py @@ -0,0 +1,207 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Cross-flow VIV of the SJTU truncated steel catenary riser in a 0.2 m/s uniform current. + +The model test of Wang et al. (2014), as used by Thorsen et al. (2017, Sec. 5.1) to verify the +time-domain synchronisation model that CableDyn's cross-flow VIV implements: writes the deck, runs +it, and compares the r.m.s. of the dynamic cross-flow strain along the riser with the 25 measured +values (Thorsen et al. 2017, Fig. 17) and the dominant strain frequency 8.25 m from the lower end +with the measured 1.00 Hz. + + python wang_scr_uniform_current.py path/to/cabledyn.exe WORKDIR [--segments 200] + [--dt 0.005] [--tmax 150] [--t0 30] [--summary DIR] + +Sources: + J. Wang, S. Fu, R. Baarholm, J. Wu, C.M. Larsen (2014), Fatigue damage of a steel catenary + riser from vortex-induced vibration caused by vessel motions, Marine Structures 39, 131-156, + https://doi.org/10.1016/j.marstruc.2014.07.002 (Table 2: the model riser) + M.J. Thorsen, S. Saevik, C.M. Larsen (2017), Non-linear time domain analysis of cross-flow + vortex-induced vibrations, Marine Structures 51, 134-151, + https://doi.org/10.1016/j.marstruc.2016.10.007 (Table 1, Sec. 5.1, Fig. 17: the measured + r.m.s. strains, read from the vector figure) +""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import json +import os +import shutil +import subprocess +from pathlib import Path + +import numpy as np + +HERE = Path(__file__).resolve().parent + +# Thorsen et al. (2017) Table 1 / Wang et al. (2014) Table 2: the truncated model riser. The +# outer coating, PPR pipe and copper core are solid: no internal water is added to the 0.69 kg/m. +LENGTH = 23.71 # m +X_TOP = 21.0425 # m, horizontal distance of the top joint from the lower end +H_TOP = 9.0 # m, height of the top joint above the fake seabed +DIAMETER = 0.024 # m +MASS = 0.69 # kg/m +EI = 10.5 # N m^2 +EA = 6.66e5 # N +# Thorsen et al. (2017) Sec. 5.1: seabed springs of 1 (kN/m)/m in compression, friction 0.2; +# their coefficient set for this case: Cv 0.7 (Re about 3000), f0 0.18, df 0.08, CD 1.2, CM 2 +SEABED_K_PER_LENGTH = 1000.0 # N/m per m of riser +FRICTION = 0.2 +CV, F0, DF, CD, CA = 0.7, 0.18, 0.08, 1.2, 1.0 +CURRENT = 0.2 # m/s, uniform, in the riser plane from the lower end towards the top +WATER_DEPTH = ( + 9.5 # m: the top joint 0.5 m below the surface (not given; the current is uniform) +) +MEASURED_FREQUENCY = ( + 1.00 # Hz, 8.25 m from the lower end (Thorsen et al. 2017, Fig. 18) +) +FREQUENCY_STATION = 8.25 # m from the lower end + + +def write_deck(case: Path, segments: int, dt: float, tmax: float) -> Path: + case.mkdir(parents=True, exist_ok=True) + (case / "current_profile.txt").write_text( + f"z ux uy uz\n(m) (m/s) (m/s) (m/s)\n{-WATER_DEPTH:.2f} {CURRENT} 0 0\n0.0 {CURRENT} 0 0\n", + encoding="utf-8", + ) + outs = "".join(f"CurvX1N{j}\nCurvY1N{j}\n" for j in range(1, segments + 2)) + text = f"""--------------------- CableDyn Input File --------------------------------- +Wang et al. (2014) truncated SCR, 0.2 m/s uniform current (Thorsen et al. 2017, case 1) +----------------------- LINE TYPES ------------------------------------------ +TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t Cl dF cF +(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) (-) (-) (-) +scr {DIAMETER} {MASS} {EA:.6e} 0.0 {EI} {CD} 0.0 {CA} 0.0 {CV} {DF} {F0} +----------------------- POINTS ---------------------------------------------- +ID Attachment X Y Z M V CdA CA +(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) +1 Coupled {X_TOP} 0.0 {-(WATER_DEPTH - H_TOP):.4f} 0 0 0 0 +2 Fixed 0.0 0.0 {-WATER_DEPTH:.4f} 0 0 0 0 +----------------------- LINES ----------------------------------------------- +ID LineType AttachA AttachB UnstrLen NumSegs Outputs +(-) (-) (-) (-) (m) (-) (-) +1 scr 1 2 {LENGTH} {segments} - +---------------------- OPTIONS ---------------------------------------------- +1025.0 rhoW +9.80665 g +{WATER_DEPTH} WtrDpth +{SEABED_K_PER_LENGTH / DIAMETER:.6e} kBot +{FRICTION} frictionMu +{dt:.6f} dtM +{round(tmax / dt) * dt:.6f} TMax +1 Currents +---------------------- OUTPUTS ----------------------------------------------- +{outs}END +------------------------- need this line -------------------------------------- +""" + deck = case / "wang_scr.dat" + deck.write_text(text, encoding="utf-8") + return deck + + +def cross_flow_strain(out: Path, t0: float): + """Arc length from the lower end, r.m.s. dynamic cross-flow strain, the strain histories. + + The cross-flow (out-of-plane) curvature is the section component with no static mean (the + in-plane one carries the catenary curvature); the strain is kappa D/2 at the outer surface, + as Fig. 17 reports it. + """ + lines = out.read_text(encoding="utf-8").splitlines() + head = lines[1].split() + a = np.loadtxt(lines[3:]) + t = a[:, 0] + keep = t > t0 + nodes = sorted({int(c[7:]) for c in head if c.startswith("CurvX1N")}) + cx = np.array([a[keep, head.index(f"CurvX1N{j}")] for j in nodes]) + cy = np.array([a[keep, head.index(f"CurvY1N{j}")] for j in nodes]) + cf = cx if np.abs(cx.mean(axis=1)).mean() < np.abs(cy.mean(axis=1)).mean() else cy + strain = (cf - cf.mean(axis=1, keepdims=True)) * DIAMETER / 2.0 + s = LENGTH - (np.array(nodes) - 1) * LENGTH / (len(nodes) - 1) + order = np.argsort(s) + return ( + s[order], + np.sqrt((strain[order] ** 2).mean(axis=1)), + strain[order], + t[keep][1] - t[keep][0], + ) + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + ap.add_argument("exe") + ap.add_argument("workdir") + ap.add_argument("--segments", type=int, default=200) + ap.add_argument("--dt", type=float, default=0.005) + ap.add_argument("--tmax", type=float, default=150.0) + ap.add_argument("--t0", type=float, default=30.0) + ap.add_argument( + "--summary", + default=None, + help="directory for the comparison CSV and summary JSON", + ) + a = ap.parse_args() + # the run starts in the case folder: resolve the executable against the invocation directory + # (or PATH, for a bare name) first + found = a.exe if Path(a.exe).is_file() else shutil.which(a.exe) + if found is None: + raise SystemExit(f"CableDyn executable not found: {a.exe}") + exe = Path(found).resolve() + case = Path(a.workdir) / f"wang_scr_n{a.segments}_dt{a.dt:g}" + deck = write_deck(case, a.segments, a.dt, a.tmax) + env = dict(os.environ, OMP_NUM_THREADS="1") + proc = subprocess.run( + [str(exe), deck.name, "out"], + cwd=case, + capture_output=True, + text=True, + env=env, + check=False, + ) + if proc.returncode != 0: + raise SystemExit(f"CableDyn failed ({proc.returncode}):\n{proc.stderr[-2000:]}") + s, rms, strain, dt = cross_flow_strain(case / "out.out", a.t0) + with open(HERE / "measured_rms_strain.csv", encoding="utf-8") as fh: + measured = [ + (float(r["s_m"]), float(r["rms_strain"])) for r in csv.DictReader(fh) + ] + sm = np.array([m[0] for m in measured]) + em = np.array([m[1] for m in measured]) + at = np.interp(sm, s, rms) + j = int(np.argmin(np.abs(s - FREQUENCY_STATION))) + spec = np.abs(np.fft.rfft(strain[j] * np.hanning(strain.shape[1]))) + freq = np.fft.rfftfreq(strain.shape[1], dt) + f_dom = float(freq[1 + int(np.argmax(spec[1:]))]) + summary = { + "segments": a.segments, + "dt_s": a.dt, + "analysis_window_s": [a.t0, a.tmax], + "frequency_resolution_hz": float(freq[1]), + "max_rms_strain": float(rms.max()), + "measured_max_rms_strain": float(em.max()), + "max_ratio": float(rms.max() / em.max()), + "mean_ratio_at_stations": float(np.mean(at / em)), + "rms_log_error_at_stations": float(np.sqrt(np.mean(np.log(at / em) ** 2))), + "dominant_frequency_hz": f_dom, + "measured_dominant_frequency_hz": MEASURED_FREQUENCY, + "executable_sha256": hashlib.sha256(exe.read_bytes()).hexdigest(), + } + print(json.dumps(summary, indent=2)) + if a.summary: + out = Path(a.summary) + out.mkdir(parents=True, exist_ok=True) + with open( + out / "rms_strain_comparison.csv", "w", newline="", encoding="utf-8" + ) as fh: + w = csv.writer(fh, lineterminator="\n") + w.writerow(["s_m", "measured_rms_strain", "cabledyn_rms_strain", "ratio"]) + for x, m, c in zip(sm, em, at, strict=True): + w.writerow([f"{x:.4f}", f"{m:.4e}", f"{c:.4e}", f"{c / m:.4f}"]) + (out / "summary.json").write_text( + json.dumps(summary, indent=2) + "\n", encoding="utf-8", newline="\n" + ) + + +if __name__ == "__main__": + main() From c46eb6403bbee62de3f019d7096691fa57be23a7 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Sun, 15 Nov 2026 02:37:45 +0900 Subject: [PATCH 18/47] docs: published VIV coefficient sets with their sources (#161) The theory manual gains "Published coefficient sets": each set with its source, the tests it was fitted to and the line-type columns it maps to: - Thorsen et al. (2016): the excitation curve Cv(y0/D) fitted to the 44 NDP riser tests (0.35 at 0, a maximum of 1.00 at 0.46, zero from 0.66) and the cross-flow damping 0.31 + 0.89 y0/D; - Thorsen et al. (2017): the Wang et al. (2014) riser set (L3-W); - Ulveseter et al. (2018): the in-line Cx 0.85, alpha 0.15; - Andersen et al. (2024a): the forced-oscillation set of their Table 3 (Cv 1.2, CD 1.1, Ca 1.0, band 0.11-0.26, i.e. dF 0.075 about cF 0.185 here) and the unified Cv of about 2.0; - Andersen et al. (2024b): the cross-flow average of their Table 3 (1.28, 0.131, 0.066; their in-line set belongs to another in-line synchronisation form, which is said); - Facchinetti et al. (2004): CL0 0.3, St 0.2, eps 0.3, A 12. Thorsen et al.'s curve, read from the vector figure, is given as a VIV AMPLITUDE table on 0.05 steps. Every value was read from the papers; the two Andersen references were checked against Crossref. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 4 +++ doc/references.rst | 13 ++++++++ doc/theory.rst | 83 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f2d0000..bfb5aa84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,6 +100,10 @@ All notable changes to CableDyn are recorded in this file. The format follows Thorsen et al. (2017) use for it: dominant strain frequency 0.992 Hz against the measured 1.00 Hz, largest r.m.s. strain 7.3 % above the measured largest, station mean 3.6 % above; converged in mesh and time step to 0.2 %. +- Theory manual, Published coefficient sets: the VIV coefficient sets of Thorsen et al. (2016, + 2017), Ulveseter et al. (2018), Andersen et al. (2024a, b) and Facchinetti et al. (2004), each + with its source, its test data and the line-type columns it maps to, and Thorsen et al.'s + excitation curve as a `VIV AMPLITUDE` table. ## [0.4.2] - 2026-11-09 diff --git a/doc/references.rst b/doc/references.rst index fd0781fc..2bba3c48 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -107,6 +107,19 @@ Hydrodynamics and ocean environment and higher harmonic VIV of slender structures. *Applied Ocean Research* **90**, 101856. https://doi.org/10.1016/j.apor.2019.101856 +.. _ref-andersen2024a: + +- **Andersen, M. L., Sævik, S., Wu, J., Leira, B. J. & Langseth, H. (2024a).** Applying Bayesian + optimization to predict parameters in a time-domain model for cross-flow vortex-induced + vibrations. *Marine Structures* **94**, 103571. https://doi.org/10.1016/j.marstruc.2023.103571 + +.. _ref-andersen2024b: + +- **Andersen, M. L., Sævik, S., Wu, J., Leira, B. J. & Langseth, H. (2024b).** Simulating + vortex-induced vibrations in sheared current by using an empirical time-domain model with + adaptive parameters. *Applied Ocean Research* **153**, 104284. + https://doi.org/10.1016/j.apor.2024.104284 + .. _ref-feeny2008: - **Feeny, B. F. (2008).** A complex orthogonal decomposition for wave motion analysis. diff --git a/doc/theory.rst b/doc/theory.rst index 0ad2c0a6..8a0e70dc 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1437,6 +1437,89 @@ with :math:`C_v = 0` and factor 2 the line settles at the static in-line offset printed digits; Thorsen's form raises the steady cross-flow amplitude from :math:`A/D` 0.68 to 1.02; and the drag, damping and VIV powers balance within 0.2 %. +.. _theory-viv-coefficients: + +Published coefficient sets +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The VIV coefficients are empirical, and the published sets differ by test, Reynolds number range +and model form. The table gives each set with its source and the line-type columns it maps to. +``Cl dF cF`` are the cross-flow columns of the line type, with the synchronisation band +:math:`c_F \pm d_F` in non-dimensional frequency; ``ClX alpha`` is the ``VIV`` section row. + +.. list-table:: + :header-rows: 1 + :widths: 30 34 36 + + * - Source and data + - Values + - In CableDyn + * - :ref:`Thorsen et al. (2016) `: excitation curve fitted to the 44 NDP + riser tests (uniform and sheared flow, Re 8 000–65 000), their Fig. 7 + - :math:`C_v(y_0/D)`: 0.35 at 0, a maximum of 1.00 at 0.46, zero from 0.66; cross-flow + damping :math:`C_{d,y} = 0.31 + 0.89\,y_0/D` (their Eq. 1) + - a ``VIV AMPLITUDE`` table (below); ``VIV DAMPING`` ``0.31 0.89 0`` + * - :ref:`Thorsen et al. (2017) `: the truncated catenary riser of + :ref:`Wang et al. (2014) ` in uniform current (Re about 3 000) + - :math:`C_v` 0.7, :math:`\hat f_0` 0.18, :math:`\Delta\hat f` 0.08, :math:`C_D` 1.2, + :math:`C_M` 2 + - ``Cl dF cF`` = ``0.7 0.08 0.18``, ``Cd_n`` 1.2, ``Ca_n`` 1.0 (validation case L3-W) + * - :ref:`Ulveseter et al. (2018) `: in-line force at twice the + cross-flow frequency + - :math:`C_x` 0.85, :math:`\alpha` 0.15, with a cross-flow :math:`C_L` of 0.65 + - ``VIV`` row ``0.85 0.15``; ``Cl`` 0.65 + * - :ref:`Andersen et al. (2024a) `, Table 3: the set calibrated to + low-Re forced-oscillation tests that they quote as the model's fixed values + - :math:`C_v` 1.2, :math:`C_D` 1.1, :math:`C_a` 1.0, :math:`\hat f_0` 0.18, band + 0.11–0.26 + - ``Cl`` 1.2, ``Cd_n`` 1.1, ``Ca_n`` 1.0; the band here is symmetric about ``cF``: + ``dF cF`` = ``0.075 0.185`` spans 0.11–0.26 + * - :ref:`Andersen et al. (2024a) `: Bayesian optimisation against seven + tests of a rigid cylinder on a spring-supported pendulum rig (Re 4.2e4–1.2e5) + - unified :math:`C_v` "very close to 2.0"; the per-case optima scatter with flow speed + - ``Cl`` 2.0 (no unified band is tabulated) + * - :ref:`Andersen et al. (2024b) `, Table 3: average of the per-case + optima for the 22 sheared-flow NDP tests + - cross-flow :math:`C_{v,y}` 1.28, :math:`\hat f_{0,y}` 0.131, :math:`\Delta\hat f_y` 0.066; + :math:`C_D` 1.16, :math:`C_a` 1.0 + - ``Cl dF cF`` = ``1.28 0.066 0.131``, ``Cd_n`` 1.16; their in-line set (:math:`C_{v,x}` + 1.09, :math:`\hat f_{0,x}` 0.321) belongs to an independent in-line synchronisation, not + the ``VIV`` row's form + * - :ref:`Facchinetti et al. (2004) `: wake oscillator with + acceleration coupling, fitted to forced-cylinder lift and lock-in data + - :math:`C_{L0}` 0.3, St 0.2 (sub-critical, :math:`300 < Re < 1.5\times10^5`), + :math:`\varepsilon` 0.3, :math:`A` 12 + - ``WAKE OSCILLATOR`` row ``0.3 0.2 0.3 12`` + +Thorsen et al. (2016)'s curve, read from the vector figure and sampled every 0.05 in +:math:`y_0/D`, as a ``VIV AMPLITUDE`` table for a type ``riser`` (its ``Cv`` replaces ``Cl``; +the drag factor stays 1): + +.. code-block:: text + + --------------------- VIV AMPLITUDE ------------------------------------ + TypeName AD Cv + (-) (-) (-) + riser 0.00 0.35 + riser 0.05 0.48 + riser 0.10 0.60 + riser 0.15 0.70 + riser 0.20 0.79 + riser 0.25 0.86 + riser 0.30 0.92 + riser 0.35 0.96 + riser 0.40 0.99 + riser 0.45 1.00 + riser 0.50 0.98 + riser 0.55 0.82 + riser 0.60 0.53 + riser 0.65 0.10 + riser 0.70 0.00 + +The sets do not transfer between structures without checking: Andersen et al. find optima that +scatter between tests with no trend in Reynolds number, and Thorsen et al. state that their curve +holds only in the Reynolds number range of the tests it was fitted to. + .. _theory-dry-buoyancy: Buoyancy and wetting From 5e65151b4538a908d3514502b9942679a5cf2d2b Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Sun, 15 Nov 2026 03:26:35 +0900 Subject: [PATCH 19/47] feat: wake-oscillator VIV on EI = 0 lines (#162) The WAKE OSCILLATOR section now acts on EI = 0 lines as on finite-EI cables; a deck with the wake oscillator on an EI = 0 line was refused. At each free node next to a lifting element the van der Pol wake variable q drives the lift 1/4 rho D CL0 q U^2 over the node's tributary length, in the direction of the synchronisation lift. The forcing is the node's smoothed cross-flow acceleration, and the wake frequency that of the ambient flow normal to the line. The step follows the finite-EI cable: q predicted at the step's evaluation point under the step-start forcing, then advanced from the committed state with the acceleration linear over the step (the shared CD_VIV_Wake_Advance). The state (q, dq/dt) is held in the line's VIV phase and first motion statistic, so the rollback, step-recovery, sub-step and checkpoint copies carry it unchanged; the checkpoint layout of an EI = 0 line does not change. CD_Set_Model_VIV takes the per-element (St, eps, A) as an optional wake argument; it refuses in-line VIV and amplitude tables with it, as the finite-EI cable does. Gates (tests/test_viv_wake_deck.f90, test_viv_coupled.f90): - the taut line of the wake gate with EI = 0 locks in at 0.282 Hz and A/D 0.5856, against 0.5850 for the finite-EI cable (0.1 %), and responds uncoupled (A 0) at the wake's 0.298 Hz, A/D 0.0989 against 0.0986; - the drag and damping take out the wake-lift power within 0.3 %; - CL0 0 is the deck without the section, bit for bit; - on the coupled route a checkpoint restart continues bit for bit with the EI = 0 wake state, a rebuild without it does not, and a rewound step repeats; - a line mixing the two models and an EI = 0 type that keeps its Cl are refused by name. The Python deck reader accepts the wake oscillator on EI = 0 lines. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 9 +- doc/capabilities.rst | 2 +- doc/driver_format.md | 4 +- doc/theory.rst | 10 +- python/cabledyn/builder.py | 2 +- python/cabledyn/deck_file.py | 9 +- python/tests/test_deck_file.py | 12 ++- python/tests/test_end_to_end.py | 2 +- src/CableDyn_DeckDriver.f90 | 25 ++++- src/CableDyn_Model.f90 | 173 ++++++++++++++++++++++++++++++-- tests/test_viv_coupled.f90 | 21 ++-- tests/test_viv_wake_deck.f90 | 105 ++++++++++--------- 12 files changed, 289 insertions(+), 85 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfb5aa84..bedfdb96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/doc/capabilities.rst b/doc/capabilities.rst index f1526d53..fd73d2a6 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -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 diff --git a/doc/driver_format.md b/doc/driver_format.md index 51a9812c..7d5502d7 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -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 ---------------------------------- @@ -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) diff --git a/doc/theory.rst b/doc/theory.rst index 8a0e70dc..39bbe962 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -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. @@ -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: diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 4e28bdb3..53d184f1 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -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. diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index b59704e3..e337f949 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -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: @@ -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 " diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index 4399e9c3..f06061e5 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -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)) @@ -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) diff --git a/python/tests/test_end_to_end.py b/python/tests/test_end_to_end.py index 496f4be9..fd3c2bd8 100644 --- a/python/tests/test_end_to_end.py +++ b/python/tests/test_end_to_end.py @@ -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, ), ] diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index ae0033a9..a0dbf67c 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -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 @@ -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 @@ -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 '// & @@ -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) @@ -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) diff --git a/src/CableDyn_Model.f90 b/src/CableDyn_Model.f90 index d12a2778..195ff8dd 100644 --- a/src/CableDyn_Model.f90 +++ b/src/CableDyn_Model.f90 @@ -59,7 +59,7 @@ MODULE CableDyn_Model USE CableDyn_VIV, ONLY: CD_VIV_Node_Lift, CD_VIV_Crossflow_Motion, CD_VIV_Phase_Rate, CD_VIV_Mean_Square, & CD_VIV_Wrap_Phase, CD_VIV_NM, CD_VIV_TWO_PI, CD_VIV_Node_Inline, CD_VIV_Inline_Phase_Rate, & CD_VIV_NMS, CD_VIV_NMS_AMP, CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, & - CD_VIV_Check_Amp_Table, CD_VIV_Ambient_Crossflow_Rate + CD_VIV_Check_Amp_Table, CD_VIV_Ambient_Crossflow_Rate, CD_VIV_Wake_Advance USE CableDyn_Dynamic, ONLY: GenAlphaConfig, CD_CableGenAlphaWorkspace, CD_Clear_GenAlpha_Workspace, & CD_Cable_Initial_Acceleration, CD_Cable_Gen_Alpha_Step, CD_Cable_Step_Loads, & CD_DYN_OK, CD_DYN_ALLOCFAIL, & @@ -438,6 +438,16 @@ MODULE CableDyn_Model LOGICAL :: has_viv_amp = .FALSE. REAL(wp), ALLOCATABLE :: viv_amp(:, :, :) INTEGER, ALLOCATABLE :: viv_amp_n(:) + ! Wake-oscillator VIV (CD_Set_Model_VIV wake; Facchinetti et al. 2004): the van der Pol wake + ! variable q = 2 C_L/C_L0 replaces the synchronisation phase of the whole line, the lift scale + ! taking viv_cl = C_L0/2. Per node the Strouhal number, van der Pol eps and coupling A + ! (length-weighted over its lifting elements). The state rides in the VIV state slots, so the + ! rollback, step-recovery, sub-step and checkpoint copies carry it unchanged: viv_phi holds q + ! (viv_phi_eval q at the step's evaluation point, viv_phi_next q at the step end) and row 1 of + ! viv_ms dq/dt; in a step, viv_rate holds the step-start wake frequency and row 2 of viv_ms_next + ! the step-start cross-flow acceleration (row 2 of viv_ms stays 0). + LOGICAL :: viv_wake = .FALSE. + REAL(wp), ALLOCATABLE :: wo_st(:), wo_eps(:), wo_a(:) TYPE(GenAlphaConfig) :: cfg ! Run audit of the committed host steps (CD_Audit_Model_Step), diagnostics only: never part ! of the state, of a copy, or of a result. audit_t holds the segment tensions of the last two @@ -3947,7 +3957,7 @@ SUBROUTINE CD_Set_Model_Syrope_State(model, slow, tmax, ErrStat, ErrMsg) END SUBROUTINE CD_Set_Model_Syrope_State SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, ErrMsg, phase_seed, & - tangent_reversed, clx, il_alpha, chh, amp, amp_n) + tangent_reversed, clx, il_alpha, chh, amp, amp_n, wake) !! Install the cross-flow VIV model (CableDyn_VIV) on an initialised line. Per element: !! the lift coefficient cl (0 = no lift on that element), hydrodynamic diameter, and the !! synchronisation centre cf and half-range df of the non-dimensional shedding frequency; @@ -3974,6 +3984,11 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, !! amplitude ratio A/D >= 0 (strictly increasing), the cross-flow coefficient C_v >= 0 that !! replaces cl, and the factor > 0 of the element's normal drag coefficient, at the smoothed !! amplitude estimate of Thorsen et al. (2016); piecewise linear, held beyond the end rows. + !! Wake oscillator (Facchinetti et al. 2004; not with in-line VIV or amplitude tables): wake + !! (3, n_elem), per element the Strouhal number St > 0, van der Pol eps > 0 and acceleration + !! coupling A >= 0 (each at most 1e15) where cl > 0, with cl then the reference lift + !! coefficient C_L0 of a fixed cylinder; cf and df are unused. The wake variable q of a node + !! starts on its limit cycle at the node's start phase, q = 2 cos(phi_0), with dq/dt = 0. TYPE(CD_ModelType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: rho, cl(:), diameter(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -3986,9 +4001,10 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, REAL(wp), INTENT(IN), OPTIONAL :: clx(:), il_alpha(:), chh(:) REAL(wp), INTENT(IN), OPTIONAL :: amp(:, :, :) INTEGER, INTENT(IN), OPTIONAL :: amp_n(:) + REAL(wp), INTENT(IN), OPTIONAL :: wake(:, :) INTEGER :: n_nodes, n_elem, e, nd, istat, k, nms REAL(wp) :: wsum - LOGICAL :: want_il, want_amp + LOGICAL :: want_il, want_amp, want_wake CHARACTER(160) :: amsg ErrStat = CD_MODEL_OK @@ -4076,6 +4092,35 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, END IF want_amp = ANY(amp_n > 0) END IF + want_wake = .FALSE. + IF (PRESENT(wake)) THEN + IF (SIZE(wake, 1) /= 3 .OR. SIZE(wake, 2) /= n_elem) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator wake must have shape (3, n_elem)') + RETURN + END IF + IF (.NOT. CD_All_Finite(wake)) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator St, eps and A must be finite') + RETURN + END IF + DO e = 1, n_elem + IF (.NOT. (cl(e) > CD_ZERO)) CYCLE + IF (.NOT. (wake(1, e) > CD_ZERO .AND. wake(2, e) > CD_ZERO .AND. wake(3, e) >= CD_ZERO .AND. & + ALL(wake(:, e) <= 1.0e15_wp))) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator needs St > 0, eps > 0 and A >= 0, each at most '// & + '1e15, where cl > 0') + RETURN + END IF + END DO + want_wake = ANY(cl > CD_ZERO) + IF (want_wake .AND. want_il) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator takes no in-line VIV (clx > 0)') + RETURN + END IF + IF (want_wake .AND. want_amp) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator takes no amplitude tables') + RETURN + END IF + END IF CALL clear_viv(model) IF (.NOT. ANY(cl > CD_ZERO)) RETURN IF (.NOT. (CD_Is_Finite(rho) .AND. rho > CD_ZERO)) THEN @@ -4088,6 +4133,7 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, CALL fail(ErrStat, ErrMsg, 'VIV needs a positive diameter on every Cl > 0 element') RETURN END IF + IF (want_wake) CYCLE IF (.NOT. (cf(e) > CD_ZERO .AND. df(e) >= CD_ZERO .AND. df(e) < cf(e))) THEN CALL fail(ErrStat, ErrMsg, 'VIV synchronisation needs cF > 0 and 0 <= dF < cF (a positive '// & 'shedding frequency)') @@ -4164,6 +4210,43 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, model%viv_phi_next = model%viv_phi model%viv_phi_rest = 0.5_wp*CD_VIV_TWO_PI IF (PRESENT(tangent_reversed)) model%viv_phi_rest = MERGE(0.5_wp*CD_VIV_TWO_PI, CD_ZERO, tangent_reversed) + IF (want_wake) THEN + ALLOCATE (model%wo_st(n_nodes), model%wo_eps(n_nodes), model%wo_a(n_nodes), STAT=istat) + IF (istat /= 0) THEN + CALL clear_viv(model) + CALL alloc_fail(ErrStat, ErrMsg, 'VIV wake oscillator storage allocation failed') + RETURN + END IF + ! the node's lift scale (viv_node_coef, 1/2 rho D viv_cl over its tributary length) is then + ! that of 1/4 rho D C_L0, the lift per unit length 1/4 rho D C_L0 q U^2 + model%viv_cl = 0.5_wp*model%viv_cl + model%wo_st = CD_ZERO + model%wo_eps = CD_ZERO + model%wo_a = CD_ZERO + DO nd = 2, n_nodes - 1 + IF (.NOT. model%viv_node(nd)) CYCLE + wsum = CD_ZERO + DO k = nd - 1, nd + IF (.NOT. (cl(k) > CD_ZERO)) CYCLE + wsum = wsum + model%l0(k) + model%wo_st(nd) = model%wo_st(nd) + model%l0(k)*wake(1, k) + model%wo_eps(nd) = model%wo_eps(nd) + model%l0(k)*wake(2, k) + model%wo_a(nd) = model%wo_a(nd) + model%l0(k)*wake(3, k) + END DO + model%wo_st(nd) = model%wo_st(nd)/wsum + model%wo_eps(nd) = model%wo_eps(nd)/wsum + model%wo_a(nd) = model%wo_a(nd)/wsum + ! on the limit cycle at the node's start phase + model%viv_phi(nd) = 2.0_wp*COS(model%viv_phi(nd)) + END DO + model%viv_cf = CD_ZERO + model%viv_df = CD_ZERO + model%viv_phi_rollback = model%viv_phi + model%recovery_viv_phi = model%viv_phi + model%viv_phi_eval = model%viv_phi + model%viv_phi_next = model%viv_phi + model%viv_wake = .TRUE. + END IF model%has_viv = .TRUE. IF (.NOT. want_il) RETURN ALLOCATE (model%vil_cx(n_elem), model%vil_alpha(n_nodes), model%vil_node(n_nodes), model%vil_phi(n_nodes), & @@ -4224,7 +4307,8 @@ SUBROUTINE CD_Get_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi !! the running mean squares of the cross-flow velocity and acceleration (2, n_nodes), and !! the averaging time (0 while unlatched). A model without VIV returns zeros. phi_x and ms_x !! (both or neither, same shapes) take the in-line phase and mean squares, zero without - !! in-line VIV. + !! in-line VIV. On a wake-oscillator line phi is the wake variable q and row 1 of ms its rate + !! dq/dt (row 2 zero). TYPE(CD_ModelType), INTENT(IN) :: model REAL(wp), INTENT(OUT) :: phi(:), ms(:, :), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -4298,7 +4382,12 @@ SUBROUTINE CD_Set_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi END IF ! the mean squares (rows 1:2) and the amplitudes y0, y0s (rows 4:5) cannot be negative; the ! travel and the last cross-flow velocity of the amplitude estimate (rows 3, 6) are signed - neg = ANY(ms(1:2, :) < CD_ZERO) + ! (a wake-oscillator line holds dq/dt in row 1, signed, and 0 in row 2) + IF (model%viv_wake) THEN + neg = ANY(ms(2, :) < CD_ZERO) + ELSE + neg = ANY(ms(1:2, :) < CD_ZERO) + END IF IF (SIZE(ms, 1) >= 5) neg = neg .OR. ANY(ms(4:5, :) < CD_ZERO) IF (neg .OR. t_window < CD_ZERO) THEN CALL fail(ErrStat, ErrMsg, 'VIV mean squares, amplitudes and averaging time must be non-negative') @@ -4479,6 +4568,11 @@ SUBROUTINE viv_node_load(model, q, v, nd, in_step, force, ok, jac_v, jac_prev, j ia = 3*nd - 2 phi = model%viv_phi(nd) IF (in_step) phi = model%viv_phi_eval(nd) + IF (model%viv_wake) THEN + ! the wake lift: the scale times the wake variable q (held in the phase slot) + coef = coef*phi + phi = CD_ZERO + END IF IF (PRESENT(jac_v)) THEN CALL CD_VIV_Node_Lift(q(ia - 3:ia - 1), q(ia + 3:ia + 5), smoothed(v, ia), uu, coef, phi, force, ok, & jac_v, jac_prev, jac_next) @@ -4642,7 +4736,7 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: nd, ia - REAL(wp) :: w, alpha_f, yd, ydd, un, coef, uu(3), xd, xdd + REAL(wp) :: w, alpha_f, yd, ydd, un, coef, uu(3), xd, xdd, sw(2) LOGICAL :: ok ErrStat = CD_MODEL_OK ErrMsg = '' @@ -4668,6 +4762,18 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) CALL fail(ErrStat, ErrMsg, 'VIV phase: the neighbours of a node coincide (no line tangent)') RETURN END IF + IF (model%viv_wake) THEN + ! the wake frequency of the ambient flow normal to the line (the free stream of the + ! paper), not of the relative flow, which the line's own cross-flow motion modulates; the + ! wake state predicted at the step's evaluation point under the step-start forcing + model%viv_rate(nd) = CD_VIV_TWO_PI*model%wo_st(nd)*viv_node_ambient_speed(model%q, ia, uu)/model%viv_dn(nd) + model%viv_ms_next(2, nd) = ydd + sw = [model%viv_phi(nd), model%viv_ms(1, nd)] + CALL CD_VIV_Wake_Advance(sw, model%viv_rate(nd), model%wo_eps(nd), model%wo_a(nd)/model%viv_dn(nd), & + ydd, ydd, (CD_ONE - alpha_f)*dt) + model%viv_phi_eval(nd) = sw(1) + CYCLE + END IF model%viv_ms_next(1, nd) = CD_VIV_Mean_Square(model%viv_ms(1, nd), yd, w) model%viv_ms_next(2, nd) = CD_VIV_Mean_Square(model%viv_ms(2, nd), ydd, w) model%viv_rate(nd) = CD_VIV_Phase_Rate(yd, ydd, model%viv_ms_next(1, nd), model%viv_ms_next(2, nd), & @@ -4694,7 +4800,7 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: nd, ia - REAL(wp) :: w, yd, ydd, un, coef, uu(3), ms1, ms2, rate_end, xd, xdd, rate_end_x, st(4) + REAL(wp) :: w, yd, ydd, un, coef, uu(3), ms1, ms2, rate_end, xd, xdd, rate_end_x, st(4), sw(2), ydd0 LOGICAL :: ok ErrStat = CD_MODEL_OK ErrMsg = '' @@ -4708,6 +4814,24 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) CALL CD_VIV_Crossflow_Motion(model%q_step(ia - 3:ia - 1), model%q_step(ia + 3:ia + 5), & smoothed(model%v_step, ia), smoothed(model%a_step, ia), uu, yd, ydd, un, ok, & xd, xdd) + IF (model%viv_wake) THEN + ! the wake state over the step with the cross-flow acceleration linear from its step-start + ! value to the converged end one (held where the end tangent is degenerate), at the + ! step-start wake frequency; a non-finite result keeps the step-start forcing alone + ydd0 = model%viv_ms_next(2, nd) + IF (.NOT. (ok .AND. CD_Is_Finite(ydd))) ydd = ydd0 + sw = [model%viv_phi(nd), model%viv_ms(1, nd)] + CALL CD_VIV_Wake_Advance(sw, model%viv_rate(nd), model%wo_eps(nd), model%wo_a(nd)/model%viv_dn(nd), & + ydd0, ydd, dt) + IF (.NOT. (CD_Is_Finite(sw(1)) .AND. CD_Is_Finite(sw(2)))) THEN + sw = [model%viv_phi(nd), model%viv_ms(1, nd)] + CALL CD_VIV_Wake_Advance(sw, model%viv_rate(nd), model%wo_eps(nd), model%wo_a(nd)/model%viv_dn(nd), & + ydd0, ydd0, dt) + END IF + model%viv_phi_next(nd) = sw(1) + model%viv_ms_next(1, nd) = sw(2) + CYCLE + END IF IF (.NOT. ok) THEN CALL fail(ErrStat, ErrMsg, 'VIV phase: the neighbours of a node coincide (no line tangent)') RETURN @@ -4735,6 +4859,14 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) rate_end, model%vil_alpha(nd)) model%vil_phi_next(nd) = CD_VIV_Wrap_Phase(model%vil_phi(nd) + 0.5_wp*dt*(model%vil_rate(nd) + rate_end_x)) END DO + IF (model%viv_wake) THEN + ! row 2 held the step-start acceleration (scratch); the committed row stays 0 + model%viv_ms_next(2, :) = CD_ZERO + IF (.NOT. (CD_All_Finite(model%viv_phi_next) .AND. CD_All_Finite(model%viv_ms_next))) THEN + CALL fail(ErrStat, ErrMsg, 'VIV wake oscillator update produced a non-finite state') + END IF + RETURN + END IF IF (.NOT. CD_All_Finite(model%viv_phi_next)) THEN CALL fail(ErrStat, ErrMsg, 'VIV phase update produced a non-finite phase') END IF @@ -4745,6 +4877,18 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) END IF END SUBROUTINE viv_step_end + PURE REAL(wp) FUNCTION viv_node_ambient_speed(q, ia, uu) RESULT(ua) + !! Speed of the ambient flow uu normal to the tangent of the node whose x component is ia (the + !! chord of its two neighbours at positions q); 0 for a degenerate tangent. + REAL(wp), INTENT(IN) :: q(:), uu(3) + INTEGER, INTENT(IN) :: ia + REAL(wp) :: yd, ydd + LOGICAL :: ok + CALL CD_VIV_Crossflow_Motion(q(ia - 3:ia - 1), q(ia + 3:ia + 5), [CD_ZERO, CD_ZERO, CD_ZERO], & + [CD_ZERO, CD_ZERO, CD_ZERO], uu, yd, ydd, ua, ok) + IF (.NOT. ok) ua = CD_ZERO + END FUNCTION viv_node_ambient_speed + PURE FUNCTION smoothed(x, ia) RESULT(xs) !! Node kinematics for the VIV phase and lift: the node value averaged with its two !! neighbours, (x_{i-1} + 2 x_i + x_{i+1})/4, at the node whose x component is ia. Thorsen's @@ -4796,6 +4940,10 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%vil_phi_next)) DEALLOCATE (model%vil_phi_next) IF (ALLOCATED(model%viv_amp)) DEALLOCATE (model%viv_amp) IF (ALLOCATED(model%viv_amp_n)) DEALLOCATE (model%viv_amp_n) + IF (ALLOCATED(model%wo_st)) DEALLOCATE (model%wo_st) + IF (ALLOCATED(model%wo_eps)) DEALLOCATE (model%wo_eps) + IF (ALLOCATED(model%wo_a)) DEALLOCATE (model%wo_a) + model%viv_wake = .FALSE. model%has_viv_amp = .FALSE. model%has_viv_il = .FALSE. model%has_viv = .FALSE. @@ -7556,6 +7704,13 @@ SUBROUTINE CD_Copy_Model(src, dst, ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN CALL copy_real1(src%viv_phi_next, work%viv_phi_next, 'viv_phi_next', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN + work%viv_wake = src%viv_wake + CALL copy_real1(src%wo_st, work%wo_st, 'wo_st', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%wo_eps, work%wo_eps, 'wo_eps', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%wo_a, work%wo_a, 'wo_a', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN work%has_viv_amp = src%has_viv_amp CALL copy_real3(src%viv_amp, work%viv_amp, 'viv_amp', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN @@ -7746,6 +7901,10 @@ SUBROUTINE commit_model_copy(from, to) CALL MOVE_ALLOC(from%viv_rate, to%viv_rate) CALL MOVE_ALLOC(from%viv_ms_next, to%viv_ms_next) CALL MOVE_ALLOC(from%viv_phi_next, to%viv_phi_next) + to%viv_wake = from%viv_wake + CALL MOVE_ALLOC(from%wo_st, to%wo_st) + CALL MOVE_ALLOC(from%wo_eps, to%wo_eps) + CALL MOVE_ALLOC(from%wo_a, to%wo_a) to%has_viv_amp = from%has_viv_amp CALL MOVE_ALLOC(from%viv_amp, to%viv_amp) CALL MOVE_ALLOC(from%viv_amp_n, to%viv_amp_n) diff --git a/tests/test_viv_coupled.f90 b/tests/test_viv_coupled.f90 index 81320a6d..31da2115 100644 --- a/tests/test_viv_coupled.f90 +++ b/tests/test_viv_coupled.f90 @@ -30,10 +30,11 @@ PROGRAM test_viv_coupled !! * in-line VIV (a VIV section, ClX 0.85, on both lines): the checkpoint blocks grow by the !! in-line phase and mean squares (3 per node), the restarted run continues bit for bit with !! both phases, a rebuild without the VIV state does not, and a rewound step repeats; - !! * wake oscillator (a WAKE OSCILLATOR row, C_L0 0.3, on the cable, whose type has Cl 0; the - !! EI = 0 riser keeps its synchronisation lift): the cable's checkpoint block grows by the wake - !! state (2 per node), the restarted run continues bit for bit with it, a rebuild without the - !! VIV state does not, and a rewound step repeats; + !! * wake oscillator (a WAKE OSCILLATOR row, C_L0 0.3, on both types, which have Cl 0): the + !! cable's checkpoint block grows by the wake state (2 per node), the EI = 0 riser carries it in + !! its VIV block (q in the phase, dq/dt in the first motion statistic), the restarted run + !! continues bit for bit with both, a rebuild without the VIV state does not, and a rewound step + !! repeats; !! * amplitude tables (a VIV AMPLITUDE table on both types, Cv falling from 0.8 at A/D 0 to 0.4 at !! 1, CdAmp from 1 to 1.5): both checkpoint blocks grow by the amplitude estimate (4 per node), !! the restarted run continues bit for bit with it, a rebuild without the VIV state does not, @@ -404,7 +405,10 @@ LOGICAL FUNCTION identical(a, b) RESULT(same) MAXVAL(ABS(a%cables(1)%line%q - b%cables(1)%line%q)) <= 0.0_wp .AND. & MAXVAL(ABS(a%cables(1)%line%viv_phi - b%cables(1)%line%viv_phi)) <= 0.0_wp IF (same .AND. wake_case) same = a%cables(1)%line%viv_wake .AND. & - MAXVAL(ABS(a%cables(1)%line%wo_s - b%cables(1)%line%wo_s)) <= 0.0_wp + MAXVAL(ABS(a%cables(1)%line%wo_s - b%cables(1)%line%wo_s)) <= 0.0_wp .AND. & + a%sys%fast%system%lines(1)%viv_wake .AND. & + MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_ms - & + b%sys%fast%system%lines(1)%viv_ms)) <= 0.0_wp IF (same .AND. amp_case) THEN ! the motion statistics with the amplitude estimate (rows 3-6) on both lines same = a%sys%fast%system%lines(1)%has_viv_amp .AND. a%cables(1)%line%has_viv_amp .AND. & @@ -443,8 +447,8 @@ END SUBROUTINE response SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp) !! The EI = 0 riser (line 1) and the finite-EI cable (line 2), 20 m apart across the current; !! VIVrmsWindow 0.25 s unless window is given (0: none), and a deck dtM when dtm is given; - !! inline adds the in-line VIV of both types (a VIV section, ClX 0.85); wake gives the cable - !! the wake oscillator instead of its lift (Cl 0 and a WAKE OSCILLATOR row, C_L0 0.3); amp a VIV + !! inline adds the in-line VIV of both types (a VIV section, ClX 0.85); wake gives both types + !! the wake oscillator instead of their lift (Cl 0 and WAKE OSCILLATOR rows, C_L0 0.3); amp a VIV !! AMPLITUDE table on both types. CHARACTER(*), INTENT(IN) :: path REAL(wp), INTENT(IN) :: cl @@ -466,7 +470,7 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp) WRITE (u, '(A)') '--------------------- LINE TYPES ---' WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' WRITE (u, '(A)') '(name) (m) (kg/m) (N) (N-s/-) (-) (-) (-) (-) (-) (-) (-) (-)' - WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 0.0 1.2 1.0 0.0 0.0 '//TRIM(cl_txt)//' 0.08 0.18' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 0.0 1.2 1.0 0.0 0.0 '//TRIM(clc_txt)//' 0.08 0.18' WRITE (u, '(A)') 'cable 0.10 10.0 5.0e7 -0.8 1.0 1.2 1.0 0.0 0.0 '//TRIM(clc_txt)//' 0.08 0.18' WRITE (u, '(A)') '--------------------- POINTS ---' WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' @@ -500,6 +504,7 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp) IF (wo) THEN WRITE (u, '(A)') '--------------------- WAKE OSCILLATOR ---' WRITE (u, '(A)') 'TypeName CL0 St eps A' + WRITE (u, '(A)') 'riser 0.3 0.2 0.3 12' WRITE (u, '(A)') 'cable 0.3 0.2 0.3 12' END IF IF (PRESENT(amp)) THEN diff --git a/tests/test_viv_wake_deck.f90 b/tests/test_viv_wake_deck.f90 index 75465161..aefad2f5 100644 --- a/tests/test_viv_wake_deck.f90 +++ b/tests/test_viv_wake_deck.f90 @@ -3,9 +3,10 @@ ! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University PROGRAM test_viv_wake_deck !! Wake-oscillator VIV on a deck (the optional WAKE OSCILLATOR section, TypeName CL0 [St [eps - !! [A]]]; Facchinetti et al. 2004): the taut finite-EI cable of the in-line VIV gate (100 m, - !! D 0.1 m, EI 1 N m^2, 50 kN, pinned at 50 m depth) in a uniform 0.15 m/s current along y, its - !! type with no synchronisation lift (Cl 0) and the row riser 0.3 (St 0.2, eps 0.3, A 12). + !! [A]]]; Facchinetti et al. 2004): the taut cable of the in-line VIV gate (100 m, D 0.1 m, + !! 50 kN, pinned at 50 m depth) in a uniform 0.15 m/s current along y, its type with no + !! synchronisation lift (Cl 0) and the row riser 0.3 (St 0.2, eps 0.3, A 12). W1-W3 run on the + !! finite-EI cable (EI 1 N m^2) and on the EI = 0 line alike. !! W1 lock-in: with the acceleration coupling A 12 the cross-flow response is captured by the !! cable's first mode, below the wake's own frequency St U/D = 0.30 Hz by more than !! 0.01 Hz, at a steady mid-span A/D between 0.4 and 0.8; uncoupled (A 0) the wake drives @@ -16,15 +17,25 @@ PROGRAM test_viv_wake_deck !! W3 a row with CL0 0 is the deck without the section, to the printed digits; !! W4 refusals by name: a malformed or non-numeric row, an unknown or repeated type, St, eps or !! A out of range, a type that keeps its synchronisation lift (Cl > 0, which in-line VIV - !! also needs), a line that mixes the two models, and an EI = 0 line. + !! also needs), and a line that mixes the two models (finite-EI and EI = 0); + !! W5 the two cores agree: the EI = 0 line locks in within 3 % of the finite-EI cable's A/D + !! and 0.003 Hz of its frequency, and so does its uncoupled response. USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK IMPLICIT NONE REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp, D = 0.1_wp, F_WAKE = 0.2_wp*0.15_wp/0.1_wp INTEGER :: nfail = 0 + REAL(wp) :: ad_fe(4) = 0.0_wp, ad_l(4) = 0.0_wp CALL write_current('wod_current.dat') - CALL check_runs() + CALL check_runs('1.0', 'wod', ad_fe) + CALL check_runs('0.0', 'wod0', ad_l) + WRITE (*, '(A,4F8.4)') 'W5: lock-in A/D, f [Hz] finite-EI, EI = 0: ', ad_fe(1:2), ad_l(1:2) + WRITE (*, '(A,4F8.4)') 'W5: uncoupled A/D, f [Hz] finite-EI, EI = 0: ', ad_fe(3:4), ad_l(3:4) + CALL require(ABS(ad_l(1)/ad_fe(1) - 1.0_wp) <= 0.03_wp .AND. ABS(ad_l(2) - ad_fe(2)) <= 0.003_wp, & + 'W5: the EI = 0 line locks in as the finite-EI cable') + CALL require(ABS(ad_l(3)/ad_fe(3) - 1.0_wp) <= 0.03_wp .AND. ABS(ad_l(4) - ad_fe(4)) <= 0.003_wp, & + 'W5: and responds uncoupled as it') CALL check_refusals() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' @@ -213,53 +224,61 @@ SUBROUTINE window_stats(tab, n, t0, t1, ad, f) f = peak_frequency(tt, z) END SUBROUTINE window_stats - SUBROUTINE check_runs() + SUBROUTINE check_runs(ei, tag, res) + !! W1-W3 on the cable of EI ei ('1.0' finite-EI, '0.0' the EI = 0 line), the files named + !! after tag; res = (coupled A/D, f, uncoupled A/D, f) over the steady windows. + CHARACTER(*), INTENT(IN) :: ei, tag + REAL(wp), INTENT(OUT) :: res(4) REAL(wp), ALLOCATABLE :: tw(:, :), t0(:, :), tn(:, :), tz(:, :) INTEGER :: nw, n0, nn, nz REAL(wp) :: ad_w, f_w, ad_w2, f_w2, ad_0, f_0, pv, pd, pb LOGICAL :: ok, keep(20000) CHARACTER(1024) :: msg - CALL write_deck('wod_wake.dat', 'riser 0.3', 100.0_wp) - CALL run('wod_wake.dat', 'wod_wake', ok, msg) - CALL require(ok, 'W1: the wake-oscillator deck runs: '//TRIM(msg)) - CALL write_deck('wod_a0.dat', 'riser 0.3 0.2 0.3 0.0', 100.0_wp) - CALL run('wod_a0.dat', 'wod_a0', ok, msg) - CALL require(ok, 'W1: the uncoupled deck (A 0) runs: '//TRIM(msg)) - CALL read_out('wod_wake.out', tw, nw) - CALL read_out('wod_a0.out', t0, n0) - CALL require(nw > 1000 .AND. n0 == nw, 'W1: the runs wrote matching rows') + CHARACTER(:), ALLOCATABLE :: lab + res = 0.0_wp + lab = ' (EI '//ei//')' + CALL write_deck(tag//'_wake.dat', 'riser 0.3', 100.0_wp, ei=ei) + CALL run(tag//'_wake.dat', tag//'_wake', ok, msg) + CALL require(ok, 'W1: the wake-oscillator deck runs'//lab//': '//TRIM(msg)) + CALL write_deck(tag//'_a0.dat', 'riser 0.3 0.2 0.3 0.0', 100.0_wp, ei=ei) + CALL run(tag//'_a0.dat', tag//'_a0', ok, msg) + CALL require(ok, 'W1: the uncoupled deck (A 0) runs'//lab//': '//TRIM(msg)) + CALL read_out(tag//'_wake.out', tw, nw) + CALL read_out(tag//'_a0.out', t0, n0) + CALL require(nw > 1000 .AND. n0 == nw, 'W1: the runs wrote matching rows'//lab) IF (.NOT. (nw > 1000 .AND. n0 == nw)) RETURN CALL window_stats(tw, nw, 50.0_wp, 75.0_wp, ad_w, f_w) CALL window_stats(tw, nw, 75.0_wp, 100.0_wp, ad_w2, f_w2) CALL window_stats(t0, n0, 50.0_wp, 100.0_wp, ad_0, f_0) - WRITE (*, '(A,2F8.4,A,2F8.4,A,F7.4)') 'W1: coupled A/D, f [Hz] (50-75 s, 75-100 s) ', ad_w, f_w, ', ', ad_w2, & - f_w2, '; wake frequency ', F_WAKE - WRITE (*, '(A,2F8.4)') 'W1: uncoupled (A 0) A/D, f [Hz] ', ad_0, f_0 + res = [ad_w, f_w, ad_0, f_0] + WRITE (*, '(A,2F8.4,A,2F8.4,A,F7.4)') 'W1'//lab//': coupled A/D, f [Hz] (50-75 s, 75-100 s) ', ad_w, f_w, & + ', ', ad_w2, f_w2, '; wake frequency ', F_WAKE + WRITE (*, '(A,2F8.4)') 'W1'//lab//': uncoupled (A 0) A/D, f [Hz] ', ad_0, f_0 CALL require(f_w < F_WAKE - 0.01_wp .AND. ad_w > 0.4_wp .AND. ad_w < 0.8_wp, & - 'W1: the coupled response locks in below the wake frequency at A/D 0.4-0.8') - CALL require(ABS(ad_w2/ad_w - 1.0_wp) <= 0.01_wp .AND. ABS(f_w2 - f_w) <= 0.002_wp, 'W1: and is steady') - CALL require(ABS(f_0 - F_WAKE) <= 0.005_wp, 'W1: uncoupled, the wake drives the cable at its own frequency') - CALL require(ad_w >= 3.0_wp*ad_0, 'W1: lock-in at least triples the uncoupled amplitude') + 'W1: the coupled response locks in below the wake frequency at A/D 0.4-0.8'//lab) + CALL require(ABS(ad_w2/ad_w - 1.0_wp) <= 0.01_wp .AND. ABS(f_w2 - f_w) <= 0.002_wp, 'W1: and is steady'//lab) + CALL require(ABS(f_0 - F_WAKE) <= 0.005_wp, 'W1: uncoupled, the wake drives the cable at its own frequency'//lab) + CALL require(ad_w >= 3.0_wp*ad_0, 'W1: lock-in at least triples the uncoupled amplitude'//lab) ! W2: the power balance of the steady lock-in keep(1:nw) = tw(1, 1:nw) >= 60.0_wp pv = SUM(PACK(tw(3, 1:nw), keep(1:nw)))/COUNT(keep(1:nw)) pd = SUM(PACK(tw(4, 1:nw), keep(1:nw)))/COUNT(keep(1:nw)) pb = SUM(PACK(tw(5, 1:nw), keep(1:nw)))/COUNT(keep(1:nw)) - WRITE (*, '(A,3ES12.4)') 'W2: mean VIVPow, DragPow, DampPow [W] over 60-100 s: ', pv, pd, pb + WRITE (*, '(A,3ES12.4)') 'W2'//lab//': mean VIVPow, DragPow, DampPow [W] over 60-100 s: ', pv, pd, pb CALL require(pv > 0.0_wp .AND. ABS(pv + pd + pb) <= 0.005_wp*pv, & - 'W2: the drag and damping take out the wake-lift power within 0.5 %') + 'W2: the drag and damping take out the wake-lift power within 0.5 %'//lab) ! W3: CL0 0 is no wake oscillator - CALL write_deck('wod_none.dat', '', 20.0_wp) - CALL run('wod_none.dat', 'wod_none', ok, msg) - CALL require(ok, 'W3: the deck without the section runs: '//TRIM(msg)) - CALL write_deck('wod_zero.dat', 'riser 0.0', 20.0_wp) - CALL run('wod_zero.dat', 'wod_zero', ok, msg) - CALL require(ok, 'W3: the CL0 0 deck runs: '//TRIM(msg)) - CALL read_out('wod_none.out', tn, nn) - CALL read_out('wod_zero.out', tz, nz) - CALL require(nn > 100 .AND. nz == nn, 'W3: the runs wrote matching rows') + CALL write_deck(tag//'_none.dat', '', 20.0_wp, ei=ei) + CALL run(tag//'_none.dat', tag//'_none', ok, msg) + CALL require(ok, 'W3: the deck without the section runs'//lab//': '//TRIM(msg)) + CALL write_deck(tag//'_zero.dat', 'riser 0.0', 20.0_wp, ei=ei) + CALL run(tag//'_zero.dat', tag//'_zero', ok, msg) + CALL require(ok, 'W3: the CL0 0 deck runs'//lab//': '//TRIM(msg)) + CALL read_out(tag//'_none.out', tn, nn) + CALL read_out(tag//'_zero.out', tz, nz) + CALL require(nn > 100 .AND. nz == nn, 'W3: the runs wrote matching rows'//lab) IF (nn > 100 .AND. nz == nn) CALL require(ALL(tz(:, 1:nz) == tn(:, 1:nn)), & - 'W3: a row with CL0 0 is the deck without the section') + 'W3: a row with CL0 0 is the deck without the section'//lab) END SUBROUTINE check_runs SUBROUTINE check_refusals() @@ -273,7 +292,10 @@ SUBROUTINE check_refusals() CALL refused('riser 0.3 0.2 0.3 -1', 'St > 0, eps > 0 and A >= 0', 'a negative A') CALL refused('riser 0.3', 'give the type LINE TYPES Cl 0', 'a type that keeps its lift', cl='0.8') CALL refused('riser 0.3', 'a line takes one VIV model', 'a line mixing the two models', mixed=.TRUE.) - CALL refused('riser 0.3', 'finite-EI cables (EI > 0) only', 'an EI = 0 line', ei='0.0') + CALL refused('riser 0.3', 'a line takes one VIV model', 'an EI = 0 line mixing the two models', ei='0.0', & + mixed=.TRUE.) + CALL refused('riser 0.3', 'give the type LINE TYPES Cl 0', 'an EI = 0 type that keeps its lift', cl='0.8', & + ei='0.0') END SUBROUTINE check_refusals SUBROUTINE refused(rows, needle, what, cl, ei, viv_row, mixed) @@ -282,17 +304,8 @@ SUBROUTINE refused(rows, needle, what, cl, ei, viv_row, mixed) LOGICAL, INTENT(IN), OPTIONAL :: mixed LOGICAL :: ok CHARACTER(1024) :: msg - IF (PRESENT(viv_row)) THEN - CALL write_deck('wod_bad.dat', rows, 1.0_wp, cl=cl, viv_row=viv_row) - ELSE IF (PRESENT(cl)) THEN - CALL write_deck('wod_bad.dat', rows, 1.0_wp, cl=cl) - ELSE IF (PRESENT(ei)) THEN - CALL write_deck('wod_bad.dat', rows, 1.0_wp, ei=ei) - ELSE IF (PRESENT(mixed)) THEN - CALL write_deck('wod_bad.dat', rows, 1.0_wp, mixed=mixed) - ELSE - CALL write_deck('wod_bad.dat', rows, 1.0_wp) - END IF + ! an absent optional passes on absent + CALL write_deck('wod_bad.dat', rows, 1.0_wp, cl=cl, ei=ei, viv_row=viv_row, mixed=mixed) CALL run('wod_bad.dat', 'wod_bad', ok, msg) CALL require(.NOT. ok .AND. INDEX(msg, needle) > 0, 'W4: '//what//' is refused: '//TRIM(msg)) END SUBROUTINE refused From 28ece6315769d8a725bea27022febc1784e9c7aa Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Sun, 15 Nov 2026 04:31:30 +0900 Subject: [PATCH 20/47] fix: continuous Gauss-point loads of a finite-EI line at the free surface (#163) The statics of a finite-EI line through the free surface could fail at isolated currents. Each Gauss point's hydrodynamic load switched on and off at the waterline, so the residual jumped and an equilibrium with a point at the surface had no root. A light lazy-wave cable (OD 31 mm, 0.919 kg/m, EI 0.217 N m^2, its top 0.75 m above the surface) in a cross current solved at 0.399 and 0.401 m/s and failed every static route at 0.400 m/s: the load stepping stopped at a drag fraction of 0.997, and Newton with the live drag stagnated at the same residual from every start. 99, 101 and 120 elements solved; at 0.400 m/s the third Gauss point of the element through the surface sat at z = 0 (-0.16 mm at 0.399 m/s, +0.13 mm at 0.401 m/s). The drag, added mass, wave Froude-Krylov load and VIV lift of a Gauss point now carry the immersed fraction of its section, linear across one diameter about the surface (CD_HermiteCable_Immersion), with its derivative in the Jacobians. A point deeper than D/2 has the fraction 1 exactly, so fully submerged elements are unchanged to the bit; the EI = 0 path already used a continuous wetted fraction. The VIV lift element takes the diameter as an optional argument (without it, the old switch). Gates: - test_hermite_drag_dynamics E: an element through the surface: the position Jacobian matches central FD (1.6e-10), the load changes by at most 3.3e-4 of its size per 0.1 mm as the element moves through the surface (a switch jumped by a Gauss weight, 5/18 or 8/18), and a fully submerged element is unchanged to the bit; - test_static_surface_crossing: the cable above at 21 currents, 0.390-0.410 m/s: every speed solves, the deflection and top tension grow monotonically, and 0.400 m/s lies between its neighbours (the deck fails on dev at 0.400 m/s only). The full suite passes unchanged under both BLAS kernels. Review fix: in waves, a Gauss point above the instantaneous surface but inside the band takes the wave velocity and acceleration at the surface (the Wheeler kinematics vanish above it), so the FK load and the wave drag stay continuous (test_hermite_wave_forcing E: at most 2.7e-4 of the load per D/2000 step). Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 11 ++ CMakeLists.txt | 4 + doc/theory.rst | 23 +++- src/CableDyn_HermiteCableDynamic.f90 | 162 +++++++++++++++++++----- tests/test_hermite_drag_dynamics.f90 | 56 ++++++++- tests/test_hermite_wave_forcing.f90 | 40 +++++- tests/test_static_surface_crossing.f90 | 165 +++++++++++++++++++++++++ 7 files changed, 422 insertions(+), 39 deletions(-) create mode 100644 tests/test_static_surface_crossing.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index bedfdb96..6cedc0c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,6 +108,17 @@ All notable changes to CableDyn are recorded in this file. The format follows with its source, its test data and the line-type columns it maps to, and Thorsen et al.'s excitation curve as a `VIV AMPLITUDE` table. +### Fixed + +- The statics of a finite-EI line through the free surface could fail at isolated currents: + each Gauss point's hydrodynamic load switched on and off at the surface, so the residual + jumped and an equilibrium with a point at the waterline had no root (a light lazy-wave cable, + OD 31 mm, in a cross current solved at 0.399 and 0.401 m/s and failed every static route at + 0.400 m/s, the load stepping stopping at a drag fraction of 0.997). The drag, added mass, wave + Froude-Krylov load and VIV lift of a Gauss point now carry the immersed fraction of its + section, linear across one diameter about the surface, with its derivative in the Jacobians. + Fully submerged points are unchanged to the bit; the full test suite passes unchanged. + ## [0.4.2] - 2026-11-09 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 24c5931a..4ed467ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1329,6 +1329,10 @@ add_executable(test_viv_wake_deck tests/test_viv_wake_deck.f90) target_link_libraries(test_viv_wake_deck PRIVATE cabledyn_core) add_test(NAME viv_wake_deck COMMAND test_viv_wake_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_tests_properties(viv_wake_deck PROPERTIES LABELS "fortran;integration;dynamic;viv" TIMEOUT 1200) +add_executable(test_static_surface_crossing tests/test_static_surface_crossing.f90) +target_link_libraries(test_static_surface_crossing PRIVATE cabledyn_core) +add_test(NAME static_surface_crossing COMMAND test_static_surface_crossing WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(static_surface_crossing PROPERTIES LABELS "fortran;integration;static" TIMEOUT 600) # VIV amplitude estimate (Thorsen et al. 2016, Eq. 8 and 9) and the amplitude tables. add_executable(test_viv_amplitude_kernel tests/test_viv_amplitude_kernel.f90) diff --git a/doc/theory.rst b/doc/theory.rst index 39bbe962..8aea3e35 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1540,11 +1540,24 @@ On the ``EI = 0`` path, an element crossing the free surface uses its wetted fra Drag, added mass, and fluid inertia act on the wetted part (drag with the wet-weighted relative velocity), and a recovery load :math:`-(1 - f)\,\tfrac{1}{2}\rho A g L_0` on each end node removes the buoyancy of the dry part; the derivatives of :math:`f` with respect to the nodal heights are -included in the tangent. On the Hermite path the hydrodynamic loads are integrated over the -deformed element length at three Gauss points, and a Gauss point above the local surface -carries no load. This is exact for fully submerged elements, the regime of lazy-wave cables and -moorings, and approximates the wetted length of a surface-piercing element by the Gauss -sampling. The Hermite buoyancy recovery is exact: the waterline crossings of the cubic +included in the tangent. On the Hermite path the hydrodynamic loads (drag, added mass, the wave +Froude-Krylov load and the VIV lift) are integrated over the deformed element length at the +Gauss points, each weighted by the immersed fraction of its section, linear across one diameter: + +.. math:: + + w = \min\left(1, \max\left(0, \tfrac12 + \frac{\eta - z_g}{D}\right)\right), + +with :math:`z_g` the height of the Gauss point and :math:`\eta` the local surface. A point +deeper than :math:`D/2` has :math:`w = 1` exactly, so fully submerged elements, the regime of +lazy-wave cables and moorings, are integrated as before to the bit; across the surface the load +of a point is continuous in its height (with :math:`\partial w/\partial z_g = -1/D` in the +tangent). In waves a point above the instantaneous surface inside the band takes the wave velocity +and acceleration at the surface, where the Wheeler-stretched field vanishes above it. A wet/dry +switch per point made the load jump, and a static equilibrium with a Gauss point at the surface +then had no root: a 31 mm cable through the surface in a 0.400 m/s cross current +failed every static route while 0.399 and 0.401 m/s solved. The Hermite buoyancy recovery is +exact: the waterline crossings of the cubic centreline height are located on each element, and the load :math:`\rho g A` is integrated in closed form against the Hermite shape functions over the dry intervals, diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 75463237..1d6bf871 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -1971,16 +1971,17 @@ SUBROUTINE viv_element_lift(model, q_cfg, v_cfg, e, flift, ErrStat, ErrMsg, djq, knx = model%vil_k(e)*[COS(model%vil_phi_eval(e)), COS(model%vil_phi_eval(e + 1))] IF (PRESENT(djq)) THEN CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, model%l0(e), uu, wl, kn, flift, djq, djv, ErrStat, ErrMsg, & - kx_node=knx) + kx_node=knx, diam=model%diam(e)) ELSE CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, model%l0(e), uu, wl, kn, flift, ErrStat=ErrStat, & - ErrMsg=ErrMsg, kx_node=knx) + ErrMsg=ErrMsg, kx_node=knx, diam=model%diam(e)) END IF ELSE IF (PRESENT(djq)) THEN - CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, model%l0(e), uu, wl, kn, flift, djq, djv, ErrStat, ErrMsg) + CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, model%l0(e), uu, wl, kn, flift, djq, djv, ErrStat, ErrMsg, & + diam=model%diam(e)) ELSE CALL CD_HermiteCable_VIV_Lift_Element(qe, ve, model%l0(e), uu, wl, kn, flift, ErrStat=ErrStat, & - ErrMsg=ErrMsg) + ErrMsg=ErrMsg, diam=model%diam(e)) END IF END SUBROUTINE viv_element_lift @@ -8349,7 +8350,7 @@ SUBROUTINE added_mass_force(qe, ae, l0, waterline_z, rho, diam, can, cat, f, Err CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER, PARAMETER :: NGP = 4 REAL(wp), PARAMETER :: PI_L = 3.14159265358979323846_wp - REAL(wp) :: gp(NGP), gw(NGP), H(4), dH(4), rpos(3), rp(3), acc(3), speed, tangent(3), fa(3), area + REAL(wp) :: gp(NGP), gw(NGP), H(4), dH(4), rpos(3), rp(3), acc(3), speed, tangent(3), fa(3), area, wf, dwf INTEGER :: g, sh, c ErrStat = CD_HCDYN_OK; ErrMsg = '' @@ -8366,14 +8367,15 @@ SUBROUTINE added_mass_force(qe, ae, l0, waterline_z, rho, diam, can, cat, f, Err rp(c) = dH(1)*qe(c) + dH(2)*qe(3 + c) + dH(3)*qe(6 + c) + dH(4)*qe(9 + c) acc(c) = H(1)*ae(c) + H(2)*ae(3 + c) + H(3)*ae(6 + c) + H(4)*ae(9 + c) END DO - IF (rpos(3) > waterline_z) CYCLE ! dry Gauss point: no added mass + CALL CD_HermiteCable_Immersion(waterline_z - rpos(3), diam, wf, dwf) + IF (.NOT. (wf > CD_ZERO)) CYCLE ! dry Gauss point: no added mass speed = SQRT(rp(1)**2 + rp(2)**2 + rp(3)**2) IF (speed <= 1.0e-12_wp) THEN ErrStat = CD_HCDYN_NOCONVERGE ErrMsg = 'added-mass force: degenerate centreline (|dr/dxi| ~ 0)'; RETURN END IF tangent = rp/speed - fa = gw(g)*speed*rho*area*(can*acc + (cat - can)*DOT_PRODUCT(tangent, acc)*tangent) + fa = (gw(g)*wf)*speed*rho*area*(can*acc + (cat - can)*DOT_PRODUCT(tangent, acc)*tangent) DO sh = 1, 4 f(3*(sh - 1) + 1:3*sh) = f(3*(sh - 1) + 1:3*sh) + H(sh)*fa END DO @@ -11671,6 +11673,30 @@ SUBROUTINE fail(msg) END SUBROUTINE fail END SUBROUTINE CD_HermiteCable_Axial_Damping_Element + PURE SUBROUTINE CD_HermiteCable_Immersion(depth, diam, wf, dwf) + !! Immersed fraction wf of a cable section whose centre lies depth below the free surface + !! (negative above it), linear across one diameter: 0 from D/2 above the surface, 1 from D/2 + !! below, 1/2 at the surface, and its derivative dwf = d wf/d z with respect to the height of + !! the centre (-1/D in the band, 0 outside). A fully submerged point has wf exactly 1; across + !! the surface the hydrodynamic load of a Gauss point is continuous in the position, where a + !! wet/dry switch made it jump (a static equilibrium with a Gauss point at the surface then had + !! no root and the solve stalled). + REAL(wp), INTENT(IN) :: depth, diam + REAL(wp), INTENT(OUT) :: wf, dwf + REAL(wp) :: x + x = 0.5_wp + depth/diam + IF (x >= CD_ONE) THEN + wf = CD_ONE + dwf = CD_ZERO + ELSE IF (x <= CD_ZERO) THEN + wf = CD_ZERO + dwf = CD_ZERO + ELSE + wf = x + dwf = -CD_ONE/diam + END IF + END SUBROUTINE CD_HermiteCable_Immersion + SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, diam, cdn, cdt, & fdrag, djq, djv, ErrStat, ErrMsg, & wv_h, wv_om, wv_k, wv_depth, wv_dir, wv_t, & @@ -11684,13 +11710,13 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia !! rel-velocity / tangent Jacobians come from the analytical Morison primitive, so djq/djv are !! exact (FD-verified) and vanish smoothly at zero relative velocity (fixed-point safe). !! - !! Submergence is evaluated per Gauss point (a point with r_z above waterline_z contributes no - !! drag). For a FULLY submerged element -- the production regime for a lazy-wave power cable or a - !! mooring, which hangs entirely below the free surface -- every Gauss point is wet and the - !! integral is exact. For an element that STRADDLES the waterline this is a bounded Gauss-sampling - !! approximation (the wetted length is quantised to the abscissae and the crossing-point - !! derivative is dropped); surface-piercing elements do not get an exact wet-portion - !! integration, which fully-submerged cables do not need. + !! Submergence is evaluated per Gauss point as the immersed fraction of its section, linear + !! across one diameter about the surface (CD_HermiteCable_Immersion), with its derivative in + !! djq. For a FULLY submerged element -- the production regime for a lazy-wave power cable or a + !! mooring, which hangs entirely below the free surface -- every fraction is exactly 1 and the + !! integral is exact. For an element that STRADDLES the waterline the load stays continuous in + !! the position (a wet/dry switch per point made it jump, and a static equilibrium with a point + !! at the surface had no root); the wetted length is still sampled at the abscissae. !! OPTIONAL WAVES: supplying a wave family adds the wave velocity at each wet Gauss point !! (Wheeler-stretched, z measured from waterline_z) to the fluid velocity the drag sees. !! Exactly one family with the shared wv_depth/wv_dir/wv_t: the scalar REGULAR trio @@ -11723,7 +11749,7 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia REAL(wp), PARAMETER :: G3 = 0.7745966692414834_wp ! sqrt(3/5) REAL(wp) :: gp(NGP), gw(NGP), H(4), dH(4) REAL(wp) :: rpos(3), vvel(3), rp(3), speed, tangent(3), urel(3), fpl(3), Jrel(3, 3), Jtan(3, 3) - REAL(wp) :: jq3(3, 3), scale, eta_w, uw(3), aw(3), uamb(3) + REAL(wp) :: jq3(3, 3), scale, eta_w, uw(3), aw(3), uamb(3), wf, dwf, gww, zsurf LOGICAL :: has_wv, has_shared, has_trio, has_cmp, any_wv_arg, want_jac, split INTEGER :: g, s, c, sp, cp, a, b, es ! the message of a per-Gauss-point CableDyn_Hydro kinematics or Morison call (at most 154 @@ -11817,10 +11843,28 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia IF (es /= CD_HYDRO_OK) THEN ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'CD_HermiteCable_Drag_Element: '//TRIM(em2); RETURN END IF - IF (rpos(3) - waterline_z > eta_w) CYCLE ! above the instantaneous surface: dry + CALL CD_HermiteCable_Immersion(waterline_z + eta_w - rpos(3), diam, wf, dwf) + IF (wf > CD_ZERO .AND. rpos(3) - waterline_z > eta_w) THEN + ! a centre above the surface inside the band: its immersed part takes the wave velocity at + ! the surface (the Wheeler kinematics vanish above it), so the drag stays continuous + IF (has_cmp) THEN + zsurf = eta_w + CALL CD_Component_Wave_Kinematics(rpos(1), rpos(2), zsurf, wv_t, wv_depth, wv_dir, .TRUE., wvc_om, & + wvc_k, wvc_amp, wvc_ph, eta_w, uw, aw, es, em2, & + inputs_validated=.TRUE., exp_m2kd=wvc_e2kd) + ELSE + zsurf = eta_w + CALL CD_Airy_Wave_Kinematics_Precomputed(rpos(1), rpos(2), zsurf, wv_t, wv_h, wv_om, wv_k, wv_depth, & + wv_dir, .TRUE., eta_w, uw, aw, es, em2) + END IF + IF (es /= CD_HYDRO_OK) THEN + ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'CD_HermiteCable_Drag_Element: '//TRIM(em2); RETURN + END IF + END IF ELSE - IF (rpos(3) > waterline_z) CYCLE ! dry Gauss point: no drag, no Jacobian + CALL CD_HermiteCable_Immersion(waterline_z - rpos(3), diam, wf, dwf) END IF + IF (.NOT. (wf > CD_ZERO)) CYCLE ! dry Gauss point: no drag, no Jacobian speed = SQRT(rp(1)**2 + rp(2)**2 + rp(3)**2) ! |dr/dxi| = deformed arc length per unit xi IF (speed <= 1.0e-12_wp) THEN ErrStat = CD_HCDYN_NOCONVERGE @@ -11854,7 +11898,10 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia IF (es /= CD_HYDRO_OK) THEN ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'CD_HermiteCable_Drag_Element: '//TRIM(em2); RETURN END IF - scale = gw(g)*speed ! ds = |dr/dxi| dxi (deformed cable length) + ! ds = |dr/dxi| dxi (deformed cable length), times the immersed fraction of the section + ! (exactly 1 at a fully submerged point, so its products are unchanged) + gww = gw(g)*wf + scale = gww*speed DO s = 1, 4 DO c = 1, 3 a = 3*(s - 1) + c @@ -11879,9 +11926,17 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia b = 3*(sp - 1) + cp ! velocity: d urel/d ve(b) = -H(sp), scaled by the deformed length measure djv(a, b) = djv(a, b) - scale*H(s)*H(sp)*Jrel(c, cp) - djq(a, b) = djq(a, b) + gw(g)*H(s)*dH(sp)*jq3(c, cp) + djq(a, b) = djq(a, b) + gww*H(s)*dH(sp)*jq3(c, cp) END DO END DO + ! the immersed fraction moves with the height of the point (in the surface band only): + ! d wf/d qe(b) = dwf H(sp) for the vertical DOFs, dwf = d wf/d z + IF (dwf /= CD_ZERO) THEN + DO sp = 1, 4 + b = 3*sp + djq(a, b) = djq(a, b) + gw(g)*speed*H(s)*fpl(c)*dwf*H(sp) + END DO + END IF END DO END DO END DO @@ -11898,7 +11953,7 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia END SUBROUTINE CD_HermiteCable_Drag_Element SUBROUTINE CD_HermiteCable_VIV_Lift_Element(qe, ve, l0, fluid, waterline_z, k_node, flift, djq, djv, & - ErrStat, ErrMsg, kx_node) + ErrStat, ErrMsg, kx_node, diam) !! Consistent Gauss-integrated cross-flow VIV lift on one cubic-Hermite element: the load !! integral N^T f ds of the per-length lift f = k(xi) U (t x v_r) (CD_VIV_Lift_Per_Length), !! with k = 1/2 rho D Cl cos(phi) interpolated linearly between the element's end nodes @@ -11912,10 +11967,14 @@ SUBROUTINE CD_HermiteCable_VIV_Lift_Element(qe, ve, l0, fluid, waterline_z, k_no INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg REAL(wp), INTENT(IN), OPTIONAL :: kx_node(2) + !! diam (optional): the section diameter; with it a Gauss point carries the immersed fraction of + !! its section (CD_HermiteCable_Immersion) across the free surface, without it a point above + !! waterline_z carries no load + REAL(wp), INTENT(IN), OPTIONAL :: diam INTEGER, PARAMETER :: NGP = 3 REAL(wp), PARAMETER :: G3 = 0.7745966692414834_wp ! sqrt(3/5) REAL(wp) :: gp(NGP), gw(NGP), H(4), dH(4), rpos(3), vvel(3), rp(3), speed, tangent(3), fpl(3) - REAL(wp) :: jrel(3, 3), jtan(3, 3), scale, kg, fx(3), jrx(3, 3), jtx(3, 3) + REAL(wp) :: jrel(3, 3), jtan(3, 3), scale, kg, fx(3), jrx(3, 3), jtx(3, 3), wf, dwf, gww LOGICAL :: want_jac, ok INTEGER :: g, s, c, sp, cp, a, b @@ -11934,7 +11993,13 @@ SUBROUTINE CD_HermiteCable_VIV_Lift_Element(qe, ve, l0, fluid, waterline_z, k_no vvel(c) = H(1)*ve(c) + H(2)*ve(3 + c) + H(3)*ve(6 + c) + H(4)*ve(9 + c) rp(c) = dH(1)*qe(c) + dH(2)*qe(3 + c) + dH(3)*qe(6 + c) + dH(4)*qe(9 + c) END DO - IF (rpos(3) > waterline_z) CYCLE ! dry Gauss point: no lift + IF (PRESENT(diam)) THEN + CALL CD_HermiteCable_Immersion(waterline_z - rpos(3), diam, wf, dwf) + ELSE + wf = MERGE(CD_ZERO, CD_ONE, rpos(3) > waterline_z) + dwf = CD_ZERO + END IF + IF (.NOT. (wf > CD_ZERO)) CYCLE ! dry Gauss point: no lift kg = (CD_ONE - gp(g))*k_node(1) + gp(g)*k_node(2) IF (want_jac) THEN CALL CD_VIV_Lift_Per_Length(fluid - vvel, rp, kg, fpl, ok, jrel, jtan) @@ -11958,7 +12023,8 @@ SUBROUTINE CD_HermiteCable_VIV_Lift_Element(qe, ve, l0, fluid, waterline_z, k_no END IF speed = SQRT(rp(1)**2 + rp(2)**2 + rp(3)**2) tangent = rp/speed - scale = gw(g)*speed + gww = gw(g)*wf + scale = gww*speed DO s = 1, 4 DO c = 1, 3 a = 3*(s - 1) + c @@ -11973,9 +12039,15 @@ SUBROUTINE CD_HermiteCable_VIV_Lift_Element(qe, ve, l0, fluid, waterline_z, k_no DO cp = 1, 3 b = 3*(sp - 1) + cp djv(a, b) = djv(a, b) - scale*H(s)*H(sp)*jrel(c, cp) - djq(a, b) = djq(a, b) + gw(g)*H(s)*dH(sp)*(speed*jtan(c, cp) + fpl(c)*tangent(cp)) + djq(a, b) = djq(a, b) + gww*H(s)*dH(sp)*(speed*jtan(c, cp) + fpl(c)*tangent(cp)) END DO END DO + IF (dwf /= CD_ZERO) THEN ! the immersed fraction moves with the height of the point + DO sp = 1, 4 + b = 3*sp + djq(a, b) = djq(a, b) + gw(g)*speed*H(s)*fpl(c)*dwf*H(sp) + END DO + END IF END DO END DO END DO @@ -12001,7 +12073,7 @@ SUBROUTINE CD_HermiteCable_AddedMass_Element(qe, l0, waterline_z, rho, diam, can INTEGER, PARAMETER :: NGP = 4 REAL(wp), PARAMETER :: PI_L = 3.14159265358979323846_wp REAL(wp) :: gp(NGP), gw(NGP), H(4), dH(4) - REAL(wp) :: rpos(3), rp(3), speed, tangent(3), ma3(3, 3), area, scale + REAL(wp) :: rpos(3), rp(3), speed, tangent(3), ma3(3, 3), area, scale, wf, dwf INTEGER :: g, s, c, sp, cp, a, b ErrStat = CD_HCDYN_OK; ErrMsg = '' @@ -12029,7 +12101,8 @@ SUBROUTINE CD_HermiteCable_AddedMass_Element(qe, l0, waterline_z, rho, diam, can rpos(c) = H(1)*qe(c) + H(2)*qe(3 + c) + H(3)*qe(6 + c) + H(4)*qe(9 + c) rp(c) = dH(1)*qe(c) + dH(2)*qe(3 + c) + dH(3)*qe(6 + c) + dH(4)*qe(9 + c) END DO - IF (rpos(3) > waterline_z) CYCLE ! dry Gauss point: no added mass + CALL CD_HermiteCable_Immersion(waterline_z - rpos(3), diam, wf, dwf) + IF (.NOT. (wf > CD_ZERO)) CYCLE ! dry Gauss point: no added mass speed = SQRT(rp(1)**2 + rp(2)**2 + rp(3)**2) IF (speed <= 1.0e-12_wp) THEN ErrStat = CD_HCDYN_NOCONVERGE @@ -12043,7 +12116,8 @@ SUBROUTINE CD_HermiteCable_AddedMass_Element(qe, l0, waterline_z, rho, diam, can END DO ma3(cp, cp) = ma3(cp, cp) + rho*area*can END DO - scale = gw(g)*speed ! ds = |dr/dxi| dxi (deformed cable length) + ! ds = |dr/dxi| dxi (deformed cable length), times the immersed fraction of the section + scale = (gw(g)*wf)*speed DO s = 1, 4 DO c = 1, 3 a = 3*(s - 1) + c @@ -12106,8 +12180,8 @@ SUBROUTINE CD_HermiteCable_FK_Element(qe, l0, waterline_z, rho, diam, can, cat, REAL(wp), PARAMETER :: G3 = 0.7745966692414834_wp ! sqrt(3/5) REAL(wp), PARAMETER :: PI_L = 3.14159265358979323846_wp REAL(wp) :: gp(NGP), gw(NGP), H(4), dH(4) - REAL(wp) :: rpos(3), rp(3), speed, tangent(3), eta_w, uw(3), aw(3), area, alpha - REAL(wp) :: fpl(3), Jtan(3, 3), proj(3, 3), projk(3), dalpha, jq3(3, 3) + REAL(wp) :: rpos(3), rp(3), speed, tangent(3), eta_w, uw(3), aw(3), area, alpha, zsurf + REAL(wp) :: fpl(3), Jtan(3, 3), proj(3, 3), projk(3), dalpha, jq3(3, 3), wf, dwf LOGICAL :: has_trio, has_cmp, has_held, want_jac INTEGER :: g, s, c, sp, cp, a, b, k, es ! the message of a per-Gauss-point CableDyn_Hydro kinematics call (at most 154 characters): a @@ -12218,7 +12292,25 @@ SUBROUTINE CD_HermiteCable_FK_Element(qe, l0, waterline_z, rho, diam, can, cat, IF (es /= CD_HYDRO_OK) THEN ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'CD_HermiteCable_FK_Element: '//TRIM(em2); RETURN END IF - IF (rpos(3) - waterline_z > eta_w) CYCLE ! above the instantaneous surface: dry + CALL CD_HermiteCable_Immersion(waterline_z + eta_w - rpos(3), diam, wf, dwf) + IF (.NOT. (wf > CD_ZERO)) CYCLE ! above the instantaneous surface: dry + IF (.NOT. has_held .AND. rpos(3) - waterline_z > eta_w) THEN + ! a centre above the surface inside the band: its immersed part takes the field at the + ! surface (the Wheeler kinematics vanish above it), so the load stays continuous + IF (has_cmp) THEN + zsurf = eta_w + CALL CD_Component_Wave_Kinematics(rpos(1), rpos(2), zsurf, wv_t, wv_depth, wv_dir, .TRUE., wvc_om, & + wvc_k, wvc_amp, wvc_ph, eta_w, uw, aw, es, em2, inputs_validated=.TRUE., & + exp_m2kd=wvc_e2kd) + ELSE + zsurf = eta_w + CALL CD_Airy_Wave_Kinematics_Precomputed(rpos(1), rpos(2), zsurf, wv_t, wv_h, wv_om, wv_k, wv_depth, & + wv_dir, .TRUE., eta_w, uw, aw, es, em2) + END IF + IF (es /= CD_HYDRO_OK) THEN + ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'CD_HermiteCable_FK_Element: '//TRIM(em2); RETURN + END IF + END IF speed = SQRT(rp(1)**2 + rp(2)**2 + rp(3)**2) IF (speed <= 1.0e-12_wp) THEN ErrStat = CD_HCDYN_NOCONVERGE @@ -12246,7 +12338,7 @@ SUBROUTINE CD_HermiteCable_FK_Element(qe, l0, waterline_z, rho, diam, can, cat, DO s = 1, 4 DO c = 1, 3 a = 3*(s - 1) + c - ffk(a) = ffk(a) + gw(g)*speed*H(s)*fpl(c) + ffk(a) = ffk(a) + (gw(g)*wf)*speed*H(s)*fpl(c) END DO END DO IF (.NOT. want_jac) CYCLE @@ -12263,9 +12355,15 @@ SUBROUTINE CD_HermiteCable_FK_Element(qe, l0, waterline_z, rho, diam, can, cat, DO sp = 1, 4 DO cp = 1, 3 b = 3*(sp - 1) + cp - fjq(a, b) = fjq(a, b) + gw(g)*H(s)*dH(sp)*jq3(c, cp) + fjq(a, b) = fjq(a, b) + (gw(g)*wf)*H(s)*dH(sp)*jq3(c, cp) END DO END DO + IF (dwf /= CD_ZERO) THEN ! the immersed fraction moves with the height of the point + DO sp = 1, 4 + b = 3*sp + fjq(a, b) = fjq(a, b) + gw(g)*speed*H(s)*fpl(c)*dwf*H(sp) + END DO + END IF END DO END DO END DO diff --git a/tests/test_hermite_drag_dynamics.f90 b/tests/test_hermite_drag_dynamics.f90 index 04e7c880..afc039e0 100644 --- a/tests/test_hermite_drag_dynamics.f90 +++ b/tests/test_hermite_drag_dynamics.f90 @@ -14,7 +14,12 @@ PROGRAM test_hermite_drag_dynamics !! the same run with drag off conserves it: drag is dissipative and correctly wired, !! C IMPLICIT-TANGENT CORRECTNESS -- a drag-active step under prescribed motion converges in a !! few Newton iterations; a wrong velocity Jacobian would degrade or break that convergence, - !! D fail-closed on a bad drag configuration. + !! D fail-closed on a bad drag configuration; + !! E SURFACE BAND -- an element through the free surface carries at each Gauss point the + !! immersed fraction of its section (linear across one diameter): the load is continuous as + !! the element moves through the surface in 0.1 mm steps (no jump where a Gauss point + !! crosses it), the position Jacobian with points in the band matches central FD, and a + !! fully submerged element is unchanged to the bit. !! !! Submerged straight beam along x (planar x-z), pinned ends, so the transverse (z) motion drives !! the normal drag. The beam sits well below the waterline, so the submerged fraction is 1. @@ -39,6 +44,7 @@ PROGRAM test_hermite_drag_dynamics nfail = 0 CALL check_drag_element_jacobian() + CALL check_drag_surface_band() CALL check_drag_arc_length_scaling() CALL check_set_drag_rollback() CALL check_fully_constrained_validation() @@ -143,6 +149,54 @@ SUBROUTINE check_drag_element_jacobian() CALL require(mmag > 1.0e-6_wp, 'material-tangent (m) DOFs carry consistent drag load (interior motion damped)') END SUBROUTINE check_drag_element_jacobian + SUBROUTINE check_drag_surface_band() + !! E: the drag of an element through the free surface (gate E in the header). + REAL(wp) :: qe(12), ve(12), fluid(3), fd(12), jq(12, 12), jv(12, 12), f0(12), f1(12) + REAL(wp) :: qp(12), fp(12), fm(12), dfd(12, 12), dj(12, 12), djd(12, 12), fs(12), fs2(12) + REAL(wp) :: hstep, errq, dz, jump, fmax + INTEGER :: i, k, es + CHARACTER(300) :: em + ! a deformed, moving element from z 0 to 0.2 m (D 0.3 m: the band is +-0.15 m about the surface) + qe = [0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.10_wp, 1.02_wp, 0.0_wp, 0.20_wp, 1.0_wp, 0.0_wp, -0.10_wp] + ve = [0.10_wp, 0.0_wp, 0.30_wp, 0.20_wp, 0.0_wp, 0.10_wp, -0.10_wp, 0.0_wp, 0.40_wp, 0.05_wp, 0.0_wp, 0.20_wp] + fluid = [0.20_wp, 0.0_wp, -0.10_wp] + ! the surface at z 0.08: every Gauss point (z within about 0.02-0.18) lies in the band + CALL CD_HermiteCable_Drag_Element(qe, ve, 1.0_wp, fluid, 0.08_wp, RHOW, DIAM, CDN, CDT, fd, jq, jv, es, em) + CALL require(es == CD_HCDYN_OK, 'E: drag element through the surface accepted: '//TRIM(em)) + DO i = 1, 12 + hstep = 1.0e-7_wp*MAX(1.0_wp, ABS(qe(i))) + qp = qe; qp(i) = qe(i) + hstep + CALL CD_HermiteCable_Drag_Element(qp, ve, 1.0_wp, fluid, 0.08_wp, RHOW, DIAM, CDN, CDT, fp, dj, djd, es, em) + qp(i) = qe(i) - hstep + CALL CD_HermiteCable_Drag_Element(qp, ve, 1.0_wp, fluid, 0.08_wp, RHOW, DIAM, CDN, CDT, fm, dj, djd, es, em) + dfd(:, i) = (fp - fm)/(2.0_wp*hstep) + END DO + errq = nan_max_abs(jq - dfd)/MAX(1.0_wp, nan_max_abs(dfd)) + WRITE (*, '(A,ES10.3)') ' [drag, surface band] position Jacobian vs central FD: err = ', errq + CALL require(errq < 1.0e-5_wp, 'E: drag position Jacobian in the surface band matches central FD') + ! the element moved down through the surface: the largest change between 0.1 mm steps against the + ! largest load (a wet/dry switch jumps by a Gauss weight, 5/18 or 8/18 of the element's load) + dz = 1.0e-4_wp + jump = 0.0_wp + fmax = 0.0_wp + CALL CD_HermiteCable_Drag_Element(qe, ve, 1.0_wp, fluid, -0.30_wp, RHOW, DIAM, CDN, CDT, f0, ErrStat=es, & + ErrMsg=em) + DO k = 1, 7000 + CALL CD_HermiteCable_Drag_Element(qe, ve, 1.0_wp, fluid, -0.30_wp + k*dz, RHOW, DIAM, CDN, CDT, f1, & + ErrStat=es, ErrMsg=em) + jump = MAX(jump, nan_max_abs(f1 - f0)) + fmax = MAX(fmax, nan_max_abs(f1)) + f0 = f1 + END DO + WRITE (*, '(A,ES10.3)') ' [drag, surface band] largest change per 0.1 mm / largest load = ', jump/fmax + CALL require(fmax > 0.0_wp .AND. jump < 2.0e-3_wp*fmax, 'E: the drag is continuous through the free surface') + ! fully submerged (every point more than D/2 below the surface at 1 m or at 100 m): the immersed + ! fraction is exactly 1, the load unchanged to the bit + CALL CD_HermiteCable_Drag_Element(qe, ve, 1.0_wp, fluid, 1.0_wp, RHOW, DIAM, CDN, CDT, fs, ErrStat=es, ErrMsg=em) + CALL CD_HermiteCable_Drag_Element(qe, ve, 1.0_wp, fluid, 100.0_wp, RHOW, DIAM, CDN, CDT, fs2, ErrStat=es, ErrMsg=em) + CALL require(ALL(fs == fs2), 'E: a fully submerged element is unchanged to the bit') + END SUBROUTINE check_drag_surface_band + SUBROUTINE check_drag_arc_length_scaling() !! Drag integrates over the DEFORMED cable length, not the reference length: a straight element !! uniformly stretched 2x (same l0) under the same transverse velocity gets ~2x the net drag. diff --git a/tests/test_hermite_wave_forcing.f90 b/tests/test_hermite_wave_forcing.f90 index 113b18cc..8144df58 100644 --- a/tests/test_hermite_wave_forcing.f90 +++ b/tests/test_hermite_wave_forcing.f90 @@ -18,7 +18,10 @@ PROGRAM test_hermite_wave_forcing !! warmup), with bounded nonzero amplitude, every step converging, and the model clock !! advancing by n dt, !! D fail-closed: Set_Waves pre-init / without any hydro config / bad height/period/depth / - !! mismatched drag-vs-added-mass waterlines; partial wave arguments to the drag element. + !! mismatched drag-vs-added-mass waterlines; partial wave arguments to the drag element; + !! E SURFACE BAND IN WAVES: a short vertical element moved through the instantaneous surface + !! in steps of D/2000: the FK load and the wave drag change by under 0.2 % of their largest + !! value per step (a point above the surface inside the band takes the field at the surface). USE CableDyn_Precision, ONLY: wp USE CableDyn_Hydro, ONLY: CD_Airy_Wave_Kinematics_Precomputed, CD_Solve_Dispersion_Wavenumber, CD_HYDRO_OK USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & @@ -42,6 +45,7 @@ PROGRAM test_hermite_wave_forcing CALL check_crest_wetting() CALL check_wave_response() CALL check_fail_closed() + CALL check_band_continuity() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' @@ -62,6 +66,40 @@ SUBROUTINE wave_omk(om, k) CALL require(es == CD_HYDRO_OK, 'dispersion solve: '//TRIM(em)) END SUBROUTINE wave_omk + SUBROUTINE check_band_continuity() + !! E: the FK load and the wave drag of an element moved through the instantaneous surface. + REAL(wp) :: qe(12), ve(12), om, k, eta, uw(3), aw(3), f0(12), f1(12), d0(12), d1(12), fj(12, 12) + REAL(wp) :: dz, z0, jfk, jdr, mfk, mdr + INTEGER :: es, i + CHARACTER(300) :: em + CALL wave_omk(om, k) + CALL CD_Airy_Wave_Kinematics_Precomputed(0.0_wp, 0.0_wp, -1.0_wp, 0.9_wp, WVH, om, k, WVDEP, 0.0_wp, .TRUE., & + eta, uw, aw, es, em) + ve = 0.0_wp + dz = DIAM/2000.0_wp + jfk = 0.0_wp; jdr = 0.0_wp; mfk = 0.0_wp; mdr = 0.0_wp + DO i = 0, 16000 + ! a straight vertical element of length 0.2 m, its foot at z0 (from eta - 0.3 to eta + 0.1) + z0 = eta - 0.3_wp + REAL(i, wp)*dz ! 16000 steps of D/2000 = 0.4 m + qe = [0.0_wp, 0.0_wp, z0, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, z0 + 0.2_wp, 0.0_wp, 0.0_wp, 1.0_wp] + CALL CD_HermiteCable_FK_Element(qe, 0.2_wp, 0.0_wp, RHOW, DIAM, CAN, CAT, WVH, om, k, WVDEP, 0.0_wp, 0.9_wp, & + f1, fj, es, em) + CALL CD_HermiteCable_Drag_Element(qe, ve, 0.2_wp, [0.0_wp, 0.0_wp, 0.0_wp], 0.0_wp, RHOW, DIAM, CDN, CDT, d1, & + ErrStat=es, ErrMsg=em, wv_h=WVH, wv_om=om, wv_k=k, wv_depth=WVDEP, & + wv_dir=0.0_wp, wv_t=0.9_wp) + IF (i > 0) THEN + jfk = MAX(jfk, nan_max_abs(f1 - f0)) + jdr = MAX(jdr, nan_max_abs(d1 - d0)) + END IF + mfk = MAX(mfk, nan_max_abs(f1)); mdr = MAX(mdr, nan_max_abs(d1)) + f0 = f1; d0 = d1 + END DO + WRITE (*, '(A,2ES10.3)') ' [surface band, waves] largest change per step / largest load, FK and drag: ', & + jfk/mfk, jdr/mdr + CALL require(mfk > 0.0_wp .AND. jfk < 2.0e-3_wp*mfk, 'E: the FK load is continuous through the wave surface') + CALL require(mdr > 0.0_wp .AND. jdr < 2.0e-3_wp*mdr, 'E: the wave drag is continuous through the wave surface') + END SUBROUTINE check_band_continuity + SUBROUTINE check_fk_element_quadrature() !! FK element vs an independent 400-point trapezoid integral of the analytic per-length FK force !! along a straight submerged element (deformed length = reference here). diff --git a/tests/test_static_surface_crossing.f90 b/tests/test_static_surface_crossing.f90 new file mode 100644 index 00000000..4eebf048 --- /dev/null +++ b/tests/test_static_surface_crossing.f90 @@ -0,0 +1,165 @@ +! File: tests/test_static_surface_crossing.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_static_surface_crossing + !! Statics of a light finite-EI cable through the free surface in a cross current: a 4.95 m + !! laboratory lazy-wave cable (OD 31 mm, 0.919 kg/m, EI 0.217 N m^2, fresh water 2 m deep), its top + !! 0.753 m above the surface and clamped vertical, its foot clamped on the floor, five buoyancy + !! modules as attachments, in a uniform current across its plane at 0.390-0.410 m/s every 1 mm/s. + !! At 0.400 m/s a Gauss point of the element through the surface sits at the waterline in the + !! equilibrium; with a wet/dry switch per Gauss point the drag jumped there, the residual had no + !! root and every static route stalled (current load stepping stopped at a drag fraction 0.997). + !! Gates: + !! S1 every speed solves; + !! S2 the sideways deflection and the top tension grow monotonically with the speed, and the + !! deflection at 0.400 m/s lies within 2 % of a step of the mean of its neighbours. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + INTEGER, PARAMETER :: NS = 21 + REAL(wp) :: speed(NS), ymax(NS), ttop(NS) + INTEGER :: nfail = 0, k + LOGICAL :: ok, all_ok + CHARACTER(1024) :: msg + CHARACTER(64) :: root + + all_ok = .TRUE. + DO k = 1, NS + speed(k) = 0.390_wp + 0.001_wp*REAL(k - 1, wp) + WRITE (root, '(A,I2.2)') 'ssc_', k + CALL write_deck(TRIM(root)//'.dat', speed(k)) + CALL run(TRIM(root)//'.dat', TRIM(root), ok, msg) + CALL require(ok, 'S1: the static solve at the speed of case '//TRIM(root)//' converges: '//TRIM(msg)) + all_ok = all_ok .AND. ok + IF (ok) CALL read_static(TRIM(root)//'.static.out', ymax(k), ttop(k)) + END DO + IF (all_ok) THEN + WRITE (*, '(A,3F10.5)') 'S2: peak sideways deflection [m] at 0.399/0.400/0.401 m/s: ', ymax(10:12) + CALL require(ALL(ymax(2:NS) > ymax(1:NS - 1)) .AND. ALL(ttop(2:NS) > ttop(1:NS - 1)), & + 'S2: the deflection and the top tension grow monotonically with the speed') + CALL require(ABS(ymax(11) - 0.5_wp*(ymax(10) + ymax(12))) <= 0.02_wp*ABS(ymax(12) - ymax(10)), & + 'S2: the deflection at 0.400 m/s lies between its neighbours (no jump)') + END IF + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: statics of a cable through the free surface in a cross current' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE write_deck(path, u) + CHARACTER(*), INTENT(IN) :: path + REAL(wp), INTENT(IN) :: u + INTEGER :: io + ! a uniform current across the cable's plane (MoorDyn water-kinematics file, CurrentMod 1) + OPEN (NEWUNIT=io, FILE='ssc_current.dat', STATUS='REPLACE', ACTION='WRITE') + WRITE (io, '(A)') 'MoorDyn v2 water kinematics file' + WRITE (io, '(A)') 'uniform current along y for the surface-crossing statics gate' + WRITE (io, '(A)') '--------------------------- WAVES -------------------------------------' + WRITE (io, '(A)') '0 WaveKinMod - type of wave input' + WRITE (io, '(A)') '"" WaveKinFile - file containing wave elevation time series' + WRITE (io, '(A)') '0.000000E+00 dtWave - time step to use in setting up wave kinematics grid (s)' + WRITE (io, '(A)') '0 WaveDir - wave heading (deg)' + WRITE (io, '(A)') '2 - X wave input type' + WRITE (io, '(A)') '-5, 5, 2 - X wave grid point data' + WRITE (io, '(A)') '2 - Y wave input type' + WRITE (io, '(A)') '-5, 5, 2 - Y wave grid point data' + WRITE (io, '(A)') '2 - Z wave input type' + WRITE (io, '(A)') '-2, 0, 2 - Z wave grid point data' + WRITE (io, '(A)') '--------------------------- CURRENT -------------------------------------' + WRITE (io, '(A)') '1 CurrentMod - type of current input' + WRITE (io, '(A)') 'z-depth x-current y-current' + WRITE (io, '(A)') '(m) (m/s) (m/s)' + WRITE (io, '(A,F8.5)') '0.0 0.0 ', u + WRITE (io, '(A,F8.5)') '-2.0 0.0 ', u + WRITE (io, '(A)') '--------------------- need this line ------------------' + CLOSE (io) + OPEN (NEWUNIT=io, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (io, '(A)') '--------------------- CableDyn Input File ---------------------------------' + WRITE (io, '(A)') 'light lazy-wave cable through the free surface in a cross current (statics)' + WRITE (io, '(A)') '----------------------- LINE TYPES ------------------------------------------' + WRITE (io, '(A)') 'TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t Cl dF cF' + WRITE (io, '(A)') '(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) (-) (-) (-)' + WRITE (io, '(A)') 'cab 0.031 0.919 1.0e4 0.0 0.217 1.2 0.0 1.0 0.0 0 0.08 0.18' + WRITE (io, '(A)') '----------------------- POINTS ----------------------------------------------' + WRITE (io, '(A)') 'ID Attachment X Y Z M V CdA CA' + WRITE (io, '(A)') '(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-)' + WRITE (io, '(A)') '1 Coupled 0.0 0.0 0.753 0 0 0 0' + WRITE (io, '(A)') '2 Fixed 2.798 0.0 -1.954 0 0 0 0' + WRITE (io, '(A)') '----------------------- LINES -----------------------------------------------' + WRITE (io, '(A)') 'ID LineType AttachA AttachB UnstrLen NumSegs Outputs' + WRITE (io, '(A)') '(-) (-) (-) (-) (m) (-) (-)' + WRITE (io, '(A)') '1 cab 1 2 4.95 100 -' + WRITE (io, '(A)') '--------------------- ATTACHMENTS ----------------------------------' + WRITE (io, '(A)') 'LineID ArcLength Mass Volume CdA Ca' + WRITE (io, '(A)') '(-) (m) (kg) (m^3) (m^2) (-)' + WRITE (io, '(A)') '1 3.1432 0.012375 1.237473e-04 0.0034 1.0' + WRITE (io, '(A)') '1 3.2299 0.012375 1.237473e-04 0.0034 1.0' + WRITE (io, '(A)') '1 3.4845 0.012375 1.237473e-04 0.0034 1.0' + WRITE (io, '(A)') '1 3.7516 0.012375 1.237473e-04 0.0034 1.0' + WRITE (io, '(A)') '1 4.0420 0.012375 1.237473e-04 0.0034 1.0' + WRITE (io, '(A)') '--------------------- END CONNECTIONS -------------------------------' + WRITE (io, '(A)') 'LineID End Stiffness EzX EzY EzZ' + WRITE (io, '(A)') '(-) (-) (N-m/rad) (-) (-) (-)' + WRITE (io, '(A)') '1 B Rigid 0.644 0 -0.765' + WRITE (io, '(A)') '1 A Rigid 0 0 -1' + WRITE (io, '(A)') '---------------------- OPTIONS ----------------------------------------------' + WRITE (io, '(A)') '1000.0 rhoW' + WRITE (io, '(A)') '9.80665 g' + WRITE (io, '(A)') '2.0 WtrDpth' + WRITE (io, '(A)') 'ssc_current.dat WaterKin' + WRITE (io, '(A)') '0.001 dtM' + WRITE (io, '(A)') '0.002 TMax' + WRITE (io, '(A)') '---------------------- OUTPUTS -----------------------------------------------' + WRITE (io, '(A)') 'FairTen1' + WRITE (io, '(A)') 'END' + WRITE (io, '(A)') '------------------------- need this line --------------------------------------' + CLOSE (io) + END SUBROUTINE write_deck + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK .AND. conv + END SUBROUTINE run + + SUBROUTINE read_static(path, ym, t1) + !! The largest sideways (y) node position and the tension at the top node of a static table. + CHARACTER(*), INTENT(IN) :: path + REAL(wp), INTENT(OUT) :: ym, t1 + CHARACTER(512) :: rec + INTEGER :: io, ios, line_id, node + REAL(wp) :: v(10) + ym = -HUGE(1.0_wp) + t1 = 0.0_wp + OPEN (NEWUNIT=io, FILE=path, STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (io, '(A)') rec + READ (io, '(A)') rec + READ (io, '(A)') rec + DO + READ (io, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + READ (rec, *, IOSTAT=ios) line_id, node, v + IF (ios /= 0) CYCLE + ym = MAX(ym, v(3)) + IF (node == 1) t1 = v(5) + END DO + CLOSE (io) + END SUBROUTINE read_static + +END PROGRAM test_static_surface_crossing From ecd12d62c110410295a45cc277c38deca7a50f75 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Sun, 15 Nov 2026 11:34:40 +0900 Subject: [PATCH 21/47] fix: a buoyancy module on a finite-EI line can float at the surface (#164) A net-buoyant ATTACHMENTS module on a finite-EI line had no static position near the free surface. Its buoyancy switched off at its node's height, so its weight in air took it below the surface and its weight in water above it. The static start stopped with "attachment ... crossed the still-water level". The buoyancy, Froude-Krylov force and drag of an attachment now carry the immersed fraction of the sphere of its volume (of its drag area without one), the formula a Rigid6 body already uses: h = clamp(eta - z + r, 0, 2r), phi = h^2 (3r - h)/(4 r^3). The load is continuous with its slope through the surface. - Dynamics: the residual takes phi, with the height derivative in the position tangent. A node deeper than r keeps phi = 1 exactly, so its loads are unchanged to the bit. - Statics: CD_HermiteCable_Static_Solve takes optional att_node, att_buoyancy and att_radius. It adds the buoyancy lost at the surface, rho g V (1 - phi), in each Newton iterate, with its stiffness and potential. The polish no longer needs the wet/dry fixed point or the crossing error. The torsion stage keeps its fixed point over the smooth loads. - Deck waves: a node above the instantaneous surface takes the wave kinematics at the surface instead of zero, as the internal waves of a cable already did (#163). Line Gauss points interpolated from such nodes therefore change too. The added mass stays in the constant mass matrix. The modal analysis leaves out the surface's hydrostatic stiffness, a module's as a line's own. Gates: - test_attachment_surface: - K1, the fraction: its slope and potential match central FD (1e-8) and are continuous at the band edges; r = 0 keeps the old switch. - K2, the static solve: with the node in the band the residual gains rho g V (1 - phi) and the tangent column matches central FD (8.7e-9). Deeper than r the residual and tangent are bit-identical to the solve without the term. - test_static_dry_weight gate 9, the module of the old failure (200 kg, 2 m^3, on a slack cable): - it now floats 0.348 m below the surface (phi 0.81); - the march holds that height over 3 s (drift 0); - in 1.5 m, 6 s Airy waves it heaves between -1.21 and +0.48 m through its band for 18 s, every step converged. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 10 ++ CMakeLists.txt | 4 + doc/theory.rst | 29 +++- doc/troubleshooting.rst | 9 +- src/CableDyn_DeckDriver.f90 | 212 +++++++++++---------------- src/CableDyn_HermiteCableDynamic.f90 | 125 ++++++++++++++-- src/CableDyn_HermiteCableStatic.f90 | 57 ++++++- tests/test_attachment_surface.f90 | 167 +++++++++++++++++++++ tests/test_static_dry_weight.f90 | 100 ++++++++++--- 9 files changed, 540 insertions(+), 173 deletions(-) create mode 100644 tests/test_attachment_surface.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cedc0c0..530f4aac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -118,6 +118,16 @@ All notable changes to CableDyn are recorded in this file. The format follows Froude-Krylov load and VIV lift of a Gauss point now carry the immersed fraction of its section, linear across one diameter about the surface, with its derivative in the Jacobians. Fully submerged points are unchanged to the bit; the full test suite passes unchanged. +- A buoyancy module (an `ATTACHMENTS` row) on a finite-EI line that floats had no static + position: its buoyancy switched off at its node's height, so its weight in air took it below + the surface and its weight in water above it, and the static start stopped with an error. Its + buoyancy, Froude-Krylov force and drag now carry the immersed fraction of the sphere of its + volume (of its drag area without one), as a Rigid6 body's buoyancy does, continuous with its + slope through the surface; the statics solve for it in each Newton iterate with its stiffness. + A 200 kg, 2 m^3 module on a slack cable now floats 0.35 m below the surface and holds that + height in the march, and rides 1.5 m waves. A module deeper than its sphere's radius is + unchanged to the bit. In deck waves a node above the instantaneous surface takes the wave + kinematics at the surface (they were zero there), as a cable's internal waves already did. ## [0.4.2] - 2026-11-09 diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ed467ed..c0fe0dea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1333,6 +1333,10 @@ add_executable(test_static_surface_crossing tests/test_static_surface_crossing.f target_link_libraries(test_static_surface_crossing PRIVATE cabledyn_core) add_test(NAME static_surface_crossing COMMAND test_static_surface_crossing WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_tests_properties(static_surface_crossing PROPERTIES LABELS "fortran;integration;static" TIMEOUT 600) +add_executable(test_attachment_surface tests/test_attachment_surface.f90) +target_link_libraries(test_attachment_surface PRIVATE cabledyn_core) +add_test(NAME attachment_surface COMMAND test_attachment_surface) +set_tests_properties(attachment_surface PROPERTIES LABELS "fortran;unit;static") # VIV amplitude estimate (Thorsen et al. 2016, Eq. 8 and 9) and the amplitude tables. add_executable(test_viv_amplitude_kernel tests/test_viv_amplitude_kernel.f90) diff --git a/doc/theory.rst b/doc/theory.rst index 8aea3e35..27021286 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -3480,19 +3480,34 @@ with the fluid velocity :math:`\mathbf{u}` and acceleration :math:`\dot{\mathbf{ the relative velocity :math:`\mathbf{w} = \mathbf{u} - \dot{\mathbf{r}}_j` split normal and along the nodal tangent :math:`\mathbf{m}_j/\lvert\mathbf{m}_j\rvert` (the line's Morison law with :math:`C_dA = C_{d,n} d` and :math:`C_dA_x = \pi C_{d,t} d`). The drag enters the velocity tangent -and, through :math:`\mathbf{m}_j`, the position tangent exactly. Above the free surface an -attachment carries its weight :math:`-m g\,\mathbf{e}_z` alone. The statics start from the +and, through :math:`\mathbf{m}_j`, the position tangent exactly. At the free surface the buoyancy, +Froude–Krylov force and drag carry the immersed fraction of the sphere of the attachment's volume, +:math:`r = (3V/4\pi)^{1/3}` (of its drag area, :math:`C_dA = \pi r^2`, without a volume), as a +Rigid6 body's buoyancy does: with the immersed height :math:`h = \min(2r, \max(0, \eta - z_j + r))`, + +.. math:: + + \phi = \frac{h^2 (3r - h)}{4 r^3}, + +so the weight is :math:`-(m - \phi\rho V)\,g\,\mathbf{e}_z`, continuous with its slope as the node +crosses the surface: :math:`\phi = 1` exactly from :math:`r` below the surface (the loads above, +unchanged) and :math:`\phi = 0` from :math:`r` above it (the weight :math:`-m g\,\mathbf{e}_z` +alone). A module that floats then rests at the height where :math:`\phi\rho V g` balances its +share of the load, where a wet/dry switch at the node gave it no position. The added mass +:math:`C_a \rho V` stays in the constant mass matrix, and the modal analysis leaves out the +hydrostatic stiffness of the surface, a module's as a line's own. The statics start from the equilibrium with the net weight smeared over the node's two elements, in a deck current across the vertical plane of the chord with the drag areas smeared over them too (per-metre drag coefficients :math:`C_dA/(d\,L)` and :math:`C_dA_x/(\pi d\,L)` added to an element of length :math:`L` for each share), and continue to the lumped loads in warm-started Newton solves, the smeared weight and drag moving to the node together; in a deck current the drag at rest is lumped at the node, each solve takes -every attachment's load on the side of the still-water level its node is on, and the final -solve is repeated with the loads of its own solution until the nodes stop moving and no -attachment changes side (an attachment that its weight in air takes below the surface and its -weight in water above it has no static position, and the solve fails closed, naming the -attachment that crossed the surface). Before, an attachment above the surface +it at its incoming state, and the final solve is repeated with the drag of its own solution +until the nodes stop moving. The buoyancy an attachment loses at the still-water level, +:math:`\rho V g (1 - \phi)` downward, is part of every Newton iterate with its stiffness +:math:`-\rho V g\, \partial\phi/\partial z` and potential, so a floating module needs no +outer iteration. Before, a wet/dry switch at the node gave a module at the surface no static +position and the solve stopped with an error; and before that, an attachment above the surface kept its buoyancy in the statics: a 500 kg, 0.2 m\ :sup:`3` module 3 m above it moved the fairlead load by up to 6.1 % in the first second of the march. The load moves in eighths; a solve that stalls on a residual floor above the tight static tolerance is diff --git a/doc/troubleshooting.rst b/doc/troubleshooting.rst index fd141c64..f89f972d 100644 --- a/doc/troubleshooting.rst +++ b/doc/troubleshooting.rst @@ -653,13 +653,8 @@ but a few geometries are genuinely hard: reported in the note ``... was reached after a failed Newton solve ... and passed the acceptance checks of the smeared state``. Check that the deck with the modules replaced by the equivalent smeared buoyancy section solves; if it does, the discrete layout itself is the difficulty. - ``... attachment of the line (Mass ..., Volume ...) crossed the still-water level ...`` - means the solves carried that attachment across the surface, where the dynamics drops its - buoyancy: its weight in air takes it below the surface and its weight in water above it, so a - point attachment has no static position there (the dynamics would bob it there). It is a - net-buoyant module that would float, or a module whose node lies nearer the surface than the - deflection its buoyancy gives the line. The message of the failed solve follows it. Move it - along the line or change its ``Mass`` or ``Volume``. + A module at the surface is not a cause: its buoyancy fades over the sphere of its volume, so a + module that floats has a static position. - **A cold start at full load.** The static solve continues the load in stages; if you have hand-tuned a case into a bad basin, remove the tuning and let the default continuation run from the catenary/arch seed. diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index a0dbf67c..7814c4e7 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -97,6 +97,7 @@ MODULE CableDyn_DeckDriver CD_HCSTAT_NOCONVERGE, CD_HC_COMPRESSION_OSCILLATION, & CD_HC_COMPRESSION_STRICT USE CableDyn_HermiteCableDynamic, ONLY: CD_HCDYN_OK, CD_HCDYN_TENSILE_OFF, CD_HCDYN_TENSILE_WARN, & + CD_HermiteCable_Point_Immersion, CD_HermiteCable_Point_Radius, & CD_HCDYN_TENSILE_ERROR, CD_HermiteCable_Dyn_Load_Power, & CD_HermiteCable_Dyn_VIV_Amplitude, & CD_HermiteCable_Axial_Damping_Resultant, & @@ -3979,13 +3980,13 @@ END SUBROUTINE torsion_note SUBROUTINE torsion_after_attachments(est, emt) !! The torsion stage of a line with ATTACHMENTS, on its discrete equilibrium (after the - !! attachment polish): the attachments' net weights -(m - rho V) g e_z at their nodes (-m g - !! e_z above the still-water level, attachment_static_weight) and, in a deck current, their - !! drag at the twisted state as nodal loads. The drag depends on the node's position and - !! line tangent, and the weight on the side of the surface, so the stage is repeated, each - !! time a fresh torsion solve from the last state, with the loads of the last solution until - !! the solution stops moving and no attachment changes side (fixed point, as in - !! attachment_static_polish). Every pass starts from the polished state, in equilibrium + !! attachment polish): the attachments' net weights -(m - rho V) g e_z at their nodes, less + !! the buoyancy an attachment within its radius of the surface loses there + !! (attachment_static_weight) and, in a deck current, their drag at the twisted state as + !! nodal loads. The drag depends on the node's position and line tangent, and that buoyancy + !! on its height, so the stage is repeated, each time a fresh torsion solve from the last + !! state, with the loads of the last solution until the solution stops moving (fixed point). + !! Every pass starts from the polished state, in equilibrium !! under the loads at that state: the change to the loads of the last solution is ramped !! with the imposed twist, in full at the target. Taken in full from the untwisted start, the !! drag of a twisted shape pushed a lazy wave whose untwisted state is unstable out of its @@ -3994,26 +3995,19 @@ SUBROUTINE torsion_after_attachments(est, emt) CHARACTER(*), INTENT(OUT) :: emt INTEGER, PARAMETER :: MAX_FIXED_POINT = 60 REAL(wp), PARAMETER :: FIXED_POINT_TOL = 1.0e-9_wp ! m - REAL(wp), ALLOCATABLE :: f_att(:), f_drag(:), q_prev(:), q_polished(:), f_untwisted(:) - LOGICAL, ALLOCATABLE :: att_dry(:), att_dry_now(:) + REAL(wp), ALLOCATABLE :: f_att(:), f_att_now(:), f_drag(:), q_prev(:), q_polished(:), f_untwisted(:) LOGICAL :: has_drag - INTEGER :: fp, k_cross - ! the first attachment a pass moved across the still-water level, which names a failure of - ! the stage after it (as in attachment_static_polish) - CHARACTER(512) :: cause - CHARACTER(64) :: mv + INTEGER :: fp est = CD_DECKDRV_OK - k_cross = 0 - cause = '' emt = '' ! every pass starts from the polished, untwisted discrete state (a pass from the last twisted ! state would first relax it, and a writhe a buckling descent left could put Theta_0 a turn ! away, on another branch) q_polished = q_static - ALLOCATE (f_att(SIZE(q_static)), f_drag(SIZE(q_static)), att_dry(SIZE(att_node)), att_dry_now(SIZE(att_node))) + ALLOCATE (f_att(SIZE(q_static)), f_att_now(SIZE(q_static)), f_drag(SIZE(q_static))) has_drag = opts%has_current .AND. ANY(ln%att(4, :) > CD_ZERO .OR. ln%att(6, :) > CD_ZERO) DO fp = 1, MAX_FIXED_POINT - CALL attachment_static_weight(q_static, att_node, ln%att, opts, f_att, att_dry) + CALL attachment_static_weight(q_static, att_node, ln%att, opts, f_att, surface=.TRUE.) f_drag = CD_ZERO IF (has_drag) THEN CALL attachment_static_drag(q_static, att_node, ln%att, opts, frame_cs, f_drag, est, emt) @@ -4030,35 +4024,16 @@ SUBROUTINE torsion_after_attachments(est, emt) ELSE CALL torsion_stage(est, emt, f_untwisted, f_att + f_drag - f_untwisted) END IF - IF (est /= CD_DECKDRV_OK) THEN - IF (k_cross > 0) emt = TRIM(cause)//'; '//TRIM(emt) - RETURN - END IF - ! an attachment the twist moved across the still-water level: once more, with its weight on - ! its new side - CALL attachment_static_weight(q_static, att_node, ln%att, opts, f_att, att_dry_now) - IF (.NOT. ALL(att_dry_now .EQV. att_dry)) THEN - IF (k_cross == 0) THEN - k_cross = FINDLOC(att_dry_now .NEQV. att_dry, .TRUE., DIM=1) - WRITE (mv, '(ES9.3,A,ES9.3)') ln%att(2, k_cross), ' kg, Volume ', ln%att(3, k_cross) - cause = 'finite-EI torsion static solve with discrete ATTACHMENTS: attachment '// & - TRIM(int_to_str(k_cross))//' of the line (Mass '//TRIM(ADJUSTL(mv))//' m^3) crossed the '// & - 'still-water level, where the dynamics drops its buoyancy; a point attachment that its weight '// & - 'in air takes below the surface and its weight in water above it has no static position (move '// & - 'it along the line or change its Mass or Volume)' - END IF - CYCLE - END IF - IF (.NOT. has_drag) RETURN + IF (est /= CD_DECKDRV_OK) RETURN + ! the weights at the twisted state: an attachment the twist moved within its radius of the + ! surface carries another share of its buoyancy (once more, with the loads of this state) + CALL attachment_static_weight(q_static, att_node, ln%att, opts, f_att_now, surface=.TRUE.) + IF (.NOT. has_drag .AND. ALL(f_att_now == f_att)) RETURN IF (MAXVAL(ABS(q_static - q_prev)) <= FIXED_POINT_TOL) RETURN END DO est = CD_DECKDRV_SOLVEFAIL - IF (ALL(att_dry_now .EQV. att_dry)) THEN - emt = 'finite-EI torsion static solve with discrete ATTACHMENTS: the attachment current drag did not '// & - 'settle to a fixed point' - ELSE - emt = cause - END IF + emt = 'finite-EI torsion static solve with discrete ATTACHMENTS: the attachment loads (current drag, '// & + 'buoyancy at the surface) did not settle to a fixed point' END SUBROUTINE torsion_after_attachments SUBROUTINE twisted_attachment_checks(est, emt) @@ -5786,18 +5761,19 @@ SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att cdt_bare, tol_floor, floor_res, release) !! Homotopy from the smeared-attachment equilibrium q to the discrete one: in warm-started !! Newton solves the element weights move from w_smear to w_bare while the lumped nodal - !! forces -(m - rho V) g e_z (-m g e_z for an attachment above the still-water level, - !! attachment_static_weight) and, in a deck current, the attachment current drag grow from + !! forces -(m - rho V) g e_z (attachment_static_weight), the buoyancy an attachment loses at + !! the still-water level (in each Newton iterate: the static solve's att_buoyancy, the + !! immersed fraction of the sphere of its volume) and, in a deck current, the attachment + !! current drag grow from !! zero to full, with the contact, dry-buoyancy, end-connection and line current terms of !! the builder's static problem. With cdn_bare and cdt_bare (the line's own drag !! coefficients of cur_obj, whose cdn and cdt carry the attachments' drag smeared, !! smear_attachment_drag) the element drag coefficients move from those of cur_obj to them !! with the weights, so the smeared drag passes to the nodes as the smeared weight does. !! The drag depends on the node's position (profile current, - !! current grid) and line tangent, and the weight on the side of the surface the node is on, - !! so each solve takes them at its incoming state and the full-load solve is repeated with - !! those of the last solution until the solution stops moving and no attachment changes - !! side (fixed point). + !! current grid) and line tangent, so each solve takes it at its incoming state and the + !! full-load solve is repeated with that of the last solution until the solution stops + !! moving (fixed point). !! !! The load fraction advances in steps of 1/NSTEP. A step whose damped Newton solve does !! not converge is repeated from the last converged state with pseudo-transient @@ -5853,15 +5829,11 @@ SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att INTEGER, PARAMETER :: NEWTON_RETRY_ITER = 40, MAX_FAILED_STEPS = 64 REAL(wp), PARAMETER :: FIXED_POINT_TOL = 1.0e-9_wp ! m REAL(wp), ALLOCATABLE :: f_att(:), f_drag(:), dry(:), knnode(:), wl(:), q_out(:), curv(:) + ! each attachment's buoyancy rho g V and the radius of its sphere at the surface + REAL(wp), ALLOCATABLE :: att_b(:), att_r(:) REAL(wp) :: lam, lam_done, dlam, res, change INTEGER :: i, ne, fp, n_failed, n_ok, grow_after LOGICAL :: has_drag, converged, newton_failed, grown, release_ - ! which attachments are above the still-water level: in the state the last solve took its - ! loads at, and in the state it returned - LOGICAL, ALLOCATABLE :: att_dry(:), att_dry_now(:) - ! the first attachment a solve moved across the still-water level (0: none), which names a - ! failure of the polish after it - INTEGER :: k_cross ! The damped Newton failure of the first failed solve, and of the last one. CHARACTER(1024) :: first_msg, last_msg CHARACTER(48) :: step_buf, lam_buf @@ -5895,9 +5867,12 @@ SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att n_failed = 0 ne = SIZE(l0) ALLOCATE (f_att(6*(ne + 1)), f_drag(6*(ne + 1)), dry(ne), q_out(SIZE(q)), curv(ne + 1)) - ALLOCATE (att_dry(SIZE(node)), att_dry_now(SIZE(node))) - CALL attachment_static_weight(q, node, att, opts, f_att, att_dry) - k_cross = 0 + CALL attachment_static_weight(q, node, att, opts, f_att) + ALLOCATE (att_b(SIZE(node)), att_r(SIZE(node))) + DO i = 1, SIZE(node) + att_b(i) = opts%rhoW*opts%g*att(3, i) + att_r(i) = CD_HermiteCable_Point_Radius(att(3, i), att(4, i)) + END DO has_drag = opts%has_current .AND. ANY(att(4, :) > CD_ZERO .OR. att(6, :) > CD_ZERO) dry = opts%rhoW*opts%g*QUARTER_PI*diam**2 IF (contact_enabled) THEN @@ -5947,12 +5922,12 @@ SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att WRITE (lam_buf, '(F8.6)') lam_done IF (dlam < MIN_STEP) THEN WRITE (step_buf, '(ES9.2)') MIN_STEP - CALL fail_solve(ErrStat, ErrMsg, surface_note('; ')//TRIM(first_msg)//'; the homotopy stopped at '// & + CALL fail_solve(ErrStat, ErrMsg, TRIM(first_msg)//'; the homotopy stopped at '// & 'load fraction '//TRIM(ADJUSTL(lam_buf))//', where load steps down to '// & TRIM(ADJUSTL(step_buf))//' did not converge either') ELSE WRITE (step_buf, '(I0)') MAX_FAILED_STEPS - CALL fail_solve(ErrStat, ErrMsg, surface_note('; ')//TRIM(first_msg)//'; the homotopy stopped at '// & + CALL fail_solve(ErrStat, ErrMsg, TRIM(first_msg)//'; the homotopy stopped at '// & 'load fraction '//TRIM(ADJUSTL(lam_buf))//' after '//TRIM(step_buf)// & ' load steps had failed') END IF @@ -5960,54 +5935,21 @@ SUBROUTINE attachment_static_polish(l0, ea, ei, w_bare, w_smear, diam, node, att END IF END IF END DO - ! An attachment whose node the last solve moved across the still-water level was loaded with - ! the weight of the other side: the full-load solve is repeated (below) until none does. A - ! line below the surface (or wholly above it) without attachment drag is done. - CALL attachment_static_weight(q, node, att, opts, f_att, att_dry_now) - IF (.NOT. release_ .AND. .NOT. has_drag .AND. ALL(att_dry_now .EQV. att_dry)) RETURN + ! The weights are constant and the buoyancy at the surface is part of each solve: without + ! attachment drag the homotopy's last solve is the equilibrium. + IF (.NOT. release_ .AND. .NOT. has_drag) RETURN DO fp = 1, MAX_FIXED_POINT CALL solve_with(CD_ONE, converged, change) IF (ErrStat /= CD_DECKDRV_OK) RETURN IF (.NOT. converged) THEN - CALL fail_solve(ErrStat, ErrMsg, surface_note('; ')//TRIM(last_msg)// & - ' (attachment current drag and surface fixed point)') + CALL fail_solve(ErrStat, ErrMsg, TRIM(last_msg)//' (attachment current drag fixed point)') RETURN END IF - CALL attachment_static_weight(q, node, att, opts, f_att, att_dry_now) - ! the weight is constant on either side of the surface: with no attachment changing side the - ! solve took the weights of its own solution, and without drag it is the equilibrium - IF (ALL(att_dry_now .EQV. att_dry) .AND. (.NOT. has_drag .OR. change <= FIXED_POINT_TOL)) RETURN + IF (.NOT. has_drag .OR. change <= FIXED_POINT_TOL) RETURN END DO - IF (ALL(att_dry_now .EQV. att_dry)) THEN - CALL fail_solve(ErrStat, ErrMsg, 'finite-EI static solve with discrete ATTACHMENTS: the attachment '// & - 'current drag did not settle to a fixed point') - ELSE - IF (k_cross == 0) k_cross = FINDLOC(att_dry_now .NEQV. att_dry, .TRUE., DIM=1) - CALL fail_solve(ErrStat, ErrMsg, surface_note('')) - END IF + CALL fail_solve(ErrStat, ErrMsg, 'finite-EI static solve with discrete ATTACHMENTS: the attachment '// & + 'current drag did not settle to a fixed point') CONTAINS - FUNCTION surface_note(sep) RESULT(msg) - !! The cause of a failed polish in which a solve moved an attachment across the still-water - !! level (k_cross; empty without one), followed by sep: a point attachment that its weight - !! in air takes below the surface and its weight in water above it (a net-buoyant module - !! that would float, or any module whose node lies nearer the surface than the deflection - !! its buoyancy rho V g gives the line) has no static position. Without this the failure - !! read as a homotopy that stopped (a 200 kg, 2 m^3 module on a slack cable, which the - !! solves carried above and below the surface in turn). - CHARACTER(*), INTENT(IN) :: sep - CHARACTER(:), ALLOCATABLE :: msg - CHARACTER(64) :: mv - msg = '' - IF (k_cross < 1) RETURN - WRITE (mv, '(ES9.3,A,ES9.3)') att(2, k_cross), ' kg, Volume ', att(3, k_cross) - msg = 'finite-EI static solve with discrete ATTACHMENTS: attachment '//TRIM(int_to_str(k_cross))// & - ' of the line (Mass '//TRIM(ADJUSTL(mv))//' m^3) crossed the still-water level, where the '// & - 'dynamics drops its buoyancy; a point attachment that its weight in air takes below the surface '// & - 'and its weight in water above it has no static position (move it along the line or change its '// & - 'Mass or Volume)' - msg = msg//sep - END FUNCTION surface_note - SUBROUTINE solve_with(scale, ok, dq_max) !! One warm-started solve at load fraction scale, with the attachment current drag !! evaluated on the incoming state: the damped Newton iteration and, when it does not @@ -6025,12 +5967,6 @@ SUBROUTINE solve_with(scale, ok, dq_max) CHARACTER(48) :: num_buf ok = .FALSE. max_it = [MERGE(NEWTON_RETRY_ITER, 200, newton_failed), 200, 200] - ! the attachments' weights on the side of the surface of the incoming state (the first one the - ! last solve moved across the surface is recorded for the failure message) - CALL attachment_static_weight(q, node, att, opts, f_att, att_dry_now) - IF (k_cross == 0 .AND. .NOT. ALL(att_dry_now .EQV. att_dry)) & - k_cross = FINDLOC(att_dry_now .NEQV. att_dry, .TRUE., DIM=1) - att_dry = att_dry_now f_drag = CD_ZERO IF (has_drag) THEN CALL attachment_static_drag(q, node, att, opts, frame_cs, f_drag, es, em) @@ -6091,7 +6027,8 @@ SUBROUTINE static_solve(mode_s, tol_s, scale, max_it, it, es, em) endconn_mode=endconn_mode, waterline_z=CD_ZERO, dry_buoyancy=dry, & water_weight=opts%rhoW*opts%g, current=cur_l, & backtracking=mode_s == MERIT, merit_line_search=mode_s == MERIT, & - pseudo_transient=mode_s == PSEUDO_TRANSIENT) + pseudo_transient=mode_s == PSEUDO_TRANSIENT, att_node=node, & + att_buoyancy=scale*att_b, att_radius=att_r) ELSE CALL CD_HermiteCable_Static_Solve(l0, ea, ei, wl, q, fixed_dofs, contact_z, CD_ZERO, 1, max_it(mode_s), & tol_s, 0.7_wp, q_out, curv, res, it, es, em, & @@ -6102,7 +6039,8 @@ SUBROUTINE static_solve(mode_s, tol_s, scale, max_it, it, es, em) endconn_mode=endconn_mode, waterline_z=CD_ZERO, dry_buoyancy=dry, & water_weight=opts%rhoW*opts%g, current=cur_l, & backtracking=mode_s == MERIT, merit_line_search=mode_s == MERIT, & - pseudo_transient=mode_s == PSEUDO_TRANSIENT) + pseudo_transient=mode_s == PSEUDO_TRANSIENT, att_node=node, & + att_buoyancy=scale*att_b, att_radius=att_r) END IF END SUBROUTINE static_solve END SUBROUTINE attachment_static_polish @@ -6118,13 +6056,16 @@ SUBROUTINE attachment_static_drag(q, node, att, opts, frame_cs, f, ErrStat, ErrM INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: k, base, es - REAL(wp) :: ug(3), ul(3), fd(3) + REAL(wp) :: ug(3), ul(3), fd(3), wf, dwf CHARACTER(1024) :: em ErrStat = CD_DECKDRV_OK; ErrMsg = '' DO k = 1, SIZE(node) IF (.NOT. (att(4, k) > CD_ZERO .OR. att(6, k) > CD_ZERO)) CYCLE base = 6*(node(k) - 1) - IF (q(base + 3) > CD_ZERO) CYCLE + ! the immersed fraction of the attachment's sphere at the still-water level, as the + ! dynamics scales its drag (attachment_residual of the cubic-Hermite model) + CALL CD_HermiteCable_Point_Immersion(-q(base + 3), CD_HermiteCable_Point_Radius(att(3, k), att(4, k)), wf, dwf) + IF (.NOT. (wf > CD_ZERO)) CYCLE ! the node's global position (the solve frame is the global one turned by frame_cs) ug = deck_current_velocity(opts, [frame_cs(1)*q(base + 1) - frame_cs(2)*q(base + 2), & frame_cs(2)*q(base + 1) + frame_cs(1)*q(base + 2), q(base + 3)], & @@ -6138,32 +6079,42 @@ SUBROUTINE attachment_static_drag(q, node, att, opts, frame_cs, f, ErrStat, ErrM IF (es /= CD_HCDYN_OK) THEN CALL fail(ErrStat, ErrMsg, TRIM(em)); RETURN END IF - f(base + 1:base + 3) = f(base + 1:base + 3) + fd + f(base + 1:base + 3) = f(base + 1:base + 3) + wf*fd END DO END SUBROUTINE attachment_static_drag - SUBROUTINE attachment_static_weight(q, node, att, opts, f, dry) + SUBROUTINE attachment_static_weight(q, node, att, opts, f, surface) !! The attachments' weight at rest as nodal loads (f, the generalized load vector of the - !! cable solve, set here): -(m - rho V) g e_z at the node of an attachment at or below the - !! still-water level and -m g e_z above it, as the dynamics loads it (attachment_residual of - !! the cubic-Hermite model: above the free surface its weight only, no buoyancy, and no drag, - !! which attachment_static_drag skips there too). Without it the static start kept the - !! buoyancy of an attachment above the surface: a 500 kg, 0.2 m^3 module 3 m above it on a - !! cable hung from 5 m above the surface moved the fairlead load by up to 6.1 % in the first - !! second. - !! dry(k): attachment k is above the surface in q. + !! cable solve, set here): the net weight -(m - rho V) g e_z at the node of each attachment. + !! With surface (default false) also the buoyancy an attachment loses at the still-water + !! level at its height in q, -rho g V (1 - wf) e_z, wf the immersed fraction of the sphere of + !! its volume (CD_HermiteCable_Point_Immersion), as the dynamics loads it (attachment_residual + !! of the cubic-Hermite model); exactly -m g e_z from its radius above the surface, nothing + !! more from its radius below it. Without surface the static solve adds that share in each + !! Newton iterate (att_buoyancy of CD_HermiteCable_Static_Solve). Without it the static start + !! kept the buoyancy of an attachment above the surface: a 500 kg, 0.2 m^3 module 3 m above it + !! on a cable hung from 5 m above the surface moved the fairlead load by up to 6.1 % in the + !! first second. REAL(wp), INTENT(IN) :: q(:), att(:, :) INTEGER, INTENT(IN) :: node(:) TYPE(DeckOptions), INTENT(IN) :: opts REAL(wp), INTENT(OUT) :: f(:) - LOGICAL, INTENT(OUT) :: dry(:) + LOGICAL, INTENT(IN), OPTIONAL :: surface INTEGER :: k, base + REAL(wp) :: wf, dwf + LOGICAL :: surface_ + surface_ = .FALSE. + IF (PRESENT(surface)) surface_ = surface f = CD_ZERO DO k = 1, SIZE(node) base = 6*(node(k) - 1) - dry(k) = q(base + 3) > CD_ZERO - IF (dry(k)) THEN + wf = CD_ONE + IF (surface_) CALL CD_HermiteCable_Point_Immersion(-q(base + 3), CD_HermiteCable_Point_Radius(att(3, k), & + att(4, k)), wf, dwf) + IF (.NOT. (wf > CD_ZERO)) THEN f(base + 3) = f(base + 3) - att(2, k)*opts%g + ELSE IF (wf < CD_ONE) THEN + f(base + 3) = f(base + 3) - (att(2, k) - wf*opts%rhoW*att(3, k))*opts%g ELSE f(base + 3) = f(base + 3) - (att(2, k) - opts%rhoW*att(3, k))*opts%g END IF @@ -34005,7 +33956,7 @@ SUBROUTINE hermite_cable_fluid(cable, n, xyz, fv, fa, wl) INTEGER, INTENT(IN) :: n REAL(wp), INTENT(OUT) :: xyz(3, n), fv(3, n), fa(3, n), wl(n) INTEGER :: j, es - REAL(wp) :: eta, wv(3), wa(3) + REAL(wp) :: eta, eta_s, wv(3), wa(3), zs CHARACTER(1024) :: em CHARACTER(200) :: em_k ! a per-node current or wave kinematics message (at most 160 characters) CALL CD_HFMF_GetNodePositions(cable, xyz, es, em) @@ -34025,6 +33976,17 @@ SUBROUTINE hermite_cable_fluid(cable, n, xyz, fv, fa, wl) IF (es /= CD_HYDRO_OK) THEN CALL hermite_fluid_fail('wave kinematics', em_k); RETURN END IF + IF (xyz(3, j) > eta) THEN + ! a node above the instantaneous surface takes the field at the surface: the parts of + ! the section (an attachment's sphere, a Gauss point's band) still wet there move with + ! it (the internal waves of a cable do the same, CD_HermiteCable_Drag_Element); the + ! kinematics above the surface are zero + zs = eta + CALL deck_wave_kinematics(opts, xyz(1, j), xyz(2, j), zs, time, eta_s, wv, wa, es, em_k) + IF (es /= CD_HYDRO_OK) THEN + CALL hermite_fluid_fail('wave kinematics', em_k); RETURN + END IF + END IF fv(:, j) = fv(:, j) + wv; fa(:, j) = wa; wl(j) = eta END IF END DO diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 1d6bf871..80583451 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -120,6 +120,8 @@ MODULE CableDyn_HermiteCableDynamic PUBLIC :: CD_HermiteCable_Dyn_Set_AddedMass PUBLIC :: CD_HermiteCable_Dyn_Set_Waves PUBLIC :: CD_HermiteCable_Dyn_Set_Held_Fluid + PUBLIC :: CD_HermiteCable_Point_Immersion + PUBLIC :: CD_HermiteCable_Point_Radius PUBLIC :: CD_HermiteCable_Dyn_Set_Contact PUBLIC :: CD_HermiteCable_Dyn_Set_Attachments PUBLIC :: CD_HermiteCable_Attachment_Drag @@ -498,14 +500,17 @@ MODULE CableDyn_HermiteCableDynamic ! [N] it loses above the free surface, the fluid-inertia coefficient att_fk(k) = ! rho V (1 + Ca) [kg], and the drag areas normal (att_cda) and axial (att_cdax) to the ! line tangent at the node [m^2] with the fluid density att_rho. Its mass - ! plus added mass m + Ca rho V is part of the constant mass Mgb. + ! plus added mass m + Ca rho V is part of the constant mass Mgb. Across the free surface + ! its buoyancy, Froude-Krylov force and drag carry the immersed fraction of the sphere of + ! its volume (radius att_r; of its drag area CdA without a volume), as a Rigid6 body's do + ! (CD_HermiteCable_Point_Immersion). LOGICAL :: has_attach = .FALSE. ! Set by a checkpoint-restart reload (CD_HFMF_UnpackMirror): the committed acceleration is ! a generalised-alpha history value, so the first held fluid field after the reload must ! preserve it instead of re-deriving an initial-condition acceleration. LOGICAL :: a_restored = .FALSE. INTEGER, ALLOCATABLE :: att_node(:) - REAL(wp), ALLOCATABLE :: att_w(:), att_b(:), att_fk(:), att_cda(:), att_cdax(:) + REAL(wp), ALLOCATABLE :: att_w(:), att_b(:), att_fk(:), att_cda(:), att_cdax(:), att_r(:) ! a point's isotropic drag (a Free point ending the line) in place of the normal/axial split LOGICAL, ALLOCATABLE :: att_iso(:) ! the point a free end carries: in the equations of motion, not in the end force @@ -2305,7 +2310,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Attachments(model, node, mass, volume, cda, c mgb_old = model%Mgb ALLOCATE (model%att_node(n), model%att_w(n), model%att_b(n), model%att_fk(n), model%att_cda(n), & model%att_cdax(n), model%att_mass(n), model%att_madd(n), model%att_iso(n), & - model%att_point(n)) + model%att_point(n), model%att_r(n)) model%att_iso = .FALSE. IF (PRESENT(isotropic)) model%att_iso = isotropic model%att_point = .FALSE. @@ -2319,6 +2324,9 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Attachments(model, node, mass, volume, cda, c model%att_rho = rho_w model%att_mass = mass model%att_madd = ca*rho_w*volume + DO k = 1, n + model%att_r(k) = CD_HermiteCable_Point_Radius(volume(k), cda(k)) + END DO DO k = 1, n DO d = 1, 3 dof = 6*(node(k) - 1) + d @@ -2329,7 +2337,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Attachments(model, node, mass, volume, cda, c CALL solve_consistent_acceleration(model, es, em) IF (es /= CD_HCDYN_OK) THEN DEALLOCATE (model%att_node, model%att_w, model%att_b, model%att_fk, model%att_cda, model%att_cdax, & - model%att_mass, model%att_madd, model%att_iso, model%att_point) + model%att_mass, model%att_madd, model%att_iso, model%att_point, model%att_r) model%has_attach = .FALSE. model%Mgb = mgb_old model%a = a_old @@ -2403,14 +2411,21 @@ SUBROUTINE assemble_attachments(model, q_cfg, v_cfg, want_residual, want_tangent CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: k, base, a, b LOGICAL :: has_jac - REAL(wp) :: rk(3), jrel(3, 3), jtan(3, 3) + REAL(wp) :: rk(3), jrel(3, 3), jtan(3, 3), jz(3) ErrStat = CD_HCDYN_OK; ErrMsg = '' DO k = 1, SIZE(model%att_node) IF (model%att_node(k) < n_lo .OR. model%att_node(k) > n_hi) CYCLE base = 6*(model%att_node(k) - 1) - CALL attachment_residual(model, k, q_cfg, v_cfg, want_tangent, rk, has_jac, jrel, jtan, ErrStat, ErrMsg) + CALL attachment_residual(model, k, q_cfg, v_cfg, want_tangent, rk, has_jac, jrel, jtan, ErrStat, ErrMsg, & + jz=jz) IF (ErrStat /= CD_HCDYN_OK) RETURN IF (want_residual) R(base + 1:base + 3) = R(base + 1:base + 3) + rk + ! the dependence on the node height through the immersed fraction (zero off the surface) + IF (want_tangent) THEN + DO a = 1, 3 + Kb(KL_D + KU_D + 1 + a - 3, base + 3) = Kb(KL_D + KU_D + 1 + a - 3, base + 3) + jz(a) + END DO + END IF IF (want_tangent .AND. has_jac) THEN ! w = u - v, so dR/dv = +df/dw; the tangent DOFs m enter through df/dm DO b = 1, 3 @@ -2425,11 +2440,16 @@ SUBROUTINE assemble_attachments(model, q_cfg, v_cfg, want_residual, want_tangent END SUBROUTINE assemble_attachments SUBROUTINE attachment_residual(model, k, q_cfg, v_cfg, want_jac, rk, has_jac, jrel, jtan, ErrStat, ErrMsg, & - f_drag) + f_drag, jz) !! Contribution rk of attachment k to R = f_int - f_ext at the translations of its node: - !! weight, buoyancy, Froude-Krylov force and drag (inertia excluded). With want_jac, the - !! drag Jacobians d f/d w and d f/d tangent are returned when has_jac is set. f_drag - !! (optional) returns the drag force on the node alone (zero above the free surface). + !! weight, buoyancy, Froude-Krylov force and drag (inertia excluded). Buoyancy, Froude-Krylov + !! force and drag carry the immersed fraction wf of the attachment's sphere (radius att_r) + !! at the local surface, so the load is continuous (C1) as the node crosses it: a buoy + !! floating at the surface has an equilibrium, where a wet/dry switch at the node height + !! had none. A node deeper than att_r below the surface has wf exactly 1 (unchanged loads). + !! With want_jac, the drag Jacobians d f/d w and d f/d tangent are returned when has_jac is + !! set. f_drag (optional) returns the drag force on the node alone (zero above the free + !! surface); jz (optional) returns d rk/d z through wf (zero off the surface band). TYPE(CD_HermiteCableDynType), INTENT(IN) :: model INTEGER, INTENT(IN) :: k REAL(wp), INTENT(IN) :: q_cfg(:), v_cfg(:) @@ -2438,12 +2458,13 @@ SUBROUTINE attachment_residual(model, k, q_cfg, v_cfg, want_jac, rk, has_jac, jr LOGICAL, INTENT(OUT) :: has_jac INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - REAL(wp), INTENT(OUT), OPTIONAL :: f_drag(3) + REAL(wp), INTENT(OUT), OPTIONAL :: f_drag(3), jz(3) INTEGER :: j, base - REAL(wp) :: u(3), ud(3), wrel(3), wl, f(3) + REAL(wp) :: u(3), ud(3), wrel(3), wl, f(3), wf, dwf ErrStat = CD_HCDYN_OK; ErrMsg = '' rk = CD_ZERO; jrel = CD_ZERO; jtan = CD_ZERO; has_jac = .FALSE. IF (PRESENT(f_drag)) f_drag = CD_ZERO + IF (PRESENT(jz)) jz = CD_ZERO j = model%att_node(k) base = 6*(j - 1) u = CD_ZERO; ud = CD_ZERO; wl = CD_ZERO @@ -2456,13 +2477,23 @@ SUBROUTINE attachment_residual(model, k, q_cfg, v_cfg, want_jac, rk, has_jac, jr IF (model%has_held_field) THEN u = u + model%hf_u(:, j); ud = model%hf_ud(:, j); wl = model%hf_wl(j) END IF - IF (q_cfg(base + 3) > wl) THEN + CALL CD_HermiteCable_Point_Immersion(wl - q_cfg(base + 3), model%att_r(k), wf, dwf) + IF (.NOT. (wf > CD_ZERO)) THEN ! above the free surface: weight only, no buoyancy or fluid load rk(3) = model%att_w(k) + model%att_b(k) RETURN END IF - rk(3) = model%att_w(k) - rk = rk - model%att_fk(k)*ud + IF (wf < CD_ONE) THEN + rk(3) = model%att_w(k) + (CD_ONE - wf)*model%att_b(k) + rk = rk - wf*model%att_fk(k)*ud + IF (PRESENT(jz)) THEN + jz(3) = -dwf*model%att_b(k) + jz = jz - dwf*model%att_fk(k)*ud + END IF + ELSE + rk(3) = model%att_w(k) + rk = rk - model%att_fk(k)*ud + END IF IF (.NOT. (model%att_cda(k) > CD_ZERO .OR. model%att_cdax(k) > CD_ZERO)) RETURN wrel = u - v_cfg(base + 1:base + 3) IF (want_jac) THEN @@ -2475,6 +2506,12 @@ SUBROUTINE attachment_residual(model, k, q_cfg, v_cfg, want_jac, rk, has_jac, jr model%att_cdax(k), f, ErrStat, ErrMsg, isotropic=model%att_iso(k)) END IF IF (ErrStat /= CD_HCDYN_OK) RETURN + IF (wf < CD_ONE) THEN + IF (PRESENT(jz)) jz = jz - dwf*f + f = wf*f + jrel = wf*jrel + jtan = wf*jtan + END IF rk = rk - f IF (PRESENT(f_drag)) f_drag = f END SUBROUTINE attachment_residual @@ -9302,6 +9339,7 @@ SUBROUTINE CD_HermiteCable_Dyn_End(model) TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model IF (ALLOCATED(model%att_node)) DEALLOCATE (model%att_node, model%att_w, model%att_b, model%att_fk, & model%att_cda, model%att_cdax) + IF (ALLOCATED(model%att_r)) DEALLOCATE (model%att_r) IF (ALLOCATED(model%att_mass)) DEALLOCATE (model%att_mass, model%att_madd) IF (ALLOCATED(model%att_iso)) DEALLOCATE (model%att_iso) IF (ALLOCATED(model%att_point)) DEALLOCATE (model%att_point) @@ -11697,6 +11735,63 @@ PURE SUBROUTINE CD_HermiteCable_Immersion(depth, diam, wf, dwf) END IF END SUBROUTINE CD_HermiteCable_Immersion + PURE REAL(wp) FUNCTION CD_HermiteCable_Point_Radius(volume, cda) RESULT(r) + !! Radius of the sphere whose immersion wets a point attachment at the free surface: the + !! sphere of its volume, r = (3 V/(4 pi))^(1/3), or without a volume that of its projected + !! drag area, CdA = pi r^2 (as rigid6_wet_fraction sizes a Rigid6 body); 0 for neither. + REAL(wp), INTENT(IN) :: volume, cda + REAL(wp), PARAMETER :: PI_ = 3.14159265358979323846_wp + IF (volume > CD_ZERO) THEN + r = (3.0_wp*volume/(4.0_wp*PI_))**(CD_ONE/3.0_wp) + ELSE IF (cda > CD_ZERO) THEN + r = SQRT(cda/PI_) + ELSE + r = CD_ZERO + END IF + END FUNCTION CD_HermiteCable_Point_Radius + + PURE SUBROUTINE CD_HermiteCable_Point_Immersion(depth, radius, wf, dwf, psi) + !! Immersed fraction wf of a sphere of radius r whose centre lies depth below the free + !! surface (negative above it), the formula of a Rigid6 body (rigid6_wet_fraction): with the + !! immersed height h = clamp(depth + r, 0, 2 r), wf = h^2 (3 r - h)/(4 r^3), 0 from r above + !! the surface, 1 from r below, 1/2 at the surface, continuous with its slope (C1). dwf = + !! d wf/d z, the derivative with respect to the height of the centre: -3 h (2 r - h)/(4 r^3) + !! in the band, 0 outside. psi (optional) = the integral of wf over the height, zero above + !! the band and -depth below it (in the band -(r h^3 - h^4/4)/(4 r^3)): the buoyancy + !! rho g V wf is the force of the potential -rho g V psi. A point (r = 0) is wet at and below + !! the surface (the old switch, dwf 0). + REAL(wp), INTENT(IN) :: depth, radius + REAL(wp), INTENT(OUT) :: wf, dwf + REAL(wp), INTENT(OUT), OPTIONAL :: psi + REAL(wp) :: h, r3 + IF (.NOT. (radius > CD_ZERO)) THEN + IF (depth >= CD_ZERO) THEN + wf = CD_ONE + IF (PRESENT(psi)) psi = -depth + ELSE + wf = CD_ZERO + IF (PRESENT(psi)) psi = CD_ZERO + END IF + dwf = CD_ZERO + RETURN + END IF + IF (depth >= radius) THEN + wf = CD_ONE + dwf = CD_ZERO + IF (PRESENT(psi)) psi = -depth + ELSE IF (depth <= -radius) THEN + wf = CD_ZERO + dwf = CD_ZERO + IF (PRESENT(psi)) psi = CD_ZERO + ELSE + h = depth + radius + r3 = 4.0_wp*radius**3 + wf = h*h*(3.0_wp*radius - h)/r3 + dwf = -3.0_wp*h*(2.0_wp*radius - h)/r3 + IF (PRESENT(psi)) psi = -(radius*h**3 - 0.25_wp*h**4)/r3 + END IF + END SUBROUTINE CD_HermiteCable_Point_Immersion + SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, diam, cdn, cdt, & fdrag, djq, djv, ErrStat, ErrMsg, & wv_h, wv_om, wv_k, wv_depth, wv_dir, wv_t, & diff --git a/src/CableDyn_HermiteCableStatic.f90 b/src/CableDyn_HermiteCableStatic.f90 index 6451254e..778a84c1 100644 --- a/src/CableDyn_HermiteCableStatic.f90 +++ b/src/CableDyn_HermiteCableStatic.f90 @@ -47,7 +47,7 @@ MODULE CableDyn_HermiteCableStatic USE CableDyn_Bathymetry, ONLY: CD_BathymetryType, CD_Bathymetry_Is_Initialized, & CD_Bathymetry_Floor, CD_Bathymetry_Floor_Gradient, CD_BATHY_OK, & CD_Bathymetry_Rotate_Curvature - USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCable_Drag_Element, CD_HCDYN_OK + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCable_Drag_Element, CD_HCDYN_OK, CD_HermiteCable_Point_Immersion USE CableDyn_Static, ONLY: CD_Static_As_Laid_Reference, CD_STATIC_OK USE CableDyn_Hydro, ONLY: CD_Current_Profile_Velocity, CD_CurrentGridType, CD_Current_Grid_Velocity, & CD_Current_Profile_Gradient, CD_Current_Grid_Gradient, CD_HYDRO_OK @@ -309,7 +309,8 @@ SUBROUTINE CD_HermiteCable_Static_Solve(l0, EA, EI, w, seed, fixed_dofs, seabed_ waterline_z, dry_buoyancy, merit_line_search, pseudo_transient, & energy_minimization, stable, water_weight, current, residual_out, & tangent_out, friction, residual_unmet, torsion, energy_out, & - end_share_hold, f_nodal_twist, stall_limit) + end_share_hold, f_nodal_twist, stall_limit, att_node, att_buoyancy, & + att_radius) !! Solve the finite-EI static equilibrium of a Hermite bending-cable line. !! !! l0(ne), EA(ne), EI(ne), w(ne) : per-element rest length, axial/bending stiffness, @@ -460,6 +461,18 @@ SUBROUTINE CD_HermiteCable_Static_Solve(l0, EA, EI, w, seed, fixed_dofs, seabed_ !! fixed count; the norm, unlike the largest component !! that decides convergence, does not change when the !! line is turned. + !! att_node, att_buoyancy, att_radius (optional, together, one entry per attachment): + !! point attachments whose buoyancy rho g V [N] + !! (att_buoyancy) at node att_node f_nodal carries in full + !! (their net weight (m - rho V) g). The buoyancy they + !! lose at the free surface (waterline_z, 0 without it), + !! rho g V (1 - wf(z)) downward, is added at the node + !! height of each iterate with its stiffness and + !! potential, wf the immersed fraction of the sphere of + !! radius att_radius (CD_HermiteCable_Point_Immersion), + !! ramped with the load-continuation factor as f_nodal. A + !! buoy floating at the surface then has an equilibrium; + !! a node deeper than its radius adds nothing. REAL(wp), INTENT(IN) :: l0(:), EA(:), EI(:), w(:), seed(:) INTEGER, INTENT(IN) :: fixed_dofs(:) REAL(wp), INTENT(IN) :: seabed_z, kn, tol, damping @@ -499,6 +512,8 @@ SUBROUTINE CD_HermiteCable_Static_Solve(l0, EA, EI, w, seed, fixed_dofs, seabed_ TYPE(CD_HermiteTorsionType), INTENT(INOUT), OPTIONAL :: torsion REAL(wp), INTENT(IN), OPTIONAL :: f_nodal_twist(:) INTEGER, INTENT(IN), OPTIONAL :: stall_limit + INTEGER, INTENT(IN), OPTIONAL :: att_node(:) + REAL(wp), INTENT(IN), OPTIONAL :: att_buoyancy(:), att_radius(:) INTEGER :: ne, nn, ndof, c, it, es, i, b, nci, n_buoy, omp_threads, axial_order, bending_order ! stall_limit: the residual merit at the start of an update, its value at the last halving @@ -680,6 +695,23 @@ SUBROUTINE CD_HermiteCable_Static_Solve(l0, EA, EI, w, seed, fixed_dofs, seabed_ CALL fail('contact_kn must be finite, positive, and have length n_nodes'); RETURN END IF END IF + IF (PRESENT(att_node) .OR. PRESENT(att_buoyancy) .OR. PRESENT(att_radius)) THEN + IF (.NOT. (PRESENT(att_node) .AND. PRESENT(att_buoyancy) .AND. PRESENT(att_radius))) THEN + CALL fail('att_node, att_buoyancy and att_radius must be supplied together'); RETURN + END IF + IF (SIZE(att_buoyancy) /= SIZE(att_node) .OR. SIZE(att_radius) /= SIZE(att_node)) THEN + CALL fail('att_node, att_buoyancy and att_radius must share one length'); RETURN + END IF + IF (ANY(att_node < 1) .OR. ANY(att_node > nn)) THEN + CALL fail('att_node out of range'); RETURN + END IF + IF (.NOT. (CD_All_Finite(att_buoyancy) .AND. CD_All_Finite(att_radius))) THEN + CALL fail('att_buoyancy and att_radius must be finite'); RETURN + END IF + IF (ANY(att_buoyancy < CD_ZERO) .OR. ANY(att_radius < CD_ZERO)) THEN + CALL fail('att_buoyancy and att_radius must be >= 0'); RETURN + END IF + END IF IF (use_bathymetry) THEN IF (.NOT. CD_Bathymetry_Is_Initialized(bathymetry)) THEN CALL fail('bathymetry must be initialized'); RETURN @@ -1209,6 +1241,8 @@ RECURSIVE SUBROUTINE newton_step(rnorm, es, em, do_update) LOGICAL, INTENT(IN) :: do_update REAL(wp) :: qe(12) REAL(wp) :: pen, dqnorm, z_floor, gxg, gyg, gx, gy, xg, yg, normal, normal_gap, kn_eff + ! an attachment's surface waterline, immersed fraction, its height derivative and potential + REAL(wp) :: z_wl_att, wf_att, dwf_att, psi_att REAL(wp) :: curv_g(3), curv_l(3) REAL(wp) :: step_scale, trial_norm, row_scale, column_scale, merit, trial_merit, merit_base, diag_floor REAL(wp) :: gradient_component, column_norm2, fdry(4), kdry(4, 4), e_term @@ -1351,6 +1385,25 @@ RECURSIVE SUBROUTINE newton_step(rnorm, es, em, do_update) END IF END IF + ! ---- buoyancy the point attachments lose at the free surface ---- + ! downward rho g V (1 - wf(z)) on top of f_nodal's net weight, with its stiffness + ! -rho g V dwf/dz >= 0 and potential rho g V (z - psi(z) - z_w), zero below the band + IF (PRESENT(att_node)) THEN + DO a = 1, SIZE(att_node) + IF (.NOT. (att_buoyancy(a) > CD_ZERO)) CYCLE + gi = 6*(att_node(a) - 1) + 3 + z_wl_att = CD_ZERO + IF (PRESENT(waterline_z)) z_wl_att = waterline_z + CALL CD_HermiteCable_Point_Immersion(z_wl_att - q(gi), att_radius(a), wf_att, dwf_att, psi_att) + IF (.NOT. (wf_att < CD_ONE)) CYCLE + R(gi) = R(gi) + eifac*att_buoyancy(a)*(CD_ONE - wf_att) + ab(KL_H + KU_H + 1, gi) = ab(KL_H + KU_H + 1, gi) - eifac*att_buoyancy(a)*dwf_att + e_term = eifac*att_buoyancy(a)*(q(gi) - psi_att - z_wl_att) + pi_total = pi_total + e_term + pi_abs = pi_abs + ABS(e_term) + END DO + END IF + ! ---- optional rotational line-end connections ---- ! Ramped with the same factor as EI: a stiff connection introduced at full strength ! against a cold seed would fight the bending continuation it is meant to ride along. diff --git a/tests/test_attachment_surface.f90 b/tests/test_attachment_surface.f90 new file mode 100644 index 00000000..b70d5213 --- /dev/null +++ b/tests/test_attachment_surface.f90 @@ -0,0 +1,167 @@ +! File: tests/test_attachment_surface.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_attachment_surface + !! The immersed fraction of a point attachment at the free surface (the sphere of its volume, + !! CD_HermiteCable_Point_Immersion) and the buoyancy it loses there in the finite-EI static solve. + !! Gates: + !! K1 the fraction: 1 from r below the surface, 0 from r above, 1/2 at it; its height + !! derivative matches central FD in the band; the potential psi has the derivative wf; wf + !! and dwf are continuous at the band edges; r = 0 is the wet/dry switch; the sphere radius + !! of a volume and of a drag area. + !! K2 the static solve (CD_HermiteCable_Static_Solve, att_node/att_buoyancy/att_radius): with + !! the attachment node in the band the residual changes by rho g V (1 - wf) at its height + !! and the tangent's column matches central FD; deeper than r the residual and tangent are + !! those without the attachment term, bit for bit; above the band the residual carries + !! rho g V in full. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCable_Point_Immersion, CD_HermiteCable_Point_Radius + USE CableDyn_HermiteCableStatic, ONLY: CD_HermiteCable_Static_Solve, CD_HCSTAT_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp + INTEGER, PARAMETER :: NE = 10, NN = NE + 1, NDOF = 6*NN, LDAB = 2*11 + 11 + 1 + INTEGER :: nfail = 0 + + CALL gate_k1() + CALL gate_k2() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAILED: ', nfail, ' check(s)' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: attachment immersion at the free surface' + +CONTAINS + + SUBROUTINE gate_k1() + REAL(wp), PARAMETER :: R = 0.4_wp, H = 1.0e-6_wp + REAL(wp) :: wf, dwf, psi, wp_, wm, dum, pp, pm, err_d, err_p, d + INTEGER :: k + CALL CD_HermiteCable_Point_Immersion(1.0_wp, R, wf, dwf, psi) + CALL check(wf == 1.0_wp .AND. dwf == 0.0_wp .AND. psi == -1.0_wp, 'K1: fully submerged below r') + CALL CD_HermiteCable_Point_Immersion(-1.0_wp, R, wf, dwf, psi) + CALL check(wf == 0.0_wp .AND. dwf == 0.0_wp .AND. psi == 0.0_wp, 'K1: dry above r') + CALL CD_HermiteCable_Point_Immersion(0.0_wp, R, wf, dwf, psi) + CALL check(ABS(wf - 0.5_wp) < 1.0e-15_wp .AND. ABS(dwf + 3.0_wp/(4.0_wp*R)) < 1.0e-14_wp, & + 'K1: half immersed at the surface, slope -3/(4 r)') + err_d = 0.0_wp + err_p = 0.0_wp + DO k = -19, 19 + d = R*REAL(k, wp)/20.0_wp + CALL CD_HermiteCable_Point_Immersion(d, R, wf, dwf, psi) + ! z = -depth: d wf/d z = -(d wf/d depth) + CALL CD_HermiteCable_Point_Immersion(d - H, R, wp_, dum, pp) + CALL CD_HermiteCable_Point_Immersion(d + H, R, wm, dum, pm) + err_d = MAX(err_d, ABS((wp_ - wm)/(2.0_wp*H) - dwf)) + err_p = MAX(err_p, ABS((pp - pm)/(2.0_wp*H) - wf)) + END DO + WRITE (*, '(A,2ES10.2)') ' K1 FD error of dwf/dz and dpsi/dz in the band: ', err_d, err_p + CALL check(err_d < 1.0e-8_wp, 'K1: dwf/dz matches central FD') + CALL check(err_p < 1.0e-8_wp, 'K1: dpsi/dz = wf') + CALL CD_HermiteCable_Point_Immersion(R*(1.0_wp - 1.0e-9_wp), R, wf, dwf, psi) + CALL check(ABS(wf - 1.0_wp) < 1.0e-12_wp .AND. ABS(dwf) < 1.0e-8_wp .AND. ABS(psi + R) < 1.0e-9_wp, & + 'K1: continuous with its slope and potential at the lower band edge') + CALL CD_HermiteCable_Point_Immersion(-R*(1.0_wp - 1.0e-9_wp), R, wf, dwf, psi) + CALL check(ABS(wf) < 1.0e-12_wp .AND. ABS(dwf) < 1.0e-8_wp .AND. ABS(psi) < 1.0e-12_wp, & + 'K1: continuous with its slope and potential at the upper band edge') + CALL CD_HermiteCable_Point_Immersion(0.0_wp, 0.0_wp, wf, dwf, psi) + CALL check(wf == 1.0_wp .AND. dwf == 0.0_wp, 'K1: a point (r = 0) is wet at the surface') + CALL CD_HermiteCable_Point_Immersion(-1.0e-12_wp, 0.0_wp, wf, dwf, psi) + CALL check(wf == 0.0_wp, 'K1: a point (r = 0) is dry above the surface') + CALL check(ABS(CD_HermiteCable_Point_Radius(4.0_wp*PI/3.0_wp, 0.5_wp) - 1.0_wp) < 1.0e-14_wp, & + 'K1: the sphere of the volume') + CALL check(ABS(CD_HermiteCable_Point_Radius(0.0_wp, PI) - 1.0_wp) < 1.0e-14_wp, & + 'K1: without a volume, the sphere of the drag area') + CALL check(CD_HermiteCable_Point_Radius(0.0_wp, 0.0_wp) == 0.0_wp, 'K1: neither: a point') + END SUBROUTINE gate_k1 + + SUBROUTINE gate_k2() + !! A 10 m line of ten elements along x at z0, attachment at node 6 (rho g V 2000 N, r 0.3 m). + REAL(wp), PARAMETER :: B = 2000.0_wp, R = 0.3_wp, HH = 1.0e-6_wp + REAL(wp) :: q(NDOF), r0(NDOF), r1(NDOF), ab0(LDAB, NDOF), ab1(LDAB, NDOF), rp(NDOF), rm(NDOF), dum(LDAB, NDOF) + REAL(wp) :: wf, dwf, col_fd(NDOF), col_an(NDOF), err, z0 + INTEGER :: jz, i + jz = 6*5 + 3 + ! in the band + z0 = 0.1_wp + CALL line_state(z0, q) + CALL evaluate(q, .FALSE., r0, ab0) + CALL evaluate(q, .TRUE., r1, ab1) + CALL CD_HermiteCable_Point_Immersion(-z0, R, wf, dwf) + CALL check(ABS(r1(jz) - r0(jz) - B*(1.0_wp - wf)) < 1.0e-9_wp*B, & + 'K2: the residual carries the lost buoyancy rho g V (1 - wf) at the node height') + CALL check(MAXVAL(ABS(r1(1:jz - 1) - r0(1:jz - 1))) == 0.0_wp .AND. & + MAXVAL(ABS(r1(jz + 1:NDOF) - r0(jz + 1:NDOF))) == 0.0_wp, 'K2: only the node''s vertical DOF changes') + q(jz) = z0 + HH + CALL evaluate(q, .TRUE., rp, dum) + q(jz) = z0 - HH + CALL evaluate(q, .TRUE., rm, dum) + col_fd = (rp - rm)/(2.0_wp*HH) + col_an = 0.0_wp + DO i = MAX(1, jz - 11), MIN(NDOF, jz + 11) + col_an(i) = ab1(2*11 + 1 + i - jz, jz) + END DO + err = MAXVAL(ABS(col_fd - col_an))/MAX(1.0_wp, MAXVAL(ABS(col_an))) + WRITE (*, '(A,ES10.2)') ' K2 static tangent column vs central FD (node in the band): ', err + CALL check(err < 1.0e-6_wp, 'K2: the static tangent column of the node matches central FD') + CALL check(ABS((ab1(2*11 + 1, jz) - ab0(2*11 + 1, jz)) + B*dwf) < 1.0e-9_wp*B, & + 'K2: the tangent adds the buoyancy stiffness -rho g V dwf/dz') + ! deeper than r: unchanged, bit for bit + CALL line_state(-0.31_wp, q) + CALL evaluate(q, .FALSE., r0, ab0) + CALL evaluate(q, .TRUE., r1, ab1) + CALL check(ALL(r1 == r0) .AND. ALL(ab1 == ab0), 'K2: an attachment deeper than r leaves the solve bit-identical') + ! above the band: the whole buoyancy is lost + CALL line_state(0.31_wp, q) + CALL evaluate(q, .FALSE., r0, ab0) + CALL evaluate(q, .TRUE., r1, ab1) + CALL check(ABS(r1(jz) - r0(jz) - B) < 1.0e-12_wp*B .AND. ALL(ab1 == ab0), & + 'K2: above the band the attachment loses its whole buoyancy, with no stiffness') + END SUBROUTINE gate_k2 + + SUBROUTINE line_state(z0, q) + !! A straight line along x at height z0, stretched 1e-4 (a non-trivial elastic residual). + REAL(wp), INTENT(IN) :: z0 + REAL(wp), INTENT(OUT) :: q(NDOF) + INTEGER :: i + q = 0.0_wp + DO i = 1, NN + q(6*(i - 1) + 1) = 1.0001_wp*REAL(i - 1, wp) + q(6*(i - 1) + 3) = z0 + 0.002_wp*SIN(REAL(i, wp)) + q(6*(i - 1) + 4) = 1.0001_wp + END DO + q(6*5 + 3) = z0 + END SUBROUTINE line_state + + SUBROUTINE evaluate(qx, with_att, r, ab) + !! The solver's residual and banded tangent at qx (no Newton update: tol = HUGE). + REAL(wp), INTENT(IN) :: qx(NDOF) + LOGICAL, INTENT(IN) :: with_att + REAL(wp), INTENT(OUT) :: r(NDOF), ab(LDAB, NDOF) + REAL(wp) :: l0(NE), ea(NE), ei(NE), w(NE), qd(NDOF), cd(NN), rr + INTEGER :: itx, esx + CHARACTER(512) :: emx + l0 = 1.0_wp; ea = 1.0e6_wp; ei = 50.0_wp; w = 40.0_wp + IF (with_att) THEN + CALL CD_HermiteCable_Static_Solve(l0, ea, ei, w, qx, [1, 2, 3, NDOF - 5, NDOF - 4, NDOF - 3], -1.0e4_wp, & + 0.0_wp, 1, 1, HUGE(1.0_wp), 1.0_wp, qd, cd, rr, itx, esx, emx, & + residual_out=r, tangent_out=ab, att_node=[6], att_buoyancy=[2000.0_wp], & + att_radius=[0.3_wp]) + ELSE + CALL CD_HermiteCable_Static_Solve(l0, ea, ei, w, qx, [1, 2, 3, NDOF - 5, NDOF - 4, NDOF - 3], -1.0e4_wp, & + 0.0_wp, 1, 1, HUGE(1.0_wp), 1.0_wp, qd, cd, rr, itx, esx, emx, & + residual_out=r, tangent_out=ab) + END IF + CALL check(esx == CD_HCSTAT_OK, 'residual and tangent evaluation: '//TRIM(emx)) + END SUBROUTINE evaluate + + SUBROUTINE check(ok, msg) + LOGICAL, INTENT(IN) :: ok + CHARACTER(*), INTENT(IN) :: msg + IF (ok) THEN + WRITE (*, '(2A)') 'ok ', msg + ELSE + WRITE (*, '(2A)') 'FAIL ', msg + nfail = nfail + 1 + END IF + END SUBROUTINE check +END PROGRAM test_attachment_surface diff --git a/tests/test_static_dry_weight.f90 b/tests/test_static_dry_weight.f90 index 178e9c99..445a0081 100644 --- a/tests/test_static_dry_weight.f90 +++ b/tests/test_static_dry_weight.f90 @@ -51,12 +51,14 @@ PROGRAM test_static_dry_weight !! march to 1e-4 m (measured 0); with the buoyancy kept above the surface (dev before the !! dry-weight fix) they moved by 5.5e-3 m. !! 9. A net-buoyant module (200 kg, 2 m^3) 50 m along a slack finite-EI cable from 20 m below - !! the surface: in water it lifts its node 4.5 m above the surface, where the dynamics gives - !! it its weight alone, which sinks it: a point attachment has no static position there. - !! The static start fails closed and its message names the attachment that crossed the - !! still-water level. Before, the solves carried the module above and below the surface in - !! turn until a load step failed, and the message read as a homotopy that stopped (dev - !! started the module 4.5 m above the surface with its buoyancy and ran). + !! the surface: in water it would lift its node 4.5 m above the surface, so it floats. Its + !! buoyancy fades over the sphere of its volume (r 0.78 m), and the static start finds it + !! inside that band, at the height where the immersed share balances its load; the march + !! holds it there over 3 s to 1e-3 m (the dynamics wets the module with the same fraction). + !! In 1.5 m, 6 s Airy waves the module rides the surface through its band for 18 s: every + !! step converges and it stays within its radius of the instantaneous surface's range. + !! Before, a wet/dry switch at the node gave it no static position and the static start + !! failed, naming the attachment that crossed the still-water level. !! A deck whose lines are all submerged is solved once, bit-identically (the example A/B). USE CableDyn_Precision, ONLY: wp USE CableDyn_OpenFAST_Aggregate, ONLY: CD_AGG_ModuleType, CD_AGG_Init_From_Deck, CD_AGG_GetMovingPointMesh, & @@ -140,7 +142,7 @@ PROGRAM test_static_dry_weight CALL check(dmax <= 1.0e-4_wp, 'chain between two moving objects across the surface: both start in the march''s '// & 'equilibrium') - ! 9. a module that would float: no static position, failed by name + ! 9. a module that floats: a static position in the surface band, held by the march CALL floating_module() IF (nfail > 0) THEN @@ -479,10 +481,14 @@ END SUBROUTINE body_cable_heave SUBROUTINE floating_module() !! Gate 9: a 160 m finite-EI cable (80 elements) from a Coupled point at (0, 0, -20) m to a - !! Fixed one at (100, 0, -50) m on a 50 m seabed, a 200 kg, 2 m^3 module 50 m along it. - INTEGER :: u, es - LOGICAL :: conv + !! Fixed one at (100, 0, -50) m on a 50 m seabed, a 200 kg, 2 m^3 module 50 m along it (node + !! 26), 3 s of the march. + REAL(wp), PARAMETER :: R_SPHERE = 0.7816_wp ! (3 V/(4 pi))^(1/3), V = 2 m^3 + INTEGER :: u, es, ios + LOGICAL :: conv, first + REAL(wp) :: row(2), z0, dz_max, z_lo, z_hi CHARACTER(1024) :: em + CHARACTER(4096) :: line OPEN (NEWUNIT=u, FILE='dry_float.dat', STATUS='replace', ACTION='write') WRITE (u, '(A)') 'test_static_dry_weight: a net-buoyant module that would float' WRITE (u, '(A)') '--- LINE TYPES ---' @@ -505,7 +511,7 @@ SUBROUTINE floating_module() WRITE (u, '(A)') '--- ATTACHMENTS ---' WRITE (u, '(A)') 'LineID ArcLength Mass Volume CdA Ca CdAx' WRITE (u, '(A)') '(-) (m) (kg) (m^3) (m^2) (-) (m^2)' - WRITE (u, '(A)') '1 50.0 200.0 2.0 0.0 0.0 0.0' + WRITE (u, '(A)') '1 50.0 200.0 2.0 1.0 0.5 0.0' WRITE (u, '(A)') '--- OPTIONS ---' WRITE (u, '(A)') '9.80665 g' WRITE (u, '(A)') '1025.0 rhoW' @@ -513,18 +519,78 @@ SUBROUTINE floating_module() WRITE (u, '(A)') '3.0e5 cBot' WRITE (u, '(A)') '0.01 dtM' WRITE (u, '(A)') '50.0 WtrDpth' - WRITE (u, '(A)') '0.1 TMax' + WRITE (u, '(A)') '3.0 TMax' WRITE (u, '(A)') '--- OUTPUTS ---' - WRITE (u, '(A)') 'Point1Fz' + WRITE (u, '(A)') 'L1N26pz' WRITE (u, '(A)') '--- END ---' CLOSE (u) CALL CD_Run_Deck_Driver('dry_float.dat', 'dry_float', conv, es, em) - WRITE (*, '(2A)') ' module that would float: ', TRIM(em) - CALL check(es /= CD_DECKDRV_OK, 'module that would float: the static start fails closed') - CALL check(INDEX(em, 'attachment 1 of the line') > 0 .AND. INDEX(em, 'crossed the still-water level') > 0, & - 'module that would float: the failure names the attachment that crossed the surface') + CALL check(es == CD_DECKDRV_OK .AND. conv, 'module that floats: the static start and the march run: '//TRIM(em)) + IF (es /= CD_DECKDRV_OK) RETURN + OPEN (NEWUNIT=u, FILE='dry_float.out', STATUS='old', ACTION='read') + first = .TRUE. + z0 = 0.0_wp + dz_max = 0.0_wp + DO + READ (u, '(A)', IOSTAT=ios) line + IF (ios /= 0) EXIT + READ (line, *, IOSTAT=ios) row + IF (ios /= 0) CYCLE + IF (first) THEN + z0 = row(2) + first = .FALSE. + END IF + dz_max = MAX(dz_max, ABS(row(2) - z0)) + END DO + CLOSE (u) + WRITE (*, '(A,F9.4,A,ES10.2,A)') ' module that floats: static height ', z0, ' m, largest drift ', dz_max, ' m' + CALL check(.NOT. first .AND. ABS(z0) < R_SPHERE, 'module that floats: its static height lies in the surface '// & + 'band of its sphere') + CALL check(dz_max <= 1.0e-3_wp, 'module that floats: the march holds its static height') + ! the same in waves: the module heaves through its band + CALL copy_with_waves('dry_float.dat', 'dry_float_wave.dat') + CALL CD_Run_Deck_Driver('dry_float_wave.dat', 'dry_float_wave', conv, es, em) + CALL check(es == CD_DECKDRV_OK .AND. conv, 'module that floats, in waves: the march runs: '//TRIM(em)) + IF (es /= CD_DECKDRV_OK) RETURN + OPEN (NEWUNIT=u, FILE='dry_float_wave.out', STATUS='old', ACTION='read') + z_lo = HUGE(1.0_wp) + z_hi = -HUGE(1.0_wp) + DO + READ (u, '(A)', IOSTAT=ios) line + IF (ios /= 0) EXIT + READ (line, *, IOSTAT=ios) row + IF (ios /= 0) CYCLE + z_lo = MIN(z_lo, row(2)) + z_hi = MAX(z_hi, row(2)) + END DO + CLOSE (u) + WRITE (*, '(A,2F9.4,A)') ' module that floats, in waves: height range ', z_lo, z_hi, ' m' + CALL check(z_hi - z_lo > 0.5_wp .AND. z_lo > -0.75_wp - R_SPHERE .AND. z_hi < 0.75_wp + R_SPHERE, & + 'module that floats, in waves: it heaves with the surface, within its radius of the wave crest '// & + 'and trough') END SUBROUTINE floating_module + SUBROUTINE copy_with_waves(src, dst) + !! The deck src with 1.5 m, 6 s Airy waves (head-on) and TMax 18 s, written to dst. + CHARACTER(*), INTENT(IN) :: src, dst + INTEGER :: ui, uo, ios + CHARACTER(4096) :: line + OPEN (NEWUNIT=ui, FILE=src, STATUS='old', ACTION='read') + OPEN (NEWUNIT=uo, FILE=dst, STATUS='replace', ACTION='write') + DO + READ (ui, '(A)', IOSTAT=ios) line + IF (ios /= 0) EXIT + IF (TRIM(line) == '3.0 TMax') THEN + WRITE (uo, '(A)') '18.0 TMax' + WRITE (uo, '(A)') 'airy 1.5 6.0 0.0 waves' + ELSE + WRITE (uo, '(A)') TRIM(line) + END IF + END DO + CLOSE (ui) + CLOSE (uo) + END SUBROUTINE copy_with_waves + SUBROUTINE two_objects_drift(dmax) !! Gate 8: the body of gate 7, a 65 m chain (EI = 0, 30 segments) from its point (0, 0, 8) m to !! a Connect point (3 t) at (-30, 0, -50) m, and an 85 m chain from there to a Fixed point at From 7d3998fddeda539b55034dbfda63513b7143ae8d Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Sun, 15 Nov 2026 14:31:10 +0900 Subject: [PATCH 22/47] feat: VIV FRAME section, wake frequency relative to the cable's filtered motion (#165) The wake oscillator took its frequency from the ambient flow normal to the line. A cable moved through still water, by a tow or by its floater, therefore never shed, and the model could not drive floater-induced VIV. A new optional section VIV FRAME, rows `TypeName Tf`, sets the flow frame of a line type's VIV model. With Tf > 0 [s] the free stream is the ambient flow relative to the node's velocity, low-pass filtered over Tf: U_a = |(u - vbar)_n|, vbar_{n+1} = vbar_n + (1 - exp(-dt/Tf)) (v_{n+1} - vbar_n) This is the exact first-order filter of the converged end velocity held over the step, started at the node's initial velocity. The slow motion counts as flow, and the VIV velocity, much faster than Tf, is filtered out. In this commit the frame sets the wake oscillator's frequency, and a row needs a WAKE OSCILLATOR row. The synchronisation model's ambient-frame quantities (the amplitude estimate, the cross-flow damping split) can take the same frame later without changing the input. With Tf 0 or no row, runs are unchanged to the bit. - Finite-EI cables: wo_s grows from 2 to 5 rows per node when a node has Tf > 0. The recovery, snapshot and checkpoint copies carry the new rows, and the mirror packs SIZE(wo_s). - EI = 0 lines: the filtered velocity takes rows 3-5 of the VIV motion statistics (CD_VIV_NMS_AMP rows; a wake line has no amplitude table), so the state get/set, rollback and checkpoint already carry it. - The core setters take wake(4, ne) = Tf as an optional fourth row. - Deck reader, Python reader and builder (viv_frame_tf), docs and CHANGELOG. Gates: - test_viv_wake_deck W6: a finite-EI taut cable towed at 0.15 m/s through still water, with Tf 10 s, locks in at A/D 0.588, 0.283 Hz. The same cable held in a 0.15 m/s current gives 0.585, 0.282 Hz. Without Tf the towed cable reaches A/D 0.042. On the held cable Tf changes A/D by 0.03 % on both cores, and the cores agree within 0.1 %. - test_viv_wake_deck W7: VIV FRAME refusals by name (malformed row, unknown or repeated type, negative Tf, a type without a wake oscillator). - test_viv_coupled: with a VIV FRAME the checkpoint blocks grow by the filtered velocity; the restarted run continues bit for bit, a rebuild without the VIV state does not, and a rewound step repeats. - Python reader, builder and native-parity cases for the section. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 10 ++ doc/capabilities.rst | 4 +- doc/driver_format.md | 37 ++++++- doc/theory.rst | 21 +++- python/cabledyn/builder.py | 26 +++++ python/cabledyn/deck_file.py | 42 +++++++ python/tests/test_builder.py | 20 ++++ python/tests/test_deck_file.py | 34 ++++++ python/tests/test_end_to_end.py | 22 ++++ src/CableDyn_DeckDriver.f90 | 104 ++++++++++++++--- src/CableDyn_HermiteCableDynamic.f90 | 100 +++++++++++++---- src/CableDyn_Model.f90 | 68 +++++++++--- src/CableDyn_OpenFAST_HermiteFMF.f90 | 10 +- tests/test_viv_coupled.f90 | 31 +++++- tests/test_viv_wake_deck.f90 | 160 +++++++++++++++++++++++++-- 15 files changed, 615 insertions(+), 74 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 530f4aac..4b20c3dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,6 +108,16 @@ All notable changes to CableDyn are recorded in this file. The format follows with its source, its test data and the line-type columns it maps to, and Thorsen et al.'s excitation curve as a `VIV AMPLITUDE` table. +- Wake oscillator for moving cables: an optional `VIV FRAME` section, rows `TypeName Tf`, takes + the free stream of a line type's VIV model relative to the cable's velocity low-pass filtered + over `Tf` [s] (first order). The wake frequency then follows a cable towed or moved by its + floater through still water, which the ambient flow alone never made shed. A taut cable towed + at 0.15 m/s with `Tf` 10 s locks in as the cable held in a 0.15 m/s current (A/D within + 0.6 %); on a held cable `Tf` changes A/D by 0.03 %. On `EI = 0` lines and finite-EI cables, + the filtered velocity in the step-recovery, snapshot and checkpoint state; `Tf` 0 or no row + leaves runs unchanged to the bit. The Python deck reader and builder (`viv_frame_tf`) take the + section. + ### Fixed - The statics of a finite-EI line through the free surface could fail at isolated currents: diff --git a/doc/capabilities.rst b/doc/capabilities.rst index fd73d2a6..b66ba3e6 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -159,7 +159,9 @@ 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, - on ``EI = 0`` lines and 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; a + ``VIV FRAME`` row (``Tf``) takes its frequency from the flow relative to the cable's + filtered motion (a towed or floater-driven cable) (:ref:`theory-viv-wake`), its state in the checkpoint * - Amplitude-dependent VIV coefficients (``VIV AMPLITUDE`` section ``AD``, ``Cv``, ``CdAmp``) - Standalone and coupled diff --git a/doc/driver_format.md b/doc/driver_format.md index 7d5502d7..1867df78 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -134,7 +134,7 @@ exist. A conventional layout is: LINE TYPES → BODIES → EXTERNAL LOADS → ROD TYPES → RODS → POINTS → TURBINES → LINES → SYROPE IC → SECTIONS → END CONNECTIONS / EQUIVALENT BUOYANCY / ATTACHMENTS / STIFFENERS / VIV / WAKE OSCILLATOR / -VIV AMPLITUDE / VIV DIAMETER / VIV DAMPING / FAILURE / CONTROL → OPTIONS → OUTPUTS +VIV AMPLITUDE / VIV DIAMETER / VIV DAMPING / VIV FRAME / FAILURE / CONTROL → OPTIONS → OUTPUTS Within LINE TYPES, the header row must precede the data rows because it selects their column order. @@ -215,6 +215,7 @@ are collapsed. It must match one of the spellings below; any other name fails wi | VIV AMPLITUDE | `VIV AMPLITUDE`, `VIV AMPLITUDES` | | VIV DIAMETER | `VIV DIAMETER`, `VIV DIAMETERS` | | VIV DAMPING | `VIV DAMPING` | +| VIV FRAME | `VIV FRAME`, `VIV FRAMES` | | FAILURE | `FAILURE`, `FAILURES` | | CONTROL | `CONTROL`, `CONTROLS` | | TURBINES | `TURBINES`, `TURBINE` | @@ -1355,6 +1356,40 @@ Behaviour: finite-EI cables, standalone and coupled. A row fails if it is not `TypeName Dviv`, names an undefined or already named type or one without VIV, or holds a value out of range. +### VIV FRAME (optional) + +The flow frame of the VIV model of a line type: the flow the model takes as its free stream, the +ambient flow by default. A cable moved through the water by a tow or by its floater sees no +ambient flow, so its wake oscillator never shed; with a filter time `Tf` the free stream is the +ambient flow relative to the cable's own slow motion (see [Wake oscillator](theory.rst)). + +```text +--------------------- VIV FRAME ---------------------------------------- +TypeName Tf +(-) (s) +cable 10 +``` + +| Column | Meaning | +|--------|---------| +| `TypeName` | an existing LINE TYPES name (case-insensitive) with a WAKE OSCILLATOR row, at most one row each | +| `Tf` | filter time >= 0 [s], at most 1e15; `0` is the ambient flow | + +Behaviour: + +- With `Tf > 0` the wake frequency `2 pi St U_a/D` takes `U_a` = the speed normal to the line of + the ambient flow less the node's velocity low-pass filtered over `Tf` (first order, started at + the node's initial velocity). The slow motion then counts as flow; the cable's own VIV + velocity, much faster than `Tf`, does not modulate the frequency. +- Take `Tf` several VIV periods long and short against the motion. A taut cable towed at 0.15 m/s + through still water (VIV at 0.28 Hz) with `Tf` 10 s locks in as the same cable held in a + 0.15 m/s current, A/D within 0.6 % and frequency within 0.001 Hz, where the ambient flow gave it + no lock-in. On a held cable in a current `Tf` changes A/D by 0.03 %. +- The filtered velocity is part of the step-recovery, snapshot and checkpoint state. A row with + `Tf = 0` leaves the run exactly as without it. It acts on `EI = 0` lines and finite-EI cables, + standalone and coupled. A row fails if it is not `TypeName Tf`, names an undefined or already + named type or one without a WAKE OSCILLATOR row, or holds a value out of range. + ### VIV DAMPING (optional, finite-EI lines) Splits the normal Morison drag of a line type into an in-line and a cross-flow part in the frame diff --git a/doc/theory.rst b/doc/theory.rst index 27021286..401839d8 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1289,7 +1289,23 @@ mass): with :math:`U_a` the speed of the ambient flow (current and host field) normal to the line, the free stream of the paper, so that the cable's own cross-flow velocity does not modulate the wake frequency, and :math:`\ddot y` along the cross-flow axis :math:`\mathbf t\times\mathbf v_n/U` of -the synchronisation model. The lift per unit length acts across the relative normal flow +the synchronisation model. The ambient flow sets no frequency for a cable moved through still +water, which then never sheds; a ``VIV FRAME`` row with the filter time :math:`T_f > 0` takes +:math:`U_a` relative to the node's velocity low-pass filtered over :math:`T_f`, + +.. math:: + + U_a = \bigl|(\mathbf u - \bar{\mathbf v})_n\bigr|,\qquad + \bar{\mathbf v}_{n+1} = \bar{\mathbf v}_n + \bigl(1 - e^{-\delta t/T_f}\bigr) + (\mathbf v_{n+1} - \bar{\mathbf v}_n), + +the exact first-order filter of the converged end velocity held over the step, started at the +node's initial velocity. The slow motion (a tow, a floater's response) then counts as flow, and the +VIV velocity, far faster than :math:`T_f`, is filtered out. On a cable towed at 0.15 m/s through +still water (the taut cable of the deck gate, VIV at 0.28 Hz) :math:`T_f` 10 s gives the lock-in of +the cable held in a 0.15 m/s current to 0.6 % in A/D and 0.001 Hz, where the ambient flow gave no +lock-in; on the held cable it changes A/D by 0.03 %. :math:`\bar{\mathbf v}` is part of the wake +state. The lift per unit length acts across the relative normal flow :math:`\mathbf v_n` of speed :math:`U`, as the synchronisation lift does: .. math:: @@ -1318,7 +1334,8 @@ its exact position and velocity derivatives in the tangent at fixed :math:`q`. O 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 +the line's VIV state (with :math:`T_f`, :math:`\bar{\mathbf v}` the next three statistics, and three +more state rows on a finite-EI cable). :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. diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 53d184f1..7efb186c 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -229,6 +229,12 @@ class LineType: synchronisation lift, so ``cl`` stays ``None`` or 0, and acts on ``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_frame_tf : float | None + Optional flow frame of a type's VIV model, a ``VIV FRAME`` section row + ``Name Tf``: the filter time [s] of the cable velocity the model's free + stream is taken relative to (0: the ambient flow; set it for a cable + moved through the water by a tow or its floater). It sets the wake + oscillator's frequency, so it needs ``wake_cl0``. ``None`` writes no row. viv_amplitude : list of tuples | None Optional amplitude-dependent VIV coefficients of a type (Thorsen et al. 2016), the rows of a ``VIV AMPLITUDE`` section table ``Name AD Cv @@ -275,6 +281,7 @@ class LineType: wake_a: float | None = None viv_amplitude: list[tuple[float, ...]] | None = None viv_diameter: float | None = None + viv_frame_tf: float | None = None viv_damping: tuple[float, ...] | None = None @@ -1701,6 +1708,7 @@ def add_line_type( wake_a: float | None = None, viv_amplitude: list[tuple[float, ...]] | None = None, viv_diameter: float | None = None, + viv_frame_tf: float | None = None, viv_damping: tuple[float, ...] | None = None, ) -> LineType: """Add a ``LINE TYPES`` row; see :class:`LineType` for the fields. @@ -1744,6 +1752,7 @@ def add_line_type( wake_a, None if viv_amplitude is None else [tuple(row) for row in viv_amplitude], viv_diameter, + viv_frame_tf, None if viv_damping is None else tuple(viv_damping), ) self._line_types.append(item) @@ -2639,6 +2648,7 @@ def to_text(self, *, validate: bool = True) -> str: _emit(out, "WAKE OSCILLATOR", *self._wake_table()) _emit(out, "VIV AMPLITUDE", *self._viv_amp_table()) _emit(out, "VIV DIAMETER", *self._viv_diam_table()) + _emit(out, "VIV FRAME", *self._viv_frame_table()) _emit(out, "VIV DAMPING", *self._viv_damp_table()) _emit(out, "FAILURE", *self._failure_table()) _emit(out, "CONTROL", *self._control_table()) @@ -3086,6 +3096,19 @@ def _viv_diam_table(self) -> tuple[str, str, list[list[str]]]: rows.append([_text(item.name, what), _num(item.viv_diameter, what)]) return "Name Dviv", "(-) (m)", rows + def _viv_frame_table(self) -> tuple[str, str, list[list[str]]]: + rows: list[list[str]] = [] + for item in self._line_types: + if item.viv_frame_tf is None: + continue + what = f"line type {item.name!r}" + if item.wake_cl0 is None: + raise ValueError( + f"{what}: viv_frame_tf sets the frame of its wake oscillator, set wake_cl0" + ) + rows.append([_text(item.name, what), _num(item.viv_frame_tf, what)]) + return "Name Tf", "(-) (s)", rows + def _syrope_table(self) -> tuple[str, str, list[list[str]]]: rows = [ [_line_list(row.lines), _num(row.tmax0, "SYROPE IC"), _num(row.tmean0, "SYROPE IC")] @@ -3309,6 +3332,9 @@ def load(self) -> None: for row in self.rows("VIV DIAMETER"): t = row.tokens model.line_types[t[0]].viv_diameter = _f(t[1]) + for row in self.rows("VIV FRAME"): + t = row.tokens + model.line_types[t[0]].viv_frame_tf = _f(t[1]) for row in self.rows("ATTACHMENTS"): t = row.tokens arc: float | tuple[float, float, float] diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index e337f949..48a258e1 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -87,6 +87,8 @@ "VIV DIAMETER": "VIV DIAMETER", "VIV DIAMETERS": "VIV DIAMETER", "VIV DAMPING": "VIV DAMPING", + "VIV FRAME": "VIV FRAME", + "VIV FRAMES": "VIV FRAME", } # Table sections whose rows the native reader takes through a Fortran # list-directed READ. Their descriptive and units rows are recognized by the @@ -120,6 +122,7 @@ "VIV AMPLITUDE", "VIV DIAMETER", "VIV DAMPING", + "VIV FRAME", } ) _TABLE_SECTIONS = _LIST_DIRECTED_SECTIONS | _WHITESPACE_TABLE_SECTIONS @@ -3384,6 +3387,44 @@ def _check_viv_diam_section(self, viv_type_names: set[str]) -> None: "VIV: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row" ) + def _check_viv_frame_section(self, wake_type_names: set[str]) -> None: + """Native ``apply_type_viv_frame`` for the VIV FRAME section. + + A row ``TypeName Tf`` sets the flow frame of a line type's VIV model: with the filter + time ``Tf > 0`` [s] the free stream is the ambient flow relative to the cable's velocity + low-pass filtered over ``Tf`` (0: the ambient flow), at most 1e15. It sets the wake + oscillator's frequency, so the type needs a WAKE OSCILLATOR row with ``CL0 > 0``; a type + takes one row. + """ + types = {row.tokens[0].lower(): row.tokens[0] for row in self.line_types} + named: set[str] = set() + for row in self._rows("VIV FRAME"): + where = self._at(row) + if len(row.tokens) != 2: + raise DeckFormatError(f"{where}: VIV FRAME rows must be: TypeName Tf") + name = row.tokens[0].lower() + if name not in types: + raise DeckFormatError( + f'{where}: VIV FRAME row names undefined LINE TYPE "{row.tokens[0]}"' + ) + if name in named: + raise DeckFormatError(f'{where}: VIV FRAME names LINE TYPE "{types[name]}" twice') + named.add(name) + try: + value = _native_float(row.tokens[1]) + except ValueError as exc: + raise DeckFormatError(f"{where}: VIV FRAME Tf must be a plain number") from exc + if not (math.isfinite(value) and 0.0 <= value <= _NATIVE_MAX_COEFFICIENT): + raise DeckFormatError( + f"{where}: VIV FRAME filter time Tf must be >= 0 (0 = the ambient flow), " + "at most 1e15" + ) + if name not in wake_type_names: + raise DeckFormatError( + f'{where}: VIV FRAME of LINE TYPE "{types[name]}" sets the flow frame of its ' + "wake oscillator: give the type a WAKE OSCILLATOR row" + ) + def _check_viv_damp_section(self, amp_type_names: set[str]) -> set[str]: """Native ``apply_type_viv_damp`` for the VIV DAMPING section; the types it names. @@ -4783,6 +4824,7 @@ def end_key(token: str) -> str: wake_type_names = self._check_wake_section(viv_type_names) amp_type_names = self._check_viv_amp_section(viv_type_names) self._check_viv_diam_section(viv_type_names | wake_type_names) + self._check_viv_frame_section(wake_type_names) damp_type_names = self._check_viv_damp_section(amp_type_names) amp_lines = { line_id diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index 99e82805..556cbf3e 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -281,6 +281,26 @@ def test_viv_amplitude_rows_are_written_with_the_values_given(tmp_path: Path) -> model.to_text(validate=False) +def test_viv_frame_rows_are_written(tmp_path: Path) -> None: + model = _chain_model(tmp_path) + model.add_line_type( + "towed", + diam=0.1, + mass=10.0, + ea=5.0e7, + ei=1.0, + cdn=1.2, + can=1.0, + wake_cl0=0.3, + viv_frame_tf=8.0, + ) + deck = DeckFile.from_text(model.to_text(validate=False), path=tmp_path / "deck.dat") + assert [row.tokens for row in deck._rows("VIV FRAME")] == [("towed", "8.0")] + model.add_line_type("plain", diam=0.1, mass=10.0, ea=5.0e7, viv_frame_tf=8.0) + with pytest.raises(ValueError, match="set wake_cl0"): + model.to_text(validate=False) + + def test_viv_diameter_rows_are_written(tmp_path: Path) -> None: model = _chain_model(tmp_path) model.add_line_type( diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index f06061e5..3e62ec3d 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -4991,6 +4991,40 @@ def test_viv_diameter_takes_a_wake_oscillator_type(): DeckFile.from_text(_with_section(text, "VIV DIAMETER", "chain 0.9")) +def test_viv_frame_rows_are_read_and_kept(tmp_path): + from cabledyn import DeckModel + + text = _with_section( + _with_section(_DYNAMIC, "WAKE OSCILLATOR", "chain 0.3"), + "VIV FRAME", + "TypeName Tf", + "chain 8", + ) + DeckFile.from_text(text) + path = tmp_path / "frame.dat" + path.write_text(text, encoding="utf-8") + assert DeckModel.load(path).line_types["chain"].viv_frame_tf == 8.0 + saved = tmp_path / "saved.dat" + DeckModel.load(path).save(saved) + assert DeckModel.load(saved).line_types["chain"].viv_frame_tf == 8.0 + + +@pytest.mark.parametrize( + "wake, rows, message", + [ + (True, ("chain 8 1",), "rows must be: TypeName Tf"), + (True, ("cable 8",), 'undefined LINE TYPE "cable"'), + (True, ("chain 8", "chain 4"), 'names LINE TYPE "chain" twice'), + (True, ("chain -1",), "filter time Tf must be >= 0"), + (False, ("chain 8",), "give the type a WAKE OSCILLATOR row"), + ], +) +def test_viv_frame_rows_follow_the_native_checks(wake, rows, message): + text = _with_section(_DYNAMIC, "WAKE OSCILLATOR", "chain 0.3") if wake else _DYNAMIC + with pytest.raises(DeckFormatError, match=re.escape(message)): + DeckFile.from_text(_with_section(text, "VIV FRAME", *rows)) + + _DAMP_BASE = _with_section( _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")), "VIV AMPLITUDE", diff --git a/python/tests/test_end_to_end.py b/python/tests/test_end_to_end.py index fd3c2bd8..91c96996 100644 --- a/python/tests/test_end_to_end.py +++ b/python/tests/test_end_to_end.py @@ -345,6 +345,28 @@ def _dia_rows(*rows: str) -> tuple[str, str]: _AMP_PARITY += _DIA_PARITY +def _frame_rows(*rows: str) -> tuple[str, str]: + """The edit that puts a VIV FRAME section with ``rows`` before OPTIONS.""" + block = "--------------------- VIV FRAME -----\n" + "".join(f"{row}\n" for row in rows) + return _AMP_OPTIONS, block + _AMP_OPTIONS + + +_WAKE_RISER = ("riser 0.85 0.15", "riser 0.3") +_FRAME_PARITY = [ + ("frame-accepted", [_WAKE_LIFT, _WAKE_SECTION, _WAKE_RISER, _frame_rows("riser 8")], True), + ("frame-zero", [_WAKE_LIFT, _WAKE_SECTION, _WAKE_RISER, _frame_rows("riser 0")], True), + ("frame-negative", [_WAKE_LIFT, _WAKE_SECTION, _WAKE_RISER, _frame_rows("riser -1")], False), + ( + "frame-three-columns", + [_WAKE_LIFT, _WAKE_SECTION, _WAKE_RISER, _frame_rows("riser 8 1")], + False, + ), + ("frame-sync-type", [_frame_rows("riser 8")], False), +] + +_AMP_PARITY += _FRAME_PARITY + + def _damp_rows(*rows: str) -> tuple[str, str]: """The edit that puts a VIV DAMPING section with ``rows`` before OPTIONS.""" block = "--------------------- VIV DAMPING -----\n" + "".join(f"{row}\n" for row in rows) diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 7814c4e7..17ce2b7d 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -462,6 +462,11 @@ MODULE CableDyn_DeckDriver ! has_wake_row marks a type the section names. REAL(wp) :: wo_cl0 = CD_ZERO, wo_st = CD_VIV_WAKE_DEFAULT_ST, wo_eps = CD_VIV_WAKE_DEFAULT_EPS REAL(wp) :: wo_a = CD_VIV_WAKE_DEFAULT_A + ! The VIV frame of a line type (the optional VIV FRAME section, a row per type: TypeName Tf): + ! the filter time Tf [s] of the cable velocity that the VIV model's flow frame moves with + ! (0: the ambient flow); has_vivf_row marks a type the section names. + REAL(wp) :: viv_tf = CD_ZERO + LOGICAL :: has_vivf_row = .FALSE. LOGICAL :: has_wake_row = .FALSE. ! Amplitude-dependent VIV coefficients (the optional VIV AMPLITUDE section, rows TypeName AD Cv ! [CdAmp]): amp_n rows of (A/D, C_v, drag factor) in amp_tab, A/D increasing; amp_cols the @@ -1917,7 +1922,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:), viv_hh(:) REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :), viv_dva(:), cdy_a(:), cdy_b(:), cdy_c(:) INTEGER, ALLOCATABLE :: viv_ampn(:) - REAL(wp), ALLOCATABLE :: wo_cl0(:), wo_st(:), wo_eps(:), wo_a(:) + REAL(wp), ALLOCATABLE :: wo_cl0(:), wo_st(:), wo_eps(:), wo_a(:), wo_tf(:) REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:) REAL(wp) :: mode1_omega REAL(wp), ALLOCATABLE :: contact_kn(:), contact_cn(:) @@ -3316,8 +3321,8 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, ALLOCATE (viv_cl(SIZE(l0)), viv_cf(SIZE(l0)), viv_df(SIZE(l0)), viv_clx(SIZE(l0)), viv_al(SIZE(l0)), & viv_hh(SIZE(l0))) CALL finite_viv_arrays(ln, sections, types, viv_cl, viv_cf, viv_df, viv_clx, viv_al, viv_hh) - ALLOCATE (wo_cl0(SIZE(l0)), wo_st(SIZE(l0)), wo_eps(SIZE(l0)), wo_a(SIZE(l0))) - CALL finite_wake_arrays(ln, sections, types, wo_cl0, wo_st, wo_eps, wo_a) + ALLOCATE (wo_cl0(SIZE(l0)), wo_st(SIZE(l0)), wo_eps(SIZE(l0)), wo_a(SIZE(l0)), wo_tf(SIZE(l0))) + CALL finite_wake_arrays(ln, sections, types, wo_cl0, wo_st, wo_eps, wo_a, wo_tf) ALLOCATE (viv_tix(SIZE(l0))) CALL viv_amp_type_index(ln, sections, types, viv_tix) ALLOCATE (viv_dva(SIZE(l0))) @@ -3334,6 +3339,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL remap_elem_by_reference_arc(wo_st, l0, l0_am) CALL remap_elem_by_reference_arc(wo_eps, l0, l0_am) CALL remap_elem_by_reference_arc(wo_a, l0, l0_am) + CALL remap_elem_by_reference_arc(wo_tf, l0, l0_am) CALL remap_elem_by_reference_arc(viv_cl, l0, l0_am) CALL remap_elem_by_reference_arc(viv_cf, l0, l0_am) CALL remap_elem_by_reference_arc(viv_df, l0, l0_am) @@ -3712,7 +3718,8 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(CD_VIV_NM, wp)*MERGE(opts%dtM, dt, opts%has_dtm), & opts%viv_rms_window > CD_ZERO), es, em, phase_seed=seed, & tangent_reversed=.NOT. ln%ends_swapped, & - wake=RESHAPE([wo_st, wo_eps, wo_a], [3, SIZE(wo_st)], ORDER=[2, 1]), & + wake=RESHAPE([wo_st, wo_eps, wo_a, wo_tf], [4, SIZE(wo_st)], & + ORDER=[2, 1]), & dviv=viv_dva) ELSE IF (ANY(viv_clx > CD_ZERO)) THEN CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, viv_cl, viv_cf, viv_df, & @@ -10449,7 +10456,7 @@ 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) + ! the WAKE OSCILLATOR rows per element (C_L0, St, eps, A, Tf; C_L0 0 where none) REAL(wp), ALLOCATABLE :: viv_wo(:, :) INTEGER, ALLOCATABLE :: viv_ampn(:) LOGICAL, ALLOCATABLE :: syr_el(:) @@ -10491,7 +10498,7 @@ 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_wo(4, SIZE(l0))) + viv_tix(SIZE(l0)), viv_dia(SIZE(l0)), viv_wo(5, SIZE(l0))) viv_tix = CD_ZERO viv_wo = CD_ZERO viv_dia = CD_ZERO @@ -10561,7 +10568,8 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er 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] + types(line_section_type(sections, ln%id, i))%wo_a, & + types(line_section_type(sections, ln%id, i))%viv_tf] 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 '// & @@ -10892,7 +10900,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er 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, :)) + phase_seed=seed, tangent_reversed=.NOT. ln%ends_swapped, wake=viv_wo(2:5, :)) 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, & @@ -11740,13 +11748,13 @@ SUBROUTINE finite_viv_arrays(ln, sections, types, cl, cf, df, clx, il_alpha, chh chh = chh(SIZE(chh):1:-1) END SUBROUTINE finite_viv_arrays - SUBROUTINE finite_wake_arrays(ln, sections, types, cl0, st, eps, a) - !! Expand the WAKE OSCILLATOR rows (CL0, St, eps, A) to finite-EI element arrays, in the + SUBROUTINE finite_wake_arrays(ln, sections, types, cl0, st, eps, a, tf) + !! Expand the WAKE OSCILLATOR rows (CL0, St, eps, A, Tf) to finite-EI element arrays, in the !! element order of finite_hydro_arrays. TYPE(DeckLine), INTENT(IN) :: ln TYPE(DeckSection), INTENT(IN) :: sections(:) TYPE(DeckLineType), INTENT(IN) :: types(:) - REAL(wp), INTENT(OUT) :: cl0(:), st(:), eps(:), a(:) + REAL(wp), INTENT(OUT) :: cl0(:), st(:), eps(:), a(:), tf(:) INTEGER :: i, j, e, tidx e = 0 @@ -11759,12 +11767,14 @@ SUBROUTINE finite_wake_arrays(ln, sections, types, cl0, st, eps, a) st(e) = types(tidx)%wo_st eps(e) = types(tidx)%wo_eps a(e) = types(tidx)%wo_a + tf(e) = types(tidx)%viv_tf END DO END DO cl0 = cl0(SIZE(cl0):1:-1) st = st(SIZE(st):1:-1) eps = eps(SIZE(eps):1:-1) a = a(SIZE(a):1:-1) + tf = tf(SIZE(tf):1:-1) END SUBROUTINE finite_wake_arrays SUBROUTINE viv_amp_type_index(ln, sections, types, tix) @@ -13993,6 +14003,9 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti INTEGER :: n_vdmp INTEGER, ALLOCATABLE :: vdia_lines(:) INTEGER :: n_vdia + CHARACTER(DECK_RECLEN), ALLOCATABLE :: vfrm_rows(:) + INTEGER, ALLOCATABLE :: vfrm_lines(:) + INTEGER :: n_vfrm CHARACTER(2*NAMELEN), ALLOCATABLE :: channel_keys(:) LOGICAL :: ext_march, types_stock_cols, rodtypes_legacy_cols, turb_ok, static_finite_ok, tors_marched INTEGER :: unit, ios, section, nt, nb, nrt, nr, np, nlin, nsec, neq, nch, nfl, nct, nec, lineno @@ -14011,7 +14024,7 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti SEC_EQUIV = 10, SEC_FAILURE = 11, SEC_CONTROL = 12, SEC_SYROPE_IC = 13, & SEC_ENDCONN = 14, SEC_TURBINES = 15, SEC_EXTLOADS = 16, SEC_ATTACH = 17, & SEC_STIFF = 18, SEC_VIV = 19, SEC_WAKE = 20, SEC_VIVAMP = 21, SEC_VIVDIA = 22, & - SEC_VIVDAMP = 23 + SEC_VIVDAMP = 23, SEC_VIVFRAME = 25 ErrStat = 0; ErrMsg = '' ext_march = .FALSE. @@ -14041,6 +14054,8 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti ALLOCATE (vdia_rows(0), vdia_lines(0)) ALLOCATE (vdmp_rows(0), vdmp_lines(0)) n_vdmp = 0 + ALLOCATE (vfrm_rows(0), vfrm_lines(0)) + n_vfrm = 0 n_vdia = 0 n_wake = 0 nt = 0; nb = 0; nrt = 0; nr = 0; np = 0; nlin = 0; nsec = 0; neq = 0; nch = 0; nfl = 0; nct = 0; nec = 0 @@ -14204,6 +14219,15 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti END IF vdmp_rows(n_vdmp) = line(1:MIN(LEN(line), DECK_RECLEN)) vdmp_lines(n_vdmp) = lineno + CASE (SEC_VIVFRAME) + IF (.NOT. has_numeric_token(line)) CYCLE + n_vfrm = n_vfrm + 1 + IF (n_vfrm > SIZE(vfrm_rows)) THEN + vfrm_rows = [vfrm_rows, [(REPEAT(' ', DECK_RECLEN), i_ch=1, 8)]] + vfrm_lines = [vfrm_lines, [(0, i_ch=1, 8)]] + END IF + vfrm_rows(n_vfrm) = line(1:MIN(LEN(line), DECK_RECLEN)) + vfrm_lines(n_vfrm) = lineno CASE (SEC_VIVDIA) IF (.NOT. has_numeric_token(line)) CYCLE n_vdia = n_vdia + 1 @@ -14345,6 +14369,13 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti RETURN END IF END DO + DO i_ch = 1, n_vfrm + CALL apply_type_viv_frame(vfrm_rows(i_ch), types, ErrStat, ErrMsg) + IF (ErrStat /= 0) THEN + CALL add_row_context('deck', vfrm_lines(i_ch), vfrm_rows(i_ch), ErrMsg) + RETURN + END IF + END DO DO i_ch = 1, SIZE(types) IF (types(i_ch)%amp_n == 1) THEN CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE gives LINE TYPE "'//TRIM(types(i_ch)%name)//'" one row: a '// & @@ -16026,6 +16057,8 @@ SUBROUTINE set_section(secname, section, ErrStat, ErrMsg) section = 22 CASE ('VIV DAMPING') section = 23 + CASE ('VIV FRAME', 'VIV FRAMES') + section = 25 CASE ('WAKE OSCILLATOR', 'WAKE OSCILLATORS', 'WAKE') section = 20 CASE DEFAULT @@ -17632,7 +17665,7 @@ SUBROUTINE apply_type_wake(row, types, ErrStat, ErrMsg) !! type (Facchinetti et al. 2004; the defaults St 0.2, eps 0.3, A 12 are theirs): the reference !! lift coefficient C_L0 >= 0 (0 = off; the lift of a fixed cylinder is C_L0 U^2 rho D/2), the !! Strouhal number St > 0 of the wake frequency 2 pi St U/D, the van der Pol eps > 0 and the - !! acceleration coupling A >= 0. The wake oscillator replaces the synchronisation model, so the + !! acceleration coupling A >= 0 (U: the flow of the type's VIV FRAME, the ambient flow without one). The wake oscillator replaces the synchronisation model, so the !! type takes no LINE TYPES lift Cl (and so no in-line VIV, which needs it). A type takes one !! row. CHARACTER(*), INTENT(IN) :: row @@ -17847,6 +17880,51 @@ SUBROUTINE apply_type_viv_diam(row, types, ErrStat, ErrMsg) types(it)%has_vivd_row = .TRUE. END SUBROUTINE apply_type_viv_diam + SUBROUTINE apply_type_viv_frame(row, types, ErrStat, ErrMsg) + !! One VIV FRAME row: TypeName Tf -- the flow frame of a line type's VIV model: with the filter + !! time Tf > 0 [s] (at most 1e15) the flow the model takes as the free stream is the ambient + !! flow relative to the cable's velocity low-pass filtered over Tf (first order), so that a + !! cable moved through the water by a tow or its floater sees that motion as flow, and its own + !! VIV velocity, much faster than Tf, does not count; Tf 0 is the ambient flow. It sets the + !! wake oscillator's frequency; the type needs a WAKE OSCILLATOR row. A type takes one row. + CHARACTER(*), INTENT(IN) :: row + TYPE(DeckLineType), INTENT(INOUT) :: types(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + CHARACTER(DECK_RECLEN) :: tok + INTEGER :: it + REAL(wp) :: v + LOGICAL :: found, ok + + ErrStat = 0; ErrMsg = '' + IF (count_tokens(row) /= 2) THEN + CALL fail(ErrStat, ErrMsg, 'VIV FRAME rows must be: TypeName Tf'); RETURN + END IF + CALL get_token(row, 1, tok, found) + it = find_type(types, TRIM(tok)) + IF (it == 0) THEN + CALL fail(ErrStat, ErrMsg, 'VIV FRAME row names undefined LINE TYPE "'//TRIM(tok)//'"'); RETURN + END IF + IF (types(it)%has_vivf_row) THEN + CALL fail(ErrStat, ErrMsg, 'VIV FRAME names LINE TYPE "'//TRIM(types(it)%name)//'" twice'); RETURN + END IF + CALL get_token(row, 2, tok, found) + CALL parse_real_token(tok, v, ok) + IF (.NOT. ok) THEN + CALL fail(ErrStat, ErrMsg, 'VIV FRAME Tf must be a plain number'); RETURN + END IF + IF (.NOT. (IEEE_IS_FINITE(v) .AND. v >= CD_ZERO .AND. v <= MAX_COEFFICIENT)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV FRAME filter time Tf must be >= 0 (0 = the ambient flow), at most 1e15') + RETURN + END IF + IF (.NOT. (types(it)%wo_cl0 > CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV FRAME of LINE TYPE "'//TRIM(types(it)%name)//'" sets the flow frame of '// & + 'its wake oscillator: give the type a WAKE OSCILLATOR row'); RETURN + END IF + types(it)%viv_tf = v + types(it)%has_vivf_row = .TRUE. + END SUBROUTINE apply_type_viv_frame + SUBROUTINE append_line_stiffener(row, lines, ErrStat, ErrMsg) !! One STIFFENERS row: LineID End Length RootOD TipOD InnerD E Density -- a conical segment of !! the bend stiffener sleeving End A or End B of a finite-EI line. The rows of one line end diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 80583451..fb7b558b 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -358,9 +358,14 @@ MODULE CableDyn_HermiteCableDynamic ! van der Pol eps and coupling A (length-weighted over its lifting elements), the state ! wo_s(:, k) = (q, dq/dt), q at the step's evaluation point (wo_q_eval, as viv_phi_eval), the ! step-start cross-flow acceleration and wake frequency (wo_ydd0, wo_om0) the step end - ! integrates from, and the recovery and snapshot copies of the state. - LOGICAL :: viv_wake = .FALSE. + ! integrates from, and the recovery and snapshot copies of the state. With a filter time + ! wo_tf(k) > 0 on some node (wo_filter) wo_s has three more rows, the node's velocity + ! low-pass filtered over wo_tf (first order), and the wake frequency takes the flow normal to + ! the line relative to it: a cable moved through still water sheds, the cable's own VIV + ! velocity (much faster than wo_tf) does not modulate it. + LOGICAL :: viv_wake = .FALSE., wo_filter = .FALSE. REAL(wp), ALLOCATABLE :: wo_st(:), wo_eps(:), wo_a(:), wo_s(:, :), wo_q_eval(:), wo_ydd0(:), wo_om0(:) + REAL(wp), ALLOCATABLE :: wo_tf(:) REAL(wp), ALLOCATABLE :: ws_recovery_wo_s(:, :), snap_wo_s(:, :) ! Amplitude-dependent VIV coefficients (Set_VIV amp, amp_n; VIV AMPLITUDE section): per element ! a table of viv_amp_n rows (A/D, C_v, drag factor) in viv_amp(:, 1:n, e). With it viv_ms carries @@ -1174,7 +1179,9 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! df unused. The lift per unit length is 1/4 rho D C_L0 q U^2 along the cross-flow axis, with !! q'' + eps om (q^2 - 1) q' + om^2 q = (A/D) y'' at each lifting node (om = 2 pi St U/D, y'' !! its cross-flow acceleration); q starts on its limit cycle at the phase seed, q = 2 cos(phi_0) - !! and q' = 0. + !! and q' = 0. U is the ambient flow normal to the line; an optional fourth row wake(4, e) = Tf + !! [s] > 0 takes U relative to the node velocity low-pass filtered over Tf (first order), for + !! a cable moved through the water (0: the ambient flow). !! !! Amplitude-dependent coefficients (both or neither; not with the wake oscillator): amp (3, !! CD_VIV_AMP_MAXP, ne) and amp_n (ne), per element a table of amp_n rows (0: none; only where @@ -1209,7 +1216,8 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err INTEGER, INTENT(IN), OPTIONAL :: amp_n(:) REAL(wp), INTENT(IN), OPTIONAL :: dviv(:) REAL(wp), INTENT(IN), OPTIONAL :: cdy(:, :) - INTEGER :: e, k, ne, nn, es, nms + INTEGER :: e, k, ne, nn, es, nms, nw + LOGICAL :: had_filter REAL(wp) :: wsum, tw_old, rest_old LOGICAL :: had_viv, had_il, want_il, had_wake, want_wake, bad_band, had_amp, want_amp CHARACTER(LEN=1024) :: em @@ -1223,7 +1231,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err x_ms_next(:, :), x_rec_phi(:), x_rec_ms(:, :), x_snap_phi(:), x_snap_ms(:, :), & x_hcx(:), x_hk(:) REAL(wp), ALLOCATABLE :: w_st(:), w_eps(:), w_a(:), w_s(:, :), w_qe(:), w_y0(:), w_om(:), w_rec(:, :), & - w_snap(:, :) + w_snap(:, :), w_tf(:) LOGICAL, ALLOCATABLE :: o_node(:), x_node(:) ErrStat = CD_HCDYN_OK; ErrMsg = '' @@ -1242,13 +1250,22 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err END IF want_wake = PRESENT(wake) IF (want_wake) THEN - IF (SIZE(wake, 1) /= 3 .OR. SIZE(wake, 2) /= ne) THEN + IF ((SIZE(wake, 1) /= 3 .AND. SIZE(wake, 1) /= 4) .OR. SIZE(wake, 2) /= ne) THEN ErrStat = CD_HCDYN_BADINPUT - ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: wake must be shaped (3, ne): St, eps, A per element'; RETURN + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: wake must be shaped (3 or 4, ne): St, eps, A[, Tf] per element' + RETURN END IF - IF (.NOT. CD_All_Finite(RESHAPE(wake, [3*ne]))) THEN + IF (.NOT. CD_All_Finite(RESHAPE(wake, [SIZE(wake)]))) THEN ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: wake must be finite'; RETURN END IF + IF (SIZE(wake, 1) == 4) THEN + IF (ANY(wake(4, :) < CD_ZERO) .OR. ANY(wake(4, :) > 1.0e15_wp)) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the wake filter time Tf must be >= 0 (0 = the ambient flow) and '// & + 'at most 1e15' + RETURN + END IF + END IF IF (ANY(cl > CD_ZERO .AND. .NOT. (wake(1, :) > CD_ZERO .AND. wake(2, :) > CD_ZERO .AND. & wake(3, :) >= CD_ZERO))) THEN ErrStat = CD_HCDYN_BADINPUT @@ -1387,6 +1404,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err had_viv = model%has_viv had_il = model%has_viv_il had_wake = model%viv_wake + had_filter = model%wo_filter had_amp = model%has_viv_amp tw_old = model%viv_tw rest_old = model%viv_phi_rest @@ -1483,8 +1501,25 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err model%has_viv_il = .TRUE. END IF IF (want_wake) THEN - ALLOCATE (model%wo_st(nn), model%wo_eps(nn), model%wo_a(nn), model%wo_s(2, nn), model%wo_q_eval(nn), & - model%wo_ydd0(nn), model%wo_om0(nn), model%ws_recovery_wo_s(2, nn), model%snap_wo_s(2, nn)) + ! the filter time per node, length-weighted over its lifting elements like St, eps and A + ALLOCATE (model%wo_tf(nn)) + model%wo_tf = CD_ZERO + IF (SIZE(wake, 1) == 4) THEN + DO k = 1, nn + IF (.NOT. model%viv_node(k)) CYCLE + wsum = CD_ZERO + DO e = MAX(1, k - 1), MIN(ne, k) + IF (.NOT. (cl(e) > CD_ZERO)) CYCLE + wsum = wsum + model%l0(e) + model%wo_tf(k) = model%wo_tf(k) + model%l0(e)*wake(4, e) + END DO + model%wo_tf(k) = model%wo_tf(k)/wsum + END DO + END IF + model%wo_filter = ANY(model%wo_tf > CD_ZERO) + nw = MERGE(5, 2, model%wo_filter) + ALLOCATE (model%wo_st(nn), model%wo_eps(nn), model%wo_a(nn), model%wo_s(nw, nn), model%wo_q_eval(nn), & + model%wo_ydd0(nn), model%wo_om0(nn), model%ws_recovery_wo_s(nw, nn), model%snap_wo_s(nw, nn)) ! the lift scale 1/2 rho D viv_cl is then 1/4 rho D C_L0, the lift 1/4 rho D C_L0 q U^2 model%viv_cl = 0.5_wp*cl model%wo_st = CD_ZERO @@ -1506,6 +1541,8 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err model%wo_a(k) = model%wo_a(k)/wsum ! on the limit cycle at the node's phase seed model%wo_s(1, k) = 2.0_wp*COS(model%viv_phi(k)) + ! the filtered velocity starts at the node's velocity + IF (model%wo_filter) model%wo_s(3:5, k) = model%v(6*(k - 1) + 1:6*(k - 1) + 3) END DO model%wo_q_eval = model%wo_s(1, :) model%wo_ydd0 = CD_ZERO @@ -1538,6 +1575,7 @@ SUBROUTINE refresh_acceleration() model%has_viv = had_viv model%has_viv_il = had_il model%viv_wake = had_wake + model%wo_filter = had_filter model%has_viv_amp = had_amp model%viv_tw = tw_old model%viv_phi_rest = rest_old @@ -1570,7 +1608,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(w_a, model%wo_a); CALL MOVE_ALLOC(w_s, model%wo_s) CALL MOVE_ALLOC(w_qe, model%wo_q_eval); CALL MOVE_ALLOC(w_y0, model%wo_ydd0) CALL MOVE_ALLOC(w_om, model%wo_om0); CALL MOVE_ALLOC(w_rec, model%ws_recovery_wo_s) - CALL MOVE_ALLOC(w_snap, model%snap_wo_s) + CALL MOVE_ALLOC(w_snap, model%snap_wo_s); CALL MOVE_ALLOC(w_tf, model%wo_tf) CALL MOVE_ALLOC(p_amp, model%viv_amp); CALL MOVE_ALLOC(p_ampn, model%viv_amp_n) CALL MOVE_ALLOC(p_dv, model%viv_dv) CALL MOVE_ALLOC(p_cdy, model%viv_cdy) @@ -1595,7 +1633,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(model%wo_a, w_a); CALL MOVE_ALLOC(model%wo_s, w_s) CALL MOVE_ALLOC(model%wo_q_eval, w_qe); CALL MOVE_ALLOC(model%wo_ydd0, w_y0) CALL MOVE_ALLOC(model%wo_om0, w_om); CALL MOVE_ALLOC(model%ws_recovery_wo_s, w_rec) - CALL MOVE_ALLOC(model%snap_wo_s, w_snap) + CALL MOVE_ALLOC(model%snap_wo_s, w_snap); CALL MOVE_ALLOC(model%wo_tf, w_tf) CALL MOVE_ALLOC(model%viv_amp, p_amp); CALL MOVE_ALLOC(model%viv_amp_n, p_ampn) CALL MOVE_ALLOC(model%viv_dv, p_dv) CALL MOVE_ALLOC(model%viv_cdy, p_cdy) @@ -1619,6 +1657,8 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%vhh_k)) DEALLOCATE (model%vhh_cx, model%vhh_k) IF (ALLOCATED(model%wo_s)) DEALLOCATE (model%wo_st, model%wo_eps, model%wo_a, model%wo_s, model%wo_q_eval, & model%wo_ydd0, model%wo_om0, model%ws_recovery_wo_s, model%snap_wo_s) + IF (ALLOCATED(model%wo_tf)) DEALLOCATE (model%wo_tf) + model%wo_filter = .FALSE. IF (ALLOCATED(model%viv_amp)) DEALLOCATE (model%viv_amp) IF (ALLOCATED(model%viv_amp_n)) DEALLOCATE (model%viv_amp_n) IF (ALLOCATED(model%viv_dv)) DEALLOCATE (model%viv_dv) @@ -1747,16 +1787,19 @@ REAL(wp) FUNCTION viv_node_ambient_yd(model, k) RESULT(yd) yd = CD_VIV_Ambient_Crossflow_Rate(model%q(i0 + 4:i0 + 6), model%v(i0 + 1:i0 + 3), uu) END FUNCTION viv_node_ambient_yd - REAL(wp) FUNCTION viv_node_ambient_speed(model, k) RESULT(ua) + REAL(wp) FUNCTION viv_node_ambient_speed(model, k, vslow) RESULT(ua) !! Speed of the ambient flow (current plus a held field) normal to node k's tangent (the slope - !! DOFs) at the committed state; 0 for a degenerate tangent. + !! DOFs) at the committed state, relative to the velocity vslow (optional; the node's filtered + !! velocity of the wake filter); 0 for a degenerate tangent. TYPE(CD_HermiteCableDynType), INTENT(IN) :: model INTEGER, INTENT(IN) :: k + REAL(wp), INTENT(IN), OPTIONAL :: vslow(3) REAL(wp) :: uu(3), t(3), un(3), speed INTEGER :: i0 i0 = 6*(k - 1) uu = model%current IF (model%has_held_field) uu = uu + model%hf_u(:, k) + IF (PRESENT(vslow)) uu = uu - vslow speed = NORM2(model%q(i0 + 4:i0 + 6)) ua = CD_ZERO IF (.NOT. (speed > CD_ZERO)) RETURN @@ -1816,10 +1859,20 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'VIV wake oscillator: degenerate node tangent'; RETURN END IF ! the wake frequency of the ambient flow normal to the line (the free stream of the - ! paper), not of the relative flow, which the cable's own cross-flow motion modulates - model%wo_om0(k) = CD_VIV_TWO_PI*model%wo_st(k)*viv_node_ambient_speed(model, k)/model%viv_dn(k) + ! paper), not of the relative flow, which the cable's own cross-flow motion modulates; with + ! the wake filter, of the flow relative to the node's slowly filtered motion + IF (model%wo_filter) THEN + IF (model%wo_tf(k) > CD_ZERO) THEN + model%wo_om0(k) = CD_VIV_TWO_PI*model%wo_st(k)*viv_node_ambient_speed(model, k, model%wo_s(3:5, k))/ & + model%viv_dn(k) + ELSE + model%wo_om0(k) = CD_VIV_TWO_PI*model%wo_st(k)*viv_node_ambient_speed(model, k)/model%viv_dn(k) + END IF + ELSE + model%wo_om0(k) = CD_VIV_TWO_PI*model%wo_st(k)*viv_node_ambient_speed(model, k)/model%viv_dn(k) + END IF model%wo_ydd0(k) = ydd - sw = model%wo_s(:, k) + sw = model%wo_s(1:2, k) CALL CD_VIV_Wake_Advance(sw, model%wo_om0(k), model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), ydd, ydd, & frac*dt) model%wo_q_eval(k) = sw(1) @@ -1876,15 +1929,22 @@ SUBROUTINE viv_step_end(model, dt) IF (.NOT. model%viv_node(k)) CYCLE CALL viv_node_motion(model, k, yd, ydd, un, ok) IF (.NOT. (ok .AND. CD_Is_Finite(ydd))) ydd = model%wo_ydd0(k) - sw = model%wo_s(:, k) + sw = model%wo_s(1:2, k) CALL CD_VIV_Wake_Advance(sw, model%wo_om0(k), model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), & model%wo_ydd0(k), ydd, dt) IF (.NOT. (CD_Is_Finite(sw(1)) .AND. CD_Is_Finite(sw(2)))) THEN - sw = model%wo_s(:, k) + sw = model%wo_s(1:2, k) CALL CD_VIV_Wake_Advance(sw, model%wo_om0(k), model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), & model%wo_ydd0(k), model%wo_ydd0(k), dt) END IF - model%wo_s(:, k) = sw + model%wo_s(1:2, k) = sw + ! the filtered velocity, exact for the first-order filter of the converged end velocity + ! held over the step (a non-finite end velocity keeps it) + IF (model%wo_filter) THEN + IF (model%wo_tf(k) > CD_ZERO .AND. CD_All_Finite(model%v(6*(k - 1) + 1:6*(k - 1) + 3))) & + model%wo_s(3:5, k) = model%wo_s(3:5, k) + (CD_ONE - EXP(-dt/model%wo_tf(k)))* & + (model%v(6*(k - 1) + 1:6*(k - 1) + 3) - model%wo_s(3:5, k)) + END IF END DO model%wo_q_eval = model%wo_s(1, :) RETURN diff --git a/src/CableDyn_Model.f90 b/src/CableDyn_Model.f90 index 195ff8dd..702eed5f 100644 --- a/src/CableDyn_Model.f90 +++ b/src/CableDyn_Model.f90 @@ -445,9 +445,12 @@ MODULE CableDyn_Model ! rollback, step-recovery, sub-step and checkpoint copies carry it unchanged: viv_phi holds q ! (viv_phi_eval q at the step's evaluation point, viv_phi_next q at the step end) and row 1 of ! viv_ms dq/dt; in a step, viv_rate holds the step-start wake frequency and row 2 of viv_ms_next - ! the step-start cross-flow acceleration (row 2 of viv_ms stays 0). - LOGICAL :: viv_wake = .FALSE. - REAL(wp), ALLOCATABLE :: wo_st(:), wo_eps(:), wo_a(:) + ! the step-start cross-flow acceleration (row 2 of viv_ms stays 0). With a wake filter time + ! wo_tf > 0 on some node (wo_filter) viv_ms has CD_VIV_NMS_AMP rows, rows 3:5 the node's + ! velocity low-pass filtered over wo_tf (first order), and the wake frequency takes the flow + ! normal to the line relative to it (a line moved through still water sheds). + LOGICAL :: viv_wake = .FALSE., wo_filter = .FALSE. + REAL(wp), ALLOCATABLE :: wo_st(:), wo_eps(:), wo_a(:), wo_tf(:) TYPE(GenAlphaConfig) :: cfg ! Run audit of the committed host steps (CD_Audit_Model_Step), diagnostics only: never part ! of the state, of a copy, or of a result. audit_t holds the segment tensions of the last two @@ -4004,7 +4007,7 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, REAL(wp), INTENT(IN), OPTIONAL :: wake(:, :) INTEGER :: n_nodes, n_elem, e, nd, istat, k, nms REAL(wp) :: wsum - LOGICAL :: want_il, want_amp, want_wake + LOGICAL :: want_il, want_amp, want_wake, want_filter CHARACTER(160) :: amsg ErrStat = CD_MODEL_OK @@ -4093,13 +4096,14 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, want_amp = ANY(amp_n > 0) END IF want_wake = .FALSE. + want_filter = .FALSE. IF (PRESENT(wake)) THEN - IF (SIZE(wake, 1) /= 3 .OR. SIZE(wake, 2) /= n_elem) THEN - CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator wake must have shape (3, n_elem)') + IF ((SIZE(wake, 1) /= 3 .AND. SIZE(wake, 1) /= 4) .OR. SIZE(wake, 2) /= n_elem) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator wake must have shape (3 or 4, n_elem)') RETURN END IF IF (.NOT. CD_All_Finite(wake)) THEN - CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator St, eps and A must be finite') + CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator St, eps, A and Tf must be finite') RETURN END IF DO e = 1, n_elem @@ -4110,6 +4114,14 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, '1e15, where cl > 0') RETURN END IF + IF (SIZE(wake, 1) == 4) THEN + IF (wake(4, e) < CD_ZERO) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator filter time Tf must be >= 0 (0 = the ambient '// & + 'flow) and at most 1e15') + RETURN + END IF + IF (wake(4, e) > CD_ZERO) want_filter = .TRUE. + END IF END DO want_wake = ANY(cl > CD_ZERO) IF (want_wake .AND. want_il) THEN @@ -4146,7 +4158,7 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, RETURN END IF END DO - nms = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, want_amp) + nms = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, want_amp .OR. (want_wake .AND. want_filter)) ALLOCATE (model%viv_cl(n_elem), model%viv_d(n_elem), model%viv_node(n_nodes), model%viv_cf(n_nodes), & model%viv_df(n_nodes), model%viv_dn(n_nodes), model%viv_phi(n_nodes), model%viv_ms(nms, n_nodes), & model%viv_phi_rollback(n_nodes), model%viv_ms_rollback(nms, n_nodes), & @@ -4211,7 +4223,7 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, model%viv_phi_rest = 0.5_wp*CD_VIV_TWO_PI IF (PRESENT(tangent_reversed)) model%viv_phi_rest = MERGE(0.5_wp*CD_VIV_TWO_PI, CD_ZERO, tangent_reversed) IF (want_wake) THEN - ALLOCATE (model%wo_st(n_nodes), model%wo_eps(n_nodes), model%wo_a(n_nodes), STAT=istat) + ALLOCATE (model%wo_st(n_nodes), model%wo_eps(n_nodes), model%wo_a(n_nodes), model%wo_tf(n_nodes), STAT=istat) IF (istat /= 0) THEN CALL clear_viv(model) CALL alloc_fail(ErrStat, ErrMsg, 'VIV wake oscillator storage allocation failed') @@ -4223,6 +4235,8 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, model%wo_st = CD_ZERO model%wo_eps = CD_ZERO model%wo_a = CD_ZERO + model%wo_tf = CD_ZERO + model%wo_filter = want_filter DO nd = 2, n_nodes - 1 IF (.NOT. model%viv_node(nd)) CYCLE wsum = CD_ZERO @@ -4232,12 +4246,16 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, model%wo_st(nd) = model%wo_st(nd) + model%l0(k)*wake(1, k) model%wo_eps(nd) = model%wo_eps(nd) + model%l0(k)*wake(2, k) model%wo_a(nd) = model%wo_a(nd) + model%l0(k)*wake(3, k) + IF (want_filter) model%wo_tf(nd) = model%wo_tf(nd) + model%l0(k)*wake(4, k) END DO model%wo_st(nd) = model%wo_st(nd)/wsum model%wo_eps(nd) = model%wo_eps(nd)/wsum model%wo_a(nd) = model%wo_a(nd)/wsum + model%wo_tf(nd) = model%wo_tf(nd)/wsum ! on the limit cycle at the node's start phase model%viv_phi(nd) = 2.0_wp*COS(model%viv_phi(nd)) + ! the filtered velocity starts at the node's (smoothed) velocity + IF (want_filter) model%viv_ms(3:5, nd) = smoothed(model%v, 3*nd - 2) END DO model%viv_cf = CD_ZERO model%viv_df = CD_ZERO @@ -4245,6 +4263,9 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, model%recovery_viv_phi = model%viv_phi model%viv_phi_eval = model%viv_phi model%viv_phi_next = model%viv_phi + model%viv_ms_rollback = model%viv_ms + model%recovery_viv_ms = model%viv_ms + model%viv_ms_next = model%viv_ms model%viv_wake = .TRUE. END IF model%has_viv = .TRUE. @@ -4388,7 +4409,7 @@ SUBROUTINE CD_Set_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi ELSE neg = ANY(ms(1:2, :) < CD_ZERO) END IF - IF (SIZE(ms, 1) >= 5) neg = neg .OR. ANY(ms(4:5, :) < CD_ZERO) + IF (SIZE(ms, 1) >= 5 .AND. .NOT. model%viv_wake) neg = neg .OR. ANY(ms(4:5, :) < CD_ZERO) IF (neg .OR. t_window < CD_ZERO) THEN CALL fail(ErrStat, ErrMsg, 'VIV mean squares, amplitudes and averaging time must be non-negative') RETURN @@ -4617,10 +4638,10 @@ END FUNCTION CD_Model_Has_VIV PURE INTEGER FUNCTION CD_Model_VIV_NMS(model) RESULT(n) !! Rows of the VIV motion statistics of a node in the VIV state (CD_Get_Model_VIV_State ms): - !! CD_VIV_NMS_AMP with amplitude tables (the amplitude estimate after the mean squares), - !! CD_VIV_NMS otherwise. + !! CD_VIV_NMS_AMP with amplitude tables (the amplitude estimate after the mean squares) or the + !! wake filter (the filtered velocity in rows 3:5), CD_VIV_NMS otherwise. TYPE(CD_ModelType), INTENT(IN) :: model - n = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp) + n = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp .OR. model%wo_filter) END FUNCTION CD_Model_VIV_NMS SUBROUTINE CD_Get_Model_VIV_Amplitude(model, amp, ErrStat, ErrMsg) @@ -4766,6 +4787,10 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) ! the wake frequency of the ambient flow normal to the line (the free stream of the ! paper), not of the relative flow, which the line's own cross-flow motion modulates; the ! wake state predicted at the step's evaluation point under the step-start forcing + IF (model%wo_filter) THEN + ! with the wake filter, of the flow relative to the node's slowly filtered motion + IF (model%wo_tf(nd) > CD_ZERO) uu = uu - model%viv_ms(3:5, nd) + END IF model%viv_rate(nd) = CD_VIV_TWO_PI*model%wo_st(nd)*viv_node_ambient_speed(model%q, ia, uu)/model%viv_dn(nd) model%viv_ms_next(2, nd) = ydd sw = [model%viv_phi(nd), model%viv_ms(1, nd)] @@ -4800,7 +4825,7 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: nd, ia - REAL(wp) :: w, yd, ydd, un, coef, uu(3), ms1, ms2, rate_end, xd, xdd, rate_end_x, st(4), sw(2), ydd0 + REAL(wp) :: w, yd, ydd, un, coef, uu(3), ms1, ms2, rate_end, xd, xdd, rate_end_x, st(4), sw(2), ydd0, vsm(3) LOGICAL :: ok ErrStat = CD_MODEL_OK ErrMsg = '' @@ -4830,6 +4855,14 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) END IF model%viv_phi_next(nd) = sw(1) model%viv_ms_next(1, nd) = sw(2) + ! the filtered velocity, exact for the first-order filter of the converged end velocity + ! held over the step (a non-finite end velocity keeps it) + IF (model%wo_filter) THEN + vsm = smoothed(model%v_step, ia) + IF (model%wo_tf(nd) > CD_ZERO .AND. CD_All_Finite(vsm)) & + model%viv_ms_next(3:5, nd) = model%viv_ms(3:5, nd) + (CD_ONE - EXP(-dt/model%wo_tf(nd)))* & + (vsm - model%viv_ms(3:5, nd)) + END IF CYCLE END IF IF (.NOT. ok) THEN @@ -4943,7 +4976,9 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%wo_st)) DEALLOCATE (model%wo_st) IF (ALLOCATED(model%wo_eps)) DEALLOCATE (model%wo_eps) IF (ALLOCATED(model%wo_a)) DEALLOCATE (model%wo_a) + IF (ALLOCATED(model%wo_tf)) DEALLOCATE (model%wo_tf) model%viv_wake = .FALSE. + model%wo_filter = .FALSE. model%has_viv_amp = .FALSE. model%has_viv_il = .FALSE. model%has_viv = .FALSE. @@ -7711,6 +7746,9 @@ SUBROUTINE CD_Copy_Model(src, dst, ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN CALL copy_real1(src%wo_a, work%wo_a, 'wo_a', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%wo_tf, work%wo_tf, 'wo_tf', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + work%wo_filter = src%wo_filter work%has_viv_amp = src%has_viv_amp CALL copy_real3(src%viv_amp, work%viv_amp, 'viv_amp', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN @@ -7905,6 +7943,8 @@ SUBROUTINE commit_model_copy(from, to) CALL MOVE_ALLOC(from%wo_st, to%wo_st) CALL MOVE_ALLOC(from%wo_eps, to%wo_eps) CALL MOVE_ALLOC(from%wo_a, to%wo_a) + CALL MOVE_ALLOC(from%wo_tf, to%wo_tf) + to%wo_filter = from%wo_filter to%has_viv_amp = from%has_viv_amp CALL MOVE_ALLOC(from%viv_amp, to%viv_amp) CALL MOVE_ALLOC(from%viv_amp_n, to%viv_amp_n) diff --git a/src/CableDyn_OpenFAST_HermiteFMF.f90 b/src/CableDyn_OpenFAST_HermiteFMF.f90 index 1dd2aca8..95749dd8 100644 --- a/src/CableDyn_OpenFAST_HermiteFMF.f90 +++ b/src/CableDyn_OpenFAST_HermiteFMF.f90 @@ -2262,7 +2262,7 @@ INTEGER FUNCTION CD_HFMF_VIVMirrorSize(self) RESULT(n) IF (.NOT. self%initialized) RETURN IF (self%line%has_viv) n = (1 + SIZE(self%line%viv_ms, 1))*self%line%nn + 1 IF (self%line%has_viv_il) n = n + 3*self%line%nn - IF (self%line%viv_wake) n = n + 2*self%line%nn + IF (self%line%viv_wake) n = n + SIZE(self%line%wo_s) END FUNCTION CD_HFMF_VIVMirrorSize INTEGER FUNCTION CD_HFMF_FrictionMirrorSize(self) RESULT(n) @@ -2352,8 +2352,8 @@ SUBROUTINE CD_HFMF_PackMirror(self, buf, ErrStat, ErrMsg) k = k + 3*self%line%nn END IF IF (self%line%viv_wake) THEN - buf(k + 1:k + 2*self%line%nn) = RESHAPE(self%line%wo_s, [2*self%line%nn]) - k = k + 2*self%line%nn + buf(k + 1:k + SIZE(self%line%wo_s)) = RESHAPE(self%line%wo_s, [SIZE(self%line%wo_s)]) + k = k + SIZE(self%line%wo_s) END IF IF (self%line%torsion%active) THEN buf(k + 1) = self%line%torsion%theta @@ -2545,10 +2545,10 @@ SUBROUTINE CD_HFMF_UnpackMirror(self, buf, t, ErrStat, ErrMsg) k = k + 3*self%line%nn END IF IF (self%line%viv_wake) THEN - self%line%wo_s = RESHAPE(buf(k + 1:k + 2*self%line%nn), [2, self%line%nn]) + self%line%wo_s = RESHAPE(buf(k + 1:k + SIZE(self%line%wo_s)), SHAPE(self%line%wo_s)) self%line%wo_q_eval = self%line%wo_s(1, :) self%line%ws_recovery_wo_s = self%line%wo_s - k = k + 2*self%line%nn + k = k + SIZE(self%line%wo_s) END IF IF (self%line%torsion%active) THEN self%line%torsion%theta = buf(k + 1) diff --git a/tests/test_viv_coupled.f90 b/tests/test_viv_coupled.f90 index 31da2115..b18bf10d 100644 --- a/tests/test_viv_coupled.f90 +++ b/tests/test_viv_coupled.f90 @@ -34,7 +34,9 @@ PROGRAM test_viv_coupled !! cable's checkpoint block grows by the wake state (2 per node), the EI = 0 riser carries it in !! its VIV block (q in the phase, dq/dt in the first motion statistic), the restarted run !! continues bit for bit with both, a rebuild without the VIV state does not, and a rewound step - !! repeats; + !! repeats; with the wake filter (Tf 5 s) the cable's block carries the filtered velocity too + !! (5 per node) and the riser's VIV block its rows 3-5 (6 motion statistics per node), with the + !! same restart and rewind checks; !! * amplitude tables (a VIV AMPLITUDE table on both types, Cv falling from 0.8 at A/D 0 to 0.4 at !! 1, CdAmp from 1 to 1.5): both checkpoint blocks grow by the amplitude estimate (4 per node), !! the restarted run continues bit for bit with it, a rebuild without the VIV state does not, @@ -58,13 +60,14 @@ PROGRAM test_viv_coupled INTEGER :: nfail ! the deck of the restart and rewind cases, and whether its lines carry in-line VIV CHARACTER(32) :: deck_name = 'viv_coupled.dat' - LOGICAL :: il_case = .FALSE., wake_case = .FALSE., amp_case = .FALSE. + LOGICAL :: il_case = .FALSE., wake_case = .FALSE., amp_case = .FALSE., wakef_case = .FALSE. nfail = 0 CALL write_deck('viv_coupled.dat', 0.8_wp) CALL write_deck('viv_coupled_nolift.dat', 0.0_wp) CALL write_deck('viv_coupled_il.dat', 0.8_wp, inline=.TRUE.) CALL write_deck('viv_coupled_wake.dat', 0.8_wp, wake=.TRUE.) + CALL write_deck('viv_coupled_wakef.dat', 0.8_wp, wake=.TRUE., wake_tf='5.0') CALL write_deck('viv_coupled_amp.dat', 0.8_wp, amp=.TRUE.) CALL case_lockin() CALL case_restart() @@ -80,8 +83,13 @@ PROGRAM test_viv_coupled wake_case = .TRUE. CALL case_restart() CALL case_rewind() + deck_name = 'viv_coupled_wakef.dat' + wakef_case = .TRUE. + CALL case_restart() + CALL case_rewind() deck_name = 'viv_coupled_amp.dat' wake_case = .FALSE. + wakef_case = .FALSE. amp_case = .TRUE. CALL case_restart() CALL case_rewind() @@ -372,7 +380,7 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) a_interior=aL(4:ndof - 3)) ok = ok .AND. es == CD_SYSTEM_OK nv = CD_System_Line_VIV_MirrorSize(a%sys%fast%system, il) - ok = ok .AND. nv == (MERGE(6, 3, il_case) + MERGE(4, 0, amp_case))*(ndof/3) + 1 + ok = ok .AND. nv == (MERGE(6, 3, il_case) + MERGE(4, 0, amp_case .OR. wakef_case))*(ndof/3) + 1 IF (with_viv .AND. nv > 0) THEN ALLOCATE (buf(nv)) CALL CD_Get_System_Line_VIV_State(a%sys%fast%system, il, buf, es, em) @@ -385,8 +393,8 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) ALLOCATE (buf(CD_HFMF_MirrorSize(a%cables(1))), fresh(CD_HFMF_MirrorSize(b%cables(1)))) CALL CD_HFMF_PackMirror(a%cables(1), buf, es, em) nvc = CD_HFMF_VIVMirrorSize(a%cables(1)) - ok = ok .AND. nvc == (MERGE(6, 3, il_case) + MERGE(2, 0, wake_case) + MERGE(4, 0, amp_case))* & - a%cables(1)%line%nn + 1 + ok = ok .AND. nvc == (MERGE(6, 3, il_case) + MERGE(MERGE(5, 2, wakef_case), 0, wake_case) + & + MERGE(4, 0, amp_case))*a%cables(1)%line%nn + 1 IF (.NOT. with_viv) THEN ! the cable's VIV block as the fresh build has it (the torsion-free cable ends with it) CALL CD_HFMF_PackMirror(b%cables(1), fresh, es, em) @@ -404,6 +412,9 @@ LOGICAL FUNCTION identical(a, b) RESULT(same) MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_phi - b%sys%fast%system%lines(1)%viv_phi)) <= 0.0_wp .AND. & MAXVAL(ABS(a%cables(1)%line%q - b%cables(1)%line%q)) <= 0.0_wp .AND. & MAXVAL(ABS(a%cables(1)%line%viv_phi - b%cables(1)%line%viv_phi)) <= 0.0_wp + IF (same .AND. wakef_case) same = a%cables(1)%line%wo_filter .AND. SIZE(a%cables(1)%line%wo_s, 1) == 5 .AND. & + a%sys%fast%system%lines(1)%wo_filter .AND. & + SIZE(a%sys%fast%system%lines(1)%viv_ms, 1) == 6 IF (same .AND. wake_case) same = a%cables(1)%line%viv_wake .AND. & MAXVAL(ABS(a%cables(1)%line%wo_s - b%cables(1)%line%wo_s)) <= 0.0_wp .AND. & a%sys%fast%system%lines(1)%viv_wake .AND. & @@ -444,7 +455,7 @@ SUBROUTINE response(z, ad, f) IF (n > 1) f = REAL(n - 1, wp)/(t1 - t0) END SUBROUTINE response - SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp) + SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp, wake_tf) !! The EI = 0 riser (line 1) and the finite-EI cable (line 2), 20 m apart across the current; !! VIVrmsWindow 0.25 s unless window is given (0: none), and a deck dtM when dtm is given; !! inline adds the in-line VIV of both types (a VIV section, ClX 0.85); wake gives both types @@ -454,6 +465,8 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp) REAL(wp), INTENT(IN) :: cl REAL(wp), INTENT(IN), OPTIONAL :: window, dtm LOGICAL, INTENT(IN), OPTIONAL :: anchor_first, inline, wake, amp + ! the VIV FRAME filter time Tf of both types (no section without it) + CHARACTER(*), INTENT(IN), OPTIONAL :: wake_tf INTEGER :: u LOGICAL :: stock, wo REAL(wp) :: tw @@ -506,6 +519,12 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp) WRITE (u, '(A)') 'TypeName CL0 St eps A' WRITE (u, '(A)') 'riser 0.3 0.2 0.3 12' WRITE (u, '(A)') 'cable 0.3 0.2 0.3 12' + IF (PRESENT(wake_tf)) THEN + WRITE (u, '(A)') '--------------------- VIV FRAME ---' + WRITE (u, '(A)') 'TypeName Tf' + WRITE (u, '(A)') 'riser '//wake_tf + WRITE (u, '(A)') 'cable '//wake_tf + END IF END IF IF (PRESENT(amp)) THEN IF (amp) THEN diff --git a/tests/test_viv_wake_deck.f90 b/tests/test_viv_wake_deck.f90 index aefad2f5..89583ee3 100644 --- a/tests/test_viv_wake_deck.f90 +++ b/tests/test_viv_wake_deck.f90 @@ -3,7 +3,7 @@ ! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University PROGRAM test_viv_wake_deck !! Wake-oscillator VIV on a deck (the optional WAKE OSCILLATOR section, TypeName CL0 [St [eps - !! [A]]]; Facchinetti et al. 2004): the taut cable of the in-line VIV gate (100 m, D 0.1 m, + !! [A]]], and the VIV FRAME section, TypeName Tf; Facchinetti et al. 2004): the taut cable of the in-line VIV gate (100 m, D 0.1 m, !! 50 kN, pinned at 50 m depth) in a uniform 0.15 m/s current along y, its type with no !! synchronisation lift (Cl 0) and the row riser 0.3 (St 0.2, eps 0.3, A 12). W1-W3 run on the !! finite-EI cable (EI 1 N m^2) and on the EI = 0 line alike. @@ -19,13 +19,23 @@ PROGRAM test_viv_wake_deck !! A out of range, a type that keeps its synchronisation lift (Cl > 0, which in-line VIV !! also needs), and a line that mixes the two models (finite-EI and EI = 0); !! W5 the two cores agree: the EI = 0 line locks in within 3 % of the finite-EI cable's A/D - !! and 0.003 Hz of its frequency, and so does its uncoupled response. + !! and 0.003 Hz of its frequency, and so does its uncoupled response; + !! W6 a finite-EI cable towed through still water: both ends move at 0.15 m/s against y (a + !! 10 s half-cosine ramp), no current. With the filter time Tf 10 s the wake frequency takes + !! the flow relative to the cable's filtered motion, and the cable locks in as the fixed + !! cable in the 0.15 m/s current does (A/D within 5 %, frequency within 0.003 Hz); without + !! it (the ambient flow, zero) the wake does not lock in (A/D below a tenth of that). The + !! fixed cable in the current with Tf 10 s locks in as without it (the filter removes the + !! VIV velocity: A/D within 2 %, frequency within 0.002 Hz), on both cores, and the two + !! cores agree there as in W5 (an EI = 0 line cannot run between two moving points); + !! W7 VIV FRAME refusals by name: a malformed row, an unknown or repeated type, + !! a negative Tf, and a type without a WAKE OSCILLATOR row. USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK IMPLICIT NONE REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp, D = 0.1_wp, F_WAKE = 0.2_wp*0.15_wp/0.1_wp INTEGER :: nfail = 0 - REAL(wp) :: ad_fe(4) = 0.0_wp, ad_l(4) = 0.0_wp + REAL(wp) :: ad_fe(4) = 0.0_wp, ad_l(4) = 0.0_wp, af_fe(2) = 0.0_wp, af_l(2) = 0.0_wp CALL write_current('wod_current.dat') CALL check_runs('1.0', 'wod', ad_fe) @@ -36,6 +46,12 @@ PROGRAM test_viv_wake_deck 'W5: the EI = 0 line locks in as the finite-EI cable') CALL require(ABS(ad_l(3)/ad_fe(3) - 1.0_wp) <= 0.03_wp .AND. ABS(ad_l(4) - ad_fe(4)) <= 0.003_wp, & 'W5: and responds uncoupled as it') + CALL write_tow('wod_tow.txt') + CALL check_tow('wodt', ad_fe) + CALL check_filter_fixed('1.0', 'wodf', ad_fe, af_fe) + CALL check_filter_fixed('0.0', 'wodf0', ad_l, af_l) + CALL require(ABS(af_l(1)/af_fe(1) - 1.0_wp) <= 0.03_wp .AND. ABS(af_l(2) - af_fe(2)) <= 0.003_wp, & + 'W6: with Tf the EI = 0 line locks in as the finite-EI cable') CALL check_refusals() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' @@ -80,23 +96,28 @@ SUBROUTINE write_current(path) CLOSE (u) END SUBROUTINE write_current - SUBROUTINE write_deck(path, wake_rows, tmax, cl, ei, viv_row, mixed) + SUBROUTINE write_deck(path, wake_rows, tmax, cl, ei, viv_row, mixed, tow, frame_rows) !! wake_rows: the WAKE OSCILLATOR section's data rows, ';'-separated ('' for no section); cl the !! type's LINE TYPES Cl (default 0), ei its EI (default 1), viv_row a VIV section row, mixed: - !! the line in two sections, the second of a type 'lift' with Cl 0.8. + !! the line in two sections, the second of a type 'lift' with Cl 0.8; tow: no current, both + !! ends Coupled and moved by the motion file wod_tow.txt; frame_rows: the VIV FRAME section's + !! data rows, ';'-separated (none without it). CHARACTER(*), INTENT(IN) :: path, wake_rows REAL(wp), INTENT(IN) :: tmax CHARACTER(*), INTENT(IN), OPTIONAL :: cl, ei, viv_row - LOGICAL, INTENT(IN), OPTIONAL :: mixed + LOGICAL, INTENT(IN), OPTIONAL :: mixed, tow + CHARACTER(*), INTENT(IN), OPTIONAL :: frame_rows CHARACTER(32) :: cl_col, ei_col INTEGER :: u, i0, i1 - LOGICAL :: two + LOGICAL :: two, towed cl_col = '0.0' IF (PRESENT(cl)) cl_col = cl ei_col = '1.0' IF (PRESENT(ei)) ei_col = ei two = .FALSE. IF (PRESENT(mixed)) two = mixed + towed = .FALSE. + IF (PRESENT(tow)) towed = tow OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' WRITE (u, '(A)') 'wake-oscillator deck gate: taut cable in a uniform current' @@ -109,7 +130,11 @@ SUBROUTINE write_deck(path, wake_rows, tmax, cl, ei, viv_row, mixed) WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' WRITE (u, '(A)') '1 Coupled 0.0 0.0 -50.0 0 0 0 0' - WRITE (u, '(A)') '2 Fixed 100.0 0.0 -50.0 0 0 0 0' + IF (towed) THEN + WRITE (u, '(A)') '2 Coupled 100.0 0.0 -50.0 0 0 0 0' + ELSE + WRITE (u, '(A)') '2 Fixed 100.0 0.0 -50.0 0 0 0 0' + END IF WRITE (u, '(A)') '----------------------- LINES -----------------------------------------------' WRITE (u, '(A)') 'ID NodeA NodeB Outputs' WRITE (u, '(A)') '1 1 2 -' @@ -140,12 +165,31 @@ SUBROUTINE write_deck(path, wake_rows, tmax, cl, ei, viv_row, mixed) i0 = i0 + i1 END DO END IF + IF (PRESENT(frame_rows)) THEN + WRITE (u, '(A)') '----------------------- VIV FRAME -------------------------------------------' + WRITE (u, '(A)') 'TypeName Tf' + WRITE (u, '(A)') '(-) (s)' + i0 = 1 + DO + i1 = INDEX(frame_rows(i0:), ';') + IF (i1 == 0) THEN + WRITE (u, '(A)') TRIM(frame_rows(i0:)) + EXIT + END IF + WRITE (u, '(A)') frame_rows(i0:i0 + i1 - 2) + i0 = i0 + i1 + END DO + END IF WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' WRITE (u, '(A)') '0.01 dtM' WRITE (u, '(A)') '100.0 WtrDpth' WRITE (u, '(A)') '1025.0 rhoW' WRITE (u, '(A)') '9.80665 g' - WRITE (u, '(A)') 'wod_current.dat WaterKin' + IF (towed) THEN + WRITE (u, '(A)') 'wod_tow.txt motionFile' + ELSE + WRITE (u, '(A)') 'wod_current.dat WaterKin' + END IF WRITE (u, '(A,F8.3,A)') ' ', tmax, ' TMax' WRITE (u, '(A)') '---------------------- OUTPUTS -----------------------------------------------' WRITE (u, '(A)') 'L1N25PZ' @@ -281,8 +325,100 @@ SUBROUTINE check_runs(ei, tag, res) 'W3: a row with CL0 0 is the deck without the section'//lab) END SUBROUTINE check_runs + SUBROUTINE write_tow(path) + !! Both ends (points 1 and 2) moved along -y at 0.15 m/s after a 10 s half-cosine velocity ramp, + !! every 0.01 s to 100 s: y = -U (t/2 - T sin(pi t/T)/(2 pi)) in the ramp (T 10 s). + CHARACTER(*), INTENT(IN) :: path + REAL(wp), PARAMETER :: U = 0.15_wp, TR = 10.0_wp + INTEGER :: u_, k + REAL(wp) :: t, y, v, a + OPEN (NEWUNIT=u_, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u_, '(A)') '# time point x y z vx vy vz ax ay az' + DO k = 0, 10000 + t = 0.01_wp*REAL(k, wp) + IF (t < TR) THEN + y = -U*(0.5_wp*t - TR*SIN(PI*t/TR)/(2.0_wp*PI)) + v = -U*0.5_wp*(1.0_wp - COS(PI*t/TR)) + a = -U*0.5_wp*(PI/TR)*SIN(PI*t/TR) + ELSE + y = -U*(0.5_wp*TR + (t - TR)) + v = -U + a = 0.0_wp + END IF + WRITE (u_, '(F9.3,A,3ES17.9,A,ES17.9,A,ES17.9,A)') t, ' 1 ', 0.0_wp, y, -50.0_wp, ' 0 ', v, ' 0 0 ', a, ' 0' + WRITE (u_, '(F9.3,A,3ES17.9,A,ES17.9,A,ES17.9,A)') t, ' 2 ', 100.0_wp, y, -50.0_wp, ' 0 ', v, ' 0 0 ', a, ' 0' + END DO + CLOSE (u_) + END SUBROUTINE write_tow + + SUBROUTINE check_tow(tag, ref) + !! W6 on the finite-EI cable: towed with Tf 10 s against the fixed cable in the current (ref, + !! from check_runs), and without Tf. + CHARACTER(*), INTENT(IN) :: tag + REAL(wp), INTENT(IN) :: ref(4) + CHARACTER(*), PARAMETER :: ei = '1.0' + REAL(wp), ALLOCATABLE :: tf(:, :), t0(:, :) + INTEGER :: nf, n0 + REAL(wp) :: ad_f, f_f, ad_0, f_0 + LOGICAL :: ok + CHARACTER(1024) :: msg + CHARACTER(:), ALLOCATABLE :: lab + lab = ' (EI '//ei//')' + CALL write_deck(tag//'_tf.dat', 'riser 0.3', 100.0_wp, ei=ei, tow=.TRUE., frame_rows='riser 10') + CALL run(tag//'_tf.dat', tag//'_tf', ok, msg) + CALL require(ok, 'W6: the towed deck with Tf runs'//lab//': '//TRIM(msg)) + CALL write_deck(tag//'_amb.dat', 'riser 0.3', 100.0_wp, ei=ei, tow=.TRUE.) + CALL run(tag//'_amb.dat', tag//'_amb', ok, msg) + CALL require(ok, 'W6: the towed deck without Tf runs'//lab//': '//TRIM(msg)) + CALL read_out(tag//'_tf.out', tf, nf) + CALL read_out(tag//'_amb.out', t0, n0) + CALL require(nf > 1000 .AND. n0 == nf, 'W6: the towed runs wrote matching rows'//lab) + IF (.NOT. (nf > 1000 .AND. n0 == nf)) RETURN + CALL window_stats(tf, nf, 50.0_wp, 75.0_wp, ad_f, f_f) + CALL window_stats(t0, n0, 50.0_wp, 75.0_wp, ad_0, f_0) + WRITE (*, '(A,2F8.4,A,2F8.4,A,F8.4)') 'W6'//lab//': towed A/D, f [Hz] with Tf ', ad_f, f_f, & + '; in the current ', ref(1:2), '; towed without Tf A/D ', ad_0 + CALL require(ABS(ad_f/ref(1) - 1.0_wp) <= 0.05_wp .AND. ABS(f_f - ref(2)) <= 0.003_wp, & + 'W6: towed with Tf, the cable locks in as the fixed cable in the current'//lab) + CALL require(ad_0 < 0.1_wp*ref(1), 'W6: towed without Tf (the ambient flow), the wake does not lock in'//lab) + END SUBROUTINE check_tow + + SUBROUTINE check_filter_fixed(ei, tag, ref, res) + !! W6 on the fixed cable of EI ei in the current: with Tf 10 s against without it (ref, from + !! check_runs); res = (A/D, f) with Tf. + CHARACTER(*), INTENT(IN) :: ei, tag + REAL(wp), INTENT(IN) :: ref(4) + REAL(wp), INTENT(OUT) :: res(2) + REAL(wp), ALLOCATABLE :: tf(:, :) + INTEGER :: nf + LOGICAL :: ok + CHARACTER(1024) :: msg + CHARACTER(:), ALLOCATABLE :: lab + lab = ' (EI '//ei//')' + res = 0.0_wp + CALL write_deck(tag//'.dat', 'riser 0.3', 100.0_wp, ei=ei, frame_rows='riser 10') + CALL run(tag//'.dat', tag, ok, msg) + CALL require(ok, 'W6: the fixed cable with Tf runs'//lab//': '//TRIM(msg)) + CALL read_out(tag//'.out', tf, nf) + CALL require(nf > 1000, 'W6: the fixed run with Tf wrote its rows'//lab) + IF (nf <= 1000) RETURN + CALL window_stats(tf, nf, 50.0_wp, 75.0_wp, res(1), res(2)) + WRITE (*, '(A,2F8.4,A,2F8.4)') 'W6'//lab//': fixed in the current A/D, f [Hz] with Tf ', res, '; without ', & + ref(1:2) + CALL require(ABS(res(1)/ref(1) - 1.0_wp) <= 0.02_wp .AND. ABS(res(2) - ref(2)) <= 0.002_wp, & + 'W6: fixed in the current, Tf leaves the lock-in as the ambient flow gives it'//lab) + END SUBROUTINE check_filter_fixed + SUBROUTINE check_refusals() CALL refused('riser 0.3 0.2 0.3 12 1', 'TypeName CL0 [St [eps [A]]]', 'a row of six columns') + CALL refused('riser 0.3', 'VIV FRAME rows must be: TypeName Tf', 'W7: a VIV FRAME row of three columns', & + frame_rows='riser 10 1') + CALL refused('riser 0.3', 'VIV FRAME row names undefined LINE TYPE', 'W7: an unknown type', & + frame_rows='cable 10') + CALL refused('riser 0.3', 'VIV FRAME names LINE TYPE', 'W7: a repeated type', frame_rows='riser 10;riser 5') + CALL refused('riser 0.3', 'filter time Tf must be >= 0', 'W7: a negative Tf', frame_rows='riser -1') + CALL refused('', 'give the type a WAKE OSCILLATOR row', 'W7: a type without the wake oscillator', & + cl='0.8', frame_rows='riser 10') CALL refused('riser 0.3 x', 'plain numbers', 'a non-numeric St') CALL refused('cable 0.3', 'undefined LINE TYPE', 'an unknown type') CALL refused('riser 0.3;riser 0.2', 'twice', 'a repeated type') @@ -298,14 +434,14 @@ SUBROUTINE check_refusals() ei='0.0') END SUBROUTINE check_refusals - SUBROUTINE refused(rows, needle, what, cl, ei, viv_row, mixed) + SUBROUTINE refused(rows, needle, what, cl, ei, viv_row, mixed, frame_rows) CHARACTER(*), INTENT(IN) :: rows, needle, what - CHARACTER(*), INTENT(IN), OPTIONAL :: cl, ei, viv_row + CHARACTER(*), INTENT(IN), OPTIONAL :: cl, ei, viv_row, frame_rows LOGICAL, INTENT(IN), OPTIONAL :: mixed LOGICAL :: ok CHARACTER(1024) :: msg ! an absent optional passes on absent - CALL write_deck('wod_bad.dat', rows, 1.0_wp, cl=cl, ei=ei, viv_row=viv_row, mixed=mixed) + CALL write_deck('wod_bad.dat', rows, 1.0_wp, cl=cl, ei=ei, viv_row=viv_row, mixed=mixed, frame_rows=frame_rows) CALL run('wod_bad.dat', 'wod_bad', ok, msg) CALL require(.NOT. ok .AND. INDEX(msg, needle) > 0, 'W4: '//what//' is refused: '//TRIM(msg)) END SUBROUTINE refused From 511429987e97cc4377051ce9994df48c18dd823a Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Mon, 16 Nov 2026 00:50:22 +0900 Subject: [PATCH 23/47] feat: VIV FRAME for the synchronisation model's amplitude estimate, damping split and phase input (#166) With a VIV FRAME row and Tf > 0, the synchronisation model's ambient-frame features (the amplitude estimate feeding VIV AMPLITUDE Cv and CdAmp, and the axes and blend of the VIV DAMPING split) and the cross-flow and in-line motion fed to its phases now use the node velocity relative to its velocity low-pass filtered over Tf, on finite-EI cables and EI = 0 lines. The relative flow, and so the axes and the shedding speed, are unchanged. A cable moved through still water by a tow or its floater now responds as the same cable held in the moving water: a pipe in oscillating flow gives peak A/D 0.819 moving against 0.819 held (0.711 against 0.850 without the frame), and a towed taut cable 0.7905 against 0.7906 held in the current. The filtered velocity is state (viv_ms rows 7-9) in recovery, snapshot, checkpoint and the System pack. A VIV FRAME row needs LINE TYPES Cl > 0 or a WAKE OSCILLATOR row. Runs without the row are bit-identical to dev. The frame check gates the RMS at 1 % and the peak, a single extreme that ranges 0.811-0.819 over builds, kernels and platforms, at 2 %. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 14 ++ CMakeLists.txt | 16 ++ doc/capabilities.rst | 12 +- doc/driver_format.md | 51 ++-- doc/theory.rst | 95 ++++++- python/cabledyn/builder.py | 9 +- python/cabledyn/deck_file.py | 13 +- python/tests/test_builder.py | 18 +- python/tests/test_deck_file.py | 11 +- python/tests/test_end_to_end.py | 9 +- src/CableDyn_DeckDriver.f90 | 27 +- src/CableDyn_HermiteCableDynamic.f90 | 170 +++++++++++-- src/CableDyn_Model.f90 | 139 ++++++++++- src/CableDyn_VIV.f90 | 3 + tests/test_hermite_viv_frame.f90 | 308 +++++++++++++++++++++++ tests/test_viv_coupled.f90 | 68 ++++-- tests/test_viv_frame_deck.f90 | 353 +++++++++++++++++++++++++++ tests/test_viv_wake_deck.f90 | 6 +- 18 files changed, 1230 insertions(+), 92 deletions(-) create mode 100644 tests/test_hermite_viv_frame.f90 create mode 100644 tests/test_viv_frame_deck.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b20c3dc..64c5004d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -118,6 +118,20 @@ All notable changes to CableDyn are recorded in this file. The format follows leaves runs unchanged to the bit. The Python deck reader and builder (`viv_frame_tf`) take the section. +- The `VIV FRAME` section on the synchronisation model (LINE TYPES `Cl > 0`): `Tf > 0` takes the + cable's filtered velocity as the frame of the cross-flow and in-line phases (the node's + velocity relative to it; the shedding speed stays the relative normal speed), of the amplitude + estimate (and so `Cv` and `CdAmp`) and of the axes and blend of the `VIV DAMPING` split. A cable + moved through still water had a phase input of zero cross-flow velocity, `y0 = 0`, `Cv(0)`, + `CdAmp(0)` and Morison's drag. A pipe moved at 0.6 m/s amplitude and 40 s period in still water + now gives peak A/D 0.819 against 0.819 for the same pipe held in the moving water with the + amplitude table and damping (0.711 against 0.850 without the row), and 0.713 against 0.714 with + the lift alone (0.711 against 0.736); a cable towed at 0.15 m/s gives the A/D of the cable held + in the current with the same row within 0.01 %. On `EI = 0` lines and finite-EI cables, the + filtered velocity in rows 7-9 of the VIV motion statistics, so in the step-recovery, snapshot + and checkpoint state; `Tf` 0 or no row leaves runs unchanged to the bit. A VIV FRAME row now + needs LINE TYPES `Cl > 0` or a WAKE OSCILLATOR row; the Python deck reader and builder follow. + ### Fixed - The statics of a finite-EI line through the free surface could fail at isolated currents: diff --git a/CMakeLists.txt b/CMakeLists.txt index c0fe0dea..072282f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1356,6 +1356,13 @@ add_executable(test_viv_cf_damping_deck tests/test_viv_cf_damping_deck.f90) target_link_libraries(test_viv_cf_damping_deck PRIVATE cabledyn_core) add_test(NAME viv_cf_damping_deck COMMAND test_viv_cf_damping_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_tests_properties(viv_cf_damping_deck PROPERTIES LABELS "fortran;integration;dynamic;viv;driver") +# The flow frame (VIV FRAME section) of the synchronisation model on a deck: a Tf 0 row as no +# section, a cable towed through still water against the same cable held in a current, the frame +# leaving the held cable's response on both cores, and the refusals. +add_executable(test_viv_frame_deck tests/test_viv_frame_deck.f90) +target_link_libraries(test_viv_frame_deck PRIVATE cabledyn_core) +add_test(NAME viv_frame_deck COMMAND test_viv_frame_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(viv_frame_deck PROPERTIES LABELS "fortran;integration;dynamic;viv;driver") # Amplitude-dependent VIV coefficients on a deck (VIV AMPLITUDE section), both line kinds: the # identity table, the amplitude channel against the response, self-limiting, drag amplification @@ -1385,6 +1392,15 @@ target_link_libraries(test_hermite_viv_inline PRIVATE cabledyn_core) add_test(NAME hermite_viv_inline COMMAND test_hermite_viv_inline) set_tests_properties(hermite_viv_inline PROPERTIES LABELS "fortran;dynamic;viv") +# The flow frame of the synchronisation model (Set_VIV tf): a pipe moved through still water +# against the same pipe held in the water moving the other way, with the lift alone and with the +# amplitude tables and the cross-flow damping; the refusals, the all-zero identity and the +# snapshot replay. +add_executable(test_hermite_viv_frame tests/test_hermite_viv_frame.f90) +target_link_libraries(test_hermite_viv_frame PRIVATE cabledyn_core) +add_test(NAME hermite_viv_frame COMMAND test_hermite_viv_frame) +set_tests_properties(hermite_viv_frame PROPERTIES LABELS "fortran;dynamic;viv") + add_executable(test_hermite_load_power tests/test_hermite_load_power.f90) target_link_libraries(test_hermite_load_power PRIVATE cabledyn_core) add_test(NAME hermite_load_power COMMAND test_hermite_load_power) diff --git a/doc/capabilities.rst b/doc/capabilities.rst index b66ba3e6..91070678 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -149,7 +149,10 @@ Line and constitutive capability - Standalone and coupled - MoorDyn v2's synchronisation model on ``EI = 0`` lines and, as a distributed lift, on 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 + host's fluid field on the coupled routes and its state in the checkpoint; a ``VIV FRAME`` + row (``Tf``) takes the cable's filtered motion as the frame of its phases, amplitude + estimate and cross-flow damping (a towed or floater-driven cable, + :ref:`theory-viv-frame`) * - In-line VIV (``VIV`` section ``ClX``, ``alpha``) - Standalone and coupled - the in-line shedding force of Ulveseter et al. (2018) at twice the cross-flow frequency, and @@ -168,7 +171,9 @@ Line and constitutive capability - a table over the cross-flow amplitude of the synchronisation coefficient and a drag factor, read at the amplitude estimate of Thorsen et al. (2016) (``VIVAmp`` channel), on ``EI = 0`` lines and finite-EI cables (:ref:`theory-viv-amplitude`), its state in the - checkpoint + checkpoint; a ``VIV FRAME`` row (``Tf``) takes the estimate, and the ``VIV DAMPING`` + axes, relative to the cable's filtered motion (a towed or floater-driven cable, + :ref:`theory-viv-frame`) * - VIV diameter (``VIV DIAMETER`` section ``Dviv``) - Standalone and coupled - a diameter of the VIV model apart from the hydrodynamic one, for buoyancy-module zones and @@ -179,7 +184,8 @@ Line and constitutive capability cross-flow part ``C_dy = a + b y0/D`` of Thorsen et al. (2016) read at the amplitude estimate plus a Morison-form term ``c``; ``0 0 1`` keeps Morison's drag and lets the ``VIV AMPLITUDE`` drag factor act on the in-line part alone; finite-EI cables - (:ref:`theory-viv-cf-damping`) + (:ref:`theory-viv-cf-damping`); with a ``VIV FRAME`` row about the flow relative to the + cable's filtered motion (:ref:`theory-viv-frame`) Loads and environment --------------------- diff --git a/doc/driver_format.md b/doc/driver_format.md index 1867df78..9ab410a5 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -1301,7 +1301,9 @@ Behaviour: - Each node estimates its cross-flow amplitude as Thorsen et al. do (their Eq. 8 and 9): half the travel of the node across the ambient flow between two zero crossings of its cross-flow - velocity, smoothed by a tenth of the difference at every time step. An element takes the mean of + velocity, smoothed by a tenth of the difference at every time step (with a + [VIV FRAME](#viv-frame-optional) row, the flow and the velocity relative to the cable's filtered + motion). An element takes the mean of its free nodes over its diameter as A/D (the one free node next to a fixed end or anchor), and from its table `Cv` (for the lift) and `CdAmp` (times `Cd`, for the normal Morison drag), linear between rows and held beyond the first and @@ -1358,10 +1360,12 @@ Behaviour: ### VIV FRAME (optional) -The flow frame of the VIV model of a line type: the flow the model takes as its free stream, the -ambient flow by default. A cable moved through the water by a tow or by its floater sees no -ambient flow, so its wake oscillator never shed; with a filter time `Tf` the free stream is the -ambient flow relative to the cable's own slow motion (see [Wake oscillator](theory.rst)). +The flow frame of the VIV model of a line type: the frame the model takes the cable's motion and +the free stream in, the earth and the ambient flow by default. A cable moved through the water by +a tow or by its floater sees no ambient flow, so its wake oscillator never shed, and its +synchronisation phase saw no cross-flow velocity and its amplitude estimate stayed at zero; with a +filter time `Tf` the frame moves with the cable's own slow motion (see +[Wake oscillator](theory.rst) and [Flow frame of the synchronisation model](theory.rst)). ```text --------------------- VIV FRAME ---------------------------------------- @@ -1372,23 +1376,37 @@ cable 10 | Column | Meaning | |--------|---------| -| `TypeName` | an existing LINE TYPES name (case-insensitive) with a WAKE OSCILLATOR row, at most one row each | +| `TypeName` | an existing LINE TYPES name (case-insensitive) with LINE TYPES `Cl > 0` or a WAKE OSCILLATOR row, at most one row each | | `Tf` | filter time >= 0 [s], at most 1e15; `0` is the ambient flow | Behaviour: -- With `Tf > 0` the wake frequency `2 pi St U_a/D` takes `U_a` = the speed normal to the line of - the ambient flow less the node's velocity low-pass filtered over `Tf` (first order, started at - the node's initial velocity). The slow motion then counts as flow; the cable's own VIV - velocity, much faster than `Tf`, does not modulate the frequency. -- Take `Tf` several VIV periods long and short against the motion. A taut cable towed at 0.15 m/s - through still water (VIV at 0.28 Hz) with `Tf` 10 s locks in as the same cable held in a - 0.15 m/s current, A/D within 0.6 % and frequency within 0.001 Hz, where the ambient flow gave it - no lock-in. On a held cable in a current `Tf` changes A/D by 0.03 %. +- The node's velocity is low-pass filtered over `Tf` (first order, started at the node's initial + velocity). The slow motion then counts as flow; the cable's own VIV velocity, much faster than + `Tf`, does not. +- On a wake-oscillator type the wake frequency `2 pi St U_a/D` takes `U_a` = the speed normal to + the line of the ambient flow less the filtered velocity. +- On a synchronisation type (LINE TYPES `Cl > 0`) the cross-flow and in-line phases take the + node's velocity less the filtered velocity, along the axes of the relative flow, so the shedding + speed stays the relative normal speed; with a VIV AMPLITUDE table the amplitude estimate takes + that velocity across the ambient flow less the filtered velocity, and with it the table's `Cv` + and `CdAmp`; on a finite-EI cable with VIV DAMPING the split takes its in-line and cross-flow + axes, and its blend to Morison's drag, from that flow. The lift and drag act on the relative + velocity, unchanged. +- Take `Tf` several VIV periods long and short against the motion: the filter scales the VIV + velocity at `omega` by `omega Tf/sqrt(1 + (omega Tf)^2)` (0.9985 at 0.29 Hz with `Tf` 10 s) and + lags a motion at `omega_m` by `atan(omega_m Tf)`. A taut cable towed at 0.15 m/s through still + water (VIV at 0.28 Hz) with `Tf` 10 s locks in as the same cable held in a 0.15 m/s current: + with the wake oscillator A/D within 0.6 % and frequency within 0.001 Hz, where the ambient flow + gave it no lock-in; with the synchronisation model A/D within 0.01 % of the held cable with the + same row (within 0.25 % without the row), with or without a VIV AMPLITUDE table and VIV DAMPING. On a + held cable in a current `Tf` changes A/D by 0.03 % (wake oscillator) and at most 0.23 % + (synchronisation model). - The filtered velocity is part of the step-recovery, snapshot and checkpoint state. A row with `Tf = 0` leaves the run exactly as without it. It acts on `EI = 0` lines and finite-EI cables, standalone and coupled. A row fails if it is not `TypeName Tf`, names an undefined or already - named type or one without a WAKE OSCILLATOR row, or holds a value out of range. + named type or one without VIV (neither LINE TYPES `Cl > 0` nor a WAKE OSCILLATOR row), or holds + a value out of range. ### VIV DAMPING (optional, finite-EI lines) @@ -1417,7 +1435,8 @@ Behaviour: unit length becomes `1/2 rho D [Cdn CdAmp |w| w_x e_x + (C_dy |w_y| + c Cdn |w|) w_y e_y]`: Morison's in-line part, with the drag factor `CdAmp` of the type's amplitude table, and the cross-flow law of the row. Where the ambient normal flow falls below 0.01 m/s the axes are - undefined and the drag blends smoothly back to Morison's. + undefined and the drag blends smoothly back to Morison's. With a [VIV FRAME](#viv-frame-optional) + row the axes and the blend take the ambient flow relative to the cable's filtered motion. - **`0 0 1` amplifies the in-line drag alone.** With an amplitude table's `CdAmp` (for example Chaplin et al. 2005, Eq. 4), the mean in-line drag of a vibrating cable rises while its cross-flow drag stays Morison's. A `CdAmp` without this row multiplies the whole normal drag, diff --git a/doc/theory.rst b/doc/theory.rst index 401839d8..857d5bc3 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1374,9 +1374,10 @@ velocity across the ambient flow normal to the line, :math:`\dot{\mathbf r}\cdot \mathbf u_n)/|\mathbf u_n|`: their :math:`y` is measured across the incoming flow, and the cross-flow axis of the phase, across the relative flow, turns with the node's own velocity, which at a response velocity comparable to the flow would shorten the projected velocity by -:math:`U/|\mathbf v_n|` (16 % at the A/D of 0.68 of the gate below). The travel is integrated by -the trapezoidal rule over each step, with a crossing inside a step placed by linear interpolation; -the error is that of the rule, :math:`(\omega\Delta t)^2/12` relative for a harmonic response. +:math:`U/|\mathbf v_n|` (16 % at the A/D of 0.68 of the gate below); a ``VIV FRAME`` row takes the +flow and the velocity relative to the cable's filtered motion (:ref:`theory-viv-frame`). The +travel is integrated by the trapezoidal rule over each step, with a crossing inside a step +placed by linear interpolation; the error is that of the rule, :math:`(\omega\Delta t)^2/12` relative for a harmonic response. The travel is carried signed, :math:`\int\dot y\,\mathrm{d}t` since the last crossing, whose sign is that of the half cycle: a velocity that reverses through a sample at zero ends the half cycle there, and one that touches zero without a sign change ends none. @@ -1443,7 +1444,8 @@ from the still-water decay tests of Vikestad et al. 2000, valid for :math:`y_0/D :math:`u_{ref} = 0.01` m/s the axes are undefined, and :math:`\mathbf f_n` blends to Morison's as :math:`\beta\,\mathbf f_s + (1-\beta)\,\mathbf f_M` with :math:`\beta = U^2/(U^2 + u_{ref}^2)`. The force and its Jacobians in the relative velocity and in the tangent are exact, and the -tangential drag is unchanged. +tangential drag is unchanged. With a ``VIV FRAME`` row the axes and the blend take the ambient flow +relative to the cable's filtered motion (:ref:`theory-viv-frame`). The row serves two uses: @@ -1460,6 +1462,91 @@ with :math:`C_v = 0` and factor 2 the line settles at the static in-line offset printed digits; Thorsen's form raises the steady cross-flow amplitude from :math:`A/D` 0.68 to 1.02; and the drag, damping and VIV powers balance within 0.2 %. +.. _theory-viv-frame: + +Flow frame of the synchronisation model +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The synchronisation model takes the node's motion in the earth frame. Its phase reads the +cross-flow velocity :math:`\dot{\mathbf r}\cdot\mathbf e` across the relative flow, which is +:math:`\mathbf u\cdot\mathbf e` and so zero in still water; the amplitude estimate and the +cross-flow damping are defined across the ambient flow, which still water does not have. A cable +moved through still water, by a tow or by its floater, therefore locks its phase on +:math:`\ddot y` alone, keeps :math:`y_0^* = 0`, :math:`C_v(0)` and the drag factor at 0, and its +damping blends to Morison's, while the same problem in the cable's frame (the water moving past +the held cable) does not. A ``VIV FRAME`` row with :math:`T_f > 0` on a synchronisation type +(LINE TYPES ``Cl > 0``) takes these quantities in the frame of the node's filtered velocity +:math:`\bar{\mathbf v}` of :ref:`theory-viv-wake` (the same filter, started at the node's +velocity): + +- the phases (cross-flow, and in-line where it runs) take :math:`\dot{\mathbf r} - + \bar{\mathbf v}` along their axes, which the relative flow sets, so the axes and the shedding + speed :math:`U` stay those of the relative flow; the acceleration stays the node's, since + :math:`\bar{\mathbf v}` changes slowly and its rate :math:`(\mathbf v - \bar{\mathbf v})/T_f` + would carry the VIV velocity; +- the amplitude estimate takes + + .. math:: + + \dot y = (\dot{\mathbf r} - \bar{\mathbf v})\cdot + \frac{\mathbf t\times(\mathbf u - \bar{\mathbf v})_n}{|(\mathbf u - \bar{\mathbf v})_n|}, + + and with it the table's :math:`C_v`, drag factor and :math:`C_{dy}`; +- the damping takes :math:`\mathbf e_x`, :math:`\mathbf e_y` and the blend :math:`\beta` from + :math:`(\mathbf u - \bar{\mathbf v})_n`, an element the mean :math:`\bar{\mathbf v}` of its end + nodes. + +:math:`\bar{\mathbf v}` is held over a step (the step-start value), so the Jacobians are +unchanged, and it is updated at the converged end. The lift and the drag act on the relative +velocity, which does not depend on the frame, and are unchanged. For a frame moving at a constant +velocity (a steady tow) the model is that of the held cable exactly. The velocity relative to +:math:`\bar{\mathbf v}` loses the part of the VIV velocity that passes the filter: for a response +at :math:`\omega` it is scaled by :math:`\omega T_f/\sqrt{1 + \omega^2 T_f^2}` and led by +:math:`\arctan(1/\omega T_f)` (0.9985 and 3.1° at 0.29 Hz with :math:`T_f` 10 s). For a motion at +:math:`\omega_m` the filter lags by :math:`\arctan\omega_m T_f`. :math:`T_f` is therefore taken +several VIV periods long and short against the motion. + +A pipe of the displaced mass (20 m, :math:`D` 0.1 m, ``Cl`` 0.8) moved in still water with +velocity amplitude 0.6 m/s and period 40 s, against the same pipe held in the water moving the +other way (the held fluid field, so the Froude-Krylov load acts; a pipe of another mass would +differ by :math:`(m - \rho A)\dot V`), with :math:`T_f` 0.6 s: + +.. list-table:: + :header-rows: 1 + + * - Pipe + - Frame + - Peak A/D moving / held + - RMS A/D moving / held + * - Amplitude table and Thorsen's damping + - ``Tf`` 0.6 s + - 0.819 / 0.819 + - 0.446 / 0.447 + * - + - none + - 0.711 / 0.850 + - 0.349 / 0.450 + * - ``Cl`` alone + - ``Tf`` 0.6 s + - 0.713 / 0.714 + - 0.372 / 0.371 + * - + - none + - 0.711 / 0.736 + - 0.349 / 0.375 + +With the row the RMS of the two frames agrees within 0.2 % and the peak within 1 % (the moving +pipe's peak, a single extreme, ranges 0.811-0.819 over builds, OpenBLAS kernels and platforms), +the rest being the filter's lag +(:math:`\omega_m T_f` = 0.094). A taut cable towed at 0.15 m/s with :math:`T_f` 10 s gives A/D +0.7905 against 0.7906 held in the current with the same row (0.792 without it; 0.665 towed without +the row) with the table and damping, and 0.6764 against 0.6764 with ``Cl`` alone. On the held +cable :math:`T_f` changes A/D by at most 0.23 % on both line kinds. :math:`\bar{\mathbf v}` takes +rows 7-9 of the node's motion statistics on both line kinds (nine rows; rows 3-6, the amplitude +estimate, stay 0 without a table), so it is part of the step-recovery, snapshot and checkpoint +state; an ``EI = 0`` line filters its smoothed node velocity. :math:`T_f` 0 or no row leaves the +run unchanged to the bit. + .. _theory-viv-coefficients: Published coefficient sets diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 7efb186c..e0bed973 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -234,7 +234,10 @@ class LineType: ``Name Tf``: the filter time [s] of the cable velocity the model's free stream is taken relative to (0: the ambient flow; set it for a cable moved through the water by a tow or its floater). It sets the wake - oscillator's frequency, so it needs ``wake_cl0``. ``None`` writes no row. + oscillator's frequency, or on the synchronisation model the motion of + the phases, the amplitude estimate (and so the ``viv_amplitude`` + coefficients) and the ``viv_damping`` split, so it needs ``cl > 0`` or + ``wake_cl0``. ``None`` writes no row. viv_amplitude : list of tuples | None Optional amplitude-dependent VIV coefficients of a type (Thorsen et al. 2016), the rows of a ``VIV AMPLITUDE`` section table ``Name AD Cv @@ -3102,9 +3105,9 @@ def _viv_frame_table(self) -> tuple[str, str, list[list[str]]]: if item.viv_frame_tf is None: continue what = f"line type {item.name!r}" - if item.wake_cl0 is None: + if item.wake_cl0 is None and not (item.cl is not None and item.cl > 0.0): raise ValueError( - f"{what}: viv_frame_tf sets the frame of its wake oscillator, set wake_cl0" + f"{what}: viv_frame_tf sets the frame of its VIV model, set cl > 0 or wake_cl0" ) rows.append([_text(item.name, what), _num(item.viv_frame_tf, what)]) return "Name Tf", "(-) (s)", rows diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index 48a258e1..3b2b5d33 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -3387,14 +3387,15 @@ def _check_viv_diam_section(self, viv_type_names: set[str]) -> None: "VIV: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row" ) - def _check_viv_frame_section(self, wake_type_names: set[str]) -> None: + def _check_viv_frame_section(self, frame_type_names: set[str]) -> None: """Native ``apply_type_viv_frame`` for the VIV FRAME section. A row ``TypeName Tf`` sets the flow frame of a line type's VIV model: with the filter time ``Tf > 0`` [s] the free stream is the ambient flow relative to the cable's velocity low-pass filtered over ``Tf`` (0: the ambient flow), at most 1e15. It sets the wake - oscillator's frequency, so the type needs a WAKE OSCILLATOR row with ``CL0 > 0``; a type - takes one row. + oscillator's frequency, or on the synchronisation model the motion of the phases, the + amplitude estimate and the VIV DAMPING split, so the type needs LINE TYPES ``Cl > 0`` or + a WAKE OSCILLATOR row with ``CL0 > 0`` (``frame_type_names``); a type takes one row. """ types = {row.tokens[0].lower(): row.tokens[0] for row in self.line_types} named: set[str] = set() @@ -3419,10 +3420,10 @@ def _check_viv_frame_section(self, wake_type_names: set[str]) -> None: f"{where}: VIV FRAME filter time Tf must be >= 0 (0 = the ambient flow), " "at most 1e15" ) - if name not in wake_type_names: + if name not in frame_type_names: raise DeckFormatError( f'{where}: VIV FRAME of LINE TYPE "{types[name]}" sets the flow frame of its ' - "wake oscillator: give the type a WAKE OSCILLATOR row" + "VIV model: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row" ) def _check_viv_damp_section(self, amp_type_names: set[str]) -> set[str]: @@ -4824,7 +4825,7 @@ def end_key(token: str) -> str: wake_type_names = self._check_wake_section(viv_type_names) amp_type_names = self._check_viv_amp_section(viv_type_names) self._check_viv_diam_section(viv_type_names | wake_type_names) - self._check_viv_frame_section(wake_type_names) + self._check_viv_frame_section(viv_type_names | wake_type_names) damp_type_names = self._check_viv_damp_section(amp_type_names) amp_lines = { line_id diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index 556cbf3e..7a887fad 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -296,8 +296,24 @@ def test_viv_frame_rows_are_written(tmp_path: Path) -> None: ) deck = DeckFile.from_text(model.to_text(validate=False), path=tmp_path / "deck.dat") assert [row.tokens for row in deck._rows("VIV FRAME")] == [("towed", "8.0")] + model.add_line_type( + "lifted", + diam=0.1, + mass=10.0, + ea=5.0e7, + cl=0.8, + viv_amplitude=[(0.0, 0.8, 1.0), (1.0, 0.4, 1.5)], + viv_frame_tf=6.0, + ) + model.add_line_type("lift", diam=0.1, mass=10.0, ea=5.0e7, cl=0.8, viv_frame_tf=4.0) + deck = DeckFile.from_text(model.to_text(validate=False), path=tmp_path / "deck.dat") + assert [row.tokens for row in deck._rows("VIV FRAME")] == [ + ("towed", "8.0"), + ("lifted", "6.0"), + ("lift", "4.0"), + ] model.add_line_type("plain", diam=0.1, mass=10.0, ea=5.0e7, viv_frame_tf=8.0) - with pytest.raises(ValueError, match="set wake_cl0"): + with pytest.raises(ValueError, match="set cl > 0 or wake_cl0"): model.to_text(validate=False) diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index 3e62ec3d..8646f138 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -5016,7 +5016,7 @@ def test_viv_frame_rows_are_read_and_kept(tmp_path): (True, ("cable 8",), 'undefined LINE TYPE "cable"'), (True, ("chain 8", "chain 4"), 'names LINE TYPE "chain" twice'), (True, ("chain -1",), "filter time Tf must be >= 0"), - (False, ("chain 8",), "give the type a WAKE OSCILLATOR row"), + (False, ("chain 8",), "give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row"), ], ) def test_viv_frame_rows_follow_the_native_checks(wake, rows, message): @@ -5033,6 +5033,15 @@ def test_viv_frame_rows_follow_the_native_checks(wake, rows, message): ) +def test_viv_frame_takes_a_synchronisation_type(): + # the phases of the lift alone, and with a table its estimate and damping split, take it + lift_only = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) + DeckFile.from_text(_with_section(lift_only, "VIV FRAME", "chain 8")) + DeckFile.from_text(_with_section(_DAMP_BASE, "VIV FRAME", "chain 8")) + damped = _with_section(_DAMP_BASE, "VIV DAMPING", "chain 0.31 0.89") + DeckFile.from_text(_with_section(damped, "VIV FRAME", "chain 8")) + + @pytest.mark.parametrize( "rows, expected", [ diff --git a/python/tests/test_end_to_end.py b/python/tests/test_end_to_end.py index 91c96996..580a0794 100644 --- a/python/tests/test_end_to_end.py +++ b/python/tests/test_end_to_end.py @@ -361,7 +361,13 @@ def _frame_rows(*rows: str) -> tuple[str, str]: [_WAKE_LIFT, _WAKE_SECTION, _WAKE_RISER, _frame_rows("riser 8 1")], False, ), - ("frame-sync-type", [_frame_rows("riser 8")], False), + ("frame-sync-type", [_frame_rows("riser 8")], True), + ("frame-no-viv", [_WAKE_LIFT, ("riser 0.85 0.15", ""), _frame_rows("riser 8")], False), + ( + "frame-amp-type", + [_amp_table("riser 0.0 0.8 1.0", "riser 0.5 0.4 1.5"), _frame_rows("riser 8")], + True, + ), ] _AMP_PARITY += _FRAME_PARITY @@ -381,6 +387,7 @@ def _damp_rows(*rows: str) -> tuple[str, str]: ("damp-negative", [_DAMP_TABLE, _damp_rows("riser 0.31 -0.89")], False), ("damp-one-value", [_DAMP_TABLE, _damp_rows("riser 0.31")], False), ("damp-repeated", [_DAMP_TABLE, _damp_rows("riser 0.31 0.89", "riser 0 0 1")], False), + ("damp-frame", [_DAMP_TABLE, _damp_rows("riser 0.31 0.89"), _frame_rows("riser 8")], True), ( "damp-ei0-line", [ diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 17ce2b7d..10a15ce7 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -3728,7 +3728,8 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, opts%viv_rms_window > CD_ZERO), 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, dviv=viv_dva, & - cdy=RESHAPE([cdy_a, cdy_b, cdy_c], [3, SIZE(cdy_a)], ORDER=[2, 1])) + cdy=RESHAPE([cdy_a, cdy_b, cdy_c], [3, SIZE(cdy_a)], ORDER=[2, 1]), & + tf=wo_tf) ELSE CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, viv_cl, viv_cf, viv_df, & MERGE(opts%viv_rms_window, & @@ -3736,7 +3737,8 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, opts%viv_rms_window > CD_ZERO), es, em, phase_seed=seed, & tangent_reversed=.NOT. ln%ends_swapped, amp=viv_amp3, amp_n=viv_ampn, & dviv=viv_dva, & - cdy=RESHAPE([cdy_a, cdy_b, cdy_c], [3, SIZE(cdy_a)], ORDER=[2, 1])) + cdy=RESHAPE([cdy_a, cdy_b, cdy_c], [3, SIZE(cdy_a)], ORDER=[2, 1]), & + tf=wo_tf) END IF END BLOCK IF (es /= CD_HCDYN_OK) THEN @@ -10458,6 +10460,8 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :), viv_dia(:) ! the WAKE OSCILLATOR rows per element (C_L0, St, eps, A, Tf; C_L0 0 where none) REAL(wp), ALLOCATABLE :: viv_wo(:, :) + ! the VIV FRAME filter time per element (0 where none) + REAL(wp), ALLOCATABLE :: viv_ftf(:) INTEGER, ALLOCATABLE :: viv_ampn(:) LOGICAL, ALLOCATABLE :: syr_el(:) REAL(wp) :: anchor(3), fairlead(3), mode1_omega @@ -10498,9 +10502,10 @@ 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_wo(5, SIZE(l0))) + viv_tix(SIZE(l0)), viv_dia(SIZE(l0)), viv_wo(5, SIZE(l0)), viv_ftf(SIZE(l0))) viv_tix = CD_ZERO viv_wo = CD_ZERO + viv_ftf = CD_ZERO viv_dia = CD_ZERO viv_cl = CD_ZERO viv_cf = CD_ZERO @@ -10586,6 +10591,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er viv_dia(e) = MERGE(types(line_section_type(sections, ln%id, i))%viv_dv, hydro_diam(e), & types(line_section_type(sections, ln%id, i))%viv_dv > CD_ZERO) syr_el(e) = types(line_section_type(sections, ln%id, i))%is_syrope + viv_ftf(e) = types(line_section_type(sections, ln%id, i))%viv_tf END DO END DO syr_el = syr_el(SIZE(syr_el):1:-1) @@ -10598,6 +10604,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er 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) + viv_ftf = viv_ftf(SIZE(viv_ftf):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 '// & @@ -10904,11 +10911,11 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er 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) + il_alpha=viv_al, chh=viv_hh, amp=viv_amp3, amp_n=viv_ampn, tf=viv_ftf) ELSE 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, amp=viv_amp3, & - amp_n=viv_ampn) + amp_n=viv_ampn, tf=viv_ftf) END IF END BLOCK IF (es == CD_MODEL_OK) CALL CD_Recompute_Model_Acceleration(model, es, em) @@ -17886,7 +17893,11 @@ SUBROUTINE apply_type_viv_frame(row, types, ErrStat, ErrMsg) !! flow relative to the cable's velocity low-pass filtered over Tf (first order), so that a !! cable moved through the water by a tow or its floater sees that motion as flow, and its own !! VIV velocity, much faster than Tf, does not count; Tf 0 is the ambient flow. It sets the - !! wake oscillator's frequency; the type needs a WAKE OSCILLATOR row. A type takes one row. + !! wake oscillator's frequency, or on the synchronisation model (LINE TYPES Cl > 0) the motion + !! of the phases (the cable's velocity relative to the filtered one) and the ambient-frame + !! quantities: the amplitude estimate (and so the VIV AMPLITUDE coefficients) and the axes of + !! the VIV DAMPING split; the shedding speed stays the relative normal speed. The type needs + !! LINE TYPES Cl > 0 or a WAKE OSCILLATOR row. A type takes one row. CHARACTER(*), INTENT(IN) :: row TYPE(DeckLineType), INTENT(INOUT) :: types(:) INTEGER, INTENT(OUT) :: ErrStat @@ -17917,9 +17928,9 @@ SUBROUTINE apply_type_viv_frame(row, types, ErrStat, ErrMsg) CALL fail(ErrStat, ErrMsg, 'VIV FRAME filter time Tf must be >= 0 (0 = the ambient flow), at most 1e15') RETURN END IF - IF (.NOT. (types(it)%wo_cl0 > CD_ZERO)) THEN + IF (.NOT. (types(it)%wo_cl0 > CD_ZERO .OR. types(it)%cl > CD_ZERO)) THEN CALL fail(ErrStat, ErrMsg, 'VIV FRAME of LINE TYPE "'//TRIM(types(it)%name)//'" sets the flow frame of '// & - 'its wake oscillator: give the type a WAKE OSCILLATOR row'); RETURN + 'its VIV model: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row'); RETURN END IF types(it)%viv_tf = v types(it)%has_vivf_row = .TRUE. diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index fb7b558b..9937a2d4 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -69,7 +69,7 @@ MODULE CableDyn_HermiteCableDynamic CD_VIV_Wrap_Phase, CD_VIV_TWO_PI, CD_VIV_NM, CD_VIV_Inline_Per_Length, & CD_VIV_Inline_Phase_Rate, CD_VIV_Wake_Advance, CD_VIV_NMS, CD_VIV_NMS_AMP, & CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, CD_VIV_Check_Amp_Table, & - CD_VIV_Ambient_Crossflow_Rate + CD_VIV_Ambient_Crossflow_Rate, CD_VIV_NMS_FRAME USE CableDyn_Hydro, ONLY: CD_Morison_Drag_Per_Length_Jac, CD_Airy_Wave_Kinematics_Precomputed, & CD_Morison_Drag_Split_Per_Length_Jac, & CD_Component_Wave_Kinematics, CD_Solve_Dispersion_Wavenumber, CD_HYDRO_OK @@ -386,6 +386,17 @@ MODULE CableDyn_HermiteCableDynamic ! flow (elem_cdy, elem_cdy_lin; c Cdn with the element's unamplified Cdn); a < 0, or the array ! unallocated, keeps the element's Morison drag. REAL(wp), ALLOCATABLE :: viv_cdy(:, :) + ! The flow frame of the synchronisation model (Set_VIV tf; VIV FRAME section): with a filter + ! time viv_ftfe(e) > 0 on some element (viv_frame) viv_ms has CD_VIV_NMS_FRAME rows, rows 7:9 + ! the node's velocity low-pass filtered over viv_ftf(k) (first order; the length-weighted + ! average over the node's lifting elements), rows 3:6 the amplitude estimate (0 without + ! amplitude tables). The node's velocity relative to it drives the phases (viv_node_motion; + ! the relative flow, and so the shedding speed, unchanged), and the ambient-frame quantities + ! take the ambient flow relative to it: the amplitude estimate (viv_node_ambient_yd) and so the + ! amplitude-table coefficients, and on an element with viv_ftfe(e) > 0 the axes and blend of + ! the cross-flow damping (elem_frame_v, the mean over its end nodes). + LOGICAL :: viv_frame = .FALSE. + REAL(wp), ALLOCATABLE :: viv_ftf(:), viv_ftfe(:) REAL(wp), ALLOCATABLE :: Mgb(:, :) ! constant global mass (band) LOGICAL, ALLOCATABLE :: freemask(:), solve_mask(:) INTEGER, ALLOCATABLE :: fmap(:) ! free -> global DOF index @@ -1151,7 +1162,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial(model, mu_axial, ErrStat, ErrM END SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg, phase_seed, tangent_reversed, & - clx, il_alpha, chh, wake, amp, amp_n, dviv, cdy) + clx, il_alpha, chh, wake, amp, amp_n, dviv, cdy, tf) !! 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 @@ -1201,6 +1212,15 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! CD_Morison_Drag_Split_Per_Length_Jac), y0 the smoothed amplitude estimate, so an element with !! it needs an amplitude table (amp_n > 0); a, b, c >= 0, finite. (0, 0, 1) amplifies the in-line !! drag alone and keeps Morison's cross-flow drag. + !! + !! tf (optional, ne; not with the wake oscillator, which takes it as wake(4, :)), per element the + !! filter time Tf [s] of the flow frame of the synchronisation model (0: the ambient flow; > 0 + !! only where cl > 0, at most 1e15), vbar the node velocity low-pass filtered over Tf (first + !! order): the cross-flow and in-line motion of the phases takes the node's velocity relative + !! to vbar (along the axes of the relative flow); the amplitude estimate takes it across the + !! ambient flow relative to vbar; and the cross-flow damping takes its axes and blend from that + !! flow. A cable moved through the water by a tow or its floater then sees that motion as flow. + !! The shedding speed of the phase rate stays the relative normal speed. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: cl(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -1216,13 +1236,14 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err INTEGER, INTENT(IN), OPTIONAL :: amp_n(:) REAL(wp), INTENT(IN), OPTIONAL :: dviv(:) REAL(wp), INTENT(IN), OPTIONAL :: cdy(:, :) + REAL(wp), INTENT(IN), OPTIONAL :: tf(:) INTEGER :: e, k, ne, nn, es, nms, nw - LOGICAL :: had_filter + LOGICAL :: had_filter, had_frame, want_frame REAL(wp) :: wsum, tw_old, rest_old LOGICAL :: had_viv, had_il, want_il, had_wake, want_wake, bad_band, had_amp, want_amp CHARACTER(LEN=1024) :: em REAL(wp), ALLOCATABLE :: p_amp(:, :, :) - REAL(wp), ALLOCATABLE :: p_dv(:), p_cdy(:, :) + REAL(wp), ALLOCATABLE :: p_dv(:), p_cdy(:, :), p_ftf(:), p_ftfe(:) INTEGER, ALLOCATABLE :: p_ampn(:) REAL(wp), ALLOCATABLE :: a_old(:), o_cl(:), o_k(:), o_cf(:), o_df(:), o_dn(:), o_phi(:), o_phi_eval(:), & o_rate(:), o_ms(:, :), o_ms_next(:, :), o_rec_phi(:), o_rec_ms(:, :), & @@ -1400,11 +1421,39 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err END IF END DO END IF + want_frame = .FALSE. + IF (PRESENT(tf)) THEN + IF (want_wake) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the wake oscillator takes its filter time as wake(4, :), not tf' + RETURN + END IF + IF (SIZE(tf) /= ne) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: tf must have one value per element' + RETURN + END IF + IF (.NOT. CD_All_Finite(tf)) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: tf must be finite'; RETURN + END IF + IF (ANY(tf < CD_ZERO) .OR. ANY(tf > 1.0e15_wp)) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the flow-frame filter time Tf must be >= 0 (0 = the ambient '// & + 'flow) and at most 1e15' + RETURN + END IF + IF (ANY(tf > CD_ZERO .AND. .NOT. (cl > CD_ZERO))) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the flow frame (tf > 0) acts on the VIV model: tf > 0 only where cl > 0' + RETURN + END IF + want_frame = ANY(tf > CD_ZERO) + END IF ! the previous configuration and state, kept for a rollback had_viv = model%has_viv had_il = model%has_viv_il had_wake = model%viv_wake had_filter = model%wo_filter + had_frame = model%viv_frame had_amp = model%has_viv_amp tw_old = model%viv_tw rest_old = model%viv_phi_rest @@ -1420,6 +1469,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err RETURN END IF nms = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, want_amp) + IF (want_frame) nms = CD_VIV_NMS_FRAME ALLOCATE (model%viv_cl(ne), model%viv_k(ne), model%viv_cf(nn), model%viv_df(nn), model%viv_dn(nn), & model%viv_phi(nn), & model%viv_phi_eval(nn), model%viv_rate(nn), model%viv_ms(nms, nn), model%viv_ms_next(nms, nn), & @@ -1466,6 +1516,25 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err model%viv_phi(k) = CD_VIV_Wrap_Phase(CD_VIV_TWO_PI*(REAL(nn - k, wp)/REAL(ne, wp) + 0.5_wp)) IF (PRESENT(phase_seed)) model%viv_phi(k) = CD_VIV_TWO_PI*phase_seed(k) END DO + IF (want_frame) THEN + ! the filter time per element and per node (length-weighted over its lifting elements, as + ! the band); the filtered velocity starts at the node's velocity + ALLOCATE (model%viv_ftfe(ne), model%viv_ftf(nn)) + model%viv_ftfe = tf + model%viv_ftf = CD_ZERO + DO k = 1, nn + IF (.NOT. model%viv_node(k)) CYCLE + wsum = CD_ZERO + DO e = MAX(1, k - 1), MIN(ne, k) + IF (.NOT. (cl(e) > CD_ZERO)) CYCLE + wsum = wsum + model%l0(e) + model%viv_ftf(k) = model%viv_ftf(k) + model%l0(e)*tf(e) + END DO + model%viv_ftf(k) = model%viv_ftf(k)/wsum + model%viv_ms(7:9, k) = model%v(6*(k - 1) + 1:6*(k - 1) + 3) + END DO + model%viv_frame = .TRUE. + END IF IF (want_il) THEN ALLOCATE (model%vil_cx(ne), model%vil_k(ne), model%vil_alpha(nn), model%vil_phi(nn), model%vil_phi_eval(nn), & model%vil_rate(nn), model%vil_ms(2, nn), model%vil_ms_next(2, nn), model%ws_recovery_vil_phi(nn), & @@ -1576,6 +1645,7 @@ SUBROUTINE refresh_acceleration() model%has_viv_il = had_il model%viv_wake = had_wake model%wo_filter = had_filter + model%viv_frame = had_frame model%has_viv_amp = had_amp model%viv_tw = tw_old model%viv_phi_rest = rest_old @@ -1612,6 +1682,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(p_amp, model%viv_amp); CALL MOVE_ALLOC(p_ampn, model%viv_amp_n) CALL MOVE_ALLOC(p_dv, model%viv_dv) CALL MOVE_ALLOC(p_cdy, model%viv_cdy) + CALL MOVE_ALLOC(p_ftf, model%viv_ftf); CALL MOVE_ALLOC(p_ftfe, model%viv_ftfe) ELSE CALL MOVE_ALLOC(model%viv_cl, o_cl); CALL MOVE_ALLOC(model%viv_k, o_k) CALL MOVE_ALLOC(model%viv_cf, o_cf); CALL MOVE_ALLOC(model%viv_df, o_df) @@ -1637,6 +1708,7 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(model%viv_amp, p_amp); CALL MOVE_ALLOC(model%viv_amp_n, p_ampn) CALL MOVE_ALLOC(model%viv_dv, p_dv) CALL MOVE_ALLOC(model%viv_cdy, p_cdy) + CALL MOVE_ALLOC(model%viv_ftf, p_ftf); CALL MOVE_ALLOC(model%viv_ftfe, p_ftfe) END IF END SUBROUTINE move_viv END SUBROUTINE CD_HermiteCable_Dyn_Set_VIV @@ -1663,6 +1735,9 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%viv_amp_n)) DEALLOCATE (model%viv_amp_n) IF (ALLOCATED(model%viv_dv)) DEALLOCATE (model%viv_dv) IF (ALLOCATED(model%viv_cdy)) DEALLOCATE (model%viv_cdy) + IF (ALLOCATED(model%viv_ftf)) DEALLOCATE (model%viv_ftf) + IF (ALLOCATED(model%viv_ftfe)) DEALLOCATE (model%viv_ftfe) + model%viv_frame = .FALSE. model%has_viv_amp = .FALSE. model%has_viv = .FALSE. model%has_viv_il = .FALSE. @@ -1776,7 +1851,8 @@ END FUNCTION elem_cdy_lin REAL(wp) FUNCTION viv_node_ambient_yd(model, k) RESULT(yd) !! Cross-flow velocity of node k across the ambient flow (current plus a held field) normal to !! its tangent (the slope DOFs) at the committed state, the y' of the amplitude estimate - !! (CD_VIV_Ambient_Crossflow_Rate). + !! (CD_VIV_Ambient_Crossflow_Rate). With the flow frame (viv_ftf(k) > 0) the flow and the + !! node's velocity are both taken relative to the node's filtered velocity. TYPE(CD_HermiteCableDynType), INTENT(IN) :: model INTEGER, INTENT(IN) :: k REAL(wp) :: uu(3) @@ -1784,9 +1860,29 @@ REAL(wp) FUNCTION viv_node_ambient_yd(model, k) RESULT(yd) i0 = 6*(k - 1) uu = model%current IF (model%has_held_field) uu = uu + model%hf_u(:, k) + IF (model%viv_frame) THEN + IF (model%viv_ftf(k) > CD_ZERO) THEN + yd = CD_VIV_Ambient_Crossflow_Rate(model%q(i0 + 4:i0 + 6), model%v(i0 + 1:i0 + 3) - model%viv_ms(7:9, k), & + uu - model%viv_ms(7:9, k)) + RETURN + END IF + END IF yd = CD_VIV_Ambient_Crossflow_Rate(model%q(i0 + 4:i0 + 6), model%v(i0 + 1:i0 + 3), uu) END FUNCTION viv_node_ambient_yd + PURE FUNCTION elem_frame_v(model, e) RESULT(vf) + !! The velocity of the flow frame of element e, which the ambient flow of its cross-flow damping + !! is taken relative to: the mean filtered velocity of its end nodes where the element has the + !! flow frame (viv_ftfe(e) > 0), else zero. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: e + REAL(wp) :: vf(3) + vf = CD_ZERO + IF (.NOT. model%viv_frame) RETURN + IF (.NOT. (model%viv_ftfe(e) > CD_ZERO)) RETURN + vf = 0.5_wp*(model%viv_ms(7:9, e) + model%viv_ms(7:9, e + 1)) + END FUNCTION elem_frame_v + REAL(wp) FUNCTION viv_node_ambient_speed(model, k, vslow) RESULT(ua) !! Speed of the ambient flow (current plus a held field) normal to node k's tangent (the slope !! DOFs) at the committed state, relative to the velocity vslow (optional; the node's filtered @@ -1811,7 +1907,11 @@ END FUNCTION viv_node_ambient_speed SUBROUTINE viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) !! Cross-flow velocity and acceleration of node k at the committed state, along its own !! tangent (the slope DOFs), in the flow the drag sees there (current plus a held field); - !! optionally (both or neither) the in-line ones. + !! optionally (both or neither) the in-line ones. With the flow frame (viv_ftf(k) > 0) the + !! velocity is the node's velocity relative to its filtered velocity vbar (the relative flow, + !! and so the axes and U, unchanged): a cable moved through still water then moves across the + !! flow only by its own VIV, as the held cable in the moving water does. The acceleration stays + !! the node's: vbar changes slowly, and its rate (v - vbar)/Tf would carry the VIV velocity. TYPE(CD_HermiteCableDynType), INTENT(IN) :: model INTEGER, INTENT(IN) :: k REAL(wp), INTENT(OUT) :: yd, ydd, un @@ -1822,6 +1922,14 @@ SUBROUTINE viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) i0 = 6*(k - 1) uu = model%current IF (model%has_held_field) uu = uu + model%hf_u(:, k) + IF (model%viv_frame) THEN + IF (model%viv_ftf(k) > CD_ZERO) THEN + ! absent xd, xdd pass on absent + CALL CD_VIV_Crossflow_Along(model%q(i0 + 4:i0 + 6), model%v(i0 + 1:i0 + 3) - model%viv_ms(7:9, k), & + model%a(i0 + 1:i0 + 3), uu - model%viv_ms(7:9, k), yd, ydd, un, ok, xd, xdd) + RETURN + END IF + END IF IF (PRESENT(xd)) THEN CALL CD_VIV_Crossflow_Along(model%q(i0 + 4:i0 + 6), model%v(i0 + 1:i0 + 3), model%a(i0 + 1:i0 + 3), uu, & yd, ydd, un, ok, xd, xdd) @@ -1967,6 +2075,14 @@ SUBROUTINE viv_step_end(model, dt) CALL CD_VIV_Amplitude_Update(st, yda, dt) model%viv_ms_next(3:6, k) = st END IF + IF (model%viv_frame) THEN + ! the flow frame's filtered velocity, exact for the first-order filter of the converged end + ! velocity held over the step (a non-finite end velocity keeps it); the estimate above took + ! the step-start one + IF (model%viv_ftf(k) > CD_ZERO .AND. CD_All_Finite(model%v(6*(k - 1) + 1:6*(k - 1) + 3))) & + model%viv_ms_next(7:9, k) = model%viv_ms(7:9, k) + (CD_ONE - EXP(-dt/model%viv_ftf(k)))* & + (model%v(6*(k - 1) + 1:6*(k - 1) + 3) - model%viv_ms(7:9, k)) + END IF IF (ok) THEN ms1 = CD_VIV_Mean_Square(model%viv_ms_next(1, k), yd, w) ms2 = CD_VIV_Mean_Square(model%viv_ms_next(2, k), ydd, w) @@ -2069,7 +2185,8 @@ SUBROUTINE element_drag_load(model, e, qe, ve, l0, t_eval, fdrag, ErrStat, ErrMs wvc_amp=model%wv_ampc, wvc_om=model%wv_omc, & wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & wvc_e2kd=model%wv_e2kd, cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) ELSE IF (model%has_wave) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & @@ -2077,19 +2194,22 @@ SUBROUTINE element_drag_load(model, e, qe, ve, l0, t_eval, fdrag, ErrStat, ErrMs wv_h=model%wv_h, wv_om=model%wv_om, wv_k=model%wv_k, & wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval, & cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) ELSE IF (model%has_held_field) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, l0, & model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, ErrStat=es, ErrMsg=ErrMsg, cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) ELSE CALL CD_HermiteCable_Drag_Element(qe, ve, l0, model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, ErrStat=es, ErrMsg=ErrMsg, cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) END IF ErrStat = es END SUBROUTINE element_drag_load @@ -9940,7 +10060,8 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta wvc_amp=model%wv_ampc, wvc_om=model%wv_omc, & wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & wvc_e2kd=model%wv_e2kd, cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) ELSE IF (model%has_wave) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & @@ -9948,7 +10069,8 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta wv_h=model%wv_h, wv_om=model%wv_om, wv_k=model%wv_k, & wv_depth=model%wv_depth, wv_dir=model%wv_dir, wv_t=t_eval, & cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) ELSE IF (model%has_held_field) THEN ! HELD host field: the element's ambient velocity = the drag config's constant ! current + the two end nodes' held-velocity average; the element waterline = @@ -9958,12 +10080,14 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, djq, djv, es, em_e, cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) ELSE CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fdrag, djq, djv, es, em_e, cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) END IF ELSE CALL element_drag_load(model, e, qe, ve, model%l0(e), t_eval, fdrag, es, em_e) @@ -11489,26 +11613,30 @@ SUBROUTINE evaluate_tangent_element(model, e, q_cfg, v_cfg, t_eval, Kstruct, Kdr wv_dir=model%wv_dir, wv_t=t_eval, wvc_amp=model%wv_ampc, & wvc_om=model%wv_omc, wvc_k=model%wv_kc, wvc_ph=model%wv_phc, & wvc_e2kd=model%wv_e2kd, cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) ELSE IF (model%has_wave) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fload, djq, djv, es, em, wv_h=model%wv_h, wv_om=model%wv_om, & wv_k=model%wv_k, wv_depth=model%wv_depth, wv_dir=model%wv_dir, & wv_t=t_eval, cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) ELSE IF (model%has_held_field) THEN CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), & model%current + 0.5_wp*(model%hf_u(:, e) + model%hf_u(:, e + 1)), & 0.5_wp*(model%hf_wl(e) + model%hf_wl(e + 1)), model%rho_w, & model%diam(e), elem_cdn(model, e), model%cdt(e), fload, djq, djv, es, em, & cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) ELSE CALL CD_HermiteCable_Drag_Element(qe, ve, model%l0(e), model%current, model%waterline_z, & model%rho_w, model%diam(e), elem_cdn(model, e), model%cdt(e), & fload, djq, djv, es, em, cdy=elem_cdy(model, e), & - cdy_lin=elem_cdy_lin(model, e)) + cdy_lin=elem_cdy_lin(model, e), & + frame_v=elem_frame_v(model, e)) END IF IF (es /= CD_HCDYN_OK) THEN ErrStat = es; ErrMsg = TRIM(em); RETURN @@ -11855,7 +11983,7 @@ END SUBROUTINE CD_HermiteCable_Point_Immersion SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, diam, cdn, cdt, & fdrag, djq, djv, ErrStat, ErrMsg, & wv_h, wv_om, wv_k, wv_depth, wv_dir, wv_t, & - wvc_amp, wvc_om, wvc_k, wvc_ph, wvc_e2kd, cdy, cdy_lin) + wvc_amp, wvc_om, wvc_k, wvc_ph, wvc_e2kd, cdy, cdy_lin, frame_v) !! Consistent Gauss-integrated Morison quadratic drag on one cubic-Hermite bending-cable element. !! qe(12), ve(12) = [r1, m1, r2, m2] nodal positions and velocities; the interior velocity and !! tangent use the SAME cubic-Hermite interpolation as the geometry, so the material-tangent (m) @@ -11888,6 +12016,9 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia REAL(wp), INTENT(IN), OPTIONAL :: cdy ! with cdy: the Morison-form cross-flow coefficient (CD_Morison_Drag_Split_Per_Length_Jac cdy_lin) REAL(wp), INTENT(IN), OPTIONAL :: cdy_lin + ! with cdy: the velocity of the flow frame (VIV FRAME), which the ambient flow of the split's axes + ! and blend is taken relative to (the drag itself keeps the flow relative to the cable) + REAL(wp), INTENT(IN), OPTIONAL :: frame_v(3) REAL(wp), INTENT(OUT) :: fdrag(12) ! djq/djv are OPTIONAL as a pair: a residual-only evaluation (a line-search trial, which ! never solves with a tangent) omits both and skips the 12x12 Jacobian accumulation -- @@ -12034,6 +12165,7 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia IF (split) THEN uamb = fluid IF (has_wv) uamb = uamb + uw + IF (PRESENT(frame_v)) uamb = uamb - frame_v IF (want_jac) THEN CALL CD_Morison_Drag_Split_Per_Length_Jac(urel, uamb, rp, rho, diam, cdn, cdy, cdt, CD_HCDYN_CDY_UREF, & fpl, Jrel, Jtan, es, em2, cdy_lin=cdy_lin) diff --git a/src/CableDyn_Model.f90 b/src/CableDyn_Model.f90 index 702eed5f..4f849d67 100644 --- a/src/CableDyn_Model.f90 +++ b/src/CableDyn_Model.f90 @@ -59,7 +59,8 @@ MODULE CableDyn_Model USE CableDyn_VIV, ONLY: CD_VIV_Node_Lift, CD_VIV_Crossflow_Motion, CD_VIV_Phase_Rate, CD_VIV_Mean_Square, & CD_VIV_Wrap_Phase, CD_VIV_NM, CD_VIV_TWO_PI, CD_VIV_Node_Inline, CD_VIV_Inline_Phase_Rate, & CD_VIV_NMS, CD_VIV_NMS_AMP, CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, & - CD_VIV_Check_Amp_Table, CD_VIV_Ambient_Crossflow_Rate, CD_VIV_Wake_Advance + CD_VIV_Check_Amp_Table, CD_VIV_Ambient_Crossflow_Rate, CD_VIV_Wake_Advance, & + CD_VIV_NMS_FRAME USE CableDyn_Dynamic, ONLY: GenAlphaConfig, CD_CableGenAlphaWorkspace, CD_Clear_GenAlpha_Workspace, & CD_Cable_Initial_Acceleration, CD_Cable_Gen_Alpha_Step, CD_Cable_Step_Loads, & CD_DYN_OK, CD_DYN_ALLOCFAIL, & @@ -438,6 +439,15 @@ MODULE CableDyn_Model LOGICAL :: has_viv_amp = .FALSE. REAL(wp), ALLOCATABLE :: viv_amp(:, :, :) INTEGER, ALLOCATABLE :: viv_amp_n(:) + ! The flow frame of the synchronisation model (CD_Set_Model_VIV tf; VIV FRAME section): with a + ! filter time viv_ftf(nd) > 0 on some node (viv_frame) viv_ms has CD_VIV_NMS_FRAME rows, rows + ! 7:9 the node's (smoothed) velocity low-pass filtered over viv_ftf (first order; the + ! length-weighted average over its lifting elements), rows 3:6 the amplitude estimate (0 + ! without amplitude tables). The node's velocity relative to it drives the phases (the relative + ! flow, and so the shedding speed, unchanged), and the amplitude estimate takes the node's + ! velocity across the ambient flow both relative to it (frame_node). + LOGICAL :: viv_frame = .FALSE. + REAL(wp), ALLOCATABLE :: viv_ftf(:) ! Wake-oscillator VIV (CD_Set_Model_VIV wake; Facchinetti et al. 2004): the van der Pol wake ! variable q = 2 C_L/C_L0 replaces the synchronisation phase of the whole line, the lift scale ! taking viv_cl = C_L0/2. Per node the Strouhal number, van der Pol eps and coupling A @@ -3960,7 +3970,7 @@ SUBROUTINE CD_Set_Model_Syrope_State(model, slow, tmax, ErrStat, ErrMsg) END SUBROUTINE CD_Set_Model_Syrope_State SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, ErrMsg, phase_seed, & - tangent_reversed, clx, il_alpha, chh, amp, amp_n, wake) + tangent_reversed, clx, il_alpha, chh, amp, amp_n, wake, tf) !! Install the cross-flow VIV model (CableDyn_VIV) on an initialised line. Per element: !! the lift coefficient cl (0 = no lift on that element), hydrodynamic diameter, and the !! synchronisation centre cf and half-range df of the non-dimensional shedding frequency; @@ -3991,7 +4001,15 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, !! (3, n_elem), per element the Strouhal number St > 0, van der Pol eps > 0 and acceleration !! coupling A >= 0 (each at most 1e15) where cl > 0, with cl then the reference lift !! coefficient C_L0 of a fixed cylinder; cf and df are unused. The wake variable q of a node - !! starts on its limit cycle at the node's start phase, q = 2 cos(phi_0), with dq/dt = 0. + !! starts on its limit cycle at the node's start phase, q = 2 cos(phi_0), with dq/dt = 0. An + !! optional fourth row wake(4, :) = Tf [s] >= 0 takes the flow relative to the node velocity + !! low-pass filtered over Tf (0: the ambient flow). + !! tf (optional, n_elem; not with wake), per element the filter time Tf [s] of the flow frame of + !! the synchronisation model (0: the ambient flow; > 0 only where cl > 0, at most 1e15), vbar + !! the node's smoothed velocity low-pass filtered over Tf (first order): the cross-flow and + !! in-line motion of the phases takes the node's velocity relative to vbar, and the amplitude + !! estimate takes it across the ambient flow relative to vbar, so a line moved through the + !! water sees that motion as flow. The shedding speed stays the relative normal speed. TYPE(CD_ModelType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: rho, cl(:), diameter(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -4005,9 +4023,10 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, REAL(wp), INTENT(IN), OPTIONAL :: amp(:, :, :) INTEGER, INTENT(IN), OPTIONAL :: amp_n(:) REAL(wp), INTENT(IN), OPTIONAL :: wake(:, :) + REAL(wp), INTENT(IN), OPTIONAL :: tf(:) INTEGER :: n_nodes, n_elem, e, nd, istat, k, nms REAL(wp) :: wsum - LOGICAL :: want_il, want_amp, want_wake, want_filter + LOGICAL :: want_il, want_amp, want_wake, want_filter, want_frame CHARACTER(160) :: amsg ErrStat = CD_MODEL_OK @@ -4133,6 +4152,27 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, RETURN END IF END IF + want_frame = .FALSE. + IF (PRESENT(tf)) THEN + IF (PRESENT(wake)) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV wake oscillator takes its filter time as wake(4, :), not tf') + RETURN + END IF + IF (SIZE(tf) /= n_elem .OR. .NOT. CD_All_Finite(tf)) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV flow-frame filter time tf must be finite with shape (n_elem)') + RETURN + END IF + IF (ANY(tf < CD_ZERO) .OR. ANY(tf > 1.0e15_wp)) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV flow-frame filter time Tf must be >= 0 (0 = the ambient flow) and '// & + 'at most 1e15') + RETURN + END IF + IF (ANY(tf > CD_ZERO .AND. .NOT. (cl > CD_ZERO))) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV flow frame (tf > 0) acts on the VIV model: tf > 0 only where cl > 0') + RETURN + END IF + want_frame = ANY(tf > CD_ZERO) + END IF CALL clear_viv(model) IF (.NOT. ANY(cl > CD_ZERO)) RETURN IF (.NOT. (CD_Is_Finite(rho) .AND. rho > CD_ZERO)) THEN @@ -4159,6 +4199,7 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, END IF END DO nms = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, want_amp .OR. (want_wake .AND. want_filter)) + IF (want_frame) nms = CD_VIV_NMS_FRAME ALLOCATE (model%viv_cl(n_elem), model%viv_d(n_elem), model%viv_node(n_nodes), model%viv_cf(n_nodes), & model%viv_df(n_nodes), model%viv_dn(n_nodes), model%viv_phi(n_nodes), model%viv_ms(nms, n_nodes), & model%viv_phi_rollback(n_nodes), model%viv_ms_rollback(nms, n_nodes), & @@ -4212,6 +4253,29 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, model%viv_phi(nd) = CD_VIV_Wrap_Phase(CD_VIV_TWO_PI*(REAL(n_nodes - nd, wp)/REAL(n_elem, wp) + 0.5_wp)) IF (PRESENT(phase_seed)) model%viv_phi(nd) = CD_VIV_TWO_PI*phase_seed(nd) END DO + IF (want_frame) THEN + ALLOCATE (model%viv_ftf(n_nodes), STAT=istat) + IF (istat /= 0) THEN + CALL clear_viv(model) + CALL alloc_fail(ErrStat, ErrMsg, 'VIV flow frame storage allocation failed') + RETURN + END IF + ! the filter time per node, length-weighted over its lifting elements as the band; the + ! filtered velocity starts at the node's (smoothed) velocity + model%viv_ftf = CD_ZERO + DO nd = 2, n_nodes - 1 + IF (.NOT. model%viv_node(nd)) CYCLE + wsum = CD_ZERO + DO k = nd - 1, nd + IF (.NOT. (cl(k) > CD_ZERO)) CYCLE + wsum = wsum + model%l0(k) + model%viv_ftf(nd) = model%viv_ftf(nd) + model%l0(k)*tf(k) + END DO + model%viv_ftf(nd) = model%viv_ftf(nd)/wsum + model%viv_ms(7:9, nd) = smoothed(model%v, 3*nd - 2) + END DO + model%viv_frame = .TRUE. + END IF model%viv_phi_rollback = model%viv_phi model%viv_ms_rollback = model%viv_ms model%recovery_viv_phi = model%viv_phi @@ -4642,6 +4706,7 @@ PURE INTEGER FUNCTION CD_Model_VIV_NMS(model) RESULT(n) !! wake filter (the filtered velocity in rows 3:5), CD_VIV_NMS otherwise. TYPE(CD_ModelType), INTENT(IN) :: model n = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp .OR. model%wo_filter) + IF (model%viv_frame) n = CD_VIV_NMS_FRAME END FUNCTION CD_Model_VIV_NMS SUBROUTINE CD_Get_Model_VIV_Amplitude(model, amp, ErrStat, ErrMsg) @@ -4777,8 +4842,16 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) IF (.NOT. model%viv_node(nd)) CYCLE CALL viv_node_coef(model, model%q, nd, coef, uu) ia = 3*nd - 2 - CALL CD_VIV_Crossflow_Motion(model%q(ia - 3:ia - 1), model%q(ia + 3:ia + 5), smoothed(model%v, ia), & - smoothed(model%a, ia), uu, yd, ydd, un, ok, xd, xdd) + IF (frame_node(model, nd)) THEN + ! with the flow frame, the node's velocity relative to its filtered one (the relative flow, + ! and so the axes and the shedding speed, unchanged; viv_frame) + CALL CD_VIV_Crossflow_Motion(model%q(ia - 3:ia - 1), model%q(ia + 3:ia + 5), & + smoothed(model%v, ia) - model%viv_ms(7:9, nd), smoothed(model%a, ia), & + uu - model%viv_ms(7:9, nd), yd, ydd, un, ok, xd, xdd) + ELSE + CALL CD_VIV_Crossflow_Motion(model%q(ia - 3:ia - 1), model%q(ia + 3:ia + 5), smoothed(model%v, ia), & + smoothed(model%a, ia), uu, yd, ydd, un, ok, xd, xdd) + END IF IF (.NOT. ok) THEN CALL fail(ErrStat, ErrMsg, 'VIV phase: the neighbours of a node coincide (no line tangent)') RETURN @@ -4836,9 +4909,16 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) IF (.NOT. model%viv_node(nd)) CYCLE CALL viv_node_coef(model, model%q_step, nd, coef, uu) ia = 3*nd - 2 - CALL CD_VIV_Crossflow_Motion(model%q_step(ia - 3:ia - 1), model%q_step(ia + 3:ia + 5), & - smoothed(model%v_step, ia), smoothed(model%a_step, ia), uu, yd, ydd, un, ok, & - xd, xdd) + IF (frame_node(model, nd)) THEN + CALL CD_VIV_Crossflow_Motion(model%q_step(ia - 3:ia - 1), model%q_step(ia + 3:ia + 5), & + smoothed(model%v_step, ia) - model%viv_ms(7:9, nd), & + smoothed(model%a_step, ia), uu - model%viv_ms(7:9, nd), yd, ydd, un, ok, & + xd, xdd) + ELSE + CALL CD_VIV_Crossflow_Motion(model%q_step(ia - 3:ia - 1), model%q_step(ia + 3:ia + 5), & + smoothed(model%v_step, ia), smoothed(model%a_step, ia), uu, yd, ydd, un, ok, & + xd, xdd) + END IF IF (model%viv_wake) THEN ! the wake state over the step with the cross-flow acceleration linear from its step-start ! value to the converged end one (held where the end tangent is degenerate), at the @@ -4871,13 +4951,30 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) END IF IF (model%has_viv_amp) THEN ! the amplitude estimate over the step, from the committed one (repeatable), on the - ! cross-flow velocity across the ambient flow + ! cross-flow velocity across the ambient flow; with the flow frame, the velocity and the + ! flow both relative to the step-start filtered velocity st = model%viv_ms(3:6, nd) - CALL CD_VIV_Amplitude_Update(st, CD_VIV_Ambient_Crossflow_Rate(model%q_step(ia + 3:ia + 5) - & - model%q_step(ia - 3:ia - 1), & - smoothed(model%v_step, ia), uu), dt) + IF (frame_node(model, nd)) THEN + CALL CD_VIV_Amplitude_Update(st, CD_VIV_Ambient_Crossflow_Rate(model%q_step(ia + 3:ia + 5) - & + model%q_step(ia - 3:ia - 1), & + smoothed(model%v_step, ia) - & + model%viv_ms(7:9, nd), & + uu - model%viv_ms(7:9, nd)), dt) + ELSE + CALL CD_VIV_Amplitude_Update(st, CD_VIV_Ambient_Crossflow_Rate(model%q_step(ia + 3:ia + 5) - & + model%q_step(ia - 3:ia - 1), & + smoothed(model%v_step, ia), uu), dt) + END IF model%viv_ms_next(3:6, nd) = st END IF + IF (frame_node(model, nd)) THEN + ! the filtered velocity follows the converged end velocity held over the step (exact for + ! the first-order filter; a non-finite end velocity keeps it) + vsm = smoothed(model%v_step, ia) + IF (CD_All_Finite(vsm)) & + model%viv_ms_next(7:9, nd) = model%viv_ms(7:9, nd) + (CD_ONE - EXP(-dt/model%viv_ftf(nd)))* & + (vsm - model%viv_ms(7:9, nd)) + END IF ms1 = CD_VIV_Mean_Square(model%viv_ms_next(1, nd), yd, w) ms2 = CD_VIV_Mean_Square(model%viv_ms_next(2, nd), ydd, w) rate_end = CD_VIV_Phase_Rate(yd, ydd, ms1, ms2, model%viv_phi(nd) + dt*model%viv_rate(nd), un, & @@ -4910,6 +5007,15 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) END IF END SUBROUTINE viv_step_end + PURE LOGICAL FUNCTION frame_node(model, nd) RESULT(on) + !! Node nd takes the flow frame of the synchronisation model (viv_frame, viv_ftf(nd) > 0). + TYPE(CD_ModelType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: nd + on = .FALSE. + IF (.NOT. model%viv_frame) RETURN + on = model%viv_ftf(nd) > CD_ZERO + END FUNCTION frame_node + PURE REAL(wp) FUNCTION viv_node_ambient_speed(q, ia, uu) RESULT(ua) !! Speed of the ambient flow uu normal to the tangent of the node whose x component is ia (the !! chord of its two neighbours at positions q); 0 for a degenerate tangent. @@ -4977,6 +5083,8 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%wo_eps)) DEALLOCATE (model%wo_eps) IF (ALLOCATED(model%wo_a)) DEALLOCATE (model%wo_a) IF (ALLOCATED(model%wo_tf)) DEALLOCATE (model%wo_tf) + IF (ALLOCATED(model%viv_ftf)) DEALLOCATE (model%viv_ftf) + model%viv_frame = .FALSE. model%viv_wake = .FALSE. model%wo_filter = .FALSE. model%has_viv_amp = .FALSE. @@ -7748,7 +7856,10 @@ SUBROUTINE CD_Copy_Model(src, dst, ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN CALL copy_real1(src%wo_tf, work%wo_tf, 'wo_tf', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%viv_ftf, work%viv_ftf, 'viv_ftf', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN work%wo_filter = src%wo_filter + work%viv_frame = src%viv_frame work%has_viv_amp = src%has_viv_amp CALL copy_real3(src%viv_amp, work%viv_amp, 'viv_amp', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN @@ -7944,6 +8055,8 @@ SUBROUTINE commit_model_copy(from, to) CALL MOVE_ALLOC(from%wo_eps, to%wo_eps) CALL MOVE_ALLOC(from%wo_a, to%wo_a) CALL MOVE_ALLOC(from%wo_tf, to%wo_tf) + CALL MOVE_ALLOC(from%viv_ftf, to%viv_ftf) + to%viv_frame = from%viv_frame to%wo_filter = from%wo_filter to%has_viv_amp = from%has_viv_amp CALL MOVE_ALLOC(from%viv_amp, to%viv_amp) diff --git a/src/CableDyn_VIV.f90 b/src/CableDyn_VIV.f90 index 8029a5cc..6bcf50e5 100644 --- a/src/CableDyn_VIV.f90 +++ b/src/CableDyn_VIV.f90 @@ -87,8 +87,11 @@ MODULE CableDyn_VIV !> Rows of the per-node VIV motion statistics: the running mean squares of the cross-flow !> velocity and acceleration (CD_VIV_NMS), and with an amplitude table (VIV AMPLITUDE section) !> the four values of the amplitude estimate after them (CD_VIV_NMS_AMP; CD_VIV_Amplitude_Update). + !> With a flow frame as well (VIV FRAME section, filter time Tf > 0) the node's velocity low-pass + !> filtered over Tf follows them in rows 7:9 (CD_VIV_NMS_FRAME). INTEGER, PARAMETER, PUBLIC :: CD_VIV_NMS = 2 INTEGER, PARAMETER, PUBLIC :: CD_VIV_NMS_AMP = 6 + INTEGER, PARAMETER, PUBLIC :: CD_VIV_NMS_FRAME = 9 !> The smoothing of the amplitude estimate per time step, k_a dt of Thorsen et al. (2016, Eq. 9). REAL(wp), PARAMETER, PUBLIC :: CD_VIV_AMP_KDT = 0.1_wp !> The most rows of one line type's amplitude table. diff --git a/tests/test_hermite_viv_frame.f90 b/tests/test_hermite_viv_frame.f90 new file mode 100644 index 00000000..d472015c --- /dev/null +++ b/tests/test_hermite_viv_frame.f90 @@ -0,0 +1,308 @@ +! File: tests/test_hermite_viv_frame.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_hermite_viv_frame + !! The flow frame of the synchronisation model on the cubic-Hermite cable + !! (CD_HermiteCable_Dyn_Set_VIV tf): with a filter time Tf > 0 the motion of the phase (the node's + !! velocity relative to its velocity low-pass filtered over Tf), the amplitude estimate and the + !! cross-flow damping split take the cable's filtered motion as their frame, so they are the same + !! in the cylinder's frame and in the water's. + !! + !! The pipe: 20 m, 10 elements, D 0.1 m, EI 1000 N m^2, pinned, about 21 kN, its mass that of the + !! water it displaces (8.05 kg/m, no net weight), Cd 1.2, Ca 1, Cl 0.8, alone or with an + !! amplitude table (Cv 0.8, 0.6, 0.0 and CdAmp 1.0, 1.3, 1.6 at A/D 0, 0.5, 1) and Thorsen's + !! cross-flow damping (a, b) = (0.31, 0.89). The flow along y oscillates with amplitude 0.6 m/s + !! and period 40 s (KC 240), its amplitude ramped up over the first period; the cross-flow axis + !! is z. + !! * moving: still water, both ends moved along y with velocity V(t); + !! * fixed: the ends held, the water moving at -V(t) (a held fluid field with its acceleration, + !! so the Froude-Krylov and added-mass loads act). + !! With the pipe's mass equal to the displaced mass, the in-line inertia of the two problems is + !! the same ((m + Ca rho A) dV/dt against (1 + Ca) rho A dV/dt); for any other mass they differ by + !! the Froude-Krylov term (m - rho A) dV/dt, the inertial force of the moving frame. So the two + !! runs differ only where the model depends on the frame. + !! + !! Gates: + !! * F1 the setter refuses tf of the wrong size, a negative or non-finite tf, tf > 0 on an element + !! without lift and tf with the wake oscillator; tf on the lift alone installs the frame (nine + !! motion statistics, no table); an all-zero tf installs no frame and reproduces the run + !! without tf bit for bit; + !! * F2 with Tf 0.6 s the moving and the fixed pipe agree, with the tables and with the lift + !! alone: the RMS cross-flow response of the mid node over the second period within 1 %, its + !! peak within 2 %. The RMS agrees within 0.2 % on every build and kernel; the peak of the moving + !! pipe ranges 0.811-0.819 D over the Release and Debug builds, the two OpenBLAS kernels and + !! Linux/Windows (fixed pipe 0.819 D), a single extreme of the response. What is left is the + !! filter's lag of the imposed velocity, about omega Tf = 0.094 rad; + !! * F3 without the frame they differ: in still water the moving pipe's phase sees no cross-flow + !! velocity (r'.e = u.e = 0 across the relative flow), and with the tables it takes Cv and CdAmp + !! at A/D 0 and the Morison drag; with the tables the peak response is more than 10 % (measured + !! 16 %) and the RMS more than 15 % (measured 23 %) from the fixed pipe's, with the lift alone + !! the RMS more than 4 % (measured 7 %); + !! * F4 a snapshot taken mid-run and restored replays the following steps bit for bit, the + !! filtered velocity included. + USE, INTRINSIC :: IEEE_ARITHMETIC, ONLY: IEEE_VALUE, IEEE_QUIET_NAN + USE CableDyn_Precision, ONLY: wp + USE CableDyn_VIV, ONLY: CD_VIV_AMP_MAXP, CD_VIV_NMS_FRAME + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & + CD_HermiteCable_Dyn_Set_Drag, CD_HermiteCable_Dyn_Set_AddedMass, & + CD_HermiteCable_Dyn_Set_VIV, CD_HermiteCable_Dyn_Set_Held_Fluid, & + CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Snapshot, & + CD_HermiteCable_Dyn_Restore, CD_HermiteCable_Dyn_End, CD_HCDYN_OK + IMPLICIT NONE + + REAL(wp), PARAMETER :: PI = 3.141592653589793_wp + REAL(wp), PARAMETER :: RHOW = 1025.0_wp, D = 0.1_wp, EA = 5.0e7_wp, EI = 1.0e3_wp, TENS = 2.1e4_wp + REAL(wp), PARAMETER :: SPAN = 20.0_wp, DT = 0.01_wp, U0 = 0.6_wp, TP = 40.0_wp, TF = 0.6_wp + REAL(wp), PARAMETER :: MLIN = RHOW*0.25_wp*PI*D*D + INTEGER, PARAMETER :: NE = 10, NN = NE + 1, MID = 6*(NE/2), NSTEP = NINT(2.0_wp*TP/DT) + ! the agreement of the moving and the fixed pipe with the flow frame (F2) + REAL(wp), PARAMETER :: TOL_F2 = 0.01_wp, TOL_F2_PEAK = 0.02_wp + + TYPE(CD_HermiteCableDynType) :: model, twin + REAL(wp) :: cl(NE), cf(NE), df(NE), amp(3, CD_VIV_AMP_MAXP, NE), cdy(2, NE), tf0(NE), tfv(NE) + INTEGER :: ampn(NE) + REAL(wp) :: pk_mf, rms_mf, pk_ff, rms_ff, pk_m0, rms_m0, pk_f0, rms_f0 + INTEGER :: es, nfail, k, it + LOGICAL :: tables + CHARACTER(12) :: lab + CHARACTER(1024) :: em + + nfail = 0 + cl = 0.8_wp; cf = 0.18_wp; df = 0.08_wp + amp = 0.0_wp + amp(:, 1, :) = SPREAD([0.0_wp, 0.8_wp, 1.0_wp], 2, NE) + amp(:, 2, :) = SPREAD([0.5_wp, 0.6_wp, 1.3_wp], 2, NE) + amp(:, 3, :) = SPREAD([1.0_wp, 0.0_wp, 1.6_wp], 2, NE) + ampn = 3 + cdy(1, :) = 0.31_wp; cdy(2, :) = 0.89_wp + tf0 = 0.0_wp + tfv = TF + + ! ---- F1 refusals; an all-zero tf is no frame ---- + CALL build(model) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, tf=tfv(1:NE - 1)) + CALL require(es /= CD_HCDYN_OK, 'F1: tf of the wrong size is refused') + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, tf=-tfv) + CALL require(es /= CD_HCDYN_OK .AND. INDEX(em, 'must be >= 0') > 0, 'F1: a negative tf is refused: '//TRIM(em)) + BLOCK + REAL(wp) :: bad(NE) + REAL(wp) :: cl2(NE) + bad = tfv + bad(4) = IEEE_VALUE(1.0_wp, IEEE_QUIET_NAN) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, tf=bad) + CALL require(es /= CD_HCDYN_OK, 'F1: a non-finite tf is refused') + cl2 = cl + cl2(3) = 0.0_wp + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl2, cf, df, 2.0_wp, es, em, tf=tfv) + CALL require(es /= CD_HCDYN_OK .AND. INDEX(em, 'only where cl > 0') > 0, & + 'F1: tf > 0 on an element without lift is refused: '//TRIM(em)) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, & + wake=RESHAPE([(0.2_wp, 0.3_wp, 12.0_wp, k=1, NE)], [3, NE]), tf=tf0) + CALL require(es /= CD_HCDYN_OK .AND. INDEX(em, 'wake(4, :)') > 0, 'F1: tf with the wake oscillator is refused: '// & + TRIM(em)) + END BLOCK + CALL require(.NOT. model%has_viv .AND. .NOT. model%viv_frame, 'F1: a refused call installs nothing') + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, tf=tfv) + CALL require(es == CD_HCDYN_OK .AND. model%viv_frame .AND. .NOT. model%has_viv_amp .AND. & + SIZE(model%viv_ms, 1) == CD_VIV_NMS_FRAME, 'F1: the frame installs on the lift alone: '//TRIM(em)) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy, tf=tf0) + CALL require(es == CD_HCDYN_OK .AND. .NOT. model%viv_frame .AND. SIZE(model%viv_ms, 1) == 6, & + 'F1: an all-zero tf installs no frame: '//TRIM(em)) + CALL build(twin) + CALL CD_HermiteCable_Dyn_Set_VIV(twin, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy) + CALL require(es == CD_HCDYN_OK, 'F1: the twin without tf installs: '//TRIM(em)) + DO k = 1, 600 + CALL advance(model, k, .TRUE.) + CALL advance(twin, k, .TRUE.) + IF (es /= CD_HCDYN_OK) EXIT + IF (ANY(model%q /= twin%q) .OR. ANY(model%viv_phi /= twin%viv_phi) .OR. ANY(model%viv_ms /= twin%viv_ms)) EXIT + END DO + CALL require(k > 600, 'F1: an all-zero tf reproduces the run without tf bit for bit') + CALL CD_HermiteCable_Dyn_End(model) + CALL CD_HermiteCable_Dyn_End(twin) + + ! ---- F2 and F3 the two frames, with and without the flow frame, with and without the tables ---- + DO it = 1, 2 + tables = it == 1 + lab = MERGE(' (tables) ', ' (lift only)', tables) + CALL run_case(.TRUE., tfv, tables, pk_mf, rms_mf) + CALL run_case(.FALSE., tfv, tables, pk_ff, rms_ff) + CALL run_case(.TRUE., tf0, tables, pk_m0, rms_m0) + CALL run_case(.FALSE., tf0, tables, pk_f0, rms_f0) + WRITE (*, '(A,2F9.4,A,2F9.4)') ' F2'//lab//' with Tf: moving peak, RMS A/D ', pk_mf/D, rms_mf/D, '; fixed ', & + pk_ff/D, rms_ff/D + WRITE (*, '(A,2F9.4,A,2F9.4)') ' F3'//lab//' without: moving peak, RMS A/D ', pk_m0/D, rms_m0/D, '; fixed ', & + pk_f0/D, rms_f0/D + CALL require(pk_ff > 0.2_wp*D, 'F2: the fixed pipe locks in'//lab) + CALL require(ABS(pk_mf/pk_ff - 1.0_wp) <= TOL_F2_PEAK .AND. ABS(rms_mf/rms_ff - 1.0_wp) <= TOL_F2, & + 'F2: with the flow frame the moving and the fixed pipe agree'//lab) + CALL require(ABS(pk_m0/pk_f0 - 1.0_wp) > MERGE(0.10_wp, 0.0_wp, tables) .AND. & + ABS(rms_m0/rms_f0 - 1.0_wp) > MERGE(0.15_wp, 0.04_wp, tables), & + 'F3: without it the moving pipe responds otherwise'//lab) + END DO + + ! ---- F4 snapshot replay with the filtered velocity ---- + BLOCK + REAL(wp), ALLOCATABLE :: q_ref(:, :), ms_ref(:, :, :) + INTEGER :: s + CALL build(model) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy, tf=tfv) + CALL require(es == CD_HCDYN_OK .AND. model%viv_frame .AND. SIZE(model%viv_ms, 1) == CD_VIV_NMS_FRAME, & + 'F4: the frame installs: '//TRIM(em)) + DO s = 1, 1500 + CALL advance(model, s, .TRUE.) + END DO + CALL require(MAXVAL(ABS(model%viv_ms(8, :))) > 0.1_wp*U0, 'F4: the filtered velocity follows the motion') + CALL CD_HermiteCable_Dyn_Snapshot(model, es, em) + CALL require(es == CD_HCDYN_OK, 'F4: snapshot: '//TRIM(em)) + ALLOCATE (q_ref(SIZE(model%q), 200), ms_ref(CD_VIV_NMS_FRAME, NN, 200)) + DO s = 1, 200 + CALL advance(model, 1500 + s, .TRUE.) + q_ref(:, s) = model%q + ms_ref(:, :, s) = model%viv_ms + END DO + CALL CD_HermiteCable_Dyn_Restore(model, es, em) + CALL require(es == CD_HCDYN_OK, 'F4: restore: '//TRIM(em)) + DO s = 1, 200 + CALL advance(model, 1500 + s, .TRUE.) + IF (ANY(model%q /= q_ref(:, s)) .OR. ANY(model%viv_ms /= ms_ref(:, :, s))) EXIT + END DO + CALL require(s > 200, 'F4: the restored snapshot replays the state and the filtered velocity bit for bit') + CALL CD_HermiteCable_Dyn_End(model) + END BLOCK + + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: the flow frame of the synchronisation model on the cubic-Hermite cable' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE build(m) + !! The pinned taut pipe along x at 10 m depth in still water, pretensioned through its + !! unstretched length, with drag and the normal added mass. + TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: m + REAL(wp) :: seed(6*NN), l0(NE), eav(NE), eiv(NE), wv(NE), rhoa(NE), hd(NE), hn(NE), ht(NE) + INTEGER :: i + seed = 0.0_wp + DO i = 1, NN + seed(6*(i - 1) + 1) = SPAN*REAL(i - 1, wp)/REAL(NE, wp) + seed(6*(i - 1) + 3) = -10.0_wp + seed(6*(i - 1) + 4) = 1.0_wp + END DO + l0 = SPAN/REAL(NE, wp)/(1.0_wp + TENS/EA) + eav = EA; eiv = EI; rhoa = MLIN; wv = 0.0_wp + CALL CD_HermiteCable_Dyn_Init(m, l0, eav, eiv, rhoa, wv, seed, end_dofs(), -200.0_wp, 0.0_wp, 0.5_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'init: '//TRIM(em)) + hd = D; hn = 1.2_wp; ht = 0.0_wp + CALL CD_HermiteCable_Dyn_Set_Drag(m, RHOW, hd, hn, ht, 0.0_wp, [0.0_wp, 0.0_wp, 0.0_wp], es, em) + CALL require(es == CD_HCDYN_OK, 'drag: '//TRIM(em)) + hn = 1.0_wp + CALL CD_HermiteCable_Dyn_Set_AddedMass(m, RHOW, hd, hn, ht, 0.0_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'added mass: '//TRIM(em)) + END SUBROUTINE build + + PURE FUNCTION end_dofs() RESULT(fixed) + INTEGER :: fixed(6) + fixed = [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3] + END FUNCTION end_dofs + + SUBROUTINE imposed(t, y, v, a) + !! The imposed motion along y: V = U0 r(t) sin(omega t), r = (1 - cos(pi t/TP))/2 over the + !! first period and 1 after it; y its integral (exact), a its derivative. + REAL(wp), INTENT(IN) :: t + REAL(wp), INTENT(OUT) :: y, v, a + REAL(wp) :: om, p, r, dr + om = 2.0_wp*PI/TP + p = PI/TP + IF (t < TP) THEN + r = 0.5_wp*(1.0_wp - COS(p*t)) + dr = 0.5_wp*p*SIN(p*t) + ! int_0^t (1 - cos(p s)) sin(om s)/2 ds with om = 2 p + y = U0*0.5_wp*((1.0_wp - COS(om*t))/om - (0.5_wp*(1.0_wp - COS(3.0_wp*p*t))/(3.0_wp*p) + & + 0.5_wp*(1.0_wp - COS(p*t))/p)) + ELSE + r = 1.0_wp + dr = 0.0_wp + y = U0*0.5_wp*(-(0.5_wp*(1.0_wp - COS(3.0_wp*PI))/(3.0_wp*p) + 0.5_wp*(1.0_wp - COS(PI))/p)) + & + U0*(COS(om*TP) - COS(om*t))/om + END IF + v = U0*r*SIN(om*t) + a = U0*(dr*SIN(om*t) + r*om*COS(om*t)) + END SUBROUTINE imposed + + SUBROUTINE advance(m, s, moving) + !! Step s (to t = s DT) of the moving pipe (ends prescribed) or of the fixed pipe (the held + !! field at the step's mid time, -V and -dV/dt). + TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: m + INTEGER, INTENT(IN) :: s + LOGICAL, INTENT(IN) :: moving + REAL(wp) :: y, v, a, pq(6), pv(6), pa(6), fu(3, NN), fa(3, NN), wl(NN) + INTEGER :: i + IF (moving) THEN + CALL imposed(REAL(s, wp)*DT, y, v, a) + pq = [0.0_wp, y, -10.0_wp, SPAN, y, -10.0_wp] + pv = [0.0_wp, v, 0.0_wp, 0.0_wp, v, 0.0_wp] + pa = [0.0_wp, a, 0.0_wp, 0.0_wp, a, 0.0_wp] + CALL CD_HermiteCable_Dyn_Step(m, DT, 50, 1.0e-8_wp, es, em, pres_dofs=end_dofs(), pres_q=pq, pres_v=pv, & + pres_a=pa) + ELSE + CALL imposed((REAL(s, wp) - 0.5_wp)*DT, y, v, a) + DO i = 1, NN + fu(:, i) = [0.0_wp, -v, 0.0_wp] + fa(:, i) = [0.0_wp, -a, 0.0_wp] + END DO + wl = 0.0_wp + CALL CD_HermiteCable_Dyn_Set_Held_Fluid(m, fu, fa, wl, es, em) + IF (es /= CD_HCDYN_OK) THEN + CALL require(.FALSE., 'held field: '//TRIM(em)); RETURN + END IF + CALL CD_HermiteCable_Dyn_Step(m, DT, 50, 1.0e-8_wp, es, em) + END IF + IF (es /= CD_HCDYN_OK) CALL require(.FALSE., 'step: '//TRIM(em)) + END SUBROUTINE advance + + SUBROUTINE run_case(moving, tfe, tables, pk, rms) + !! Two periods of the moving or the fixed pipe with the filter times tfe, with the amplitude + !! tables and the cross-flow damping (tables) or the lift Cl alone; over the second period + !! the peak and RMS cross-flow (z) displacement of the mid node from its rest depth. + LOGICAL, INTENT(IN) :: moving, tables + REAL(wp), INTENT(IN) :: tfe(NE) + REAL(wp), INTENT(OUT) :: pk, rms + TYPE(CD_HermiteCableDynType), ALLOCATABLE :: m + REAL(wp) :: z, s2 + INTEGER :: s, n + ALLOCATE (m) + CALL build(m) + IF (tables) THEN + CALL CD_HermiteCable_Dyn_Set_VIV(m, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy, tf=tfe) + ELSE + CALL CD_HermiteCable_Dyn_Set_VIV(m, cl, cf, df, 2.0_wp, es, em, tf=tfe) + END IF + CALL require(es == CD_HCDYN_OK, 'VIV: '//TRIM(em)) + pk = 0.0_wp + s2 = 0.0_wp + n = 0 + DO s = 1, NSTEP + CALL advance(m, s, moving) + IF (es /= CD_HCDYN_OK) EXIT + IF (s <= NSTEP/2) CYCLE + z = m%q(MID + 3) + 10.0_wp + pk = MAX(pk, ABS(z)) + s2 = s2 + z*z + n = n + 1 + END DO + rms = SQRT(s2/REAL(MAX(n, 1), wp)) + CALL CD_HermiteCable_Dyn_End(m) + END SUBROUTINE run_case + +END PROGRAM test_hermite_viv_frame diff --git a/tests/test_viv_coupled.f90 b/tests/test_viv_coupled.f90 index b18bf10d..3b91a048 100644 --- a/tests/test_viv_coupled.f90 +++ b/tests/test_viv_coupled.f90 @@ -40,7 +40,12 @@ PROGRAM test_viv_coupled !! * amplitude tables (a VIV AMPLITUDE table on both types, Cv falling from 0.8 at A/D 0 to 0.4 at !! 1, CdAmp from 1 to 1.5): both checkpoint blocks grow by the amplitude estimate (4 per node), !! the restarted run continues bit for bit with it, a rebuild without the VIV state does not, - !! and a rewound step repeats. + !! and a rewound step repeats; with the flow frame (VIV FRAME Tf 5 s on both types, and VIV + !! DAMPING on the cable) both blocks carry the filtered velocity too (3 more per node, 9 motion + !! statistics), with the same restart and rewind checks; + !! * the flow frame on the lift alone (VIV FRAME Tf 5 s, no tables): both blocks carry the + !! filtered velocity in rows 7-9 of 9 motion statistics (rows 3-6 unused), with the same restart + !! and rewind checks. USE CableDyn_Precision, ONLY: wp USE CableDyn_OpenFAST_Aggregate, ONLY: CD_AGG_ModuleType, CD_AGG_Init_From_Deck, CD_AGG_End, CD_AGG_OK, & CD_AGG_NMovingPoints, CD_AGG_GetMovingPointMesh, CD_AGG_Step_Moving, & @@ -60,7 +65,8 @@ PROGRAM test_viv_coupled INTEGER :: nfail ! the deck of the restart and rewind cases, and whether its lines carry in-line VIV CHARACTER(32) :: deck_name = 'viv_coupled.dat' - LOGICAL :: il_case = .FALSE., wake_case = .FALSE., amp_case = .FALSE., wakef_case = .FALSE. + LOGICAL :: il_case = .FALSE., wake_case = .FALSE., amp_case = .FALSE., wakef_case = .FALSE., ampf_case = .FALSE. + LOGICAL :: frame_case = .FALSE. nfail = 0 CALL write_deck('viv_coupled.dat', 0.8_wp) @@ -69,6 +75,8 @@ PROGRAM test_viv_coupled CALL write_deck('viv_coupled_wake.dat', 0.8_wp, wake=.TRUE.) CALL write_deck('viv_coupled_wakef.dat', 0.8_wp, wake=.TRUE., wake_tf='5.0') CALL write_deck('viv_coupled_amp.dat', 0.8_wp, amp=.TRUE.) + CALL write_deck('viv_coupled_ampf.dat', 0.8_wp, amp=.TRUE., wake_tf='5.0', damp=.TRUE.) + CALL write_deck('viv_coupled_frame.dat', 0.8_wp, wake_tf='5.0') CALL case_lockin() CALL case_restart() CALL case_rewind() @@ -87,12 +95,23 @@ PROGRAM test_viv_coupled wakef_case = .TRUE. CALL case_restart() CALL case_rewind() + deck_name = 'viv_coupled_frame.dat' + wake_case = .FALSE. + wakef_case = .FALSE. + frame_case = .TRUE. + CALL case_restart() + CALL case_rewind() + frame_case = .FALSE. deck_name = 'viv_coupled_amp.dat' wake_case = .FALSE. wakef_case = .FALSE. amp_case = .TRUE. CALL case_restart() CALL case_rewind() + deck_name = 'viv_coupled_ampf.dat' + ampf_case = .TRUE. + CALL case_restart() + CALL case_rewind() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' coupled VIV check(s) failed' ERROR STOP 1 @@ -380,7 +399,8 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) a_interior=aL(4:ndof - 3)) ok = ok .AND. es == CD_SYSTEM_OK nv = CD_System_Line_VIV_MirrorSize(a%sys%fast%system, il) - ok = ok .AND. nv == (MERGE(6, 3, il_case) + MERGE(4, 0, amp_case .OR. wakef_case))*(ndof/3) + 1 + ok = ok .AND. nv == (MERGE(6, 3, il_case) + MERGE(4, 0, amp_case .OR. wakef_case) + & + MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case))*(ndof/3) + 1 IF (with_viv .AND. nv > 0) THEN ALLOCATE (buf(nv)) CALL CD_Get_System_Line_VIV_State(a%sys%fast%system, il, buf, es, em) @@ -394,7 +414,8 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) CALL CD_HFMF_PackMirror(a%cables(1), buf, es, em) nvc = CD_HFMF_VIVMirrorSize(a%cables(1)) ok = ok .AND. nvc == (MERGE(6, 3, il_case) + MERGE(MERGE(5, 2, wakef_case), 0, wake_case) + & - MERGE(4, 0, amp_case))*a%cables(1)%line%nn + 1 + MERGE(4, 0, amp_case) + MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case))* & + a%cables(1)%line%nn + 1 IF (.NOT. with_viv) THEN ! the cable's VIV block as the fresh build has it (the torsion-free cable ends with it) CALL CD_HFMF_PackMirror(b%cables(1), fresh, es, em) @@ -420,10 +441,21 @@ LOGICAL FUNCTION identical(a, b) RESULT(same) a%sys%fast%system%lines(1)%viv_wake .AND. & MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_ms - & b%sys%fast%system%lines(1)%viv_ms)) <= 0.0_wp + IF (same .AND. frame_case) THEN + ! the filtered velocity in rows 7-9 of the motion statistics on both lines, no tables + same = a%cables(1)%line%viv_frame .AND. .NOT. a%cables(1)%line%has_viv_amp .AND. & + a%sys%fast%system%lines(1)%viv_frame .AND. .NOT. a%sys%fast%system%lines(1)%has_viv_amp .AND. & + SIZE(a%cables(1)%line%viv_ms, 1) == 9 .AND. SIZE(a%sys%fast%system%lines(1)%viv_ms, 1) == 9 .AND. & + MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_ms - b%sys%fast%system%lines(1)%viv_ms)) <= 0.0_wp .AND. & + MAXVAL(ABS(a%cables(1)%line%viv_ms - b%cables(1)%line%viv_ms)) <= 0.0_wp + END IF IF (same .AND. amp_case) THEN ! the motion statistics with the amplitude estimate (rows 3-6) on both lines same = a%sys%fast%system%lines(1)%has_viv_amp .AND. a%cables(1)%line%has_viv_amp .AND. & - SIZE(a%cables(1)%line%viv_ms, 1) == 6 .AND. & + SIZE(a%cables(1)%line%viv_ms, 1) == MERGE(9, 6, ampf_case) .AND. & + SIZE(a%sys%fast%system%lines(1)%viv_ms, 1) == MERGE(9, 6, ampf_case) .AND. & + (a%cables(1)%line%viv_frame .EQV. ampf_case) .AND. & + (a%sys%fast%system%lines(1)%viv_frame .EQV. ampf_case) .AND. & MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_ms - b%sys%fast%system%lines(1)%viv_ms)) <= 0.0_wp .AND. & MAXVAL(ABS(a%cables(1)%line%viv_ms - b%cables(1)%line%viv_ms)) <= 0.0_wp END IF @@ -455,16 +487,17 @@ SUBROUTINE response(z, ad, f) IF (n > 1) f = REAL(n - 1, wp)/(t1 - t0) END SUBROUTINE response - SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp, wake_tf) + SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp, wake_tf, damp) !! The EI = 0 riser (line 1) and the finite-EI cable (line 2), 20 m apart across the current; !! VIVrmsWindow 0.25 s unless window is given (0: none), and a deck dtM when dtm is given; !! inline adds the in-line VIV of both types (a VIV section, ClX 0.85); wake gives both types !! the wake oscillator instead of their lift (Cl 0 and WAKE OSCILLATOR rows, C_L0 0.3); amp a VIV - !! AMPLITUDE table on both types. + !! AMPLITUDE table on both types; damp Thorsen's cross-flow damping (VIV DAMPING 0.31 0.89) on the + !! cable. CHARACTER(*), INTENT(IN) :: path REAL(wp), INTENT(IN) :: cl REAL(wp), INTENT(IN), OPTIONAL :: window, dtm - LOGICAL, INTENT(IN), OPTIONAL :: anchor_first, inline, wake, amp + LOGICAL, INTENT(IN), OPTIONAL :: anchor_first, inline, wake, amp, damp ! the VIV FRAME filter time Tf of both types (no section without it) CHARACTER(*), INTENT(IN), OPTIONAL :: wake_tf INTEGER :: u @@ -519,12 +552,6 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp, wa WRITE (u, '(A)') 'TypeName CL0 St eps A' WRITE (u, '(A)') 'riser 0.3 0.2 0.3 12' WRITE (u, '(A)') 'cable 0.3 0.2 0.3 12' - IF (PRESENT(wake_tf)) THEN - WRITE (u, '(A)') '--------------------- VIV FRAME ---' - WRITE (u, '(A)') 'TypeName Tf' - WRITE (u, '(A)') 'riser '//wake_tf - WRITE (u, '(A)') 'cable '//wake_tf - END IF END IF IF (PRESENT(amp)) THEN IF (amp) THEN @@ -536,6 +563,19 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp, wa WRITE (u, '(A)') 'cable 1.0 0.4 1.5' END IF END IF + IF (PRESENT(damp)) THEN + IF (damp) THEN + WRITE (u, '(A)') '--------------------- VIV DAMPING ---' + WRITE (u, '(A)') 'TypeName a b' + WRITE (u, '(A)') 'cable 0.31 0.89' + END IF + END IF + IF (PRESENT(wake_tf)) THEN + WRITE (u, '(A)') '--------------------- VIV FRAME ---' + WRITE (u, '(A)') 'TypeName Tf' + WRITE (u, '(A)') 'riser '//wake_tf + WRITE (u, '(A)') 'cable '//wake_tf + END IF WRITE (u, '(A)') '--------------------- OPTIONS ---' WRITE (u, '(A)') '100.0 WtrDpth' WRITE (u, '(A)') '1025.0 rhoW' diff --git a/tests/test_viv_frame_deck.f90 b/tests/test_viv_frame_deck.f90 new file mode 100644 index 00000000..41049303 --- /dev/null +++ b/tests/test_viv_frame_deck.f90 @@ -0,0 +1,353 @@ +! File: tests/test_viv_frame_deck.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_frame_deck + !! The VIV FRAME section (TypeName Tf) on the synchronisation model: with Tf > 0 the motion of the + !! phases (the cable's velocity relative to its velocity low-pass filtered over Tf), the amplitude + !! estimate (and so the VIV AMPLITUDE coefficients Cv and CdAmp) and the axes and blend of the + !! VIV DAMPING split take the cable's filtered motion as their frame. The cable is the taut cable + !! of the VIV amplitude and damping gates (100 m, D 0.1 m, 50 kN, pinned at 50 m depth, 50 + !! elements, Cl 0.8), its type with the lift alone, or ("tables") with a VIV AMPLITUDE table (Cv + !! 0.8, 0.6, 0.0 and CdAmp 1.0, 1.3, 1.6 at A/D 0, 0.5, 1) and, on the finite-EI cable (EI 1 + !! N m^2), Thorsen's VIV DAMPING (0.31 0.89). + !! G1 a Tf 0 row is the deck without the section, bit for bit, on the finite-EI cable and on the + !! EI = 0 line, with and without the tables; + !! G2 the finite-EI cable towed through still water (both ends at 0.15 m/s against y after a + !! 10 s half-cosine ramp) with Tf 10 s responds as the cable held in a 0.15 m/s current: the + !! A/D over 50-80 s within 1 % of the held cable's (measured 0.24 % with the tables, 0.16 % + !! with the lift alone) and within 0.2 % of the held cable's with Tf 10 s (measured 0.01 %; + !! the frame moves at a constant velocity, so the two are the same problem), the frequency + !! within 0.005 and 0.0015 Hz (the 30 s window resolves 0.033 Hz; the scan peak moves by + !! 0.002 Hz). With the tables the towed cable without the frame takes Cv and CdAmp at A/D 0 + !! and the Morison drag (no ambient flow) and responds otherwise (A/D more than 10 % off; + !! measured 16 %); with the lift alone it is reported (1.9 % off); + !! G3 held in the current, Tf 10 s leaves the response as the ambient flow gives it (A/D within + !! 0.5 %, measured at most 0.23 %, frequency within 0.005 Hz), on both cores, with and without + !! the tables (an EI = 0 line cannot run between two moving points, so the towed case is + !! finite-EI only); + !! G4 refusals by name: a VIV FRAME row on a type without VIV (no Cl, no WAKE OSCILLATOR row). + USE CableDyn_Precision, ONLY: wp + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp, D = 0.1_wp + CHARACTER(*), PARAMETER :: AMP = 'riser 0.0 0.8 1.0;riser 0.5 0.6 1.3;riser 1.0 0.0 1.6' + REAL(wp), PARAMETER :: TMAX = 80.0_wp, T0 = 50.0_wp + INTEGER :: nfail = 0 + REAL(wp) :: fe_cur(2), fe_cur_tf(2), l_cur(2), l_cur_tf(2), fs_cur(2), fs_cur_tf(2), ls_cur(2), ls_cur_tf(2) + ! the agreement of the towed cable with the held one, without and with Tf (G2) + REAL(wp), PARAMETER :: TOL_TOW = 0.01_wp, TOL_TOW_TF = 0.002_wp + + CALL write_current('vfd_current.dat') + CALL write_tow('vfd_tow.txt') + CALL check_fixed('1.0', AMP, 'riser 0.31 0.89', 'vfd_fe', fe_cur, fe_cur_tf) + CALL check_fixed('0.0', AMP, '', 'vfd_l', l_cur, l_cur_tf) + CALL check_fixed('1.0', '', '', 'vfd_fs', fs_cur, fs_cur_tf) + CALL check_fixed('0.0', '', '', 'vfd_ls', ls_cur, ls_cur_tf) + CALL check_tow('vfd_tow', AMP, 'riser 0.31 0.89', fe_cur, fe_cur_tf, ' (tables)') + CALL check_tow('vfd_tows', '', '', fs_cur, fs_cur_tf, ' (lift only)') + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: VIV FRAME deck gates' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE write_current(path) + CHARACTER(*), INTENT(IN) :: path + INTEGER :: u + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') 'MoorDyn v2 water kinematics file' + WRITE (u, '(A)') 'uniform current along y for the VIV FRAME deck gate' + WRITE (u, '(A)') '--------------------------- WAVES -------------------------------------' + WRITE (u, '(A)') '0 WaveKinMod - type of wave input' + WRITE (u, '(A)') '"" WaveKinFile - file containing wave elevation time series' + WRITE (u, '(A)') '0.000000E+00 dtWave - time step to use in setting up wave kinematics grid (s)' + WRITE (u, '(A)') '0 WaveDir - wave heading (deg)' + WRITE (u, '(A)') '2 - X wave input type' + WRITE (u, '(A)') '-10, 110, 2 - X wave grid point data' + WRITE (u, '(A)') '2 - Y wave input type' + WRITE (u, '(A)') '-10, 10, 2 - Y wave grid point data' + WRITE (u, '(A)') '2 - Z wave input type' + WRITE (u, '(A)') '-100, 0, 2 - Z wave grid point data' + WRITE (u, '(A)') '--------------------------- CURRENT -------------------------------------' + WRITE (u, '(A)') '1 CurrentMod - type of current input' + WRITE (u, '(A)') 'z-depth x-current y-current' + WRITE (u, '(A)') '(m) (m/s) (m/s)' + WRITE (u, '(A)') '0.0 0.0 0.15' + WRITE (u, '(A)') '-100.0 0.0 0.15' + WRITE (u, '(A)') '--------------------- need this line ------------------' + CLOSE (u) + END SUBROUTINE write_current + + SUBROUTINE write_tow(path) + !! Both ends (points 1 and 2) moved along -y at 0.15 m/s after a 10 s half-cosine velocity ramp, + !! every 0.01 s to TMAX: y = -U (t/2 - T sin(pi t/T)/(2 pi)) in the ramp (T 10 s). + CHARACTER(*), INTENT(IN) :: path + REAL(wp), PARAMETER :: U = 0.15_wp, TR = 10.0_wp + INTEGER :: u_, k + REAL(wp) :: t, y, v, a + OPEN (NEWUNIT=u_, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u_, '(A)') '# time point x y z vx vy vz ax ay az' + DO k = 0, NINT(100.0_wp*TMAX) + t = 0.01_wp*REAL(k, wp) + IF (t < TR) THEN + y = -U*(0.5_wp*t - TR*SIN(PI*t/TR)/(2.0_wp*PI)) + v = -U*0.5_wp*(1.0_wp - COS(PI*t/TR)) + a = -U*0.5_wp*(PI/TR)*SIN(PI*t/TR) + ELSE + y = -U*(0.5_wp*TR + (t - TR)) + v = -U + a = 0.0_wp + END IF + WRITE (u_, '(F9.3,A,3ES17.9,A,ES17.9,A,ES17.9,A)') t, ' 1 ', 0.0_wp, y, -50.0_wp, ' 0 ', v, ' 0 0 ', a, ' 0' + WRITE (u_, '(F9.3,A,3ES17.9,A,ES17.9,A,ES17.9,A)') t, ' 2 ', 100.0_wp, y, -50.0_wp, ' 0 ', v, ' 0 0 ', a, ' 0' + END DO + CLOSE (u_) + END SUBROUTINE write_tow + + SUBROUTINE write_rows(u, title, header, rows) + INTEGER, INTENT(IN) :: u + CHARACTER(*), INTENT(IN) :: title, header, rows + INTEGER :: i0, i1 + WRITE (u, '(A)') '----------------------- '//title//' ---------------------------------------' + WRITE (u, '(A)') header + i0 = 1 + DO + i1 = INDEX(rows(i0:), ';') + IF (i1 == 0) THEN + WRITE (u, '(A)') TRIM(rows(i0:)) + EXIT + END IF + WRITE (u, '(A)') rows(i0:i0 + i1 - 2) + i0 = i0 + i1 + END DO + END SUBROUTINE write_rows + + SUBROUTINE write_deck(path, ei, amp_rows, damp_rows, tmax_, tow, frame_rows, cl) + !! ei the type's EI; amp_rows/damp_rows: the VIV AMPLITUDE and VIV DAMPING data rows, + !! ';'-separated ('' for no section); tow: no current, both ends Coupled and moved by the motion + !! file vfd_tow.txt; frame_rows: the VIV FRAME data rows (no section without it). + CHARACTER(*), INTENT(IN) :: path, ei, amp_rows, damp_rows + REAL(wp), INTENT(IN) :: tmax_ + LOGICAL, INTENT(IN) :: tow + CHARACTER(*), INTENT(IN), OPTIONAL :: frame_rows, cl + CHARACTER(8) :: cl_col + INTEGER :: u + cl_col = '0.8' + IF (PRESENT(cl)) cl_col = cl + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' + WRITE (u, '(A)') 'VIV FRAME deck gate: taut cable in a uniform current or towed through still water' + WRITE (u, '(A)') '----------------------- LINE TYPES ------------------------------------------' + WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//ei//' 1.2 1.0 0.0 0.0 '//TRIM(cl_col)// & + ' 0.08 0.18' + WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' + WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' + WRITE (u, '(A)') '1 Coupled 0.0 0.0 -50.0 0 0 0 0' + IF (tow) THEN + WRITE (u, '(A)') '2 Coupled 100.0 0.0 -50.0 0 0 0 0' + ELSE + WRITE (u, '(A)') '2 Fixed 100.0 0.0 -50.0 0 0 0 0' + END IF + WRITE (u, '(A)') '----------------------- LINES -----------------------------------------------' + WRITE (u, '(A)') 'ID NodeA NodeB Outputs' + WRITE (u, '(A)') '1 1 2 -' + WRITE (u, '(A)') '----------------------- SECTIONS --------------------------------------------' + WRITE (u, '(A)') 'LineID LineType Length NumSegs' + WRITE (u, '(A)') '1 riser 99.900100 50' + IF (LEN_TRIM(amp_rows) > 0) CALL write_rows(u, 'VIV AMPLITUDE', 'TypeName AD Cv CdAmp', amp_rows) + IF (LEN_TRIM(damp_rows) > 0) CALL write_rows(u, 'VIV DAMPING', 'TypeName a b', damp_rows) + IF (PRESENT(frame_rows)) CALL write_rows(u, 'VIV FRAME', 'TypeName Tf', frame_rows) + WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' + WRITE (u, '(A)') '0.01 dtM' + WRITE (u, '(A)') '100.0 WtrDpth' + WRITE (u, '(A)') '1025.0 rhoW' + WRITE (u, '(A)') '9.80665 g' + IF (tow) THEN + WRITE (u, '(A)') 'vfd_tow.txt motionFile' + ELSE + WRITE (u, '(A)') 'vfd_current.dat WaterKin' + END IF + WRITE (u, '(A,F8.3,A)') ' ', tmax_, ' TMax' + WRITE (u, '(A)') '---------------------- OUTPUTS -----------------------------------------------' + WRITE (u, '(A)') 'L1N25PZ' + WRITE (u, '(A)') 'END' + WRITE (u, '(A)') '------------------------- need this line --------------------------------------' + CLOSE (u) + END SUBROUTINE write_deck + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK .AND. conv + END SUBROUTINE run + + SUBROUTINE read_out(path, tab, n) + !! The rows (time, L1N25PZ) of a deck's main output file. + CHARACTER(*), INTENT(IN) :: path + REAL(wp), ALLOCATABLE, INTENT(OUT) :: tab(:, :) + INTEGER, INTENT(OUT) :: n + CHARACTER(1024) :: rec + INTEGER :: u, ios + ALLOCATE (tab(2, 20000)) + n = 0 + OPEN (NEWUNIT=u, FILE=path, STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (u, '(A)') rec + READ (u, '(A)') rec + DO + READ (u, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + IF (n == SIZE(tab, 2)) EXIT + n = n + 1 + READ (rec, *) tab(:, n) + END DO + CLOSE (u) + END SUBROUTINE read_out + + REAL(wp) FUNCTION peak_frequency(tt, x) RESULT(fpk) + !! The frequency of the largest Fourier amplitude of x - mean(x) on 0.05-1 Hz (0.001 Hz grid). + REAL(wp), INTENT(IN) :: tt(:), x(:) + REAL(wp) :: xm(SIZE(x)), f, best, re, im + INTEGER :: j + xm = x - SUM(x)/REAL(SIZE(x), wp) + best = -1.0_wp + fpk = 0.0_wp + DO j = 0, 950 + f = 0.05_wp + 0.001_wp*REAL(j, wp) + re = SUM(xm*COS(2.0_wp*PI*f*tt)) + im = SUM(xm*SIN(2.0_wp*PI*f*tt)) + IF (re*re + im*im > best) THEN + best = re*re + im*im + fpk = f + END IF + END DO + END FUNCTION peak_frequency + + SUBROUTINE stats(root, res, ok) + !! Half the peak-to-peak mid-span cross-flow excursion over D and the dominant frequency over + !! T0-TMAX of the run root. + CHARACTER(*), INTENT(IN) :: root + REAL(wp), INTENT(OUT) :: res(2) + LOGICAL, INTENT(OUT) :: ok + REAL(wp), ALLOCATABLE :: tab(:, :), tt(:), z(:) + INTEGER :: n + LOGICAL, ALLOCATABLE :: keep(:) + res = 0.0_wp + CALL read_out(root//'.out', tab, n) + ok = n > 1000 + IF (.NOT. ok) RETURN + keep = tab(1, 1:n) >= T0 + tt = PACK(tab(1, 1:n), keep) + z = PACK(tab(2, 1:n), keep) + res = [0.5_wp*(MAXVAL(z) - MINVAL(z))/D, peak_frequency(tt, z)] + END SUBROUTINE stats + + LOGICAL FUNCTION same_file(a, b) RESULT(same) + !! The two text files are the same, line for line. + CHARACTER(*), INTENT(IN) :: a, b + CHARACTER(1024) :: ra, rb + INTEGER :: ua, ub, ia, ib + same = .FALSE. + OPEN (NEWUNIT=ua, FILE=a, STATUS='OLD', ACTION='READ', IOSTAT=ia) + IF (ia /= 0) RETURN + OPEN (NEWUNIT=ub, FILE=b, STATUS='OLD', ACTION='READ', IOSTAT=ib) + IF (ib /= 0) THEN + CLOSE (ua); RETURN + END IF + DO + READ (ua, '(A)', IOSTAT=ia) ra + READ (ub, '(A)', IOSTAT=ib) rb + IF (ia /= 0 .OR. ib /= 0) EXIT + IF (ra /= rb) EXIT + END DO + same = ia /= 0 .AND. ib /= 0 + CLOSE (ua) + CLOSE (ub) + END FUNCTION same_file + + SUBROUTINE check_fixed(ei, amp_rows, damp_rows, tag, res, res_tf) + !! G1 and G3 on the cable of EI ei held in the current: without the section, with a Tf 0 row + !! and with Tf 10 s; res and res_tf (A/D, f) without the section and with Tf 10 s. + CHARACTER(*), INTENT(IN) :: ei, amp_rows, damp_rows, tag + REAL(wp), INTENT(OUT) :: res(2), res_tf(2) + LOGICAL :: ok, ok2 + CHARACTER(1024) :: msg + CHARACTER(:), ALLOCATABLE :: lab + lab = ' (EI '//ei//', '//TRIM(MERGE('tables', 'lift ', LEN_TRIM(amp_rows) > 0))//')' + CALL write_deck(tag//'_amb.dat', ei, amp_rows, damp_rows, TMAX, .FALSE.) + CALL run(tag//'_amb.dat', tag//'_amb', ok, msg) + CALL require(ok, 'G1: the deck without the section runs'//lab//': '//TRIM(msg)) + CALL write_deck(tag//'_t0.dat', ei, amp_rows, damp_rows, TMAX, .FALSE., frame_rows='riser 0') + CALL run(tag//'_t0.dat', tag//'_t0', ok, msg) + CALL require(ok, 'G1: the deck with Tf 0 runs'//lab//': '//TRIM(msg)) + CALL require(same_file(tag//'_amb.out', tag//'_t0.out'), 'G1: a Tf 0 row is the deck without it, bit for '// & + 'bit'//lab) + CALL write_deck(tag//'_tf.dat', ei, amp_rows, damp_rows, TMAX, .FALSE., frame_rows='riser 10') + CALL run(tag//'_tf.dat', tag//'_tf', ok, msg) + CALL require(ok, 'G3: the deck with Tf 10 s runs'//lab//': '//TRIM(msg)) + CALL stats(tag//'_amb', res, ok) + CALL stats(tag//'_tf', res_tf, ok2) + CALL require(ok .AND. ok2, 'G3: the runs wrote their rows'//lab) + WRITE (*, '(A,2F8.4,A,2F8.4)') 'G3'//lab//': in the current A/D, f [Hz] with Tf 10 s ', res_tf, & + '; without ', res + CALL require(res(1) > 0.2_wp, 'G3: the cable locks in'//lab) + CALL require(ABS(res_tf(1)/res(1) - 1.0_wp) <= 0.005_wp .AND. ABS(res_tf(2) - res(2)) <= 0.005_wp, & + 'G3: held in the current, Tf leaves the response as the ambient flow gives it'//lab) + END SUBROUTINE check_fixed + + SUBROUTINE check_tow(tag, amp_rows, damp_rows, ref, ref_tf, lab) + !! G2 on the finite-EI cable with the given tables: towed with Tf 10 s and without it, against + !! the cable held in the current without and with Tf 10 s (ref, ref_tf, from check_fixed); + !! without the tables (the lift alone) the towed cable without Tf is only reported. + CHARACTER(*), INTENT(IN) :: tag, amp_rows, damp_rows, lab + REAL(wp), INTENT(IN) :: ref(2), ref_tf(2) + REAL(wp) :: r_tf(2), r_0(2) + LOGICAL :: ok, ok2 + CHARACTER(1024) :: msg + CALL write_deck(tag//'_tf.dat', '1.0', amp_rows, damp_rows, TMAX, .TRUE., frame_rows='riser 10') + CALL run(tag//'_tf.dat', tag//'_tf', ok, msg) + CALL require(ok, 'G2: the towed deck with Tf runs'//lab//': '//TRIM(msg)) + CALL write_deck(tag//'_0.dat', '1.0', amp_rows, damp_rows, TMAX, .TRUE.) + CALL run(tag//'_0.dat', tag//'_0', ok, msg) + CALL require(ok, 'G2: the towed deck without Tf runs'//lab//': '//TRIM(msg)) + CALL stats(tag//'_tf', r_tf, ok) + CALL stats(tag//'_0', r_0, ok2) + CALL require(ok .AND. ok2, 'G2: the towed runs wrote their rows'//lab) + WRITE (*, '(A,2F8.4,A,2F8.4,A,2F8.4,A,2F8.4)') 'G2'//lab//': towed A/D, f [Hz] with Tf 10 s ', r_tf, & + '; without ', r_0, '; held in the current ', ref, ', with Tf ', ref_tf + CALL require(ABS(r_tf(1)/ref(1) - 1.0_wp) <= TOL_TOW .AND. ABS(r_tf(2) - ref(2)) <= 0.005_wp, & + 'G2: towed with Tf, the cable responds as the cable held in the current'//lab) + CALL require(ABS(r_tf(1)/ref_tf(1) - 1.0_wp) <= TOL_TOW_TF .AND. ABS(r_tf(2) - ref_tf(2)) <= 0.0015_wp, & + 'G2: towed with Tf, the cable responds as the cable held in the current with Tf'//lab) + IF (LEN_TRIM(amp_rows) > 0) CALL require(ABS(r_0(1)/ref(1) - 1.0_wp) > 0.10_wp, & + 'G2: towed without Tf, it responds otherwise'//lab) + END SUBROUTINE check_tow + + SUBROUTINE check_refusals() + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('vfd_bad.dat', '1.0', '', '', 1.0_wp, .FALSE., frame_rows='riser 10', cl='0.0') + CALL run('vfd_bad.dat', 'vfd_bad', ok, msg) + WRITE (*, '(A)') 'G4 a type without VIV: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row') > 0, & + 'G4: a VIV FRAME row on a type without VIV is refused') + END SUBROUTINE check_refusals + +END PROGRAM test_viv_frame_deck diff --git a/tests/test_viv_wake_deck.f90 b/tests/test_viv_wake_deck.f90 index 89583ee3..dece5969 100644 --- a/tests/test_viv_wake_deck.f90 +++ b/tests/test_viv_wake_deck.f90 @@ -29,7 +29,7 @@ PROGRAM test_viv_wake_deck !! VIV velocity: A/D within 2 %, frequency within 0.002 Hz), on both cores, and the two !! cores agree there as in W5 (an EI = 0 line cannot run between two moving points); !! W7 VIV FRAME refusals by name: a malformed row, an unknown or repeated type, - !! a negative Tf, and a type without a WAKE OSCILLATOR row. + !! a negative Tf, and a type without VIV (no Cl, no WAKE OSCILLATOR row). USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK IMPLICIT NONE @@ -417,8 +417,8 @@ SUBROUTINE check_refusals() frame_rows='cable 10') CALL refused('riser 0.3', 'VIV FRAME names LINE TYPE', 'W7: a repeated type', frame_rows='riser 10;riser 5') CALL refused('riser 0.3', 'filter time Tf must be >= 0', 'W7: a negative Tf', frame_rows='riser -1') - CALL refused('', 'give the type a WAKE OSCILLATOR row', 'W7: a type without the wake oscillator', & - cl='0.8', frame_rows='riser 10') + CALL refused('', 'give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row', 'W7: a type without VIV', & + frame_rows='riser 10') CALL refused('riser 0.3 x', 'plain numbers', 'a non-numeric St') CALL refused('cable 0.3', 'undefined LINE TYPE', 'an unknown type') CALL refused('riser 0.3;riser 0.2', 'twice', 'a repeated type') From 6c469fed44f9d92c130eec60128537c65c5597ff Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Mon, 16 Nov 2026 04:54:26 +0900 Subject: [PATCH 24/47] validation: Delta Flume riser VIV in a stepped current (L3-D) (#167) Validation case L3-D: cross-flow and in-line VIV of the Delta Flume riser (Chaplin et al. 2005a, 2005b) in the nine blind-trial stepped currents, U 0.16-0.95 m/s over the lower 5.94 m of a 13.12 m pinned riser with the top spring in series. The VIV set is the synchronisation model with nothing fitted to these data: Cl 0.8 in f0 0.18 +/- 0.08, in-line Cx 0.85 and alpha 0.15, CD 1.2 and Chaplin's in-line drag amplification. Measurements are the experimenters' processed results from the blind-trial presentation, read from the vector graphics through the tick labels. Dominant mode right in 5 of 9 cases and within one in all; mean in-line displacement within 17 % in 7 of 9; CF amplitude -44 % to +4 % of the summary maxima. dt/2 and 128 elements move the std and mean metrics by at most 2.6 % except the beating case 5 and the two-response case 9, both documented. The mode projection uses a row-wise trapezoid so NumPy 1.x runs it. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 5 + VALIDATION.md | 19 + doc/references.rst | 8 + doc/theory.rst | 2 +- validation/README.md | 2 +- validation/experiments/README.md | 5 +- validation/experiments/delta_flume/README.md | 130 +++++ .../delta_flume/delta_flume_viv.py | 451 ++++++++++++++++++ .../delta_flume/envelopes/README.md | 29 ++ .../delta_flume/envelopes/case1_envelopes.csv | 102 ++++ .../delta_flume/envelopes/case2_envelopes.csv | 102 ++++ .../delta_flume/envelopes/case3_envelopes.csv | 102 ++++ .../delta_flume/envelopes/case4_envelopes.csv | 102 ++++ .../delta_flume/envelopes/case5_envelopes.csv | 102 ++++ .../delta_flume/envelopes/case6_envelopes.csv | 102 ++++ .../delta_flume/envelopes/case7_envelopes.csv | 102 ++++ .../delta_flume/envelopes/case8_envelopes.csv | 102 ++++ .../delta_flume/envelopes/case9_envelopes.csv | 102 ++++ .../delta_flume/measured_summary.csv | 46 ++ .../experiments/delta_flume/provenance.json | 295 ++++++++++++ .../delta_flume/response_comparison.csv | 10 + .../experiments/delta_flume/summary.json | 261 ++++++++++ 22 files changed, 2177 insertions(+), 4 deletions(-) create mode 100644 validation/experiments/delta_flume/README.md create mode 100644 validation/experiments/delta_flume/delta_flume_viv.py create mode 100644 validation/experiments/delta_flume/envelopes/README.md create mode 100644 validation/experiments/delta_flume/envelopes/case1_envelopes.csv create mode 100644 validation/experiments/delta_flume/envelopes/case2_envelopes.csv create mode 100644 validation/experiments/delta_flume/envelopes/case3_envelopes.csv create mode 100644 validation/experiments/delta_flume/envelopes/case4_envelopes.csv create mode 100644 validation/experiments/delta_flume/envelopes/case5_envelopes.csv create mode 100644 validation/experiments/delta_flume/envelopes/case6_envelopes.csv create mode 100644 validation/experiments/delta_flume/envelopes/case7_envelopes.csv create mode 100644 validation/experiments/delta_flume/envelopes/case8_envelopes.csv create mode 100644 validation/experiments/delta_flume/envelopes/case9_envelopes.csv create mode 100644 validation/experiments/delta_flume/measured_summary.csv create mode 100644 validation/experiments/delta_flume/provenance.json create mode 100644 validation/experiments/delta_flume/response_comparison.csv create mode 100644 validation/experiments/delta_flume/summary.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 64c5004d..801c537e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,11 @@ All notable changes to CableDyn are recorded in this file. The format follows Thorsen et al. (2017) use for it: dominant strain frequency 0.992 Hz against the measured 1.00 Hz, largest r.m.s. strain 7.3 % above the measured largest, station mean 3.6 % above; converged in mesh and time step to 0.2 %. +- Validation case L3-D (`validation/experiments/delta_flume`): cross-flow and in-line VIV of the + Delta Flume riser in the nine blind-trial stepped-current cases of Chaplin et al. (2005b), with + one generic coefficient set and the drag amplification on the in-line drag alone, against the + experimenters' measured envelopes and summaries: dominant mode right in 5 of 9 and within one in + all, mean in-line displacement within 17 % in 7 of 9, cross-flow amplitude −44 % to +4 %. - Theory manual, Published coefficient sets: the VIV coefficient sets of Thorsen et al. (2016, 2017), Ulveseter et al. (2018), Andersen et al. (2024a, b) and Facchinetti et al. (2004), each with its source, its test data and the line-type columns it maps to, and Thorsen et al.'s diff --git a/VALIDATION.md b/VALIDATION.md index 8ebb5fcc..cdb2564f 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -82,6 +82,7 @@ article's methods, are compared in | **L3-H** | Holcombe static lazy-wave experiment | measured marker geometry | position RMSE 1.07–1.89% of suspended length; peak marker-curvature error 0.34–5.54% | end-restraint bracket | Pass | | **L3-B** | Bergdahl chain experiment, 30 orbit conditions | measured upper-end force | RMSE 1.58 N; MAPE 3.11%; Pearson 0.993; Lin concordance 0.989 | full published matrix | Pass | | **L3-C** | Chaplin Delta Flume riser, still-water natural frequencies | measured modes 1–7 at five tensions | mean error +1.87%, mean absolute 2.28%, largest 4.88% (34 of 35; one outlier reported) | full published table, no fitted parameter | Pass | +| **L3-D** | Chaplin Delta Flume riser in a stepped current, blind-trial cases 1–9, cross-flow and in-line VIV | measured dominant mode, peak cross-flow amplitude, mean in-line displacement, curvature standard deviations | mode right in 5/9, within one in 9/9; mean in-line within ±17% in 7/9 (−25% to +34%); cross-flow amplitude −44% to +4%; cross-flow curvature −39% to +26% | generic coefficient set, no fitted parameter | Pass measured | | **L3-W** | SJTU steel catenary riser in 0.2 m/s current, cross-flow VIV | measured r.m.s. strain (25 stations) and dominant frequency | frequency 0.992 vs 1.00 Hz; max r.m.s. strain +7.3%, station mean +3.6% | published coefficient set, no fitted parameter | Pass | | **L-fig** | Along-arc curvature overlay (CableDyn / OrcaFlex / MoorDyn-F ±4×) | 3-code committed record | CableDyn peak 0.11% from OrcaFlex | <0.5% | Pass | | **L4-1** | Coupled platform + mooring | synthetic reference | bit-for-bit | — | Pass | @@ -339,6 +340,24 @@ scripts, results, and source provenance are in separately. 128 elements and ten times the unpublished axial stiffness change no frequency by more than 3e-6 and 1.2e-4. +- **L3-D Delta Flume riser, VIV in a stepped current** + ([Chaplin et al., 2005a](https://cabledyn.readthedocs.io/en/latest/references.html#ref-chaplin2005); + [Chaplin et al., 2005b](https://cabledyn.readthedocs.io/en/latest/references.html#ref-chaplin2005b)): + the nine blind-trial cases, the lower 5.94 m of the L3-C riser in 0.16–0.95 m/s, with the top + spring in series and the measured mean top tension set statically. One generic set for all + cases: cross-flow lift 0.8 (f̂0 0.18 ± 0.08), in-line C_x 0.85, α 0.15, C_D 1.2, and the drag + amplification of Chaplin et al. (2005a, Eq. 4) on the in-line drag alone (`VIV AMPLITUDE` with + `VIV DAMPING 0 0 1`). Against the experimenters' processed results, read from the vector + graphics of their blind-trial presentation: the dominant cross-flow mode is right in 5 of 9 + cases and within one in the rest; the largest mean in-line displacement is within ±17% in 7 of + 9 (+34% in case 2, −25% in case 9; the blind predictions under-predicted it by 20–40%); + the largest cross-flow amplitude is −44% to +4%, and the overall standard deviation of the + cross-flow curvature −39% to +26%. Half the time step and 128 elements leave the mode and + change the mean in-line displacement and the cross-flow curvature by at most 2.6% (the in-line + curvature by up to 10%), except in two cases: case 5 beats in the 40 s window (its peak + amplitude moves by up to 20%), and case 9 settles in mode 7 instead of 8 at half the time + step. + - **L3-W SJTU steel catenary riser, cross-flow VIV in uniform current** ([Wang et al., 2014](https://cabledyn.readthedocs.io/en/latest/references.html#ref-wang2014); [Thorsen et al., 2017](https://cabledyn.readthedocs.io/en/latest/references.html#ref-thorsen2017)): diff --git a/doc/references.rst b/doc/references.rst index 2bba3c48..98501191 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -286,6 +286,14 @@ Verification and validation references *Journal of Fluids and Structures* **21**\ (1), 3–24. https://doi.org/10.1016/j.jfluidstructs.2005.04.010 +.. _ref-chaplin2005b: + +- **Chaplin, J. R., Bearman, P. W., Cheng, Y., Fontaine, E., Graham, J. M. R., Herfjord, K., + Huera Huarte, F. J., Isherwood, M., Lambrakos, K., Larsen, C. M., Meneghini, J. R., Moe, G., + Pattenden, R. J., Triantafyllou, M. S. & Willden, R. H. J. (2005).** Blind predictions of + laboratory measurements of vortex-induced vibrations of a tension riser. *Journal of Fluids and + Structures* **21**\ (1), 25–40. https://doi.org/10.1016/j.jfluidstructs.2005.05.016 + Comparison codes ---------------- diff --git a/doc/theory.rst b/doc/theory.rst index 857d5bc3..109f523a 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1451,7 +1451,7 @@ The row serves two uses: - With :math:`(0, 0, 1)` and the drag factor of :ref:`Chaplin et al. (2005) `, the amplification acts on the mean in-line drag alone, as measured, while the cross-flow drag - stays Morison's. + stays Morison's (validation case L3-D, the Delta Flume riser in a stepped current). - :math:`(0.31, 0.89, 0)` is Thorsen's cross-flow model. It drops the linear part :math:`\tfrac12\rho D C_{dn}U\dot y` of Morison's cross-flow damping, so it is consistent with cross-flow VIV alone. An in-line force that turns with the relative flow can then drive an diff --git a/validation/README.md b/validation/README.md index 2e17086c..b8612bfd 100644 --- a/validation/README.md +++ b/validation/README.md @@ -16,7 +16,7 @@ redistributed. | [`RELEASE_0_1_1.md`](RELEASE_0_1_1.md) | The same for v0.1.1 | | [`RELEASE_0_1_0.md`](RELEASE_0_1_0.md) | The same for v0.1.0 | | [`bodies/`](bodies/README.md) | Rigid-body, rod and shared-anchor cases with MoorDyn-C twins, stored references and pass limits | -| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and Wang et al. (2014) catenary-riser VIV comparisons | +| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, and Wang et al. (2014) catenary-riser VIV comparisons | | [`PERFORMANCE_0_1_0.md`](PERFORMANCE_0_1_0.md) | Wall time of CableDyn 0.1.0, MoorDyn-C and MoorDyn-F at equal accuracy on five mooring, cable, buoy and coupled cases | | [`performance/`](performance/README.md) | Same-host wall-clock records of the L5 cases: the resolved lazy-wave spans, the one-hour VolturnUS-S mooring and the tension-only chain | | [`PAPER_REPRODUCTION.md`](PAPER_REPRODUCTION.md) | Every CableDyn result in the journal article, re-run with the release defaults and in paper mode | diff --git a/validation/experiments/README.md b/validation/experiments/README.md index 997d8c3c..0aa20ebf 100644 --- a/validation/experiments/README.md +++ b/validation/experiments/README.md @@ -2,7 +2,7 @@ # Experimental comparisons -This directory lets reviewers reproduce CableDyn's comparisons with four published physical +This directory lets reviewers reproduce CableDyn's comparisons with five published physical experiments. Each subdirectory gives the data source, the translation of the published parameters into a CableDyn model, the assessed quantity, the reproduction commands and the committed results. @@ -12,6 +12,7 @@ committed results. | [`holcombe/`](holcombe/README.md) | Holcombe et al. (2025), 1:70 static lazy-wave cable | Finite-EI power cable | | [`bergdahl/`](bergdahl/README.md) | Bergdahl et al. (2016), 33 m dynamically scaled chain | Tension-only mooring chain | | [`chaplin/`](chaplin/README.md) | Chaplin et al. (2005), 13.12 m vertical tension riser, still-water natural frequencies | Finite-EI riser, modal analysis | +| [`delta_flume/`](delta_flume/README.md) | Chaplin et al. (2005), 13.12 m vertical tension riser, stepped current, blind-trial cases 1–9 | Finite-EI riser, synchronisation VIV, cross-flow and in-line | | [`wang_scr/`](wang_scr/README.md) | Wang et al. (2014), truncated steel catenary riser in uniform current, cross-flow VIV | Finite-EI riser, synchronisation VIV | -The results are summarised as cases L3-H, L3-B, L3-C and L3-W in [`VALIDATION.md`](../../VALIDATION.md). +The results are summarised as cases L3-H, L3-B, L3-C, L3-D and L3-W in [`VALIDATION.md`](../../VALIDATION.md). diff --git a/validation/experiments/delta_flume/README.md b/validation/experiments/delta_flume/README.md new file mode 100644 index 00000000..af9b45f0 --- /dev/null +++ b/validation/experiments/delta_flume/README.md @@ -0,0 +1,130 @@ + + +# Delta Flume vertical riser in a stepped current: cross-flow and in-line VIV + +This directory compares CableDyn's VIV with the nine blind-trial cases of the Delta Flume riser +tests. Chaplin et al. (2005a), , describe the +riser and the tests, and Chaplin et al. (2005b), +, the blind predictions made for them. The +lower 5.94 m of the 13.12 m riser is in a uniform current of 0.16–0.95 m/s, the rest in still +water. The VIV coefficients are a generic set; nothing is fitted to these measurements. The +still-water natural frequencies of the same riser are case L3-C +([`../chaplin`](../chaplin/README.md)). + +## Model and data + +- **Riser:** as L3-C: 13.12 m between pinned joints, D 28 mm, EI 29.9 N m², mass ratio 3.0 with + the internal water (1.847 kg/m), fresh water, C_a 1. From the project's mechanical-properties + page (University of Southampton, archived; `provenance.json`): EA 5.88 MN, structural damping + 0.33 % of critical, top spring 11.4 kN/m. +- **Top spring:** in series with the riser, one effective axial stiffness + EA_eff = L/(1/k + L/EA) = 1.459e5 N. The unstretched length of each case is iterated until the + static top tension in the current is the case's mean top tension. A rigid top would turn the + current's bow into tension (1799 N instead of 1002 N in case 9) and stiffen the riser. +- **Current:** the towing speed U over the lower 5.94 m (the bottom of the carriage's vacuum + tank), still water above, with a 2 cm linear step between them. +- **Cases (slide 3 of the presentation below):** + + | Case | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | + | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | + | U (m/s) | 0.16 | 0.21 | 0.31 | 0.40 | 0.54 | 0.60 | 0.70 | 0.85 | 0.95 | + | Mean top tension (N) | 405 | 407 | 457 | 506 | 598 | 670 | 743 | 923 | 1002 | + | Std of top tension (N) | 2 | 3 | 3 | 8 | 15 | 14 | 8 | 14 | 65 | + +- **VIV (all cases):** + - synchronisation lift C_l 0.8 in the band f̂0 0.18 ± 0.08; + - in-line force C_x 0.85, α 0.15 (Ulveseter et al. 2018); + - C_D 1.2; + - a `VIV AMPLITUDE` table with C_v 0.8 constant and the drag amplification of Chaplin et al. + (2005a, Eq. 4), CdAmp = 1 + 2.3 s + 1.7 s², s = (A/D)/√2, at A/D 0–1.5; + - `VIV DAMPING` `0 0 1`: the amplification acts on the in-line drag only, and the cross-flow drag + stays Morison's. +- **Measurements:** the experimenters' processed results, from their presentation of the blind + trial (Chaplin et al., Trondheim, October 2004). The slides are vector graphics, so the values are + the plotted coordinates mapped through the tick labels, not a pixel digitisation: + - `measured_summary.csv`, from slides 17–19: maximum cross-flow displacement, maximum mean and + maximum dynamic in-line displacement (in D), and the overall standard deviation of the in-line + and cross-flow curvature (κD). Its `U` column is the speed read from each point; it matches + the tabulated speed within 0.006 m/s, which checks the axis mapping. + - `envelopes/`: the measured envelopes along the riser of each case (slides 7–15), with their + columns, checks and the assumed curvature scale in [`envelopes/README.md`](envelopes/README.md). + - The dominant cross-flow mode numbers 2, 3, 4, 5, 6, 6, 7, 7, 7 (slide 23). +- **Assumed:** the 11.4 kN/m top spring (the page also lists 38.1 kN/m, without saying which tests + used which); the 0.33 % structural damping as bending damping of a pure bending mode at 2 Hz (the + page gives no frequency). +- **CableDyn:** 64 elements; dt the largest of 5, 2.5, 2, 1 and 0.5 ms at or below 1/200 of the + shedding period D/(0.18 U) (2.5 ms in cases 1–3, 1 ms in 4–7, 0.5 ms in 8–9); `VIVrmsWindow` + 0.25 s; 40 s, statistics over t > 15 s. +- **Metrics:** x is in-line and y cross-flow, both from the line between the joints. + - dominant cross-flow mode: the pinned-pinned sine with the largest r.m.s. projection of y; + - maximum cross-flow amplitude: the largest half peak-to-peak of y along the riser, against the + slide-18 maximum; + - maximum mean in-line displacement: the largest time mean of x; + - dominant cross-flow frequency (`response_comparison.csv` only): the spectral peak of y a + quarter of the length above the lower joint, at a resolution of 0.04 Hz; + - overall standard deviation of curvature: the r.m.s. over the nodes of the standard deviation + of the curvature (second differences of the node positions), times D. + +## Reproduce + +From the repository root, with `path/to/cabledyn.exe` the release executable or a local build: + +```powershell +python validation/experiments/delta_flume/delta_flume_viv.py ` + path/to/cabledyn.exe validation/experiments/delta_flume/work ` + --summary validation/experiments/delta_flume +``` + +The nine cases run in parallel (`--jobs`), in about two minutes on a 24-core workstation. `--cases` +(for example `5,9`) selects cases; `--segments`, `--dt-scale` and `--spring` change the mesh, the +time step and the top spring. + +## Results + +CableDyn / measured; the measured cross-flow amplitude is the slide-18 maximum, with the half +peak-to-peak of the measured envelope in brackets. + +| Case | U (m/s) | Mode | A_CF/D | Mean IL/D | Std κD, CF | Std κD, IL | Mean top tension (N) | +| --- | --- | --- | --- | --- | --- | --- | --- | +| 1 | 0.16 | 2 / 2 | 0.653 / 0.757 (0.763) | 1.19 / 1.06 | 5.7e-5 / 9.3e-5 | 3.5e-5 / 5.0e-5 | 409 / 405 | +| 2 | 0.21 | 3 / 3 | 0.601 / 0.579 (0.561) | 1.60 / 1.19 | 1.12e-4 / 0.89e-4 | 7.2e-5 / 3.4e-5 | 413 / 407 | +| 3 | 0.31 | 4 / 4 | 0.629 / 0.779 (0.809) | 3.27 / 3.45 | 2.06e-4 / 2.70e-4 | 0.91e-4 / 1.95e-4 | 476 / 457 | +| 4 | 0.40 | **4** / 5 | 0.692 / 0.674 (0.595) | 4.78 / 4.97 | 2.30e-4 / 3.18e-4 | 1.37e-4 / 2.69e-4 | 541 / 506 | +| 5 | 0.54 | 6 / 6 | 0.779 / 0.843 (0.889) | 6.39 / 6.69 | 4.10e-4 / 4.81e-4 | 2.10e-4 / 2.31e-4 | 656 / 598 | +| 6 | 0.60 | 6 / 6 | 0.606 / 0.709 (0.779) | 6.78 / 8.13 | 4.39e-4 / 4.77e-4 | 2.57e-4 / 4.57e-4 | 734 / 670 | +| 7 | 0.70 | **6** / 7 | 0.737 / 0.777 (0.717) | 8.32 / 8.90 | 4.68e-4 / 6.47e-4 | 2.64e-4 / 3.03e-4 | 836 / 743 | +| 8 | 0.85 | **6** / 7 | 0.781 / 0.907 (0.890) | 9.65 / 11.18 | 4.91e-4 / 6.89e-4 | 2.99e-4 / 4.48e-4 | 1046 / 923 | +| 9 | 0.95 | **8** / 7 | 0.599 / 1.074 (0.996) | 10.16 / 13.51 | 6.88e-4 / 7.36e-4 | 3.70e-4 / 6.24e-4 | 1128 / 1002 | + +- **Dominant cross-flow mode:** right in 5 of 9 cases and within one in the other four (one low in + cases 4, 7 and 8, one high in case 9). Four of the eleven blind predictions found 7 or 8 of the 9 + (slide 24). +- **Mean in-line displacement:** within ±17 % in 7 of 9 cases; +34 % in case 2, where the + measured maximum is 1.2 D, and −25 % in case 9. The blind predictions under-predicted the drag + amplification, and with it the mean in-line displacement, by 20–40 % (slide 26). +- **Cross-flow amplitude:** −44 % to +4 % against the slide-18 maxima (−40 % to +16 % against + the envelopes), within ±12 %, the scatter between the two measured values, in cases 2, 4, 5 + and 7. The −44 % of case 9 goes with the response in mode 8. +- **Curvature:** the cross-flow standard deviation is −39 % to +26 %, low in every case but 2 + (−6 % to −29 % in cases 3–9); the in-line one −53 % to +110 %. The blind predictions' r.m.s. + curvatures were 20 % to 180 % of the measured (slide 26). +- **Top tension:** the static top tension in the current is the measured mean, but the drag + amplification bows the riser further: the mean top tension of the run is 1–13 % above the + measured mean (7–13 % in cases 4–9), so the run is stiffer than the test at the higher + speeds. +- **Convergence (`provenance.json`):** + - cases 1–4 and 6–8: half the time step leaves the mode and changes the mean in-line + displacement and the cross-flow curvature standard deviation by at most 0.6 %, the peak + amplitude by at most 4.5 % and the in-line curvature by at most 10 % (case 8); 128 elements + leave the mode and change them by at most 2.6 %, 4.2 % and 9 %; + - case 5 beats in the 40 s window: its peak amplitude changes by −17 % and −20 % and its + in-line curvature by −10 % and +25 %, while the other metrics move by at most 9 %; + - case 9 has two responses: at half the time step it settles in mode 7 (5.80 Hz, A/D 0.725, + mean in-line displacement 10.63 D), with the base step and with 128 elements in mode 8 + (6.60 Hz), which an 80 s run keeps. +- **Top spring 38.1 kN/m (`--spring 38.1e3`):** the mean top tension of the run is up to 14 % + higher and the mean in-line displacement 2–16 % lower, within ±17 % in 4 of 9 cases; the mode + is right in 5 of 9 (case 9 in mode 7, case 5 in mode 5, case 8 in mode 5). + +`response_comparison.csv` holds the per-case values with their errors, and `summary.json` the +statistics and the SHA-256 of the executable. diff --git a/validation/experiments/delta_flume/delta_flume_viv.py b/validation/experiments/delta_flume/delta_flume_viv.py new file mode 100644 index 00000000..c80fe90c --- /dev/null +++ b/validation/experiments/delta_flume/delta_flume_viv.py @@ -0,0 +1,451 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Cross-flow and in-line VIV of the Delta Flume vertical tension riser, blind-trial cases 1-9. + +The nine stepped-current cases of the blind-prediction trial of Chaplin et al. (2005b): the lower +5.94 m of the 13.12 m riser in a uniform current of 0.16-0.95 m/s, the rest in still water. +Writes a deck per case, sets its unstretched length so that the static top tension in the current +is the case's measured mean, runs it, and compares with the measured response: the dominant +cross-flow mode, the largest cross-flow amplitude, the largest mean in-line deflection and the +overall standard deviations of the in-line and cross-flow curvature. + + python delta_flume_viv.py path/to/cabledyn.exe WORKDIR [--cases 1-9] [--segments 64] + [--dt-scale 1] [--tmax 40] [--t0 15] [--spring 11.4e3] [--jobs N] [--summary DIR] + +Sources: + J.R. Chaplin, P.W. Bearman, F.J. Huera Huarte, R.J. Pattenden (2005a), Laboratory measurements + of vortex-induced vibrations of a vertical tension riser in a stepped current, Journal of Fluids + and Structures 21(1), 3-24, https://doi.org/10.1016/j.jfluidstructs.2005.04.010 (the riser; + Eq. 4, the drag amplification) + J.R. Chaplin, P.W. Bearman, Y. Cheng, E. Fontaine, J.M.R. Graham, K. Herfjord, F.J. Huera + Huarte, M. Isherwood, K. Lambrakos, C.M. Larsen, J.R. Meneghini, G. Moe, R.J. Pattenden, + M.S. Triantafyllou, R.H.J. Willden (2005b), Blind predictions of laboratory measurements of + vortex-induced vibrations of a tension riser, Journal of Fluids and Structures 21(1), 25-40, + https://doi.org/10.1016/j.jfluidstructs.2005.05.016 (the blind-trial cases; the measured + results are those of the authors' presentation of the trial, Trondheim, October 2004) + The project's pages at the University of Southampton (archived): the mechanical properties + (mass, structural damping, axial and top-spring stiffness) and the current zone +""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import json +import math +import os +import shutil +import subprocess +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path + +import numpy as np + +HERE = Path(__file__).resolve().parent + +# The riser (Chaplin et al. 2005a, Sec. 2; the Southampton mechanical-properties page): 13.12 m +# between pinned joints, D 28 mm, EI 29.9 N m^2, mass ratio 3.0 with the internal water +# (1.847 kg/m; the page gives 1.85 kg/m and the 12.1 N/m submerged weight), EA 5.88 MN, +# structural damping 0.33 % of critical, top spring 11.4 kN/m (the page gives 11.4 or 38.1). +LENGTH = 13.12 # m +DIAMETER = 0.028 # m +EI = 29.9 # N m^2 +EA_RISER = 5.88e6 # N +MASS_RATIO = 3.0 +RHO_W = 1000.0 # kg/m^3, fresh water +GRAVITY = 9.80665 # m/s^2 +AREA = math.pi * DIAMETER**2 / 4.0 +MASS = MASS_RATIO * RHO_W * AREA # kg/m +SUBMERGED_WEIGHT = (MASS - RHO_W * AREA) * GRAVITY # N/m +ZETA = 0.0033 # structural damping ratio, as bending damping of a pure bending mode at F_REF +F_REF = 2.0 # Hz (the frequency of the measured damping is not given) +CURRENT_HEIGHT = 5.94 # m: the current zone above the lower joint, still water above +Z_BOTTOM = -14.0 # m, lower joint; the top joint at Z_BOTTOM + LENGTH +WATER_DEPTH = 20.0 # m + +# Blind-trial cases (presentation slide 3): towing speed [m/s] and mean top tension [N] +CASES: dict[int, tuple[float, float]] = { + 1: (0.16, 405.0), + 2: (0.21, 407.0), + 3: (0.31, 457.0), + 4: (0.40, 506.0), + 5: (0.54, 598.0), + 6: (0.60, 670.0), + 7: (0.70, 743.0), + 8: (0.85, 923.0), + 9: (0.95, 1002.0), +} +# Measured dominant cross-flow mode numbers (slide 23) +MEASURED_MODES = {1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 6, 7: 7, 8: 7, 9: 7} + +# VIV set, not fitted to these measurements: synchronisation lift Cl 0.8 in the band +# cF 0.18 +- dF 0.08; in-line force ClX 0.85, alpha 0.15 (Ulveseter et al. 2018); Cd 1.2, Ca 1. +CD, CA, CL, DF, CF = 1.2, 1.0, 0.8, 0.08, 0.18 +CLX, ALPHA = 0.85, 0.15 +CV = 0.8 # the VIV AMPLITUDE table holds Cv = Cl constant +VIV_RMS_WINDOW = 0.25 # s, the same averaging time at every dtM + + +def trapezoid_rows(f: np.ndarray, x: np.ndarray) -> np.ndarray: + """Trapezoidal integral of each row of f over x (NumPy 1.x has no np.trapezoid).""" + return 0.5 * ((f[:, 1:] + f[:, :-1]) * np.diff(x)).sum(axis=1) + + +def drag_amplification(ad: float) -> float: + """Chaplin et al. (2005a, Eq. 4): Cd/Cd0 = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2).""" + s = ad / math.sqrt(2.0) + return 1.0 + 2.3 * s + 1.7 * s * s + + +def effective_ea(spring: float) -> float: + """The top spring in series with the riser, as one axial stiffness of the line.""" + return LENGTH / (1.0 / spring + LENGTH / EA_RISER) + + +def time_step(u: float, scale: float) -> float: + """The largest round step at or below 1/200 of the shedding period D/(cF U), times scale.""" + target = DIAMETER / (CF * u) / 200.0 + base = max(s for s in (0.005, 0.0025, 0.002, 0.001, 0.0005) if s <= target) + return base * scale + + +def deck_text( + case: int, l0: float, segments: int, dt: float, tmax: float, ea: float +) -> str: + u, t_top = CASES[case] + amp = "".join( + f"riser {ad:.2f} {CV} {drag_amplification(ad):.5f}\n" + for ad in (0.1 * k for k in range(16)) + ) + return f"""--------------------- CableDyn Input File --------------------------------- +Delta Flume riser, blind-trial case {case}: U {u} m/s, top tension {t_top:g} N +----------------------- LINE TYPES ------------------------------------------ +TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t Cl dF cF +(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) (-) (-) (-) +riser {DIAMETER} {MASS:.6f} {ea:.6e} 0.0 {EI}|-{ZETA}|{F_REF} {CD} 0.0 {CA} 0.0 {CL} {DF} {CF} +----------------------- POINTS ---------------------------------------------- +ID Attachment X Y Z M V CdA CA +(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) +1 Coupled 0.0 0.0 {Z_BOTTOM + LENGTH:.6f} 0 0 0 0 +2 Fixed 0.0 0.0 {Z_BOTTOM:.6f} 0 0 0 0 +----------------------- LINES ----------------------------------------------- +ID LineType AttachA AttachB UnstrLen NumSegs Outputs +(-) (-) (-) (-) (m) (-) (-) +1 riser 1 2 {l0:.9f} {segments} p +--------------------- VIV ---------------------------------------------- +TypeName ClX alpha +(-) (-) (-) +riser {CLX} {ALPHA} +--------------------- VIV AMPLITUDE ------------------------------------ +TypeName AD Cv CdAmp +(-) (-) (-) (-) +{amp}--------------------- VIV DAMPING ------------------------------------ +TypeName a b c +(-) (-) (-) (-) +riser 0 0 1 +---------------------- OPTIONS ---------------------------------------------- +{RHO_W} rhoW +{GRAVITY} g +{WATER_DEPTH} WtrDpth +{dt:.6f} dtM +{round(tmax / dt) * dt:.6f} TMax +1 Currents +{VIV_RMS_WINDOW} VIVrmsWindow +---------------------- OUTPUTS ----------------------------------------------- +FairTen1 +END +------------------------- need this line -------------------------------------- +""" + + +def write_current(folder: Path, u: float) -> None: + """Uniform U over the lower CURRENT_HEIGHT, still water above (a 2 cm linear step).""" + zc = Z_BOTTOM + CURRENT_HEIGHT + (folder / "current_profile.txt").write_text( + "z ux uy uz\n(m) (m/s) (m/s) (m/s)\n" + f"{-WATER_DEPTH:.3f} {u} 0 0\n{zc - 0.01:.3f} {u} 0 0\n" + f"{zc + 0.01:.3f} 0 0 0\n0.0 0 0 0\n", + encoding="utf-8", + ) + + +def run(exe: Path, folder: Path, stem: str) -> None: + env = dict(os.environ, OMP_NUM_THREADS="1") + proc = subprocess.run( + [str(exe), f"{stem}.dat", stem], + cwd=folder, + capture_output=True, + text=True, + encoding="utf-8", + errors="replace", + env=env, + check=False, + ) + (folder / f"{stem}.console.txt").write_text( + proc.stdout + proc.stderr, encoding="utf-8" + ) + if proc.returncode != 0: + raise SystemExit(f"{folder / stem}: CableDyn exited with {proc.returncode}") + + +def static_top_tension(folder: Path, stem: str) -> float: + rows = (folder / f"{stem}.static.out").read_text(encoding="utf-8").splitlines() + head = rows[1].split() + first = rows[3].split() # node 1, End A, the top joint + return float(first[head.index("Tension")]) + + +def tuned_length(exe: Path, folder: Path, case: int, segments: int, ea: float): + """Unstretched length whose static top tension in the current is the case's mean tension. + + The start is the still-water length, the exact integral of ds / (1 + T(s)/EA) with T falling + by the submerged weight down the riser; the current's bow then raises the tension, and each + iteration corrects the length by the tension error over EA. + """ + t_target = CASES[case][1] + t_bottom = t_target - SUBMERGED_WEIGHT * LENGTH + l0 = ea / SUBMERGED_WEIGHT * math.log((ea + t_target) / (ea + t_bottom)) + for _ in range(12): + stem = "static" + (folder / f"{stem}.dat").write_text( + deck_text(case, l0, segments, 0.005, 0.0, ea), encoding="utf-8" + ) + run(exe, folder, stem) + t = static_top_tension(folder, stem) + if abs(t - t_target) < 0.05: + return l0, t + l0 *= 1.0 + (t - t_target) / ea + raise SystemExit(f"case {case}: the static top tension did not converge ({t} N)") + + +def response(folder: Path, stem: str, t0: float) -> dict: + """Response metrics of a run, statistics over t > t0. + + x is in-line (along the current), y cross-flow, both from the line between the joints. + """ + path = folder / f"{stem}.Line1.p.out" + a = np.loadtxt(path, skiprows=2) + keep = a[:, 0] > t0 + t = a[keep, 0] + xyz = a[keep, 1:].reshape(len(t), -1, 3) + x, y, z = xyz[:, :, 0], xyz[:, :, 1], xyz[:, :, 2] + # height over the chord, 0 at the lower joint + s = (z.mean(axis=0) - Z_BOTTOM) / LENGTH + half_pp = (y.max(axis=0) - y.min(axis=0)) / 2.0 / DIAMETER + x_mean = x.mean(axis=0) / DIAMETER + # dominant cross-flow mode: the largest r.m.s. projection on the pinned-pinned sines + yd = y - y.mean(axis=0) + o = np.argsort(s) + so = s[o] + proj = [ + float( + np.sqrt(np.mean(trapezoid_rows(yd[:, o] * np.sin(n * np.pi * so), so) ** 2)) + ) + for n in range(1, 16) + ] + mode = int(np.argmax(proj)) + 1 + # dominant cross-flow frequency a quarter of the length above the lower joint + j = int(np.argmin(np.abs(s - 0.25))) + sig = yd[:, j] * np.hanning(len(t)) + freq = np.fft.rfftfreq(len(t), t[1] - t[0]) + f_cf = float(freq[1 + int(np.argmax(np.abs(np.fft.rfft(sig))[1:]))]) + # curvature from second differences of the node positions (equal elements along the arc); + # overall standard deviation = r.m.s. over the interior nodes of the standard deviation + ds = LENGTH / (xyz.shape[1] - 1) + kx = (x[:, 2:] - 2.0 * x[:, 1:-1] + x[:, :-2]) / ds**2 + ky = (y[:, 2:] - 2.0 * y[:, 1:-1] + y[:, :-2]) / ds**2 + tension = np.loadtxt(folder / f"{stem}.out", skiprows=2) + tension = tension[tension[:, 0] > t0, 1] + return { + "mode": mode, + "f_cf_hz": f_cf, + "frequency_resolution_hz": float(freq[1]), + "max_cf_half_pp_D": float(half_pp.max()), + "max_il_mean_D": float(x_mean.max()), + "std_curv_il_kD": float(np.sqrt(np.mean(np.var(kx, axis=0))) * DIAMETER), + "std_curv_cf_kD": float(np.sqrt(np.mean(np.var(ky, axis=0))) * DIAMETER), + "mean_top_tension_N": float(tension.mean()), + "std_top_tension_N": float(tension.std()), + } + + +def measured() -> tuple[dict, dict]: + with open(HERE / "measured_summary.csv", encoding="utf-8") as fh: + summ = { + (r["quantity"], int(r["case"])): float(r["value"]) + for r in csv.DictReader(fh) + } + env = {} + for case in CASES: + with open( + HERE / "envelopes" / f"case{case}_envelopes.csv", encoding="utf-8" + ) as fh: + rows = list(csv.DictReader(fh)) + env[case] = max((float(r["y_max_D"]) - float(r["y_min_D"])) / 2.0 for r in rows) + return summ, env + + +def parse_cases(text: str) -> list[int]: + out: list[int] = [] + for part in text.split(","): + lo, _, hi = part.partition("-") + out += range(int(lo), int(hi or lo) + 1) + if not out or any(c not in CASES for c in out): + raise SystemExit(f"--cases: cases are 1-9, got {text!r}") + return sorted(set(out)) + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + ap.add_argument("exe") + ap.add_argument("workdir") + ap.add_argument("--cases", default="1-9", help="for example 1-9, 5 or 5,9") + ap.add_argument("--segments", type=int, default=64) + ap.add_argument( + "--dt-scale", + type=float, + default=1.0, + help="factor of each case's time step (1: 1/200 of the shedding period, rounded down)", + ) + ap.add_argument("--tmax", type=float, default=40.0) + ap.add_argument( + "--t0", type=float, default=15.0, help="start of the statistics [s]" + ) + ap.add_argument( + "--spring", type=float, default=11.4e3, help="top spring stiffness [N/m]" + ) + ap.add_argument("--jobs", type=int, default=min(9, os.cpu_count() or 1)) + ap.add_argument( + "--summary", + default=None, + help="directory for the comparison CSV and summary JSON", + ) + a = ap.parse_args() + found = a.exe if Path(a.exe).is_file() else shutil.which(a.exe) + if found is None: + raise SystemExit(f"CableDyn executable not found: {a.exe}") + exe = Path(found).resolve() + cases = parse_cases(a.cases) + ea = effective_ea(a.spring) + tag = f"n{a.segments}_dt{a.dt_scale:g}_k{a.spring:g}" + + def one(case: int) -> dict: + u, _ = CASES[case] + folder = Path(a.workdir).resolve() / f"case{case}_{tag}" + folder.mkdir(parents=True, exist_ok=True) + write_current(folder, u) + l0, t_static = tuned_length(exe, folder, case, a.segments, ea) + dt = time_step(u, a.dt_scale) + stem = f"case{case}" + (folder / f"{stem}.dat").write_text( + deck_text(case, l0, a.segments, dt, a.tmax, ea), encoding="utf-8" + ) + run(exe, folder, stem) + out = { + "case": case, + "dt_s": dt, + "unstretched_length_m": l0, + "static_top_tension_N": t_static, + } + out.update(response(folder, stem, a.t0)) + return out + + with ThreadPoolExecutor(max_workers=max(1, a.jobs)) as pool: + results = list(pool.map(one, cases)) + + summ, env = measured() + + def pct(model: float, meas: float) -> float: + return round(100.0 * (model / meas - 1.0), 1) + + rows = [] + for r in results: + c = r["case"] + u, t_top = CASES[c] + rows.append( + { + "case": c, + "U_m_per_s": u, + "top_tension_N": t_top, + "dt_s": r["dt_s"], + "mode_measured": MEASURED_MODES[c], + "mode_cabledyn": r["mode"], + "f_cf_cabledyn_hz": round(r["f_cf_hz"], 3), + "max_cf_D_measured": round(summ[("max_cf_disp_D", c)], 4), + "max_cf_half_pp_D_measured_envelope": round(env[c], 4), + "max_cf_half_pp_D_cabledyn": round(r["max_cf_half_pp_D"], 4), + "max_cf_error_percent": pct( + r["max_cf_half_pp_D"], summ[("max_cf_disp_D", c)] + ), + "max_cf_envelope_error_percent": pct(r["max_cf_half_pp_D"], env[c]), + "max_il_mean_D_measured": round(summ[("max_il_mean_D", c)], 3), + "max_il_mean_D_cabledyn": round(r["max_il_mean_D"], 3), + "max_il_mean_error_percent": pct( + r["max_il_mean_D"], summ[("max_il_mean_D", c)] + ), + "std_curv_cf_kD_measured": f"{summ[('std_curv_cf_kD', c)]:.4e}", + "std_curv_cf_kD_cabledyn": f"{r['std_curv_cf_kD']:.4e}", + "std_curv_cf_error_percent": pct( + r["std_curv_cf_kD"], summ[("std_curv_cf_kD", c)] + ), + "std_curv_il_kD_measured": f"{summ[('std_curv_il_kD', c)]:.4e}", + "std_curv_il_kD_cabledyn": f"{r['std_curv_il_kD']:.4e}", + "std_curv_il_error_percent": pct( + r["std_curv_il_kD"], summ[("std_curv_il_kD", c)] + ), + "mean_top_tension_N_cabledyn": round(r["mean_top_tension_N"], 1), + } + ) + print( + f"case {c}: mode {r['mode']}/{MEASURED_MODES[c]}, f_CF {r['f_cf_hz']:.2f} Hz, " + f"A_CF/D {r['max_cf_half_pp_D']:.3f}/{summ[('max_cf_disp_D', c)]:.3f}, " + f"IL mean/D {r['max_il_mean_D']:.2f}/{summ[('max_il_mean_D', c)]:.2f}, " + f"sd kD CF {r['std_curv_cf_kD']:.2e}/{summ[('std_curv_cf_kD', c)]:.2e}, " + f"IL {r['std_curv_il_kD']:.2e}/{summ[('std_curv_il_kD', c)]:.2e}" + ) + + def span(key: str) -> list[float]: + values = [r[key] for r in rows] + return [min(values), max(values)] + + il_err = [r["max_il_mean_error_percent"] for r in rows] + summary = { + "cases": cases, + "segments": a.segments, + "dt_scale": a.dt_scale, + "tmax_s": a.tmax, + "statistics_after_s": a.t0, + "top_spring_N_per_m": a.spring, + "effective_axial_stiffness_N": round(ea, 1), + "modes_right": sum(r["mode_cabledyn"] == r["mode_measured"] for r in rows), + "modes_within_one": sum( + abs(r["mode_cabledyn"] - r["mode_measured"]) <= 1 for r in rows + ), + "il_mean_within_17_percent": sum(abs(e) <= 17.0 for e in il_err), + "il_mean_error_percent_range": span("max_il_mean_error_percent"), + "max_cf_error_percent_range": span("max_cf_error_percent"), + "max_cf_envelope_error_percent_range": span("max_cf_envelope_error_percent"), + "std_curv_cf_error_percent_range": span("std_curv_cf_error_percent"), + "std_curv_il_error_percent_range": span("std_curv_il_error_percent"), + "per_case": rows, + "executable_sha256": hashlib.sha256(exe.read_bytes()).hexdigest(), + } + print(json.dumps({k: v for k, v in summary.items() if k != "per_case"}, indent=2)) + if a.summary: + out = Path(a.summary) + out.mkdir(parents=True, exist_ok=True) + with open( + out / "response_comparison.csv", "w", newline="", encoding="utf-8" + ) as fh: + w = csv.DictWriter(fh, fieldnames=list(rows[0]), lineterminator="\n") + w.writeheader() + w.writerows(rows) + (out / "summary.json").write_text( + json.dumps(summary, indent=2) + "\n", encoding="utf-8", newline="\n" + ) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/delta_flume/envelopes/README.md b/validation/experiments/delta_flume/envelopes/README.md new file mode 100644 index 00000000..c49a1057 --- /dev/null +++ b/validation/experiments/delta_flume/envelopes/README.md @@ -0,0 +1,29 @@ + + +# Measured response envelopes, blind-trial cases 1–9 + +`case_envelopes.csv` holds the measured envelopes along the riser of case N, read from the +measurement curves (the top row of slides 7–15) of the experimenters' presentation of the blind +trial of Chaplin et al. (2005b), . The slides +are vector graphics: each measured curve is a polyline of 102 nearly equally spaced vertices from +one end of the riser to the other, so the values are the plotted vertices, linearly resampled to +101 equally spaced stations, not a pixel digitisation. + +| Column | Meaning | +| --- | --- | +| `z_over_L` | height above the lower joint over the 13.12 m length: 0 at the lower joint (in the current), 1 at the top joint | +| `x_min_D`, `x_mean_D`, `x_max_D` | in-line displacement (along the current) over the diameter: minimum, mean and maximum; zero is the panel edge that the end stations touch | +| `y_min_D`, `y_max_D` | cross-flow displacement over the diameter: minimum and maximum, about the panel centre | +| `kx_rms_D`, `ky_rms_D` | in-line and cross-flow r.m.s. curvature times the diameter (see below) | + +- **Displacement scales:** the in-line panel's `10` tick and the cross-flow panel's `-1` and `1` + ticks. As a check, the largest `x_mean_D` of each case is within 0.05 D (4 %) of the measured + maximum mean in-line displacement of slide 17 (`../measured_summary.csv`). +- **Cross-flow scatter:** half the largest peak-to-peak of the cross-flow envelope differs from + the measured maximum cross-flow displacement of slide 18 by −12 % to +10 %. The experimenters + processed quasi-steady windows of each record, and slide 18 summarises them; this difference is + the scale of the measurement scatter in a peak amplitude. +- **Curvature scale (assumed):** the curvature panels carry no scale. Each shape is scaled so that + its r.m.s. over the 101 stations equals the overall standard deviation of curvature of slide 19 + for the case, assuming that number is the r.m.s. over the span of the r.m.s. curvature. The + shapes and the positions of their peaks do not depend on the assumption; the magnitudes do. diff --git a/validation/experiments/delta_flume/envelopes/case1_envelopes.csv b/validation/experiments/delta_flume/envelopes/case1_envelopes.csv new file mode 100644 index 00000000..fba4d051 --- /dev/null +++ b/validation/experiments/delta_flume/envelopes/case1_envelopes.csv @@ -0,0 +1,102 @@ +z_over_L,x_min_D,x_mean_D,x_max_D,y_min_D,y_max_D,kx_rms_D,ky_rms_D +1.0000,0,0,0,0.0019215,0.0019215,0,0 +0.9900,-0.008835,0.017901,0.026852,-0.040876,0.047177,6.3492e-06,1.6376e-05 +0.9800,-0.0091084,0.027331,0.063069,-0.085126,0.091014,1.2212e-05,3.2267e-05 +0.9700,-0.014717,0.044402,0.09522,-0.12707,0.13294,1.8406e-05,4.6756e-05 +0.9600,-0.015259,0.066097,0.12792,-0.17507,0.185,2.4988e-05,6.2761e-05 +0.9500,-0.015259,0.083437,0.154,-0.21563,0.22514,3.1303e-05,7.3985e-05 +0.9400,-0.015259,0.090621,0.18952,-0.25454,0.26,3.7547e-05,8.2517e-05 +0.9300,-0.015002,0.10806,0.21575,-0.29005,0.29136,4.3439e-05,8.9259e-05 +0.9200,-0.0086153,0.12674,0.2436,-0.32334,0.32437,4.9129e-05,9.3376e-05 +0.9100,2.3856e-05,0.14413,0.26683,-0.35316,0.34939,5.3576e-05,9.4635e-05 +0.9000,0.0087751,0.16164,0.29297,-0.38202,0.37681,5.7197e-05,9.3897e-05 +0.8900,0.021503,0.18087,0.32598,-0.41604,0.40712,6.0057e-05,9.0807e-05 +0.8800,0.039055,0.19851,0.34875,-0.43734,0.42756,6.1421e-05,8.5957e-05 +0.8700,0.057226,0.21698,0.3684,-0.46347,0.44965,6.1351e-05,8.0365e-05 +0.8600,0.072822,0.23432,0.39394,-0.49197,0.47193,6.072e-05,7.5187e-05 +0.8500,0.10076,0.25002,0.41227,-0.52161,0.50126,5.8818e-05,7.1183e-05 +0.8400,0.12706,0.26774,0.42677,-0.54938,0.53018,5.6704e-05,6.8927e-05 +0.8300,0.15636,0.28851,0.44183,-0.58327,0.56023,5.3676e-05,7.1039e-05 +0.8200,0.18389,0.30518,0.45579,-0.61273,0.58891,5.0665e-05,7.6146e-05 +0.8100,0.21156,0.32595,0.46493,-0.64087,0.61418,4.7198e-05,8.3043e-05 +0.8000,0.23574,0.34304,0.47212,-0.66164,0.63463,4.3311e-05,9.1522e-05 +0.7900,0.25278,0.35859,0.47312,-0.68164,0.65603,3.9321e-05,0.00010006 +0.7800,0.27706,0.37622,0.47827,-0.69619,0.67568,3.3869e-05,0.0001076 +0.7700,0.28757,0.39536,0.48123,-0.71083,0.6909,2.8293e-05,0.00011408 +0.7600,0.30438,0.41568,0.50344,-0.71802,0.70235,2.1349e-05,0.0001198 +0.7500,0.31561,0.43185,0.52289,-0.71896,0.70843,1.7948e-05,0.00012207 +0.7400,0.32356,0.44954,0.53841,-0.71515,0.71055,1.8235e-05,0.00012162 +0.7300,0.33114,0.46678,0.55804,-0.70577,0.7043,2.2216e-05,0.00011957 +0.7200,0.34034,0.48222,0.58227,-0.69057,0.69377,2.8448e-05,0.00011588 +0.7100,0.34034,0.50126,0.60988,-0.67095,0.67809,3.546e-05,0.00010996 +0.7000,0.34172,0.52156,0.63984,-0.64379,0.65417,4.2243e-05,0.00010251 +0.6900,0.34649,0.54041,0.67884,-0.60885,0.62235,4.8628e-05,9.3562e-05 +0.6800,0.34969,0.5583,0.70779,-0.57681,0.59283,5.3797e-05,8.6545e-05 +0.6700,0.35877,0.57652,0.73806,-0.54291,0.5577,5.785e-05,7.9881e-05 +0.6600,0.37046,0.5933,0.76255,-0.50654,0.51931,6.0783e-05,7.5172e-05 +0.6500,0.38593,0.60927,0.78707,-0.46551,0.48017,6.3756e-05,7.3314e-05 +0.6400,0.40147,0.62837,0.80617,-0.42225,0.43712,6.5923e-05,7.4958e-05 +0.6300,0.42824,0.64755,0.83083,-0.3819,0.38928,6.7605e-05,8.0018e-05 +0.6200,0.44939,0.6643,0.84888,-0.35198,0.36024,6.8512e-05,8.6767e-05 +0.6100,0.46957,0.68642,0.86022,-0.33169,0.34569,6.8512e-05,9.4217e-05 +0.6000,0.4893,0.70943,0.878,-0.31413,0.33319,6.7858e-05,0.00010132 +0.5900,0.51617,0.72735,0.89592,-0.29755,0.32079,6.6058e-05,0.00010673 +0.5800,0.54615,0.74417,0.91066,-0.28217,0.30653,6.356e-05,0.0001098 +0.5700,0.5809,0.76218,0.92065,-0.26395,0.29251,5.9426e-05,0.00011011 +0.5600,0.61441,0.78401,0.92907,-0.24595,0.27862,5.335e-05,0.00010663 +0.5500,0.65007,0.80173,0.93194,-0.22752,0.26637,4.7116e-05,9.9894e-05 +0.5400,0.68768,0.81765,0.93194,-0.20835,0.2528,4.0574e-05,8.9769e-05 +0.5300,0.72693,0.83562,0.93194,-0.18835,0.23682,3.3406e-05,7.6577e-05 +0.5200,0.76841,0.85705,0.93194,-0.17761,0.22293,2.62e-05,6.1214e-05 +0.5100,0.81112,0.87854,0.93194,-0.19067,0.21644,2.0148e-05,4.5642e-05 +0.5000,0.84807,0.89851,0.93194,-0.23024,0.24126,1.6503e-05,3.2247e-05 +0.4900,0.86691,0.91833,0.95923,-0.27941,0.29529,1.765e-05,3.0427e-05 +0.4800,0.87067,0.93578,0.99621,-0.32407,0.3438,2.1935e-05,3.9135e-05 +0.4700,0.87067,0.95225,1.031,-0.37076,0.39208,2.73e-05,5.3548e-05 +0.4600,0.87067,0.96882,1.067,-0.41798,0.43906,3.3197e-05,6.8436e-05 +0.4500,0.87067,0.98666,1.1027,-0.46276,0.48336,3.8612e-05,8.1959e-05 +0.4400,0.87067,1.0036,1.1382,-0.50341,0.52542,4.3211e-05,9.4764e-05 +0.4300,0.87614,1.0225,1.1721,-0.54412,0.57036,4.8061e-05,0.00010723 +0.4200,0.88565,1.0417,1.1988,-0.57757,0.60749,5.1609e-05,0.00011657 +0.4100,0.889,1.0541,1.2246,-0.6038,0.63964,5.4217e-05,0.00012343 +0.4000,0.889,1.0684,1.2517,-0.62684,0.66745,5.6162e-05,0.00012883 +0.3900,0.89425,1.0813,1.2735,-0.64617,0.69296,5.715e-05,0.00013262 +0.3800,0.89823,1.0906,1.2902,-0.6649,0.71453,5.8326e-05,0.0001344 +0.3700,0.89823,1.0945,1.3069,-0.67925,0.73047,5.9443e-05,0.00013382 +0.3600,0.90417,1.1003,1.321,-0.69338,0.74381,6.0838e-05,0.00013042 +0.3500,0.90746,1.1036,1.3243,-0.70628,0.75277,6.2571e-05,0.00012529 +0.3400,0.90746,1.1036,1.3243,-0.71634,0.75739,6.4144e-05,0.00011931 +0.3300,0.91351,1.1036,1.3183,-0.72707,0.75858,6.5553e-05,0.00011343 +0.3200,0.92266,1.0976,1.3091,-0.73857,0.76125,6.5645e-05,0.00010846 +0.3100,0.92579,1.0888,1.2946,-0.74729,0.76484,6.4443e-05,0.00010527 +0.3000,0.93029,1.0853,1.2764,-0.75463,0.76879,6.1667e-05,0.00010552 +0.2900,0.93194,1.0706,1.2504,-0.75948,0.76693,5.6986e-05,0.00010861 +0.2800,0.94123,1.0599,1.2238,-0.75726,0.76619,5.0616e-05,0.00011349 +0.2700,0.94425,1.0438,1.1916,-0.75359,0.76352,4.3369e-05,0.00011904 +0.2600,0.94425,1.0283,1.1569,-0.74543,0.75718,3.6081e-05,0.0001232 +0.2500,0.93137,1.0111,1.1209,-0.73196,0.74442,2.9058e-05,0.00012546 +0.2400,0.91284,0.99257,1.0794,-0.71195,0.72978,2.4017e-05,0.00012478 +0.2300,0.89145,0.96318,1.0429,-0.68708,0.70363,2.2801e-05,0.00012015 +0.2200,0.8735,0.94661,1.0263,-0.65853,0.67797,2.6305e-05,0.00011276 +0.2100,0.85033,0.92136,1.0138,-0.62686,0.64988,3.1387e-05,0.00010229 +0.2000,0.81724,0.89491,1.0068,-0.59224,0.61905,3.727e-05,8.9577e-05 +0.1900,0.78042,0.8673,0.99109,-0.55279,0.58007,4.4119e-05,7.3518e-05 +0.1800,0.73889,0.83497,0.9727,-0.51243,0.54398,5.0741e-05,5.6113e-05 +0.1700,0.69547,0.80725,0.96188,-0.47469,0.50631,5.6849e-05,3.8534e-05 +0.1600,0.64434,0.7693,0.93428,-0.42752,0.46107,6.4167e-05,2.0551e-05 +0.1500,0.6001,0.73391,0.91029,-0.3882,0.42645,7.0194e-05,2.2765e-05 +0.1400,0.55737,0.70027,0.88343,-0.35699,0.4029,7.5667e-05,3.822e-05 +0.1300,0.51114,0.65522,0.85006,-0.33424,0.38433,7.9746e-05,5.6549e-05 +0.1200,0.46805,0.62026,0.81381,-0.31304,0.36532,8.3066e-05,7.282e-05 +0.1100,0.42719,0.57784,0.76333,-0.29441,0.34821,8.4096e-05,8.67e-05 +0.1000,0.37386,0.5241,0.71094,-0.26982,0.32283,8.2569e-05,9.967e-05 +0.0900,0.33021,0.48045,0.65282,-0.24962,0.29878,7.8948e-05,0.00010725 +0.0800,0.28657,0.43978,0.5967,-0.22657,0.2731,7.2763e-05,0.00011064 +0.0700,0.24981,0.38554,0.52718,-0.20147,0.24451,6.5016e-05,0.00010989 +0.0600,0.20937,0.33305,0.46847,-0.17415,0.21335,5.6759e-05,0.00010632 +0.0500,0.17167,0.28857,0.3981,-0.14682,0.18006,4.7244e-05,9.78e-05 +0.0400,0.13716,0.22491,0.31794,-0.11761,0.14562,3.8619e-05,8.5238e-05 +0.0300,0.096617,0.16626,0.23856,-0.08546,0.1088,2.7824e-05,6.6607e-05 +0.0200,0.062774,0.11276,0.15764,-0.055641,0.072613,1.84e-05,4.6219e-05 +0.0100,0.034895,0.052403,0.078546,-0.026942,0.035112,9.0028e-06,2.3073e-05 +0.0000,0,0,0,0.0019215,0.0019215,0,0 diff --git a/validation/experiments/delta_flume/envelopes/case2_envelopes.csv b/validation/experiments/delta_flume/envelopes/case2_envelopes.csv new file mode 100644 index 00000000..778e4eaf --- /dev/null +++ b/validation/experiments/delta_flume/envelopes/case2_envelopes.csv @@ -0,0 +1,102 @@ +z_over_L,x_min_D,x_mean_D,x_max_D,y_min_D,y_max_D,kx_rms_D,ky_rms_D +1.0000,0,0,0,0.0019206,0.0019206,0,0 +0.9900,0.0089508,0.017902,0.026853,-0.044813,0.04324,9.5506e-06,9.3453e-06 +0.9800,0.018104,0.036089,0.054193,-0.092599,0.087445,1.8397e-05,1.8156e-05 +0.9700,0.026872,0.05362,0.085993,-0.13791,0.128,2.5221e-05,2.6574e-05 +0.9600,0.037605,0.072138,0.11896,-0.19272,0.1813,3.2055e-05,3.6789e-05 +0.9500,0.04696,0.090835,0.1466,-0.23791,0.2255,3.563e-05,4.4704e-05 +0.9400,0.056627,0.10897,0.17035,-0.28119,0.26424,3.741e-05,5.2814e-05 +0.9300,0.071277,0.12652,0.18818,-0.31972,0.30283,3.6702e-05,5.9694e-05 +0.9200,0.089955,0.14509,0.21559,-0.35912,0.34369,3.4611e-05,6.7724e-05 +0.9100,0.10734,0.16258,0.23312,-0.39374,0.37831,3.2405e-05,7.4551e-05 +0.9000,0.12484,0.17705,0.25926,-0.425,0.40957,2.9811e-05,8.1273e-05 +0.8900,0.14715,0.1993,0.27904,-0.46185,0.44498,2.7898e-05,8.9278e-05 +0.8800,0.16442,0.21799,0.29659,-0.48857,0.47225,2.7982e-05,9.4969e-05 +0.8700,0.18019,0.24465,0.31476,-0.50976,0.49413,2.899e-05,9.9943e-05 +0.8600,0.19779,0.2619,0.32958,-0.52767,0.51119,3.19e-05,0.00010427 +0.8500,0.21631,0.2777,0.3482,-0.54131,0.53012,3.3932e-05,0.00010747 +0.8400,0.23387,0.29531,0.36631,-0.55227,0.54314,3.542e-05,0.000109 +0.8300,0.2524,0.31617,0.39649,-0.55989,0.55516,3.5268e-05,0.00010953 +0.8200,0.27079,0.3341,0.4142,-0.56215,0.56029,3.4225e-05,0.00010916 +0.8100,0.28848,0.35967,0.43017,-0.5582,0.55973,3.1568e-05,0.00010757 +0.8000,0.30426,0.3773,0.4478,-0.55409,0.55641,2.7736e-05,0.00010595 +0.7900,0.32587,0.39538,0.46538,-0.54537,0.54834,2.3309e-05,0.00010271 +0.7800,0.34866,0.41265,0.48153,-0.531,0.53731,2.0658e-05,9.9723e-05 +0.7700,0.3678,0.43056,0.50881,-0.51581,0.52136,2.0354e-05,9.6186e-05 +0.7600,0.38812,0.4596,0.53303,-0.49289,0.49625,2.5313e-05,9.1518e-05 +0.7500,0.40524,0.47786,0.55756,-0.47046,0.47168,3.0496e-05,8.6715e-05 +0.7400,0.42505,0.49472,0.5752,-0.44514,0.44377,3.5739e-05,8.1718e-05 +0.7300,0.44229,0.51279,0.5925,-0.4164,0.4148,3.9223e-05,7.6209e-05 +0.7200,0.45773,0.53737,0.60788,-0.38689,0.38533,4.178e-05,7.0888e-05 +0.7100,0.47741,0.55582,0.62831,-0.354,0.35311,4.2325e-05,6.431e-05 +0.7000,0.50143,0.57433,0.6513,-0.31849,0.32277,4.0655e-05,5.7747e-05 +0.6900,0.52744,0.59911,0.66303,-0.28785,0.28642,3.5292e-05,4.943e-05 +0.6800,0.55231,0.62161,0.68198,-0.261,0.25677,2.9661e-05,4.2745e-05 +0.6700,0.57863,0.63788,0.69805,-0.23324,0.22528,2.3736e-05,3.6371e-05 +0.6600,0.60321,0.65739,0.70769,-0.20277,0.19863,1.8858e-05,3.1093e-05 +0.6500,0.63038,0.68067,0.7258,-0.17604,0.17846,1.7753e-05,2.8693e-05 +0.6400,0.65598,0.70095,0.74792,-0.16119,0.16823,2.1935e-05,2.8707e-05 +0.6300,0.68066,0.71942,0.77324,-0.1655,0.18249,2.915e-05,3.2564e-05 +0.6200,0.70692,0.74064,0.78998,-0.18384,0.20697,3.511e-05,3.8556e-05 +0.6100,0.72843,0.76215,0.80811,-0.21828,0.23207,3.9793e-05,4.5601e-05 +0.6000,0.74991,0.78116,0.82957,-0.25013,0.25478,4.1957e-05,5.2493e-05 +0.5900,0.77217,0.80319,0.8519,-0.28075,0.27768,4.1762e-05,5.9804e-05 +0.5800,0.7881,0.82383,0.87099,-0.30936,0.30144,3.9437e-05,6.7397e-05 +0.5700,0.80418,0.84588,0.89704,-0.33963,0.32739,3.5864e-05,7.5452e-05 +0.5600,0.81916,0.87127,0.91723,-0.36525,0.35522,3.2103e-05,8.3176e-05 +0.5500,0.83699,0.8891,0.93815,-0.38685,0.3798,2.9603e-05,8.9719e-05 +0.5400,0.85306,0.91065,0.95866,-0.40434,0.40248,2.9075e-05,9.5473e-05 +0.5300,0.86933,0.93368,0.98052,-0.41849,0.42233,3.0846e-05,0.00010049 +0.5200,0.89213,0.95511,1.0086,-0.43337,0.43879,3.4354e-05,0.00010503 +0.5100,0.91797,0.97666,1.0345,-0.4451,0.45148,3.7962e-05,0.00010864 +0.5000,0.94145,0.99663,1.0627,-0.45728,0.46385,4.0579e-05,0.00011167 +0.4900,0.96127,1.02,1.087,-0.46826,0.46951,4.1574e-05,0.00011384 +0.4800,0.97873,1.04,1.1094,-0.47486,0.46951,3.9872e-05,0.00011451 +0.4700,1,1.0629,1.1301,-0.47835,0.46738,3.6492e-05,0.00011364 +0.4600,1.0209,1.0853,1.1466,-0.47707,0.46417,3.2182e-05,0.00011201 +0.4500,1.0431,1.1076,1.1645,-0.47341,0.45931,2.7406e-05,0.00010935 +0.4400,1.0665,1.1293,1.1785,-0.46419,0.44997,2.3909e-05,0.00010535 +0.4300,1.0924,1.1483,1.1943,-0.44802,0.44415,2.4055e-05,9.9932e-05 +0.4200,1.1153,1.1673,1.2114,-0.43062,0.44159,2.7915e-05,9.404e-05 +0.4100,1.1258,1.1797,1.2282,-0.41946,0.43547,3.3165e-05,8.8557e-05 +0.4000,1.1389,1.1941,1.2462,-0.40964,0.42654,3.8387e-05,8.3136e-05 +0.3900,1.157,1.2052,1.2591,-0.39702,0.41368,4.2816e-05,7.8008e-05 +0.3800,1.1702,1.2131,1.2684,-0.38033,0.39721,4.5212e-05,7.3823e-05 +0.3700,1.1792,1.2221,1.2773,-0.36172,0.37729,4.4319e-05,6.9995e-05 +0.3600,1.1833,1.2322,1.2814,-0.33775,0.35075,4.084e-05,6.5971e-05 +0.3500,1.1833,1.2355,1.2814,-0.30787,0.32034,3.4528e-05,6.2531e-05 +0.3400,1.1772,1.2355,1.2814,-0.27962,0.29276,2.8053e-05,5.9002e-05 +0.3300,1.1741,1.2355,1.2754,-0.24828,0.26209,2.2527e-05,5.5155e-05 +0.3200,1.1681,1.2355,1.2662,-0.21297,0.22595,2.1416e-05,5.055e-05 +0.3100,1.165,1.2298,1.2631,-0.19791,0.19339,2.5562e-05,4.5404e-05 +0.3000,1.1582,1.2195,1.2631,-0.19934,0.16736,3.2899e-05,3.9252e-05 +0.2900,1.1485,1.2097,1.2557,-0.20646,0.18307,4.0154e-05,3.3816e-05 +0.2800,1.1327,1.2033,1.2469,-0.21569,0.21342,4.5186e-05,3.1778e-05 +0.2700,1.1143,1.1925,1.2377,-0.22964,0.24826,4.7906e-05,3.2453e-05 +0.2600,1.0988,1.1784,1.2222,-0.25416,0.28069,4.8412e-05,3.6996e-05 +0.2500,1.0816,1.1613,1.2106,-0.28247,0.31015,4.5741e-05,4.4831e-05 +0.2400,1.0631,1.1427,1.1949,-0.31271,0.34218,4.1007e-05,5.471e-05 +0.2300,1.0417,1.1134,1.1682,-0.34671,0.38484,3.3355e-05,6.8169e-05 +0.2200,1.0263,1.089,1.1416,-0.36898,0.42375,2.7441e-05,7.9786e-05 +0.2100,1.0087,1.0699,1.1144,-0.39341,0.45733,2.5168e-05,9.1554e-05 +0.2000,0.97658,1.0379,1.0905,-0.42045,0.48885,2.6181e-05,0.00010308 +0.1900,0.94945,1.0107,1.0563,-0.44739,0.51465,3.1162e-05,0.00011498 +0.1800,0.90812,0.97664,1.0292,-0.4729,0.53763,3.7136e-05,0.00012707 +0.1700,0.87089,0.9414,1.0034,-0.49229,0.55573,4.1477e-05,0.00013808 +0.1600,0.82214,0.90109,0.96262,-0.51011,0.57514,4.4409e-05,0.00015031 +0.1500,0.78596,0.86569,0.92969,-0.52118,0.58235,4.4583e-05,0.00015832 +0.1400,0.74439,0.82401,0.88579,-0.52601,0.5862,4.1961e-05,0.00016476 +0.1300,0.70089,0.77789,0.83918,-0.52294,0.57993,3.734e-05,0.00016772 +0.1200,0.65545,0.73482,0.7988,-0.51265,0.57013,3.2937e-05,0.00016732 +0.1100,0.61156,0.6836,0.74805,-0.49947,0.55622,3.0929e-05,0.00016372 +0.1000,0.55166,0.62216,0.67418,-0.47568,0.5287,3.175e-05,0.00015444 +0.0900,0.50801,0.57852,0.62482,-0.44682,0.49744,3.6549e-05,0.00014299 +0.0800,0.45558,0.52015,0.56319,-0.41355,0.45915,4.141e-05,0.00012852 +0.0700,0.40081,0.46516,0.5081,-0.374,0.41651,4.6165e-05,0.00011262 +0.0600,0.35122,0.40438,0.45012,-0.32855,0.37139,4.8226e-05,9.676e-05 +0.0500,0.29007,0.34506,0.37977,-0.2813,0.3158,4.7784e-05,7.9773e-05 +0.0400,0.23642,0.28016,0.30524,-0.22914,0.26053,4.3508e-05,6.2666e-05 +0.0300,0.16626,0.20262,0.22976,-0.16892,0.19218,3.6277e-05,4.5125e-05 +0.0200,0.11276,0.13957,0.15765,-0.11216,0.1278,2.5117e-05,2.9434e-05 +0.0100,0.0524,0.066875,0.078546,-0.054362,0.063974,1.3231e-05,1.4706e-05 +0.0000,0,0,0,0.0019206,0.0019206,0,0 diff --git a/validation/experiments/delta_flume/envelopes/case3_envelopes.csv b/validation/experiments/delta_flume/envelopes/case3_envelopes.csv new file mode 100644 index 00000000..483c93a2 --- /dev/null +++ b/validation/experiments/delta_flume/envelopes/case3_envelopes.csv @@ -0,0 +1,102 @@ +z_over_L,x_min_D,x_mean_D,x_max_D,y_min_D,y_max_D,kx_rms_D,ky_rms_D +1.0000,0,0,0,0.0019206,0.0019206,0,0 +0.9900,0.017902,0.044634,0.080322,-0.08023,0.075215,5.2344e-05,5.0451e-05 +0.9800,0.036089,0.096198,0.16542,-0.16424,0.15163,0.00010156,9.8631e-05 +0.9700,0.062035,0.14565,0.2413,-0.24147,0.22163,0.00014393,0.00013773 +0.9600,0.092216,0.20927,0.32867,-0.33068,0.30337,0.0001848,0.00017466 +0.9500,0.13014,0.25364,0.40512,-0.40455,0.36907,0.00020979,0.00019616 +0.9400,0.17341,0.30547,0.46846,-0.46989,0.42726,0.00022405,0.00021032 +0.9300,0.22343,0.35829,0.52698,-0.52474,0.47862,0.00022969,0.00022031 +0.9200,0.28842,0.42289,0.59097,-0.57915,0.52671,0.00022736,0.00023111 +0.9100,0.34668,0.47226,0.63172,-0.62146,0.56037,0.00021671,0.00024382 +0.9000,0.41647,0.52174,0.68109,-0.65609,0.58923,0.00019941,0.00025902 +0.8900,0.50884,0.58553,0.7368,-0.68695,0.61455,0.00016599,0.00027959 +0.8800,0.57885,0.6395,0.77824,-0.7016,0.62723,0.00013479,0.00029446 +0.8700,0.64507,0.7027,0.82407,-0.70961,0.62624,9.848e-05,0.00030427 +0.8600,0.67827,0.75236,0.86529,-0.70833,0.61835,7.2139e-05,0.00030805 +0.8500,0.72357,0.80587,0.91403,-0.69241,0.60242,7.4339e-05,0.00030454 +0.8400,0.75661,0.8644,0.98224,-0.67124,0.58153,0.00010468,0.00029291 +0.8300,0.81039,0.92825,1.0754,-0.62914,0.54558,0.00015339,0.00027206 +0.8200,0.85763,0.98221,1.1528,-0.58541,0.50748,0.00019047,0.00024995 +0.8100,0.90973,1.0422,1.224,-0.53553,0.46244,0.00022075,0.00022632 +0.8000,0.96014,1.0945,1.2939,-0.48111,0.41663,0.00023925,0.00020521 +0.7900,1.014,1.1477,1.3618,-0.41959,0.37166,0.00024689,0.00018643 +0.7800,1.0653,1.2079,1.4205,-0.35787,0.33424,0.0002436,0.0001723 +0.7700,1.1304,1.2622,1.4835,-0.29932,0.30752,0.00022975,0.00015962 +0.7600,1.1964,1.3254,1.5462,-0.25796,0.30805,0.00020375,0.00014725 +0.7500,1.2665,1.3835,1.5952,-0.25287,0.33351,0.00017468,0.00013531 +0.7400,1.3342,1.4344,1.6373,-0.27332,0.36449,0.00014291,0.00012243 +0.7300,1.4057,1.4908,1.68,-0.31657,0.39237,0.00011033,0.00011008 +0.7200,1.4825,1.5502,1.7148,-0.3699,0.41943,8.633e-05,0.00010562 +0.7100,1.551,1.6023,1.7485,-0.42819,0.4406,8.182e-05,0.00011353 +0.7000,1.5782,1.6576,1.7914,-0.48324,0.46611,0.00010403,0.00013717 +0.6900,1.6123,1.7273,1.8785,-0.54712,0.52408,0.00014655,0.000176 +0.6800,1.6488,1.7812,1.9528,-0.59754,0.57593,0.00018429,0.00021029 +0.6700,1.6865,1.8388,2.0257,-0.64377,0.62427,0.00021829,0.00024245 +0.6600,1.7326,1.8896,2.1,-0.68423,0.66373,0.00024346,0.00026847 +0.6500,1.7841,1.946,2.1707,-0.71802,0.69648,0.00025879,0.0002881 +0.6400,1.8421,2.0078,2.2424,-0.74434,0.72061,0.00026143,0.00030157 +0.6300,1.9125,2.068,2.3067,-0.76146,0.73842,0.00024959,0.00030927 +0.6200,1.978,2.1243,2.3564,-0.76793,0.74489,0.00022647,0.00031317 +0.6100,2.0487,2.1822,2.4046,-0.76287,0.75259,0.00019459,0.00031655 +0.6000,2.1176,2.2382,2.4525,-0.75931,0.76548,0.00015777,0.00032057 +0.5900,2.1891,2.2977,2.4931,-0.76254,0.76841,0.00012108,0.00032472 +0.5800,2.2641,2.3546,2.5296,-0.75681,0.76232,9.6529e-05,0.00032823 +0.5700,2.3201,2.4176,2.5701,-0.73847,0.7473,9.9129e-05,0.00032889 +0.5600,2.3505,2.4805,2.6233,-0.706,0.72106,0.00013081,0.00032165 +0.5500,2.3822,2.5355,2.693,-0.66716,0.68903,0.00016728,0.00030777 +0.5400,2.4156,2.5949,2.7601,-0.62037,0.64964,0.00020165,0.00028727 +0.5300,2.4538,2.6528,2.8256,-0.56549,0.59845,0.00023104,0.00025938 +0.5200,2.5073,2.7097,2.8837,-0.49879,0.5379,0.00025305,0.00022533 +0.5100,2.5673,2.7677,2.9399,-0.42802,0.47301,0.00026412,0.00019161 +0.5000,2.6436,2.831,3.005,-0.35105,0.39357,0.00026322,0.00015912 +0.4900,2.7262,2.8965,3.0625,-0.3247,0.30882,0.00024914,0.0001383 +0.4800,2.7995,2.9564,3.1068,-0.34434,0.24037,0.00022699,0.00013229 +0.4700,2.8762,3.0134,3.1492,-0.37497,0.22153,0.00019655,0.00013635 +0.4600,2.9498,3.069,3.1901,-0.4052,0.2611,0.00016126,0.00014651 +0.4500,3.0196,3.1258,3.226,-0.42984,0.31933,0.00012673,0.0001576 +0.4400,3.0947,3.1814,3.2552,-0.44911,0.38022,9.9834e-05,0.00016716 +0.4300,3.1474,3.2409,3.3155,-0.46306,0.44337,9.4125e-05,0.00017554 +0.4200,3.1642,3.2946,3.3939,-0.47905,0.4959,0.0001137,0.00018434 +0.4100,3.1809,3.342,3.458,-0.52353,0.54505,0.00014275,0.00019756 +0.4000,3.1939,3.3798,3.5146,-0.58202,0.59717,0.00017363,0.00021994 +0.3900,3.205,3.4125,3.5621,-0.63559,0.64618,0.00020332,0.00025239 +0.3800,3.2103,3.4431,3.5948,-0.68121,0.68816,0.00022882,0.00029395 +0.3700,3.2136,3.4653,3.6202,-0.7144,0.72027,0.00024793,0.00033795 +0.3600,3.2219,3.4854,3.6442,-0.74857,0.75933,0.00026202,0.0003846 +0.3500,3.225,3.492,3.6706,-0.78312,0.79161,0.00026549,0.00042177 +0.3400,3.2307,3.492,3.6831,-0.80557,0.80421,0.00025904,0.0004439 +0.3300,3.2336,3.492,3.6812,-0.81604,0.80177,0.00024233,0.00045414 +0.3200,3.2336,3.4799,3.6669,-0.81414,0.78484,0.00021478,0.00045056 +0.3100,3.2229,3.4621,3.6377,-0.80009,0.75406,0.00017984,0.00043524 +0.3000,3.2119,3.4299,3.5859,-0.77164,0.71089,0.00013508,0.00040682 +0.2900,3.1927,3.3992,3.5301,-0.73173,0.6653,9.9201e-05,0.00037356 +0.2800,3.1742,3.3592,3.4708,-0.68541,0.62093,9.1891e-05,0.00034039 +0.2700,3.1446,3.3156,3.4338,-0.62839,0.56478,0.00011607,0.00030546 +0.2600,3.079,3.2652,3.4162,-0.56641,0.50571,0.0001551,0.00027166 +0.2500,2.9946,3.2136,3.3863,-0.49936,0.44228,0.00019689,0.00023667 +0.2400,2.8983,3.1545,3.3447,-0.42495,0.37074,0.00023466,0.00020035 +0.2300,2.7926,3.0745,3.2766,-0.3346,0.28553,0.00026731,0.00016166 +0.2200,2.7132,3.0037,3.2244,-0.25688,0.21406,0.00028335,0.00014303 +0.2100,2.6273,2.926,3.1571,-0.18895,0.16905,0.0002884,0.00014914 +0.2000,2.5561,2.8525,3.0753,-0.23027,0.19609,0.00028131,0.00017768 +0.1900,2.4789,2.7635,2.9789,-0.29648,0.2608,0.0002617,0.00022145 +0.1800,2.4061,2.6695,2.8672,-0.36781,0.33032,0.0002315,0.00026708 +0.1700,2.3295,2.576,2.7482,-0.4325,0.39425,0.00019332,0.00030655 +0.1600,2.2351,2.4606,2.5951,-0.50607,0.46086,0.00013983,0.00034458 +0.1500,2.1587,2.3489,2.4512,-0.55347,0.50806,9.6751e-05,0.00036399 +0.1400,2.0499,2.2367,2.348,-0.59125,0.54855,7.4046e-05,0.00037272 +0.1300,1.9274,2.1199,2.257,-0.61485,0.57613,8.9309e-05,0.00037368 +0.1200,1.8024,1.995,2.1613,-0.624,0.59601,0.00012859,0.00036941 +0.1100,1.6748,1.87,2.0542,-0.61857,0.60044,0.00017066,0.00036499 +0.1000,1.5169,1.7161,1.9127,-0.60349,0.59318,0.00021945,0.00036319 +0.0900,1.3861,1.5795,1.7757,-0.578,0.57731,0.00025205,0.00036668 +0.0800,1.2226,1.4247,1.6209,-0.55959,0.55448,0.00027764,0.00037345 +0.0700,1.0642,1.2695,1.4656,-0.53126,0.52597,0.00029283,0.00037847 +0.0600,0.9127,1.1181,1.2975,-0.48996,0.4879,0.00029548,0.00037414 +0.0500,0.76017,0.94585,1.1096,-0.43842,0.43668,0.00028373,0.00035715 +0.0400,0.60473,0.76566,0.91095,-0.36925,0.3713,0.00025556,0.00032117 +0.0300,0.43755,0.56147,0.67334,-0.27953,0.28185,0.00020542,0.00025737 +0.0200,0.28548,0.37181,0.44879,-0.19034,0.1929,0.00014347,0.00018076 +0.0100,0.1425,0.18615,0.22105,-0.092844,0.099088,7.2738e-05,9.1819e-05 +0.0000,0,0,0,0.0019206,0.0019206,0,0 diff --git a/validation/experiments/delta_flume/envelopes/case4_envelopes.csv b/validation/experiments/delta_flume/envelopes/case4_envelopes.csv new file mode 100644 index 00000000..2112668b --- /dev/null +++ b/validation/experiments/delta_flume/envelopes/case4_envelopes.csv @@ -0,0 +1,102 @@ +z_over_L,x_min_D,x_mean_D,x_max_D,y_min_D,y_max_D,kx_rms_D,ky_rms_D +1.0000,0,0,0,0.0019206,0.0019206,0,0 +0.9900,0.026853,0.068388,0.10407,-0.055635,0.075215,9.6454e-05,7.0734e-05 +0.9800,0.063068,0.14128,0.21049,-0.10961,0.14822,0.00018629,0.00013634 +0.9700,0.095221,0.214,0.31244,-0.16256,0.21762,0.00025688,0.00018946 +0.9600,0.15593,0.30138,0.42766,-0.2309,0.29914,0.0003171,0.00024022 +0.9500,0.2218,0.38126,0.5143,-0.28931,0.36205,0.00033982,0.00027328 +0.9400,0.29315,0.45178,0.59475,-0.34407,0.41117,0.00033586,0.00029911 +0.9300,0.37816,0.52762,0.65877,-0.39292,0.45297,0.00030969,0.00032207 +0.9200,0.47777,0.60823,0.72325,-0.43601,0.48163,0.00025881,0.00034509 +0.9100,0.57665,0.68385,0.77274,-0.46725,0.49843,0.00019534,0.00036215 +0.9000,0.69008,0.76239,0.82502,-0.48841,0.50324,0.00012562,0.00037003 +0.8900,0.81035,0.85941,0.92683,-0.49035,0.48406,7.9491e-05,0.00036335 +0.8800,0.86709,0.93559,1.0379,-0.47916,0.45793,0.00012299,0.0003428 +0.8700,0.91421,1.0159,1.15,-0.45432,0.41616,0.00019967,0.0003089 +0.8600,0.96491,1.0919,1.2429,-0.4151,0.37034,0.00026697,0.00027152 +0.8500,1.0297,1.1724,1.3326,-0.36682,0.31751,0.00031949,0.00023363 +0.8400,1.0895,1.2489,1.4171,-0.3097,0.26171,0.00034778,0.0002064 +0.8300,1.1847,1.3441,1.5002,-0.23728,0.20134,0.00034721,0.00018659 +0.8200,1.2774,1.4308,1.5702,-0.17683,0.16399,0.0003187,0.00017531 +0.8100,1.3861,1.5105,1.6318,-0.13115,0.13861,0.00026681,0.00016126 +0.8000,1.4952,1.5884,1.6984,-0.1278,0.12636,0.00019992,0.00014338 +0.7900,1.6099,1.6745,1.7497,-0.1746,0.15767,0.0001233,0.00012867 +0.7800,1.7126,1.7506,1.8027,-0.21709,0.21229,6.7314e-05,0.0001332 +0.7700,1.7574,1.834,1.8916,-0.26666,0.27295,0.00010027,0.00017028 +0.7600,1.808,1.926,2.0267,-0.32399,0.33002,0.00019027,0.00023204 +0.7500,1.8556,2.0058,2.1398,-0.3657,0.37318,0.00026155,0.00028575 +0.7400,1.9112,2.0869,2.2393,-0.40192,0.41349,0.00031551,0.00032911 +0.7300,1.9827,2.1695,2.3291,-0.43048,0.44752,0.00035043,0.00036016 +0.7200,2.0545,2.2456,2.408,-0.45271,0.47355,0.00036247,0.00037503 +0.7100,2.1441,2.3261,2.4859,-0.4652,0.48992,0.0003486,0.0003757 +0.7000,2.2348,2.4087,2.5547,-0.46662,0.49497,0.0003075,0.00036556 +0.6900,2.3527,2.5011,2.6234,-0.46273,0.4847,0.00023091,0.00034779 +0.6800,2.4693,2.5788,2.6729,-0.45727,0.46379,0.00015195,0.00033372 +0.6700,2.5896,2.6577,2.7249,-0.44655,0.43573,8.4606e-05,0.0003209 +0.6600,2.6835,2.7339,2.8036,-0.42525,0.40252,8.6113e-05,0.00030779 +0.6500,2.7404,2.8127,2.9095,-0.39242,0.35963,0.0001646,0.00029047 +0.6400,2.7891,2.8956,3.0202,-0.34275,0.30382,0.00024904,0.00026389 +0.6300,2.8538,2.9861,3.1308,-0.27193,0.23706,0.00032002,0.00022243 +0.6200,2.9193,3.066,3.2244,-0.19882,0.18296,0.00035934,0.00017744 +0.6100,2.9927,3.1471,3.3076,-0.15631,0.15863,0.00037127,0.00013668 +0.6000,3.0734,3.2294,3.3796,-0.18552,0.16613,0.00035681,0.00011903 +0.5900,3.1603,3.3081,3.4513,-0.2554,0.19775,0.00031759,0.00013763 +0.5800,3.2535,3.3898,3.5134,-0.32167,0.25838,0.0002572,0.00018268 +0.5700,3.3738,3.4801,3.5814,-0.38837,0.34076,0.00017182,0.00023879 +0.5600,3.5001,3.5679,3.6405,-0.44064,0.41526,9.7351e-05,0.00028742 +0.5500,3.5764,3.6516,3.7082,-0.47588,0.47013,0.00010135,0.00031944 +0.5400,3.6185,3.733,3.8091,-0.50072,0.51188,0.00016688,0.00034108 +0.5300,3.6684,3.8094,3.9231,-0.51782,0.54591,0.0002452,0.00035616 +0.5200,3.7321,3.8887,4.0316,-0.53148,0.57481,0.00031233,0.00036729 +0.5100,3.802,3.9721,4.1244,-0.53877,0.59167,0.00035488,0.00037623 +0.5000,3.8914,4.066,4.2212,-0.53891,0.59832,0.00037072,0.00038446 +0.4900,3.9872,4.1522,4.3114,-0.53107,0.59141,0.00035392,0.00038988 +0.4800,4.0814,4.2327,4.3768,-0.5161,0.57513,0.00031377,0.00039001 +0.4700,4.1856,4.3153,4.4341,-0.49395,0.54753,0.00025157,0.00038551 +0.4600,4.2955,4.3981,4.4865,-0.46551,0.51141,0.00017562,0.0003784 +0.4500,4.407,4.4799,4.5413,-0.43501,0.47282,0.00010564,0.00036985 +0.4400,4.4971,4.5554,4.6207,-0.40034,0.42703,9.144e-05,0.00035862 +0.4300,4.551,4.6336,4.7304,-0.34687,0.36303,0.00015908,0.00033958 +0.4200,4.5883,4.7088,4.8319,-0.28251,0.29375,0.00024128,0.00031065 +0.4100,4.6243,4.7681,4.9222,-0.21851,0.22844,0.00030687,0.00027443 +0.4000,4.6633,4.8192,4.9986,-0.16309,0.17896,0.00035327,0.0002376 +0.3900,4.7052,4.8721,5.0535,-0.16232,0.16651,0.00037688,0.00022019 +0.3800,4.7506,4.9151,5.093,-0.22282,0.19312,0.00037459,0.00024244 +0.3700,4.799,4.9496,5.1178,-0.30212,0.25066,0.00034597,0.00029725 +0.3600,4.8554,4.9843,5.1261,-0.38638,0.33723,0.00028627,0.00036854 +0.3500,4.9067,5.0048,5.1192,-0.45873,0.42121,0.00020677,0.00042215 +0.3400,4.9508,5.0149,5.0999,-0.51034,0.48759,0.00012806,0.0004436 +0.3300,4.9419,5.0178,5.0795,-0.54782,0.54119,8.7681e-05,0.00043541 +0.3200,4.9009,5.0121,5.0893,-0.57064,0.5794,0.00013044,0.00039845 +0.3100,4.8518,5.0031,5.1153,-0.57925,0.60236,0.00021014,0.00034501 +0.3000,4.8002,4.9795,5.1261,-0.57523,0.6143,0.00029686,0.00027817 +0.2900,4.747,4.9381,5.1114,-0.56515,0.61286,0.00035825,0.00023133 +0.2800,4.7017,4.8967,5.0816,-0.55156,0.60628,0.00038943,0.00021845 +0.2700,4.6553,4.8379,5.025,-0.53445,0.59104,0.00039489,0.00022885 +0.2600,4.6066,4.7718,4.9517,-0.5166,0.57136,0.00037274,0.00024826 +0.2500,4.5491,4.6962,4.8605,-0.49362,0.54696,0.00032462,0.0002694 +0.2400,4.494,4.6094,4.7447,-0.46266,0.5139,0.000252,0.00029076 +0.2300,4.4148,4.4927,4.5841,-0.41472,0.4683,0.00014715,0.00031481 +0.2200,4.3457,4.3853,4.4381,-0.37158,0.4222,6.0272e-05,0.00033278 +0.2100,4.2102,4.2669,4.3249,-0.326,0.36883,8.9822e-05,0.00033981 +0.2000,4.0589,4.1495,4.2369,-0.277,0.3048,0.00017622,0.00033013 +0.1900,3.8901,4.0167,4.1434,-0.21433,0.22727,0.00026628,0.00029683 +0.1800,3.7214,3.8778,4.0315,-0.1427,0.14666,0.00033742,0.00024151 +0.1700,3.5664,3.7361,3.8994,-0.097125,0.15371,0.00038225,0.00017972 +0.1600,3.3743,3.5511,3.725,-0.16064,0.23645,0.00040285,0.00014794 +0.1500,3.2167,3.3863,3.5632,-0.25134,0.31015,0.00038586,0.0002077 +0.1400,3.066,3.2196,3.3839,-0.33479,0.38961,0.00033984,0.00030529 +0.1300,2.9062,3.0401,3.1699,-0.41054,0.46778,0.00026703,0.00040652 +0.1200,2.7525,2.8496,2.9588,-0.47122,0.53462,0.00017445,0.0004884 +0.1100,2.6089,2.6684,2.7395,-0.51217,0.58905,7.9989e-05,0.00054389 +0.1000,2.3897,2.4329,2.486,-0.54024,0.6273,8.4964e-05,0.00057961 +0.0900,2.1551,2.2381,2.3285,-0.54408,0.64173,0.00018399,0.00058051 +0.0800,1.9094,2.024,2.1495,-0.53301,0.63363,0.00028081,0.00056315 +0.0700,1.6626,1.8025,1.9546,-0.50829,0.61046,0.00035547,0.00053216 +0.0600,1.4182,1.5843,1.7432,-0.47405,0.56936,0.00039862,0.0004927 +0.0500,1.1751,1.3437,1.5032,-0.4232,0.51409,0.00041188,0.00044171 +0.0400,0.93218,1.0835,1.2343,-0.36826,0.43748,0.00038866,0.00037977 +0.0300,0.67291,0.79694,0.91793,-0.28456,0.33676,0.00032166,0.0002965 +0.0200,0.43949,0.52626,0.61258,-0.19439,0.22871,0.00022871,0.00020435 +0.0100,0.20938,0.26178,0.30531,-0.096692,0.11545,0.00011738,0.00010336 +0.0000,0,0,0,0.0019206,0.0019206,0,0 diff --git a/validation/experiments/delta_flume/envelopes/case5_envelopes.csv b/validation/experiments/delta_flume/envelopes/case5_envelopes.csv new file mode 100644 index 00000000..0a291208 --- /dev/null +++ b/validation/experiments/delta_flume/envelopes/case5_envelopes.csv @@ -0,0 +1,102 @@ +z_over_L,x_min_D,x_mean_D,x_max_D,y_min_D,y_max_D,kx_rms_D,ky_rms_D +1.0000,0,0,0,0.0019206,0.0019206,0,0 +0.9900,0.044634,0.09524,0.14572,-0.069408,0.096368,0.00010265,0.00010314 +0.9800,0.087322,0.20139,0.28883,-0.14186,0.18758,0.00019604,0.00019599 +0.9700,0.14484,0.29211,0.4145,-0.2094,0.27526,0.00026381,0.00026406 +0.9600,0.24145,0.41925,0.55212,-0.28562,0.36951,0.00030953,0.000321 +0.9500,0.33932,0.51712,0.65902,-0.34786,0.44219,0.00031102,0.00035408 +0.9400,0.44868,0.62565,0.74693,-0.39534,0.49541,0.00028016,0.00038351 +0.9300,0.55788,0.72491,0.83106,-0.43901,0.53259,0.00022388,0.00041394 +0.9200,0.70342,0.83337,0.91311,-0.46766,0.56056,0.00014606,0.00044388 +0.9100,0.83422,0.93222,1.012,-0.47578,0.56532,7.7114e-05,0.00045702 +0.9000,0.96213,1.034,1.1487,-0.4652,0.55089,8.8133e-05,0.00044544 +0.8900,1.0617,1.1736,1.3284,-0.4176,0.49996,0.00017508,0.0003913 +0.8800,1.1391,1.2759,1.4559,-0.36426,0.44322,0.00023938,0.0003287 +0.8700,1.2298,1.3824,1.5773,-0.29695,0.37228,0.00028656,0.0002665 +0.8600,1.3238,1.4928,1.6789,-0.22724,0.2984,0.0003068,0.00023786 +0.8500,1.4323,1.6019,1.7772,-0.1575,0.2197,0.00030013,0.0002457 +0.8400,1.5645,1.7133,1.8617,-0.13532,0.17976,0.00026941,0.00026298 +0.8300,1.7204,1.84,1.9478,-0.16346,0.2294,0.00020324,0.00025672 +0.8200,1.8608,1.9517,2.0365,-0.22441,0.26504,0.00013612,0.00022649 +0.8100,1.9929,2.0604,2.132,-0.28299,0.30884,8.7809e-05,0.00019734 +0.8000,2.0827,2.1685,2.2472,-0.33821,0.37869,0.00010271,0.00020996 +0.7900,2.1548,2.2754,2.3866,-0.38751,0.46423,0.00016691,0.00027799 +0.7800,2.223,2.3851,2.5207,-0.43272,0.53567,0.00022899,0.00036038 +0.7700,2.3092,2.4988,2.6571,-0.48423,0.5932,0.00027957,0.0004327 +0.7600,2.4251,2.6277,2.799,-0.5229,0.63286,0.00030534,0.00047122 +0.7500,2.5343,2.736,2.9086,-0.54385,0.64498,0.000301,0.00047139 +0.7400,2.648,2.8431,3.0005,-0.55381,0.64113,0.0002736,0.00045295 +0.7300,2.7802,2.949,3.0877,-0.55617,0.62413,0.00022473,0.0004314 +0.7200,2.9188,3.0543,3.1739,-0.54237,0.59896,0.00016326,0.0004208 +0.7100,3.0616,3.1609,3.2687,-0.51458,0.56985,0.00010688,0.00041979 +0.7000,3.1917,3.2744,3.3918,-0.47345,0.52225,0.00010285,0.00041444 +0.6900,3.2984,3.3996,3.5506,-0.40669,0.44804,0.00017207,0.00038143 +0.6800,3.3801,3.5018,3.6755,-0.34655,0.37755,0.00023717,0.00032477 +0.6700,3.4687,3.6087,3.7921,-0.28746,0.2965,0.00028854,0.00024493 +0.6600,3.5579,3.7106,3.8924,-0.23908,0.22837,0.0003153,0.00017112 +0.6500,3.6638,3.8139,3.9841,-0.20613,0.17763,0.00031512,0.00014582 +0.6400,3.7805,3.9258,4.0678,-0.2048,0.17248,0.00028373,0.00019634 +0.6300,3.9227,4.0454,4.1616,-0.26661,0.25756,0.00021902,0.00027308 +0.6200,4.0607,4.1517,4.2447,-0.34577,0.34513,0.00014759,0.00032495 +0.6100,4.1887,4.2558,4.3282,-0.41178,0.41936,0.00010086,0.00035746 +0.6000,4.2795,4.3592,4.4405,-0.46303,0.48016,0.0001176,0.0003807 +0.5900,4.3427,4.4673,4.5836,-0.50187,0.53113,0.00018408,0.00040625 +0.5800,4.4122,4.5762,4.7155,-0.52862,0.57347,0.00025088,0.000439 +0.5700,4.5033,4.6909,4.8484,-0.54353,0.6076,0.00030281,0.0004785 +0.5600,4.6139,4.8137,4.9748,-0.55377,0.62152,0.00032239,0.00050619 +0.5500,4.7258,4.9202,5.0802,-0.56229,0.6163,0.00031027,0.00050888 +0.5400,4.8521,5.0205,5.1733,-0.56101,0.59234,0.00027281,0.00048769 +0.5300,4.9908,5.1251,5.2575,-0.54568,0.54824,0.0002132,0.00044393 +0.5200,5.136,5.2344,5.3387,-0.51461,0.49085,0.00014194,0.00038488 +0.5100,5.2675,5.3432,5.4334,-0.47049,0.42868,0.00010034,0.0003298 +0.5000,5.3738,5.463,5.5679,-0.40605,0.35201,0.00012884,0.00028709 +0.4900,5.4553,5.5784,5.7098,-0.32425,0.2923,0.00020176,0.00026807 +0.4800,5.5371,5.6852,5.836,-0.2536,0.28127,0.00026054,0.00026176 +0.4700,5.6338,5.7937,5.9589,-0.22785,0.30189,0.00030224,0.00025567 +0.4600,5.7375,5.9018,6.0673,-0.24978,0.32915,0.00031827,0.00025168 +0.4500,5.846,6.0058,6.1698,-0.28149,0.35181,0.00030782,0.00026341 +0.4400,5.9586,6.1087,6.2643,-0.33397,0.37877,0.0002722,0.00030635 +0.4300,6.0874,6.2157,6.3477,-0.41567,0.43117,0.00020964,0.00038926 +0.4200,6.209,6.309,6.4089,-0.47967,0.48735,0.00014454,0.00048139 +0.4100,6.2896,6.3908,6.4563,-0.51813,0.5245,0.00011093,0.00056086 +0.4000,6.3421,6.4636,6.5324,-0.53156,0.5424,0.00013131,0.00061901 +0.3900,6.3769,6.5281,6.6284,-0.52482,0.53793,0.00018609,0.00064565 +0.3800,6.4076,6.5808,6.7113,-0.50783,0.50863,0.00024391,0.00063413 +0.3700,6.4408,6.6239,6.7749,-0.47613,0.45768,0.00028584,0.00058602 +0.3600,6.4799,6.667,6.832,-0.41626,0.38949,0.00030861,0.00049742 +0.3500,6.5164,6.6974,6.872,-0.34058,0.31542,0.00030468,0.00039395 +0.3400,6.5451,6.717,6.8819,-0.27364,0.31037,0.00027968,0.00031278 +0.3300,6.5724,6.7288,6.8779,-0.29174,0.34784,0.0002378,0.00027372 +0.3200,6.5979,6.7262,6.858,-0.36097,0.39465,0.00018706,0.00029001 +0.3100,6.6139,6.7194,6.8258,-0.4301,0.44013,0.00014502,0.00033545 +0.3000,6.6096,6.6963,6.7911,-0.50229,0.49123,0.00013263,0.00039014 +0.2900,6.5576,6.6527,6.7835,-0.5599,0.53764,0.00016499,0.00043022 +0.2800,6.4779,6.6107,6.7723,-0.60318,0.57415,0.000211,0.00045654 +0.2700,6.3959,6.5445,6.7344,-0.64394,0.59648,0.00025605,0.00047599 +0.2600,6.3055,6.4689,6.6719,-0.68296,0.6198,0.00028792,0.00048606 +0.2500,6.2117,6.3871,6.584,-0.71031,0.64492,0.00030355,0.00048433 +0.2400,6.1074,6.2832,6.4651,-0.71721,0.65259,0.000299,0.00046817 +0.2300,5.9906,6.144,6.3084,-0.69742,0.65259,0.00026791,0.00043774 +0.2200,5.8798,6.0247,6.1611,-0.66353,0.64402,0.00022029,0.00042108 +0.2100,5.7597,5.8812,5.9893,-0.61281,0.62054,0.00016058,0.00043359 +0.2000,5.6401,5.7347,5.8149,-0.54776,0.58097,0.00010959,0.00047486 +0.1900,5.4728,5.5624,5.6255,-0.46991,0.52272,0.00010777,0.00052728 +0.1800,5.262,5.3847,5.4672,-0.3865,0.44308,0.00016017,0.00056075 +0.1700,5.051,5.2009,5.317,-0.29519,0.34914,0.00022381,0.00055138 +0.1600,4.7894,4.9649,5.1129,-0.19007,0.21525,0.00028821,0.00047294 +0.1500,4.567,4.7496,4.9193,-0.24323,0.14474,0.00031686,0.00034328 +0.1400,4.3452,4.5232,4.7008,-0.33336,0.25793,0.00031915,0.0001718 +0.1300,4.1216,4.2824,4.4445,-0.4406,0.40545,0.00029081,0.00014344 +0.1200,3.9013,4.0362,4.1713,-0.54625,0.54818,0.00023491,0.00034099 +0.1100,3.688,3.7848,3.8856,-0.66554,0.67191,0.00016047,0.00056601 +0.1000,3.4107,3.4625,3.5241,-0.79054,0.79539,6.3268e-05,0.00082167 +0.0900,3.1225,3.1953,3.2802,-0.85547,0.85791,8.2891e-05,0.00099122 +0.0800,2.7743,2.8885,3.0281,-0.88662,0.89041,0.00017263,0.001127 +0.0700,2.4296,2.5724,2.7552,-0.87789,0.88659,0.00025557,0.0012019 +0.0600,2.0954,2.2584,2.462,-0.84427,0.84719,0.00031281,0.0012168 +0.0500,1.7363,1.9185,2.124,-0.77711,0.78875,0.00034304,0.0011673 +0.0400,1.3836,1.5531,1.7586,-0.68516,0.69525,0.0003373,0.0010491 +0.0300,0.99594,1.1471,1.3137,-0.54415,0.55004,0.0002877,0.00084005 +0.0200,0.65391,0.75781,0.87961,-0.37465,0.38078,0.00020801,0.00058672 +0.0100,0.32282,0.37219,0.43043,-0.19001,0.19241,0.00010738,0.0002976 +0.0000,0,0,0,0.0019206,0.0019206,0,0 diff --git a/validation/experiments/delta_flume/envelopes/case6_envelopes.csv b/validation/experiments/delta_flume/envelopes/case6_envelopes.csv new file mode 100644 index 00000000..c6561dc9 --- /dev/null +++ b/validation/experiments/delta_flume/envelopes/case6_envelopes.csv @@ -0,0 +1,102 @@ +z_over_L,x_min_D,x_mean_D,x_max_D,y_min_D,y_max_D,kx_rms_D,ky_rms_D +1.0000,0,0,0,0.0019206,0.0019206,0,0 +0.9900,0.068388,0.12197,0.17246,-0.076786,0.10473,0.00021061,0.00011033 +0.9800,0.15903,0.25546,0.34881,-0.15678,0.20889,0.00039692,0.00021621 +0.9700,0.24075,0.38079,0.50384,-0.22692,0.30031,0.00052324,0.00030648 +0.9600,0.37649,0.53541,0.66828,-0.3119,0.40248,0.00058814,0.00040676 +0.9500,0.51134,0.66339,0.8056,-0.37322,0.47557,0.00055455,0.00048691 +0.9400,0.65597,0.79475,0.91856,-0.41909,0.53169,0.00044877,0.0005585 +0.9300,0.81503,0.9313,1.0364,-0.4457,0.56076,0.00029585,0.00061147 +0.9200,0.94889,1.0648,1.1925,-0.45217,0.5707,0.00013204,0.00063556 +0.9100,1.0302,1.1898,1.3524,-0.43769,0.55766,0.00017289,0.00061984 +0.9000,1.1175,1.3265,1.521,-0.40643,0.52158,0.00034623,0.0005622 +0.8900,1.2471,1.4893,1.7224,-0.34153,0.45078,0.00052568,0.00044798 +0.8800,1.367,1.6256,1.8752,-0.27526,0.37948,0.00060796,0.00035589 +0.8700,1.4941,1.7599,2.0147,-0.20709,0.29434,0.00062374,0.00029462 +0.8600,1.6397,1.8969,2.1337,-0.14844,0.21442,0.00057346,0.00028046 +0.8500,1.8191,2.0396,2.2375,-0.13923,0.1406,0.0004584,0.00028339 +0.8400,1.9904,2.1741,2.3325,-0.18813,0.18147,0.00031021,0.00027074 +0.8300,2.2182,2.3336,2.4617,-0.25357,0.268,0.00016727,0.00024358 +0.8200,2.3813,2.4745,2.5937,-0.31592,0.33283,0.00020827,0.00025826 +0.8100,2.4651,2.6157,2.7549,-0.37641,0.39335,0.00035718,0.00033331 +0.8000,2.5615,2.7529,2.9242,-0.43531,0.44028,0.00048371,0.00043102 +0.7900,2.6777,2.8923,3.0909,-0.4809,0.48137,0.00056831,0.00051788 +0.7800,2.7964,3.0267,3.2417,-0.50863,0.50991,0.00059633,0.00057169 +0.7700,2.938,3.1678,3.3867,-0.51769,0.54242,0.00056075,0.00059338 +0.7600,3.1258,3.331,3.526,-0.51003,0.56752,0.00045062,0.00059546 +0.7500,3.2986,3.4689,3.6373,-0.50615,0.58548,0.0003183,0.00059957 +0.7400,3.4691,3.6006,3.7602,-0.49778,0.58686,0.00020306,0.00060731 +0.7300,3.6208,3.7369,3.8987,-0.47077,0.56641,0.00018909,0.00060429 +0.7200,3.7088,3.8663,4.0408,-0.4237,0.52282,0.00030514,0.00056762 +0.7100,3.8173,4.0077,4.2014,-0.35954,0.4551,0.00044438,0.00047796 +0.7000,3.9274,4.1413,4.3596,-0.29767,0.3675,0.00054788,0.00033875 +0.6900,4.0785,4.2972,4.5109,-0.22203,0.26072,0.00059669,0.00017728 +0.6800,4.2191,4.4301,4.6241,-0.19947,0.20933,0.00057429,0.00016052 +0.6700,4.3743,4.5637,4.7329,-0.25224,0.22398,0.00049179,0.00028011 +0.6600,4.5391,4.685,4.8276,-0.32748,0.29123,0.00036578,0.00038857 +0.6500,4.7069,4.8185,4.9368,-0.40269,0.37236,0.0002259,0.00044877 +0.6400,4.839,4.9576,5.0915,-0.46341,0.44264,0.00017844,0.00046213 +0.6300,4.9245,5.1047,5.2843,-0.5074,0.50523,0.00031645,0.00045972 +0.6200,5.0136,5.2368,5.4544,-0.53949,0.54662,0.00046909,0.00048604 +0.6100,5.111,5.3692,5.6113,-0.56467,0.5746,0.00057958,0.00054948 +0.6000,5.2243,5.5023,5.7561,-0.58444,0.58828,0.00063113,0.00062446 +0.5900,5.3572,5.6358,5.8807,-0.59448,0.58786,0.00061781,0.0006799 +0.5800,5.5014,5.7673,5.9892,-0.58544,0.5752,0.00054089,0.00069539 +0.5700,5.6812,5.9131,6.0961,-0.55883,0.54262,0.00039452,0.00066249 +0.5600,5.8816,6.0576,6.1887,-0.51454,0.49485,0.00023419,0.00059288 +0.5500,6.0628,6.1852,6.2848,-0.46683,0.44377,0.00019887,0.00052141 +0.5400,6.207,6.3128,6.4189,-0.41669,0.38343,0.00029578,0.00045655 +0.5300,6.3086,6.4448,6.5794,-0.35482,0.30752,0.00043914,0.00039927 +0.5200,6.3991,6.5786,6.7369,-0.27431,0.25094,0.00055334,0.00034979 +0.5100,6.4981,6.7083,6.8811,-0.21164,0.25399,0.00060691,0.00032018 +0.5000,6.6297,6.8583,7.0265,-0.24558,0.27731,0.00059216,0.00032973 +0.4900,6.7726,7.0067,7.1567,-0.356,0.29735,0.00050622,0.00038565 +0.4800,6.9115,7.1329,7.2622,-0.4474,0.3428,0.00038758,0.00044604 +0.4700,7.0604,7.2687,7.3804,-0.52596,0.41698,0.00025911,0.00048842 +0.4600,7.1951,7.4024,7.5188,-0.58535,0.48654,0.00021128,0.00049078 +0.4500,7.3068,7.5272,7.669,-0.62421,0.53763,0.00028465,0.00044961 +0.4400,7.4101,7.649,7.8219,-0.64418,0.5729,0.00041735,0.00037272 +0.4300,7.5199,7.7735,7.9802,-0.64636,0.59358,0.00054031,0.00028746 +0.4200,7.6143,7.8793,8.0995,-0.63182,0.59512,0.00060051,0.00027021 +0.4100,7.7051,7.9641,8.1843,-0.6166,0.58709,0.00059923,0.0003232 +0.4000,7.801,8.0308,8.2374,-0.60676,0.57478,0.00054134,0.00040677 +0.3900,7.8921,8.0859,8.2562,-0.6013,0.55621,0.00043242,0.00048779 +0.3800,7.9713,8.1299,8.2553,-0.59518,0.52968,0.00028307,0.00055503 +0.3700,8.0084,8.1558,8.2404,-0.58159,0.49703,0.00015446,0.00059873 +0.3600,8.0021,8.1696,8.278,-0.55034,0.45717,0.00018635,0.00061661 +0.3500,7.9566,8.1727,8.3372,-0.49601,0.40248,0.00034838,0.00059381 +0.3400,7.905,8.1604,8.3731,-0.42818,0.33936,0.00049056,0.0005322 +0.3300,7.8533,8.1365,8.39,-0.33456,0.25845,0.00059533,0.00043248 +0.3200,7.8056,8.1045,8.3776,-0.23421,0.2331,0.0006432,0.00032033 +0.3100,7.761,8.0644,8.3405,-0.22088,0.26529,0.0006277,0.00026796 +0.3000,7.7189,8.0022,8.2643,-0.28977,0.31751,0.0005368,0.00033295 +0.2900,7.6739,7.9301,8.1658,-0.39446,0.42045,0.00038382,0.00046283 +0.2800,7.6246,7.8459,8.0509,-0.48804,0.53179,0.00020665,0.00056702 +0.2700,7.5634,7.7491,7.932,-0.57779,0.63249,0.00011813,0.00063384 +0.2600,7.4663,7.6506,7.859,-0.64945,0.70895,0.00024585,0.00065138 +0.2500,7.3228,7.527,7.7799,-0.70441,0.76293,0.00042939,0.0006312 +0.2400,7.1597,7.3861,7.6774,-0.73767,0.79813,0.00058146,0.00058793 +0.2300,6.969,7.2069,7.5254,-0.7517,0.80676,0.00068239,0.00053814 +0.2200,6.8088,7.0434,7.3572,-0.74414,0.7939,0.00068667,0.00051572 +0.2100,6.6588,6.8619,7.1438,-0.72362,0.76754,0.00061593,0.00051032 +0.2000,6.5037,6.6686,6.9181,-0.68584,0.72274,0.00048139,0.00051203 +0.1900,6.3328,6.4581,6.6501,-0.63311,0.6592,0.00028779,0.0005041 +0.1800,6.1156,6.2325,6.3887,-0.56363,0.60238,9.5094e-05,0.0004755 +0.1700,5.8686,5.9983,6.1805,-0.48603,0.54173,0.00019506,0.00042002 +0.1600,5.5143,5.6991,5.9339,-0.37646,0.4533,0.0004363,0.00031603 +0.1500,5.2212,5.439,5.7104,-0.2777,0.3673,0.00059587,0.00021746 +0.1400,4.9247,5.1623,5.454,-0.21193,0.28841,0.00069214,0.00019128 +0.1300,4.6183,4.8648,5.16,-0.23539,0.33754,0.0007099,0.00029639 +0.1200,4.3344,4.5666,4.8457,-0.28857,0.39345,0.00064345,0.00045091 +0.1100,4.0604,4.27,4.5181,-0.34685,0.44316,0.00050826,0.00058987 +0.1000,3.7393,3.8979,4.0846,-0.41671,0.49604,0.00027637,0.00071811 +0.0900,3.4686,3.5875,3.7159,-0.46818,0.5297,7.4395e-05,0.00076743 +0.0800,3.1379,3.2369,3.3446,-0.49865,0.55685,0.0002136,0.0007685 +0.0700,2.7502,2.884,3.0323,-0.50354,0.55775,0.00042144,0.00072249 +0.0600,2.3637,2.5327,2.713,-0.48388,0.53839,0.00057584,0.00064899 +0.0500,1.9604,2.1463,2.35,-0.43809,0.48845,0.0006718,0.00055499 +0.0400,1.5555,1.7339,1.9397,-0.37257,0.41924,0.00068287,0.00045297 +0.0300,1.1194,1.2769,1.4527,-0.28437,0.32171,0.00059591,0.00033848 +0.0200,0.73081,0.84413,0.97485,-0.19058,0.21739,0.00043591,0.0002287 +0.0100,0.3548,0.41584,0.4798,-0.096692,0.10967,0.00022704,0.00011438 +0.0000,0,0,0,0.0019206,0.0019206,0,0 diff --git a/validation/experiments/delta_flume/envelopes/case7_envelopes.csv b/validation/experiments/delta_flume/envelopes/case7_envelopes.csv new file mode 100644 index 00000000..851026d0 --- /dev/null +++ b/validation/experiments/delta_flume/envelopes/case7_envelopes.csv @@ -0,0 +1,102 @@ +z_over_L,x_min_D,x_mean_D,x_max_D,y_min_D,y_max_D,kx_rms_D,ky_rms_D +1.0000,0,0,0,0.0019206,0.0019206,0,0 +0.9900,0.10407,0.13093,0.18141,-0.1063,0.10129,0.00013514,0.00024052 +0.9800,0.21049,0.27061,0.35804,-0.2077,0.19509,0.00025397,0.00045632 +0.9700,0.32927,0.40739,0.52698,-0.2842,0.26899,0.00032962,0.00060945 +0.9600,0.48542,0.57356,0.71484,-0.35414,0.32919,0.00036139,0.00071731 +0.9500,0.63865,0.71682,0.86059,-0.39293,0.3591,0.00032884,0.00073979 +0.9400,0.79309,0.85895,0.99829,-0.40919,0.38052,0.00025248,0.00071896 +0.9300,0.91258,0.99347,1.1158,-0.41202,0.40405,0.00015769,0.00067935 +0.9200,1.0373,1.1454,1.262,-0.40133,0.41433,0.0001107,0.00063411 +0.9100,1.1653,1.2879,1.4045,-0.37579,0.40706,0.00018894,0.00059051 +0.9000,1.2903,1.4246,1.5556,-0.33394,0.37964,0.00028746,0.00053481 +0.8900,1.4669,1.6074,1.7402,-0.26554,0.31199,0.00036664,0.00042688 +0.8800,1.6183,1.7536,1.8752,-0.2208,0.24798,0.00038107,0.00031244 +0.8700,1.792,1.9045,2.0155,-0.19377,0.18598,0.0003425,0.00018282 +0.8600,1.962,2.0477,2.1408,-0.25883,0.21133,0.00026265,0.00011035 +0.8500,2.1471,2.1985,2.2625,-0.35107,0.31437,0.00014938,0.00019488 +0.8400,2.3088,2.3354,2.4254,-0.4343,0.40853,7.7967e-05,0.00031666 +0.8300,2.4531,2.5201,2.6421,-0.52134,0.51211,0.00019086,0.00045294 +0.8200,2.5797,2.6704,2.8179,-0.58091,0.58084,0.00029906,0.00055761 +0.8100,2.7141,2.8225,2.9844,-0.62457,0.63133,0.00037256,0.0006523 +0.8000,2.8529,2.9661,3.1353,-0.65224,0.66333,0.00039751,0.00072812 +0.7900,3.0037,3.1145,3.2832,-0.6602,0.67795,0.00037483,0.00078028 +0.7800,3.1649,3.2612,3.4091,-0.65173,0.67585,0.00031097,0.00079259 +0.7700,3.3364,3.4178,3.5455,-0.62896,0.65423,0.00021425,0.00075502 +0.7600,3.4976,3.5886,3.6905,-0.57233,0.60324,0.00014977,0.00065175 +0.7500,3.6306,3.7319,3.8176,-0.505,0.53789,0.00018937,0.00052945 +0.7400,3.7602,3.8767,3.9573,-0.42438,0.46321,0.00027345,0.00040204 +0.7300,3.9003,4.0258,4.1267,-0.33219,0.37012,0.0003432,0.00028952 +0.7200,4.0474,4.1692,4.2786,-0.24494,0.26942,0.00037423,0.00022446 +0.7100,4.2081,4.3156,4.4275,-0.19473,0.18441,0.00036063,0.00021816 +0.7000,4.3624,4.4648,4.5699,-0.20275,0.20651,0.00030242,0.00025399 +0.6900,4.5358,4.6282,4.7197,-0.2831,0.2807,0.00020333,0.00032399 +0.6800,4.6752,4.7673,4.8537,-0.36474,0.3683,0.00014352,0.0004026 +0.6700,4.7995,4.9072,5.0119,-0.4432,0.45185,0.00016305,0.00049577 +0.6600,4.9151,5.0436,5.1676,-0.5073,0.52004,0.00024323,0.00058763 +0.6500,5.0485,5.1853,5.3285,-0.55845,0.56734,0.00031976,0.00066951 +0.6400,5.1938,5.3312,5.4841,-0.58817,0.59321,0.00036439,0.00073183 +0.6300,5.3626,5.4904,5.6492,-0.58923,0.59155,0.00036046,0.00076329 +0.6200,5.5173,5.6332,5.7858,-0.56441,0.56992,0.00031265,0.00075732 +0.6100,5.6702,5.7735,5.9048,-0.51898,0.53302,0.0002367,0.0007165 +0.6000,5.8099,5.9108,6.0152,-0.45817,0.47966,0.00016477,0.00064189 +0.5900,5.9383,6.0475,6.1275,-0.38756,0.40985,0.00014737,0.00053394 +0.5800,6.0675,6.1861,6.2604,-0.32005,0.33309,0.00020349,0.00040218 +0.5700,6.2213,6.3431,6.4469,-0.26837,0.25424,0.00028892,0.00026535 +0.5600,6.3861,6.5053,6.6239,-0.2405,0.19563,0.00034587,0.0002378 +0.5500,6.5316,6.6454,6.7647,-0.24486,0.197,0.00035707,0.00032659 +0.5400,6.6712,6.7803,6.8896,-0.2841,0.24775,0.000331,0.00044633 +0.5300,6.8118,6.9178,7.0198,-0.3504,0.31303,0.00027148,0.00055073 +0.5200,6.957,7.0611,7.1486,-0.42179,0.3734,0.00019577,0.00062125 +0.5100,7.0959,7.2014,7.2853,-0.4786,0.41925,0.00015718,0.0006554 +0.5000,7.2413,7.3565,7.4734,-0.52423,0.45524,0.00019891,0.00066763 +0.4900,7.3859,7.5084,7.6577,-0.55134,0.48514,0.00028467,0.00067079 +0.4800,7.5209,7.6486,7.8127,-0.55514,0.50137,0.00034727,0.00067493 +0.4700,7.6657,7.7929,7.9615,-0.54044,0.49857,0.00037939,0.00067825 +0.4600,7.8209,7.9316,8.1014,-0.50575,0.47467,0.00036954,0.00067085 +0.4500,7.9756,8.0653,8.2264,-0.45086,0.43379,0.00031931,0.00064272 +0.4400,8.1205,8.2005,8.337,-0.38253,0.37391,0.00023508,0.00058344 +0.4300,8.2641,8.3434,8.4462,-0.29374,0.29644,0.00014362,0.00047668 +0.4200,8.3818,8.4652,8.5558,-0.20088,0.23164,0.0001517,0.00033982 +0.4100,8.4698,8.5724,8.6791,-0.22968,0.24085,0.00023657,0.00020289 +0.4000,8.551,8.6685,8.7941,-0.33443,0.32746,0.00032879,0.00018908 +0.3900,8.6316,8.7466,8.8832,-0.4403,0.4327,0.00039129,0.00034293 +0.3800,8.6894,8.8122,8.9475,-0.53817,0.53116,0.00041003,0.00057539 +0.3700,8.7298,8.8621,8.9904,-0.61508,0.61623,0.00037984,0.00079942 +0.3600,8.7707,8.9044,9.0125,-0.67232,0.69077,0.00029538,0.0010127 +0.3500,8.802,8.9301,9.0095,-0.69498,0.73152,0.00018733,0.0011516 +0.3400,8.8223,8.9356,9.0355,-0.68161,0.73544,0.00014276,0.0011991 +0.3300,8.8229,8.9299,9.0677,-0.64148,0.70927,0.00020469,0.0011651 +0.3200,8.7916,8.9148,9.0771,-0.57696,0.65342,0.00031478,0.0010457 +0.3100,8.7486,8.8856,9.0603,-0.49053,0.57226,0.00040273,0.00086144 +0.3000,8.6971,8.8338,9.0113,-0.36435,0.45041,0.00045384,0.00059094 +0.2900,8.629,8.7711,8.9337,-0.2245,0.31673,0.00043944,0.00030952 +0.2800,8.568,8.698,8.8363,-0.12519,0.19354,0.00037277,0.00016865 +0.2700,8.5,8.6089,8.7109,-0.20367,0.24967,0.00026327,0.00030211 +0.2600,8.4297,8.5048,8.5706,-0.33128,0.37629,0.0001538,0.00051734 +0.2500,8.3128,8.3879,8.4536,-0.45462,0.49965,0.00015227,0.00071669 +0.2400,8.145,8.2485,8.3456,-0.56264,0.60311,0.00025745,0.00088535 +0.2300,7.9283,8.0682,8.1914,-0.65573,0.68489,0.000394,0.0010266 +0.2200,7.7472,7.8964,8.0385,-0.69935,0.71759,0.00046557,0.0010962 +0.2100,7.5561,7.7063,7.8504,-0.70892,0.72502,0.00048473,0.0011191 +0.2000,7.371,7.5066,7.6409,-0.68368,0.70886,0.00044752,0.0010932 +0.1900,7.168,7.2803,7.3858,-0.62112,0.66358,0.00035782,0.0010133 +0.1800,6.9485,7.0343,7.1134,-0.53448,0.5869,0.00023265,0.00088064 +0.1700,6.723,6.7847,6.8357,-0.4361,0.49015,0.00013404,0.00070662 +0.1600,6.3869,6.4524,6.5157,-0.29886,0.34826,0.00019061,0.00044685 +0.1500,6.0709,6.1711,6.2657,-0.17834,0.22059,0.00031537,0.00022439 +0.1400,5.7369,5.8673,5.9946,-0.087892,0.18098,0.00041888,0.00020671 +0.1300,5.3939,5.5433,5.6935,-0.1929,0.29046,0.00047627,0.00041575 +0.1200,5.067,5.2118,5.3763,-0.31468,0.40515,0.00047231,0.00064499 +0.1100,4.7465,4.8802,5.0412,-0.41677,0.49152,0.00041344,0.00082618 +0.1000,4.3518,4.4649,4.6088,-0.52274,0.58335,0.00028347,0.00097676 +0.0900,4.0228,4.1137,4.2283,-0.58142,0.63578,0.00015346,0.0010234 +0.0800,3.6368,3.7172,3.809,-0.61274,0.65553,0.00011889,0.0010073 +0.0700,3.206,3.3213,3.41,-0.61376,0.64544,0.00024123,0.00093465 +0.0600,2.7842,2.9168,3.0289,-0.58701,0.60809,0.00035884,0.00082726 +0.0500,2.321,2.4789,2.6001,-0.53447,0.54429,0.00044169,0.0006922 +0.0400,1.8591,2.0099,2.1443,-0.45798,0.46073,0.00046453,0.00054798 +0.0300,1.3462,1.4792,1.6005,-0.35188,0.34679,0.00041597,0.00039271 +0.0200,0.88827,0.98063,1.0703,-0.23711,0.2361,0.00030818,0.0002553 +0.0100,0.43043,0.4798,0.5322,-0.1169,0.11929,0.00016198,0.00012469 +0.0000,0,0,0,0.0019206,0.0019206,0,0 diff --git a/validation/experiments/delta_flume/envelopes/case8_envelopes.csv b/validation/experiments/delta_flume/envelopes/case8_envelopes.csv new file mode 100644 index 00000000..6b8bfcfe --- /dev/null +++ b/validation/experiments/delta_flume/envelopes/case8_envelopes.csv @@ -0,0 +1,102 @@ +z_over_L,x_min_D,x_mean_D,x_max_D,y_min_D,y_max_D,kx_rms_D,ky_rms_D +1.0000,0,0,0,0.0019206,0.0019206,0,0 +0.9900,0.09524,0.17246,0.24085,-0.1122,0.13277,0.00020495,0.00024646 +0.9800,0.20139,0.35769,0.48133,-0.22159,0.25974,0.0003807,0.00046913 +0.9700,0.31725,0.53539,0.70861,-0.30997,0.36128,0.00049216,0.00063626 +0.9600,0.49401,0.7462,0.96939,-0.38995,0.45104,0.00053643,0.00076983 +0.9500,0.67707,0.93579,1.1869,-0.43214,0.49728,0.00049604,0.00082657 +0.9400,0.88171,1.1211,1.3993,-0.44875,0.50856,0.00041621,0.00084803 +0.9300,1.0912,1.3046,1.6063,-0.44046,0.49693,0.00035928,0.00085046 +0.9200,1.2349,1.4944,1.8253,-0.40648,0.4597,0.00039095,0.00083685 +0.9100,1.3861,1.6804,2.0086,-0.36468,0.4034,0.00048486,0.00080338 +0.9000,1.5547,1.8574,2.186,-0.34063,0.33751,0.0005732,0.00073209 +0.8900,1.7948,2.0956,2.3887,-0.28684,0.24038,0.00061051,0.00057507 +0.8800,2.001,2.2807,2.5289,-0.2405,0.21395,0.00056719,0.00041104 +0.8700,2.2458,2.4778,2.6543,-0.22047,0.2304,0.00045215,0.00023758 +0.8600,2.4844,2.6653,2.7851,-0.28808,0.30107,0.00030615,0.00017853 +0.8500,2.7451,2.8606,2.9604,-0.38475,0.43393,0.00019855,0.00032078 +0.8400,2.9192,3.0485,3.1748,-0.47548,0.55288,0.00027032,0.00048089 +0.8300,3.0672,3.2766,3.4208,-0.5778,0.68651,0.00045232,0.00063444 +0.8200,3.2035,3.4701,3.6291,-0.65985,0.7837,0.00057091,0.00073001 +0.8100,3.3584,3.6668,3.8538,-0.72973,0.85811,0.00062542,0.00079603 +0.8000,3.517,3.8535,4.0786,-0.78315,0.90599,0.0006134,0.00083879 +0.7900,3.7133,4.0443,4.2891,-0.83189,0.92522,0.00054623,0.00086359 +0.7800,3.9189,4.2325,4.4908,-0.8645,0.91471,0.0004563,0.00086797 +0.7700,4.1679,4.4351,4.7065,-0.86807,0.87323,0.00038914,0.00084481 +0.7600,4.4286,4.6545,4.9513,-0.84745,0.79236,0.00041726,0.0007867 +0.7500,4.6025,4.8459,5.149,-0.80239,0.71094,0.00049661,0.00071509 +0.7400,4.7449,5.0264,5.3243,-0.73534,0.62891,0.00056983,0.00063135 +0.7300,4.9127,5.2179,5.4912,-0.65243,0.54297,0.00060423,0.00053752 +0.7200,5.0895,5.3952,5.6305,-0.55038,0.45926,0.00058436,0.00044375 +0.7100,5.2944,5.5823,5.7577,-0.44036,0.37933,0.0005074,0.00036487 +0.7000,5.5167,5.769,5.9099,-0.34726,0.3348,0.00039101,0.00034745 +0.6900,5.7925,5.9747,6.1526,-0.39917,0.41568,0.00027899,0.00044292 +0.6800,5.9882,6.1473,6.347,-0.48792,0.48368,0.00027839,0.00057699 +0.6700,6.1161,6.3238,6.5354,-0.56197,0.55035,0.00037073,0.00071862 +0.6600,6.23,6.4946,6.7033,-0.61584,0.60012,0.00047614,0.00083137 +0.6500,6.3558,6.6701,6.8669,-0.64781,0.63816,0.00054993,0.00090489 +0.6400,6.5095,6.8503,7.0385,-0.65904,0.66196,0.00056979,0.00093079 +0.6300,6.7003,7.0408,7.2452,-0.65646,0.67389,0.00052483,0.00090805 +0.6200,6.8902,7.2191,7.4466,-0.64231,0.66092,0.00044658,0.00085925 +0.6100,7.0879,7.3944,7.6474,-0.61668,0.62145,0.00037379,0.00079768 +0.6000,7.2924,7.5626,7.8439,-0.57369,0.55989,0.00035514,0.00073123 +0.5900,7.4878,7.731,8.0373,-0.51606,0.47806,0.00040609,0.0006615 +0.5800,7.6452,7.9035,8.2161,-0.44734,0.3868,0.00048955,0.00059155 +0.5700,7.8129,8.0972,8.3937,-0.35744,0.32649,0.00056087,0.00052164 +0.5600,8.0042,8.2924,8.5431,-0.27886,0.33055,0.00057286,0.00048158 +0.5500,8.1946,8.4603,8.6589,-0.28221,0.33792,0.00052299,0.00048742 +0.5400,8.3911,8.6241,8.7694,-0.36421,0.36342,0.00042675,0.00052891 +0.5300,8.6068,8.7935,8.922,-0.46934,0.4222,0.0003063,0.00059657 +0.5200,8.8295,8.9648,9.1197,-0.56411,0.49966,0.00023898,0.00068263 +0.5100,8.9882,9.1352,9.3074,-0.63604,0.57563,0.00029739,0.00077732 +0.5000,9.1096,9.3238,9.5105,-0.68993,0.64757,0.00044225,0.00088928 +0.4900,9.2437,9.5106,9.7012,-0.72013,0.69193,0.00056486,0.0009968 +0.4800,9.3806,9.6793,9.881,-0.72187,0.70844,0.00061957,0.0010709 +0.4700,9.5428,9.8496,10.077,-0.69992,0.69809,0.00061342,0.0011092 +0.4600,9.7265,10.019,10.258,-0.65609,0.65918,0.00054716,0.0010949 +0.4500,9.9209,10.183,10.426,-0.59382,0.59868,0.00044162,0.0010235 +0.4400,10.128,10.345,10.608,-0.51325,0.51689,0.00033641,0.00089451 +0.4300,10.341,10.518,10.806,-0.43019,0.42228,0.00031187,0.00071046 +0.4200,10.465,10.663,10.966,-0.38655,0.37771,0.00039423,0.00055142 +0.4100,10.552,10.787,11.091,-0.3759,0.37924,0.00049558,0.00048558 +0.4000,10.646,10.899,11.186,-0.39731,0.40682,0.00056642,0.00053601 +0.3900,10.746,10.993,11.25,-0.45197,0.44688,0.00058236,0.0006637 +0.3800,10.847,11.076,11.281,-0.53003,0.49958,0.00053597,0.00080833 +0.3700,10.938,11.135,11.282,-0.62072,0.58133,0.00043819,0.0009212 +0.3600,11.029,11.183,11.302,-0.71247,0.68564,0.00029799,0.00099155 +0.3500,11.1,11.214,11.345,-0.7695,0.76681,0.00021863,0.0009948 +0.3400,11.078,11.225,11.383,-0.78937,0.81207,0.0002741,0.00094303 +0.3300,11.011,11.215,11.401,-0.79111,0.8345,0.00039753,0.00084792 +0.3200,10.941,11.18,11.386,-0.77792,0.83973,0.00051194,0.00073098 +0.3100,10.867,11.131,11.339,-0.75984,0.8262,0.00057669,0.00062724 +0.3000,10.778,11.051,11.237,-0.7453,0.7901,0.00058156,0.00055455 +0.2900,10.691,10.945,11.108,-0.73333,0.73689,0.00051221,0.00054722 +0.2800,10.609,10.83,10.982,-0.71675,0.67893,0.00039392,0.0005714 +0.2700,10.515,10.685,10.804,-0.6854,0.603,0.00023898,0.00059656 +0.2600,10.394,10.528,10.636,-0.63403,0.52593,0.00014245,0.00060298 +0.2500,10.202,10.345,10.482,-0.56636,0.44688,0.00021531,0.00058869 +0.2400,9.9657,10.146,10.309,-0.47726,0.40371,0.00036591,0.00055727 +0.2300,9.6851,9.8889,10.073,-0.39446,0.40565,0.00050955,0.00051788 +0.2200,9.4512,9.6566,9.8489,-0.39033,0.40413,0.0005687,0.00050162 +0.2100,9.2078,9.4061,9.586,-0.40249,0.388,0.00056437,0.00051535 +0.2000,8.9701,9.1525,9.3084,-0.42795,0.36487,0.00049839,0.00055937 +0.1900,8.7194,8.8658,8.9946,-0.46019,0.34228,0.00037395,0.00062679 +0.1800,8.4594,8.5585,8.6478,-0.48192,0.36672,0.00021435,0.00069743 +0.1700,8.1769,8.2546,8.3071,-0.49425,0.40746,0.00012348,0.00075316 +0.1600,7.7677,7.8528,7.9297,-0.4869,0.442,0.00024532,0.00079096 +0.1500,7.3823,7.5087,7.629,-0.46712,0.45088,0.00039765,0.00078765 +0.1400,6.981,7.1363,7.2918,-0.44786,0.4385,0.00051349,0.00075679 +0.1300,6.5596,6.7347,6.9186,-0.42878,0.40424,0.00057202,0.00069982 +0.1200,6.15,6.3271,6.5174,-0.40743,0.35541,0.0005589,0.00062527 +0.1100,5.7528,5.9156,6.0951,-0.37141,0.3028,0.00048121,0.00054397 +0.1000,5.2681,5.3997,5.5397,-0.30612,0.22796,0.0003205,0.00045092 +0.0900,4.8609,4.9609,5.0601,-0.24023,0.1967,0.00016033,0.00041312 +0.0800,4.3844,4.4768,4.5634,-0.16251,0.18878,0.00014205,0.00043828 +0.0700,3.869,3.9813,4.1146,-0.16716,0.18174,0.00030448,0.00051844 +0.0600,3.3542,3.4921,3.6498,-0.19052,0.18791,0.00045052,0.00060671 +0.0500,2.8007,2.9557,3.1258,-0.20308,0.2016,0.00055315,0.00067161 +0.0400,2.2395,2.39,2.5588,-0.19355,0.20512,0.0005823,0.00067569 +0.0300,1.6263,1.7599,1.8991,-0.16522,0.18142,0.00052137,0.00059265 +0.0200,1.0612,1.1651,1.2661,-0.11574,0.1354,0.0003869,0.00043743 +0.0100,0.52345,0.57282,0.6223,-0.05821,0.07119,0.00020298,0.00022886 +0.0000,0,0,0,0.0019206,0.0019206,0,0 diff --git a/validation/experiments/delta_flume/envelopes/case9_envelopes.csv b/validation/experiments/delta_flume/envelopes/case9_envelopes.csv new file mode 100644 index 00000000..e2bc7487 --- /dev/null +++ b/validation/experiments/delta_flume/envelopes/case9_envelopes.csv @@ -0,0 +1,102 @@ +z_over_L,x_min_D,x_mean_D,x_max_D,y_min_D,y_max_D,kx_rms_D,ky_rms_D +1.0000,0,0,0,0.0019206,0.0019206,0,0 +0.9900,0.13093,0.21411,0.27653,-0.12303,0.13917,0.00027436,0.00029742 +0.9800,0.27061,0.4449,0.54168,-0.2464,0.27073,0.00050256,0.00056923 +0.9700,0.43814,0.66341,0.78672,-0.34781,0.38539,0.00063147,0.00077395 +0.9600,0.67027,0.93702,1.0797,-0.45086,0.51419,0.00064575,0.00094298 +0.9500,0.90527,1.1704,1.3351,-0.51062,0.60501,0.00053228,0.0010212 +0.9400,1.1443,1.401,1.6161,-0.54128,0.66742,0.00037002,0.001055 +0.9300,1.313,1.6253,1.8784,-0.55218,0.70474,0.00030678,0.0010614 +0.9200,1.4852,1.8613,2.164,-0.55783,0.71309,0.00047916,0.0010395 +0.9100,1.6713,2.0911,2.416,-0.53753,0.68896,0.00068956,0.00098342 +0.9000,1.8898,2.3152,2.6517,-0.48126,0.63605,0.00083382,0.00087563 +0.8900,2.2071,2.6058,2.9528,-0.36733,0.52763,0.00086025,0.00066255 +0.8800,2.4927,2.8372,3.1809,-0.26168,0.42937,0.00075583,0.00045921 +0.8700,2.8166,3.0777,3.3932,-0.19136,0.42667,0.00054481,0.00028181 +0.8600,3.0737,3.3065,3.5896,-0.29558,0.56939,0.00033225,0.00028087 +0.8500,3.2807,3.5486,3.8025,-0.43896,0.70825,0.00033739,0.00044598 +0.8400,3.4756,3.7889,4.0121,-0.56511,0.82601,0.00057686,0.00060296 +0.8300,3.7391,4.0664,4.326,-0.69157,0.94082,0.00083731,0.00074103 +0.8200,3.982,4.3096,4.5991,-0.76909,1.0136,0.00095147,0.00082329 +0.8100,4.2338,4.5561,4.8578,-0.8204,1.0758,0.0009371,0.00088948 +0.8000,4.4917,4.7867,5.0726,-0.83961,1.1317,0.00080875,0.00094732 +0.7900,4.7699,5.0324,5.275,-0.8299,1.1623,0.00059406,0.00099859 +0.7800,5.0373,5.258,5.4751,-0.81115,1.1628,0.00039473,0.0010272 +0.7700,5.2756,5.5103,5.7269,-0.79856,1.1369,0.00039824,0.0010183 +0.7600,5.4783,5.7874,6.0427,-0.74944,1.0766,0.00064155,0.00095212 +0.7500,5.6704,6.0245,6.3159,-0.68216,0.99655,0.00082876,0.00085854 +0.7400,5.8836,6.2478,6.5556,-0.58942,0.89787,0.00092003,0.00074672 +0.7300,6.1271,6.4798,6.7772,-0.46672,0.77589,0.00089933,0.00062444 +0.7200,6.3906,6.7013,6.9794,-0.35168,0.64432,0.00077679,0.00051267 +0.7100,6.661,6.9303,7.1754,-0.33014,0.54401,0.00057998,0.00043316 +0.7000,6.928,7.1561,7.3786,-0.33804,0.59781,0.00041141,0.0004337 +0.6900,7.1551,7.4125,7.6499,-0.42108,0.72644,0.00044951,0.0005551 +0.6800,7.3367,7.6263,7.9044,-0.52326,0.82135,0.00062611,0.00070561 +0.6700,7.5444,7.845,8.1446,-0.64164,0.92282,0.0007952,0.00085778 +0.6600,7.7599,8.0502,8.3742,-0.73421,1.0217,0.00088149,0.00097382 +0.6500,7.9742,8.2588,8.618,-0.80396,1.0911,0.00086847,0.0010438 +0.6400,8.1907,8.4763,8.8369,-0.84439,1.1314,0.00075047,0.0010635 +0.6300,8.4355,8.7098,9.0396,-0.85261,1.1368,0.00054962,0.0010404 +0.6200,8.6533,8.9278,9.2098,-0.82341,1.1119,0.00041069,0.001002 +0.6100,8.8724,9.1428,9.364,-0.7766,1.0806,0.00042808,0.00096108 +0.6000,9.0832,9.3487,9.5638,-0.72949,1.0453,0.0005756,0.00091937 +0.5900,9.2789,9.556,9.833,-0.67087,0.98914,0.00073619,0.00086653 +0.5800,9.46,9.7666,10.083,-0.59696,0.91109,0.00083515,0.00079493 +0.5700,9.6885,10.005,10.328,-0.51071,0.79856,0.00084185,0.00069538 +0.5600,9.9421,10.238,10.549,-0.44016,0.68187,0.00073956,0.00059952 +0.5500,10.194,10.445,10.733,-0.43099,0.62262,0.0005842,0.00055898 +0.5400,10.447,10.644,10.902,-0.48698,0.65704,0.00043205,0.0005872 +0.5300,10.679,10.847,11.102,-0.57975,0.74424,0.00037693,0.00068284 +0.5200,10.874,11.056,11.371,-0.67658,0.81225,0.00047758,0.00082305 +0.5100,11.041,11.256,11.642,-0.75544,0.84915,0.00063835,0.00096328 +0.5000,11.219,11.491,11.918,-0.81185,0.85697,0.00077632,0.0010908 +0.4900,11.402,11.721,12.166,-0.84694,0.85937,0.00082588,0.0011636 +0.4800,11.581,11.92,12.368,-0.8889,0.87887,0.00078781,0.0011657 +0.4700,11.772,12.128,12.55,-0.93152,0.89399,0.00067946,0.001099 +0.4600,11.965,12.332,12.72,-0.96359,0.87914,0.00053456,0.00096775 +0.4500,12.146,12.531,12.888,-0.97992,0.84557,0.00042514,0.00079449 +0.4400,12.328,12.725,13.082,-0.96973,0.80027,0.00043089,0.00061125 +0.4300,12.525,12.915,13.308,-0.94057,0.73409,0.00056747,0.00048053 +0.4200,12.69,13.08,13.479,-0.90095,0.67096,0.00070994,0.00047693 +0.4100,12.837,13.21,13.594,-0.86075,0.61864,0.00079206,0.00054005 +0.4000,12.97,13.316,13.668,-0.8129,0.58108,0.00080069,0.00060634 +0.3900,13.087,13.402,13.72,-0.75878,0.55043,0.00073065,0.00064678 +0.3800,13.206,13.472,13.745,-0.74371,0.5487,0.00058856,0.00066153 +0.3700,13.312,13.513,13.749,-0.77229,0.58014,0.00041493,0.00066141 +0.3600,13.374,13.537,13.755,-0.81308,0.60975,0.00028352,0.00065357 +0.3500,13.352,13.538,13.752,-0.84605,0.62106,0.0003476,0.00063902 +0.3400,13.3,13.519,13.761,-0.86475,0.61577,0.00050416,0.00062132 +0.3300,13.225,13.476,13.772,-0.86986,0.62599,0.00065456,0.00060987 +0.3200,13.138,13.409,13.758,-0.86753,0.64597,0.00074892,0.00062217 +0.3100,13.03,13.329,13.694,-0.86474,0.65102,0.00076947,0.00066404 +0.3000,12.906,13.212,13.562,-0.87936,0.6304,0.00070867,0.0007291 +0.2900,12.778,13.068,13.385,-0.90236,0.59947,0.00057692,0.00077344 +0.2800,12.647,12.911,13.195,-0.90957,0.59134,0.00042261,0.00077244 +0.2700,12.464,12.716,12.984,-0.90776,0.57162,0.00029383,0.00072481 +0.2600,12.25,12.513,12.741,-0.89122,0.55698,0.0003028,0.00064608 +0.2500,11.993,12.279,12.491,-0.86668,0.57139,0.0004251,0.00056431 +0.2400,11.697,12.016,12.235,-0.83004,0.58909,0.00057558,0.00051436 +0.2300,11.346,11.698,11.938,-0.78427,0.59985,0.00070513,0.00051565 +0.2200,11.05,11.4,11.655,-0.75037,0.59872,0.00074762,0.0005437 +0.2100,10.761,11.077,11.342,-0.75437,0.58232,0.00072259,0.00056371 +0.2000,10.446,10.743,11.017,-0.75946,0.55911,0.00063341,0.00056434 +0.1900,10.094,10.388,10.635,-0.74834,0.52693,0.00048752,0.00055172 +0.1800,9.7266,10.007,10.225,-0.74312,0.47712,0.0003243,0.00053778 +0.1700,9.3487,9.6246,9.8454,-0.73956,0.43078,0.00026124,0.00053442 +0.1600,8.8638,9.1316,9.4197,-0.71902,0.42436,0.00039191,0.00054868 +0.1500,8.4281,8.7103,9.0588,-0.70062,0.42488,0.00056877,0.00057623 +0.1400,7.9585,8.2567,8.652,-0.66618,0.41604,0.00071573,0.00061413 +0.1300,7.4877,7.7792,8.1978,-0.61252,0.39814,0.00079426,0.00065338 +0.1200,7.0295,7.2907,7.7061,-0.56153,0.38616,0.00078122,0.00067548 +0.1100,6.5526,6.8149,7.2008,-0.54613,0.36663,0.0006812,0.0006633 +0.1000,5.9507,6.209,6.536,-0.51464,0.32979,0.00046523,0.00059428 +0.0900,5.4594,5.7025,5.9689,-0.46703,0.27496,0.00025132,0.00050144 +0.0800,4.9204,5.1355,5.343,-0.40491,0.20759,0.00022167,0.0004238 +0.0700,4.3581,4.5699,4.7659,-0.3274,0.15325,0.00044342,0.00044381 +0.0600,3.7688,4.0084,4.2409,-0.27114,0.16808,0.00065376,0.00054651 +0.0500,3.1345,3.3916,3.6527,-0.257,0.18936,0.00080509,0.00065896 +0.0400,2.5024,2.7424,3.0091,-0.23108,0.19488,0.00085028,0.00071043 +0.0300,1.8105,2.014,2.241,-0.18623,0.16773,0.00076312,0.00065659 +0.0200,1.1794,1.3376,1.4982,-0.13064,0.12208,0.00056799,0.00049794 +0.0100,0.57282,0.66011,0.74146,-0.067831,0.063974,0.00029794,0.00026528 +0.0000,0,0,0,0.0019206,0.0019206,0,0 diff --git a/validation/experiments/delta_flume/measured_summary.csv b/validation/experiments/delta_flume/measured_summary.csv new file mode 100644 index 00000000..b01519d9 --- /dev/null +++ b/validation/experiments/delta_flume/measured_summary.csv @@ -0,0 +1,46 @@ +quantity,case,U,value +max_cf_disp_D,1,0.16,0.756538 +max_cf_disp_D,2,0.21,0.578777 +max_cf_disp_D,3,0.309,0.779326 +max_cf_disp_D,4,0.406,0.673778 +max_cf_disp_D,5,0.545,0.842763 +max_cf_disp_D,6,0.605,0.709345 +max_cf_disp_D,7,0.703,0.777016 +max_cf_disp_D,8,0.854,0.906623 +max_cf_disp_D,9,0.951,1.07449 +max_il_mean_D,1,0.161,1.06132 +max_il_mean_D,2,0.211,1.1945 +max_il_mean_D,3,0.31,3.45051 +max_il_mean_D,4,0.407,4.97342 +max_il_mean_D,5,0.546,6.68884 +max_il_mean_D,6,0.606,8.1267 +max_il_mean_D,7,0.704,8.8987 +max_il_mean_D,8,0.855,11.1844 +max_il_mean_D,9,0.953,13.5076 +max_il_dyn_D,1,0.16,0.206466 +max_il_dyn_D,2,0.21,0.0979251 +max_il_dyn_D,3,0.309,0.29709 +max_il_dyn_D,4,0.406,0.243781 +max_il_dyn_D,5,0.545,0.186736 +max_il_dyn_D,6,0.605,0.305004 +max_il_dyn_D,7,0.703,0.16926 +max_il_dyn_D,8,0.854,0.359082 +max_il_dyn_D,9,0.951,0.485263 +std_curv_il_kD,1,0.16,5.04942e-05 +std_curv_il_kD,2,0.21,3.42471e-05 +std_curv_il_kD,3,0.309,0.000194713 +std_curv_il_kD,4,0.406,0.000268844 +std_curv_il_kD,5,0.545,0.000231251 +std_curv_il_kD,6,0.605,0.000457232 +std_curv_il_kD,7,0.703,0.00030285 +std_curv_il_kD,8,0.854,0.000448194 +std_curv_il_kD,9,0.951,0.000623852 +std_curv_cf_kD,1,0.16,9.26657e-05 +std_curv_cf_kD,2,0.21,8.859e-05 +std_curv_cf_kD,3,0.309,0.000270412 +std_curv_cf_kD,4,0.406,0.000317895 +std_curv_cf_kD,5,0.545,0.000480763 +std_curv_cf_kD,6,0.605,0.000477281 +std_curv_cf_kD,7,0.703,0.000647034 +std_curv_cf_kD,8,0.854,0.000688661 +std_curv_cf_kD,9,0.951,0.000735512 diff --git a/validation/experiments/delta_flume/provenance.json b/validation/experiments/delta_flume/provenance.json new file mode 100644 index 00000000..5db6580c --- /dev/null +++ b/validation/experiments/delta_flume/provenance.json @@ -0,0 +1,295 @@ +{ + "source": "Chaplin, Bearman, Huera Huarte & Pattenden (2005a), Journal of Fluids and Structures 21(1), 3-24 (the riser, Sec. 2; the drag amplification, Eq. 4); Chaplin, Bearman, Cheng, Fontaine, Graham, Herfjord, Huera Huarte, Isherwood, Lambrakos, Larsen, Meneghini, Moe, Pattenden, Triantafyllou & Willden (2005b), Journal of Fluids and Structures 21(1), 25-40 (the blind-trial cases); the authors' presentation of the blind trial, 'Blind predictions of laboratory measurements of vortex-induced vibrations of a tension riser', Trondheim, October 2004 (the measured results); the project's pages at the University of Southampton, archived by the Internet Archive (mechanical properties, current zone)", + "doi": [ + "10.1016/j.jfluidstructs.2005.04.010", + "10.1016/j.jfluidstructs.2005.05.016" + ], + "archived_pages": [ + "https://web.archive.org/web/20041103155158/http://www.civil.soton.ac.uk:80/hydraulics/riser/mechanical%20properties(1).htm", + "https://web.archive.org/web/20041103154947/http://www.civil.soton.ac.uk:80/hydraulics/riser/benchmarking%20cases(1).htm" + ], + "data_used": "riser: L 13.12 m between pinned joints, D 28 mm, EI 29.9 N m^2, mass ratio 3.0 with the internal water (paper; the page gives 1.85 kg/m), EA 5.88 MN, structural damping 0.33 % of critical, top spring 11.4 kN/m (page); the lower 5.94 m in the current (page); slide 3: towing speeds and mean top tensions of cases 1-9; slides 7-15: the measured envelopes along the riser (envelopes/); slides 17-19: the measured maximum cross-flow displacement, maximum mean and dynamic in-line displacement and overall standard deviations of curvature (measured_summary.csv); slide 23: the measured dominant cross-flow mode numbers", + "extraction": "the slides are vector graphics: the measured points (filled circles of the measurement colour) and curves (polylines of 102 nearly equally spaced vertices along the riser, resampled to 101 equally spaced stations) are read as plotted coordinates and mapped linearly through the panel tick labels; the recovered towing speeds match slide 3 within 0.006 m/s; the envelope maxima of the mean in-line displacement match slide 17 within 0.05 D", + "assumptions": "fresh water, Ca 1 (as L3-C); the 11.4 kN/m top spring of the two the page lists; the structural damping as bending damping of a pure bending mode at 2 Hz; the static top tension in the current (drag unamplified) set to the measured mean; the curvature panels of slides 7-15 have no scale, so each envelope curvature shape is scaled so that its r.m.s. over the stations equals the slide-19 overall standard deviation", + "coefficients": "generic, not fitted to these measurements: Cl 0.8, cF 0.18, dF 0.08; in-line ClX 0.85, alpha 0.15 (Ulveseter et al. 2018); Cd 1.2; VIV AMPLITUDE Cv 0.8 constant with CdAmp = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2) (Chaplin et al. 2005a, Eq. 4); VIV DAMPING 0 0 1 (the amplification on the in-line drag only)", + "CableDyn_commit": "7d3998f (dev)", + "validation_date": "2026-11-15", + "executable_name": "cabledyn.exe", + "executable_sha256": "see summary.json", + "compiler": "GNU Fortran 16.2.0", + "build_type": "Release", + "platform": "Windows 11 x86-64", + "segments": 64, + "dt_s": "per case, the largest of 0.005, 0.0025, 0.002, 0.001, 0.0005 at or below 1/200 of D/(0.18 U)", + "sensitivity": { + "dt_half": { + "1": { + "mode": 2, + "f_cf_hz": 0.92, + "max_cf_half_pp_D": 0.6535, + "max_il_mean_D": 1.19, + "std_curv_cf_kD": 5.6604e-05, + "std_curv_il_kD": 3.5373e-05, + "mean_top_tension_N": 408.5 + }, + "2": { + "mode": 3, + "f_cf_hz": 1.36, + "max_cf_half_pp_D": 0.5973, + "max_il_mean_D": 1.603, + "std_curv_cf_kD": 0.00011179, + "std_curv_il_kD": 7.1936e-05, + "mean_top_tension_N": 412.8 + }, + "3": { + "mode": 4, + "f_cf_hz": 2.0, + "max_cf_half_pp_D": 0.6162, + "max_il_mean_D": 3.266, + "std_curv_cf_kD": 0.00020525, + "std_curv_il_kD": 9.146e-05, + "mean_top_tension_N": 475.5 + }, + "4": { + "mode": 4, + "f_cf_hz": 2.24, + "max_cf_half_pp_D": 0.7077, + "max_il_mean_D": 4.782, + "std_curv_cf_kD": 0.00022964, + "std_curv_il_kD": 0.00013684, + "mean_top_tension_N": 541.4 + }, + "5": { + "mode": 6, + "f_cf_hz": 3.72, + "max_cf_half_pp_D": 0.6485, + "max_il_mean_D": 6.542, + "std_curv_cf_kD": 0.00044751, + "std_curv_il_kD": 0.00018971, + "mean_top_tension_N": 660.1 + }, + "6": { + "mode": 6, + "f_cf_hz": 3.92, + "max_cf_half_pp_D": 0.6093, + "max_il_mean_D": 6.804, + "std_curv_cf_kD": 0.00044174, + "std_curv_il_kD": 0.00025254, + "mean_top_tension_N": 734.5 + }, + "7": { + "mode": 6, + "f_cf_hz": 4.24, + "max_cf_half_pp_D": 0.7339, + "max_il_mean_D": 8.319, + "std_curv_cf_kD": 0.00046749, + "std_curv_il_kD": 0.00026398, + "mean_top_tension_N": 836.1 + }, + "8": { + "mode": 6, + "f_cf_hz": 4.8, + "max_cf_half_pp_D": 0.7462, + "max_il_mean_D": 9.654, + "std_curv_cf_kD": 0.00049254, + "std_curv_il_kD": 0.0002702, + "mean_top_tension_N": 1045.6 + }, + "9": { + "mode": 7, + "f_cf_hz": 5.8, + "max_cf_half_pp_D": 0.7249, + "max_il_mean_D": 10.632, + "std_curv_cf_kD": 0.00064422, + "std_curv_il_kD": 0.00031337, + "mean_top_tension_N": 1145.9 + } + }, + "segments_128": { + "1": { + "mode": 2, + "f_cf_hz": 0.92, + "max_cf_half_pp_D": 0.6526, + "max_il_mean_D": 1.204, + "std_curv_cf_kD": 5.6747e-05, + "std_curv_il_kD": 3.5554e-05, + "mean_top_tension_N": 408.6 + }, + "2": { + "mode": 3, + "f_cf_hz": 1.36, + "max_cf_half_pp_D": 0.5946, + "max_il_mean_D": 1.637, + "std_curv_cf_kD": 0.00011292, + "std_curv_il_kD": 7.2924e-05, + "mean_top_tension_N": 413.0 + }, + "3": { + "mode": 4, + "f_cf_hz": 2.0, + "max_cf_half_pp_D": 0.6143, + "max_il_mean_D": 3.319, + "std_curv_cf_kD": 0.00020749, + "std_curv_il_kD": 9.4304e-05, + "mean_top_tension_N": 476.1 + }, + "4": { + "mode": 4, + "f_cf_hz": 2.24, + "max_cf_half_pp_D": 0.6642, + "max_il_mean_D": 4.865, + "std_curv_cf_kD": 0.00023121, + "std_curv_il_kD": 0.00014079, + "mean_top_tension_N": 542.6 + }, + "5": { + "mode": 6, + "f_cf_hz": 3.68, + "max_cf_half_pp_D": 0.6224, + "max_il_mean_D": 6.369, + "std_curv_cf_kD": 0.00041739, + "std_curv_il_kD": 0.00026224, + "mean_top_tension_N": 654.6 + }, + "6": { + "mode": 6, + "f_cf_hz": 3.92, + "max_cf_half_pp_D": 0.5816, + "max_il_mean_D": 6.908, + "std_curv_cf_kD": 0.00044891, + "std_curv_il_kD": 0.00026562, + "mean_top_tension_N": 736.4 + }, + "7": { + "mode": 6, + "f_cf_hz": 4.24, + "max_cf_half_pp_D": 0.7081, + "max_il_mean_D": 8.43, + "std_curv_cf_kD": 0.0004708, + "std_curv_il_kD": 0.00028325, + "mean_top_tension_N": 838.5 + }, + "8": { + "mode": 6, + "f_cf_hz": 4.8, + "max_cf_half_pp_D": 0.7484, + "max_il_mean_D": 9.845, + "std_curv_cf_kD": 0.00050403, + "std_curv_il_kD": 0.00027331, + "mean_top_tension_N": 1051.0 + }, + "9": { + "mode": 8, + "f_cf_hz": 6.64, + "max_cf_half_pp_D": 0.5947, + "max_il_mean_D": 10.354, + "std_curv_cf_kD": 0.00071066, + "std_curv_il_kD": 0.0003868, + "mean_top_tension_N": 1134.1 + } + }, + "tmax_80_s_cases_5_9": { + "5": { + "mode": 6, + "f_cf_hz": 3.692, + "max_cf_half_pp_D": 0.7786, + "max_il_mean_D": 6.427, + "std_curv_cf_kD": 0.00043051, + "std_curv_il_kD": 0.00020686, + "mean_top_tension_N": 657.3 + }, + "9": { + "mode": 8, + "f_cf_hz": 6.615, + "max_cf_half_pp_D": 0.6091, + "max_il_mean_D": 10.155, + "std_curv_cf_kD": 0.00068799, + "std_curv_il_kD": 0.00036953, + "mean_top_tension_N": 1128.1 + } + }, + "top_spring_38p1_kN_per_m": { + "1": { + "mode": 2, + "f_cf_hz": 0.92, + "max_cf_half_pp_D": 0.65, + "max_il_mean_D": 1.162, + "std_curv_cf_kD": 5.6486e-05, + "std_curv_il_kD": 3.4978e-05, + "mean_top_tension_N": 415.7 + }, + "2": { + "mode": 3, + "f_cf_hz": 1.4, + "max_cf_half_pp_D": 0.6153, + "max_il_mean_D": 1.532, + "std_curv_cf_kD": 0.00010964, + "std_curv_il_kD": 7.2096e-05, + "mean_top_tension_N": 423.7 + }, + "3": { + "mode": 4, + "f_cf_hz": 2.08, + "max_cf_half_pp_D": 0.6316, + "max_il_mean_D": 2.982, + "std_curv_cf_kD": 0.00019748, + "std_curv_il_kD": 9.1888e-05, + "mean_top_tension_N": 504.2 + }, + "4": { + "mode": 4, + "f_cf_hz": 2.32, + "max_cf_half_pp_D": 0.6453, + "max_il_mean_D": 4.293, + "std_curv_cf_kD": 0.00023093, + "std_curv_il_kD": 0.00012918, + "mean_top_tension_N": 591.5 + }, + "5": { + "mode": 5, + "f_cf_hz": 3.24, + "max_cf_half_pp_D": 0.7159, + "max_il_mean_D": 5.681, + "std_curv_cf_kD": 0.00034362, + "std_curv_il_kD": 0.00014224, + "mean_top_tension_N": 728.3 + }, + "6": { + "mode": 6, + "f_cf_hz": 4.04, + "max_cf_half_pp_D": 0.5454, + "max_il_mean_D": 5.702, + "std_curv_cf_kD": 0.00037648, + "std_curv_il_kD": 0.00030899, + "mean_top_tension_N": 787.9 + }, + "7": { + "mode": 6, + "f_cf_hz": 4.48, + "max_cf_half_pp_D": 0.6894, + "max_il_mean_D": 7.184, + "std_curv_cf_kD": 0.00044718, + "std_curv_il_kD": 0.00025784, + "mean_top_tension_N": 934.3 + }, + "8": { + "mode": 5, + "f_cf_hz": 4.32, + "max_cf_half_pp_D": 0.7633, + "max_il_mean_D": 8.507, + "std_curv_cf_kD": 0.00040298, + "std_curv_il_kD": 0.00021852, + "mean_top_tension_N": 1187.5 + }, + "9": { + "mode": 7, + "f_cf_hz": 6.16, + "max_cf_half_pp_D": 0.7137, + "max_il_mean_D": 9.123, + "std_curv_cf_kD": 0.00060676, + "std_curv_il_kD": 0.00028333, + "mean_top_tension_N": 1283.9 + } + } + } +} diff --git a/validation/experiments/delta_flume/response_comparison.csv b/validation/experiments/delta_flume/response_comparison.csv new file mode 100644 index 00000000..892ab8db --- /dev/null +++ b/validation/experiments/delta_flume/response_comparison.csv @@ -0,0 +1,10 @@ +case,U_m_per_s,top_tension_N,dt_s,mode_measured,mode_cabledyn,f_cf_cabledyn_hz,max_cf_D_measured,max_cf_half_pp_D_measured_envelope,max_cf_half_pp_D_cabledyn,max_cf_error_percent,max_cf_envelope_error_percent,max_il_mean_D_measured,max_il_mean_D_cabledyn,max_il_mean_error_percent,std_curv_cf_kD_measured,std_curv_cf_kD_cabledyn,std_curv_cf_error_percent,std_curv_il_kD_measured,std_curv_il_kD_cabledyn,std_curv_il_error_percent,mean_top_tension_N_cabledyn +1,0.16,405.0,0.0025,2,2,0.92,0.7565,0.7632,0.6534,-13.6,-14.4,1.061,1.191,12.2,9.2666e-05,5.6648e-05,-38.9,5.0494e-05,3.5410e-05,-29.9,408.5 +2,0.21,407.0,0.0025,3,3,1.36,0.5788,0.5612,0.6012,3.9,7.1,1.194,1.604,34.3,8.8590e-05,1.1170e-04,26.1,3.4247e-05,7.1892e-05,109.9,412.8 +3,0.31,457.0,0.0025,4,4,2.0,0.7793,0.8089,0.6285,-19.4,-22.3,3.451,3.27,-5.2,2.7041e-04,2.0558e-04,-24.0,1.9471e-04,9.1215e-05,-53.2,475.6 +4,0.4,506.0,0.001,5,4,2.24,0.6738,0.5948,0.6918,2.7,16.3,4.973,4.782,-3.8,3.1790e-04,2.2974e-04,-27.7,2.6884e-04,1.3698e-04,-49.0,541.4 +5,0.54,598.0,0.001,6,6,3.72,0.8428,0.8885,0.7786,-7.6,-12.4,6.689,6.386,-4.5,4.8076e-04,4.0956e-04,-14.8,2.3125e-04,2.1049e-04,-9.0,655.8 +6,0.6,670.0,0.001,6,6,3.92,0.7093,0.7792,0.6057,-14.6,-22.3,8.127,6.779,-16.6,4.7728e-04,4.3901e-04,-8.0,4.5723e-04,2.5676e-04,-43.8,733.8 +7,0.7,743.0,0.001,7,6,4.24,0.777,0.717,0.737,-5.1,2.8,8.899,8.321,-6.5,6.4703e-04,4.6781e-04,-27.7,3.0285e-04,2.6416e-04,-12.8,836.2 +8,0.85,923.0,0.0005,7,6,4.8,0.9066,0.8896,0.781,-13.9,-12.2,11.184,9.652,-13.7,6.8866e-04,4.9143e-04,-28.6,4.4819e-04,2.9917e-04,-33.3,1046.0 +9,0.95,1002.0,0.0005,7,8,6.6,1.0745,0.9961,0.599,-44.2,-39.9,13.508,10.155,-24.8,7.3551e-04,6.8775e-04,-6.5,6.2385e-04,3.6999e-04,-40.7,1128.1 diff --git a/validation/experiments/delta_flume/summary.json b/validation/experiments/delta_flume/summary.json new file mode 100644 index 00000000..eb3a8779 --- /dev/null +++ b/validation/experiments/delta_flume/summary.json @@ -0,0 +1,261 @@ +{ + "cases": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "segments": 64, + "dt_scale": 1.0, + "tmax_s": 40.0, + "statistics_after_s": 15.0, + "top_spring_N_per_m": 11400.0, + "effective_axial_stiffness_N": 145857.9, + "modes_right": 5, + "modes_within_one": 9, + "il_mean_within_17_percent": 7, + "il_mean_error_percent_range": [ + -24.8, + 34.3 + ], + "max_cf_error_percent_range": [ + -44.2, + 3.9 + ], + "max_cf_envelope_error_percent_range": [ + -39.9, + 16.3 + ], + "std_curv_cf_error_percent_range": [ + -38.9, + 26.1 + ], + "std_curv_il_error_percent_range": [ + -53.2, + 109.9 + ], + "per_case": [ + { + "case": 1, + "U_m_per_s": 0.16, + "top_tension_N": 405.0, + "dt_s": 0.0025, + "mode_measured": 2, + "mode_cabledyn": 2, + "f_cf_cabledyn_hz": 0.92, + "max_cf_D_measured": 0.7565, + "max_cf_half_pp_D_measured_envelope": 0.7632, + "max_cf_half_pp_D_cabledyn": 0.6534, + "max_cf_error_percent": -13.6, + "max_cf_envelope_error_percent": -14.4, + "max_il_mean_D_measured": 1.061, + "max_il_mean_D_cabledyn": 1.191, + "max_il_mean_error_percent": 12.2, + "std_curv_cf_kD_measured": "9.2666e-05", + "std_curv_cf_kD_cabledyn": "5.6648e-05", + "std_curv_cf_error_percent": -38.9, + "std_curv_il_kD_measured": "5.0494e-05", + "std_curv_il_kD_cabledyn": "3.5410e-05", + "std_curv_il_error_percent": -29.9, + "mean_top_tension_N_cabledyn": 408.5 + }, + { + "case": 2, + "U_m_per_s": 0.21, + "top_tension_N": 407.0, + "dt_s": 0.0025, + "mode_measured": 3, + "mode_cabledyn": 3, + "f_cf_cabledyn_hz": 1.36, + "max_cf_D_measured": 0.5788, + "max_cf_half_pp_D_measured_envelope": 0.5612, + "max_cf_half_pp_D_cabledyn": 0.6012, + "max_cf_error_percent": 3.9, + "max_cf_envelope_error_percent": 7.1, + "max_il_mean_D_measured": 1.194, + "max_il_mean_D_cabledyn": 1.604, + "max_il_mean_error_percent": 34.3, + "std_curv_cf_kD_measured": "8.8590e-05", + "std_curv_cf_kD_cabledyn": "1.1170e-04", + "std_curv_cf_error_percent": 26.1, + "std_curv_il_kD_measured": "3.4247e-05", + "std_curv_il_kD_cabledyn": "7.1892e-05", + "std_curv_il_error_percent": 109.9, + "mean_top_tension_N_cabledyn": 412.8 + }, + { + "case": 3, + "U_m_per_s": 0.31, + "top_tension_N": 457.0, + "dt_s": 0.0025, + "mode_measured": 4, + "mode_cabledyn": 4, + "f_cf_cabledyn_hz": 2.0, + "max_cf_D_measured": 0.7793, + "max_cf_half_pp_D_measured_envelope": 0.8089, + "max_cf_half_pp_D_cabledyn": 0.6285, + "max_cf_error_percent": -19.4, + "max_cf_envelope_error_percent": -22.3, + "max_il_mean_D_measured": 3.451, + "max_il_mean_D_cabledyn": 3.27, + "max_il_mean_error_percent": -5.2, + "std_curv_cf_kD_measured": "2.7041e-04", + "std_curv_cf_kD_cabledyn": "2.0558e-04", + "std_curv_cf_error_percent": -24.0, + "std_curv_il_kD_measured": "1.9471e-04", + "std_curv_il_kD_cabledyn": "9.1215e-05", + "std_curv_il_error_percent": -53.2, + "mean_top_tension_N_cabledyn": 475.6 + }, + { + "case": 4, + "U_m_per_s": 0.4, + "top_tension_N": 506.0, + "dt_s": 0.001, + "mode_measured": 5, + "mode_cabledyn": 4, + "f_cf_cabledyn_hz": 2.24, + "max_cf_D_measured": 0.6738, + "max_cf_half_pp_D_measured_envelope": 0.5948, + "max_cf_half_pp_D_cabledyn": 0.6918, + "max_cf_error_percent": 2.7, + "max_cf_envelope_error_percent": 16.3, + "max_il_mean_D_measured": 4.973, + "max_il_mean_D_cabledyn": 4.782, + "max_il_mean_error_percent": -3.8, + "std_curv_cf_kD_measured": "3.1790e-04", + "std_curv_cf_kD_cabledyn": "2.2974e-04", + "std_curv_cf_error_percent": -27.7, + "std_curv_il_kD_measured": "2.6884e-04", + "std_curv_il_kD_cabledyn": "1.3698e-04", + "std_curv_il_error_percent": -49.0, + "mean_top_tension_N_cabledyn": 541.4 + }, + { + "case": 5, + "U_m_per_s": 0.54, + "top_tension_N": 598.0, + "dt_s": 0.001, + "mode_measured": 6, + "mode_cabledyn": 6, + "f_cf_cabledyn_hz": 3.72, + "max_cf_D_measured": 0.8428, + "max_cf_half_pp_D_measured_envelope": 0.8885, + "max_cf_half_pp_D_cabledyn": 0.7786, + "max_cf_error_percent": -7.6, + "max_cf_envelope_error_percent": -12.4, + "max_il_mean_D_measured": 6.689, + "max_il_mean_D_cabledyn": 6.386, + "max_il_mean_error_percent": -4.5, + "std_curv_cf_kD_measured": "4.8076e-04", + "std_curv_cf_kD_cabledyn": "4.0956e-04", + "std_curv_cf_error_percent": -14.8, + "std_curv_il_kD_measured": "2.3125e-04", + "std_curv_il_kD_cabledyn": "2.1049e-04", + "std_curv_il_error_percent": -9.0, + "mean_top_tension_N_cabledyn": 655.8 + }, + { + "case": 6, + "U_m_per_s": 0.6, + "top_tension_N": 670.0, + "dt_s": 0.001, + "mode_measured": 6, + "mode_cabledyn": 6, + "f_cf_cabledyn_hz": 3.92, + "max_cf_D_measured": 0.7093, + "max_cf_half_pp_D_measured_envelope": 0.7792, + "max_cf_half_pp_D_cabledyn": 0.6057, + "max_cf_error_percent": -14.6, + "max_cf_envelope_error_percent": -22.3, + "max_il_mean_D_measured": 8.127, + "max_il_mean_D_cabledyn": 6.779, + "max_il_mean_error_percent": -16.6, + "std_curv_cf_kD_measured": "4.7728e-04", + "std_curv_cf_kD_cabledyn": "4.3901e-04", + "std_curv_cf_error_percent": -8.0, + "std_curv_il_kD_measured": "4.5723e-04", + "std_curv_il_kD_cabledyn": "2.5676e-04", + "std_curv_il_error_percent": -43.8, + "mean_top_tension_N_cabledyn": 733.8 + }, + { + "case": 7, + "U_m_per_s": 0.7, + "top_tension_N": 743.0, + "dt_s": 0.001, + "mode_measured": 7, + "mode_cabledyn": 6, + "f_cf_cabledyn_hz": 4.24, + "max_cf_D_measured": 0.777, + "max_cf_half_pp_D_measured_envelope": 0.717, + "max_cf_half_pp_D_cabledyn": 0.737, + "max_cf_error_percent": -5.1, + "max_cf_envelope_error_percent": 2.8, + "max_il_mean_D_measured": 8.899, + "max_il_mean_D_cabledyn": 8.321, + "max_il_mean_error_percent": -6.5, + "std_curv_cf_kD_measured": "6.4703e-04", + "std_curv_cf_kD_cabledyn": "4.6781e-04", + "std_curv_cf_error_percent": -27.7, + "std_curv_il_kD_measured": "3.0285e-04", + "std_curv_il_kD_cabledyn": "2.6416e-04", + "std_curv_il_error_percent": -12.8, + "mean_top_tension_N_cabledyn": 836.2 + }, + { + "case": 8, + "U_m_per_s": 0.85, + "top_tension_N": 923.0, + "dt_s": 0.0005, + "mode_measured": 7, + "mode_cabledyn": 6, + "f_cf_cabledyn_hz": 4.8, + "max_cf_D_measured": 0.9066, + "max_cf_half_pp_D_measured_envelope": 0.8896, + "max_cf_half_pp_D_cabledyn": 0.781, + "max_cf_error_percent": -13.9, + "max_cf_envelope_error_percent": -12.2, + "max_il_mean_D_measured": 11.184, + "max_il_mean_D_cabledyn": 9.652, + "max_il_mean_error_percent": -13.7, + "std_curv_cf_kD_measured": "6.8866e-04", + "std_curv_cf_kD_cabledyn": "4.9143e-04", + "std_curv_cf_error_percent": -28.6, + "std_curv_il_kD_measured": "4.4819e-04", + "std_curv_il_kD_cabledyn": "2.9917e-04", + "std_curv_il_error_percent": -33.3, + "mean_top_tension_N_cabledyn": 1046.0 + }, + { + "case": 9, + "U_m_per_s": 0.95, + "top_tension_N": 1002.0, + "dt_s": 0.0005, + "mode_measured": 7, + "mode_cabledyn": 8, + "f_cf_cabledyn_hz": 6.6, + "max_cf_D_measured": 1.0745, + "max_cf_half_pp_D_measured_envelope": 0.9961, + "max_cf_half_pp_D_cabledyn": 0.599, + "max_cf_error_percent": -44.2, + "max_cf_envelope_error_percent": -39.9, + "max_il_mean_D_measured": 13.508, + "max_il_mean_D_cabledyn": 10.155, + "max_il_mean_error_percent": -24.8, + "std_curv_cf_kD_measured": "7.3551e-04", + "std_curv_cf_kD_cabledyn": "6.8775e-04", + "std_curv_cf_error_percent": -6.5, + "std_curv_il_kD_measured": "6.2385e-04", + "std_curv_il_kD_cabledyn": "3.6999e-04", + "std_curv_il_error_percent": -40.7, + "mean_top_tension_N_cabledyn": 1128.1 + } + ], + "executable_sha256": "a95b9df931e7f416674785413d8da8a79a204567ef0d4809f455fb41a660a647" +} From efbfbba8aeeb61080de540b17ade0ebed11024f0 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Mon, 16 Nov 2026 07:10:21 +0900 Subject: [PATCH 25/47] fix: a finite-EI dynamic step on the inertia's round-off floor converges (#168) A finite-EI cable could fail its first dynamic step at a small time step: Newton stagnated just above the tolerance, and the step recovery's smaller steps only raised it. Found on a 13 m riser (64 elements) at rest in a 0.95 m/s current taking the VIV lift at dtM 1.25e-4 s: the residual stopped at 1.06 times the tolerance, and each 4-fold smaller substep raised the stagnant residual about 16-fold (3.8e-8, 6.2e-7, 8.6e-6, 1.3e-4, 2.6e-3, 4.7e-2 N), to 3.4e4 times the tolerance at 1024 substeps. The 16-fold growth per 4-fold step is the inertia's 1/dt^2, not the 1/dt of a velocity-coupled force (drag, VIV lift): the inertia takes the acceleration (q - q_n)/(beta dt^2) - ... from coordinates stored to their last bits, so its residual cannot be settled below about eps sum_j |M_ij| |q_j| / (beta dt^2). The rows that stalled were the axial rows of nodes 8.5 to 12 m deep, not the cross-flow rows the lift loads: the Newton correction they needed, a few 1e-16 m, is below the 1.8e-15 m spacing of those coordinates. Without the lift the step starts at the static equilibrium and converges at its predictor; with it the line near rest sets no inertial force scale, and tol times the force scale (here its axial round-off floor) lies below the inertia's floor. A floor of the force scale built from that bound, where it binds, would accept residuals up to 16 times the bound, some 60 times the floor Newton reaches (the bound sits about 4 times above it: 1.7e-7 against 3.8e-8 N on the riser, 4.7e-3 against 1.2e-3 N in the test below). The fix is therefore a stall test, as on the EI = 0 route: when no step length of a fresh Newton correction reduces the residual, the residual is below 1e-4 of the force scale, and the correction moves no free coordinate by more than 16 eps times its scale (the largest coordinate magnitude or element length; 1 or the largest tangent or twist magnitude for those DOFs), the iterate is converged. The riser now runs at dtM 1.25e-4 s, and over 2 s its node positions and fairlead tension continue the time-step sequence of dtM 5e-4 and 2.5e-4 s (differences 1.3 mm and 0.55 mm, 5.5 N and 2.9 N). A step that meets the tolerance is unchanged: every example and test-data deck gives bit-identical outputs on the old and new driver (229 files over 118 decks), and through the C API five coupled steps of every deck give bit-identical line arrays (1685 arrays over 70 decks), and the full test suite (424 tests; 426 after the rebase onto 6c469fe) passes on the default and the Prescott OpenBLAS kernel, where the 66 example decks also run with no fallback note. Test: test_hermite_viv round-off floor, the test's 100 m line hung vertically from 50 to 150 m depth, from rest with the lift at dt 2.5e-5 s. Before, the first step stagnated at 2.4 times the tolerance through its 50-iteration budget and failed; now each step stops on the floor after two iterations, and the cross-flow displacement at 0.02 s matches the same line's at dt 1e-3 s within 1 % (to 5 digits). Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 13 ++++++ doc/theory.rst | 12 +++++- src/CableDyn_HermiteCableDynamic.f90 | 60 ++++++++++++++++++++++++++++ tests/test_hermite_viv.f90 | 60 +++++++++++++++++++++++++++- 4 files changed, 143 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 801c537e..062478f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -157,6 +157,19 @@ All notable changes to CableDyn are recorded in this file. The format follows height in the march, and rides 1.5 m waves. A module deeper than its sphere's radius is unchanged to the bit. In deck waves a node above the instantaneous surface takes the wave kinematics at the surface (they were zero there), as a cable's internal waves already did. +- A finite-EI dynamic step at a small time step could fail on a line near rest: the Newton + residual stagnated just above the tolerance, and the step recovery's smaller steps only raised + it (a 13 m riser, 64 elements, at rest in a 0.95 m/s current, took the VIV lift at dtM + 1.25e-4 s and stopped at 1.06 times the tolerance; each 4-fold smaller substep raised the + stagnant residual about 16-fold, to 3.4e4 times the tolerance at 1024 substeps). The inertia + takes the acceleration `(q - q_n)/(beta dt^2) - ...` from coordinates stored to their last + bits, so its residual cannot be settled below about `eps sum_j |M_ij| |q_j| / (beta dt^2)`, a + floor that grows like `dt^-2` and, where the line's inertia sets no force scale, stands above + the tolerance. As on the `EI = 0` route, an iterate on that floor is now converged: when no + step length of a fresh Newton correction reduces the residual, the residual is below 1e-4 of + the force scale and the correction moves no free coordinate by more than `16 eps` times its + scale. A step that meets the tolerance is unchanged: every example and test deck gives + bit-identical outputs. ## [0.4.2] - 2026-11-09 diff --git a/doc/theory.rst b/doc/theory.rst index 109f523a..faaab054 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -2918,7 +2918,17 @@ of the axial and bending forces (:math:`x_\text{ref}` the largest coordinate mag length; the axial and bending damping take the strain and curvature rates from the Newmark velocity, whose rounding is :math:`\gamma/(\beta\,\Delta t)` times that of the coordinates). The bending term is the larger on a soft line (a tensioner in series, a fine mesh) with bending -damping at a small time step. The +damping at a small time step. The inertia takes the acceleration +:math:`(\mathbf q - \mathbf q_n)/(\beta\,\Delta t^2) - \dots` from the coordinates, so a row's +inertial force cannot be resolved finer than about +:math:`\epsilon\,\sum_j \lvert M_{ij}\rvert\,\lvert q_j\rvert/(\beta\,\Delta t^2)`, a floor that grows +like :math:`\Delta t^{-2}` and stands above the tolerance on a line near rest at a small time step +(its inertia then sets no force scale), where a smaller step only raises it. As on the +:math:`EI = 0` path, a residual on it is converged: when no step length of a fresh Newton +correction reduces the residual, the residual is below :math:`10^{-4}` of the force scale, and +the correction moves no free coordinate by more than :math:`16\,\epsilon` times its scale +(:math:`x_\text{ref}` for the positions, the largest of 1 and the tangent or twist magnitudes for +the tangents and twist angles), the iterate is accepted. The deck defaults are relative tolerance :math:`10^{-8}`, absolute tolerance :math:`10^{-14}`, 30 iterations, and 12 backtracks (option ``dynamic_solver``). Option ``modified_newton`` reuses the factorised tangent within a step while each iterate reduces the residual to at most a quarter diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 9937a2d4..ef74065d 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -4915,6 +4915,10 @@ SUBROUTINE dyn_step_core(model, dt, max_iter, tol, ErrStat, ErrMsg, iters_out, r ! XS_TOL_FACTOR*tol, which keeps the outputs as close to the converged solution as full ! Newton's. REAL(wp), PARAMETER :: XS_TOL_FACTOR = 0.3_wp + ! Round-off acceptance of a stalled iterate (see at_roundoff_floor): the Newton correction + ! is within STALL_ROUNDOFF units of eps times the coordinate scale, and the residual within + ! STALL_SANITY of the force scale (the EI = 0 route's bound). + REAL(wp), PARAMETER :: STALL_ROUNDOFF = 16.0_wp, STALL_SANITY = 1.0e-4_wp INTEGER(INT64) :: pc0, pc1, pcr, pt0, pt1 CHARACTER(1024) :: em2 @@ -5537,6 +5541,21 @@ SUBROUTINE dyn_step_core(model, dt, max_iter, tol, ErrStat, ErrMsg, iters_out, r END IF EXIT mn_retry END DO mn_retry + ! A fresh correction that no step length improves and that would move no coordinate beyond + ! its last bits: the iterate is on the residual's round-off floor and is converged. + IF (chosen < CD_ZERO) THEN + IF (at_roundoff_floor()) THEN + ! the rejected trials overwrote the staged states: restage the iterate's + CALL eval_res(model%ws_qk, .FALSE., rnorm, es, em2) + IF (es /= CD_HCDYN_OK) THEN + ErrStat = es; ErrMsg = 'CD_HermiteCable_Dyn_Step: '//TRIM(em2) + IF (attempt < n_attempt) CYCLE predict + RETURN + END IF + IF (PRESENT(res_out)) res_out = rnorm + EXIT + END IF + END IF IF (chosen < CD_ZERO) THEN ! No step length reduced the residual (with a usable tangent): fall back to the ! SMALLEST step that at least gave a finite evaluation (a safe damped step). Using @@ -6234,6 +6253,47 @@ SUBROUTINE eval_res(qcur, use_trial, rn, esx, emx, stash) END IF END SUBROUTINE eval_res + LOGICAL FUNCTION at_roundoff_floor() RESULT(at_floor) + !! The iterate sits on the residual's round-off floor: a fresh Newton correction (ws_dq, + !! tw_dp) that no step length improves moves no free coordinate by more than + !! STALL_ROUNDOFF eps times its scale (the largest coordinate magnitude or element length, + !! and for the tangents and twist angles the largest of their magnitudes and 1), and the + !! residual is within STALL_SANITY of the force scale. Each coordinate is stored to its + !! last bit, and the inertia takes the acceleration c_a (q - q_n) from it, c_a = + !! 1/(beta dt^2): a row's inertial force cannot be resolved finer than about c_a M eps |q|, + !! which grows like 1/dt^2 and stands above tol*fscale on a line near rest at a small time + !! step (its inertia then sets no force scale). The residual test alone then never passes: + !! a 13 m riser at rest in a 0.95 m/s current (64 elements, dt 1.25e-4 s) took the VIV + !! lift and stagnated at 1.06 times the tolerance on its axial rows, and each 4-fold + !! smaller substep of the step recovery raised the stagnation about 16-fold. The criterion + !! is the EI = 0 route's (the residual within the operator's backward error of the + !! coordinates, eps max|q| ||A||), applied through the correction A^-1 G. + INTEGER :: ii + REAL(wp) :: xs, ts, ps + at_floor = .FALSE. + IF (.NOT. (rnorm <= STALL_SANITY)) RETURN + xs = MAXVAL(model%l0); ts = CD_ONE + DO ii = 1, ndof + IF (MOD(ii - 1, 6) < 3) THEN + xs = MAX(xs, ABS(model%ws_qk(ii))) + ELSE + ts = MAX(ts, ABS(model%ws_qk(ii))) + END IF + END DO + DO ii = 1, ndof + IF (.NOT. model%solve_mask(ii)) CYCLE + IF (.NOT. (ABS(model%ws_dq(ii)) <= STALL_ROUNDOFF*EPSILON(CD_ONE)*MERGE(xs, ts, MOD(ii - 1, 6) < 3))) RETURN + END DO + IF (model%tw_active) THEN + ps = MAX(CD_ONE, MAXVAL(ABS(model%tw_pk))) + DO ii = 1, model%nn + IF (.NOT. model%tw_free(ii)) CYCLE + IF (.NOT. (ABS(model%tw_dp(ii)) <= STALL_ROUNDOFF*EPSILON(CD_ONE)*ps)) RETURN + END DO + END IF + at_floor = .TRUE. + END FUNCTION at_roundoff_floor + SUBROUTINE impose_step_rigid_kinematics(q_state, v_state, a_state) !! Eliminate the two prescribed rotational tangent components while leaving !! the axial magnitude as the single solved coordinate. The scalar magnitude diff --git a/tests/test_hermite_viv.f90 b/tests/test_hermite_viv.f90 index 698b4534..a53c1da6 100644 --- a/tests/test_hermite_viv.f90 +++ b/tests/test_hermite_viv.f90 @@ -19,7 +19,14 @@ PROGRAM test_hermite_viv !! * at 60 s the mid-span cross-flow amplitude is above 0.3 D with the lift and below 0.01 D !! without it; !! * a snapshot taken mid-run and restored replays the following steps bit for bit (state and - !! phase), and the recovering step equals the plain step when no step fails. + !! phase), and the recovering step equals the plain step when no step fails; + !! * the residual's round-off floor: the same line hung vertically from 50 m to 150 m depth, + !! from rest with the lift, at dt 2.5e-5 s. The inertia takes the acceleration + !! (q - q_n)/(beta dt^2) - ... from coordinates stored to their last bits, so its residual + !! cannot be settled below their rounding, which grows like 1/dt^2: the first step stagnated + !! at 2.4 times the tolerance 1e-8 through its 50-iteration budget and failed. Each step stops + !! on that floor, and the cross-flow displacement at 0.02 s matches the same line's at + !! dt 1e-3 s within 1 %. USE CableDyn_Precision, ONLY: wp USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & CD_HermiteCable_Dyn_Set_Drag, CD_HermiteCable_Dyn_Set_AddedMass, & @@ -132,6 +139,9 @@ PROGRAM test_hermite_viv CALL require(k > 100, 'the recovering step equals the plain step') CALL CD_HermiteCable_Dyn_End(model) + ! ---- the inertia's round-off floor at a small time step ---- + CALL check_inertia_floor() + IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' ERROR STOP 1 @@ -200,6 +210,54 @@ REAL(wp) FUNCTION run_amplitude(m) RESULT(amp) amp = 0.5_wp*(zmax - zmin) END FUNCTION run_amplitude + SUBROUTINE check_inertia_floor() + !! The line hung vertically from 50 m to 150 m depth in the cross current along y (its lift + !! along x), from rest: 800 steps of 2.5e-5 s against 20 of 1e-3 s, the mid-span cross-flow + !! displacement at 0.02 s. + REAL(wp), PARAMETER :: T_END = 0.02_wp + REAL(wp) :: dx(2), step_dt(2), res, seed(6*(NE + 1)), l0(NE), eav(NE), eiv(NE), wv(NE), rhoa(NE), & + hd(NE), hn(NE), ht(NE) + INTEGER :: run, n, it, i, xmid + step_dt = [2.5e-5_wp, 1.0e-3_wp] + xmid = 6*(NE/2) + 1 ! r_x of the mid-span node + seed = 0.0_wp + DO i = 1, NE + 1 + seed(6*(i - 1) + 3) = -50.0_wp - SPAN*REAL(i - 1, wp)/REAL(NE, wp) + seed(6*(i - 1) + 6) = -1.0_wp + END DO + l0 = SPAN/REAL(NE, wp)/(1.0_wp + TENS/EA) + eav = EA; eiv = EI; rhoa = MLIN + wv = (MLIN - RHOW*0.25_wp*PI*D**2)*GACC + hd = D; ht = 0.0_wp + DO run = 1, 2 + CALL CD_HermiteCable_Dyn_Init(model, l0, eav, eiv, rhoa, wv, seed, [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3], & + -200.0_wp, 0.0_wp, 0.5_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'round-off floor, init: '//TRIM(em)) + hn = 1.2_wp + CALL CD_HermiteCable_Dyn_Set_Drag(model, RHOW, hd, hn, ht, 0.0_wp, [0.0_wp, U, 0.0_wp], es, em) + CALL require(es == CD_HCDYN_OK, 'round-off floor, drag: '//TRIM(em)) + hn = 1.0_wp + CALL CD_HermiteCable_Dyn_Set_AddedMass(model, RHOW, hd, hn, ht, 0.0_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'round-off floor, added mass: '//TRIM(em)) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 0.25_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'round-off floor, VIV: '//TRIM(em)) + dx(run) = model%q(xmid) + DO n = 1, NINT(T_END/step_dt(run)) + CALL CD_HermiteCable_Dyn_Step(model, step_dt(run), 50, 1.0e-8_wp, es, em, it, res) + IF (es /= CD_HCDYN_OK) THEN + CALL require(.FALSE., 'round-off floor: step failed: '//TRIM(em)) + CALL CD_HermiteCable_Dyn_End(model) + RETURN + END IF + END DO + dx(run) = model%q(xmid) - dx(run) + CALL CD_HermiteCable_Dyn_End(model) + END DO + WRITE (*, '(A,ES11.4,A,ES11.4,A)') ' round-off floor: mid-span cross-flow displacement at 0.02 s ', dx(1), & + ' m at dt 2.5e-5 s, ', dx(2), ' m at dt 1e-3 s' + CALL require(ABS(dx(1) - dx(2)) <= 0.01_wp*ABS(dx(2)), 'round-off floor: the small steps follow the large ones') + END SUBROUTINE check_inertia_floor + SUBROUTINE require(cond, label) LOGICAL, INTENT(IN) :: cond CHARACTER(*), INTENT(IN) :: label From 041337e12a5b15833afe42ce9fe19647b9a49c5e Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Mon, 16 Nov 2026 12:04:56 +0900 Subject: [PATCH 26/47] fix: a finite-EI step no longer converges to the root with its tangents reversed (#169) A finite-EI line with little numerical damping could fail its march a few steps in. Found on the lock-in line of the long-run VIV checks (a taut 20 m line, 10 elements, EA 5e7 N, 3.8 kN, pinned in a 0.3 m/s cross current with the lift) at rho_inf 1 and 50 steps per VIV cycle (dt 0.037 s): step 2 converged in 3 quadratic iterations to a state with every nodal tangent reversed (m_x -1.13 against +1.00015), 2.4e8 J of strain energy against 3.5 J, and step 6 stagnated at 1e-3 through its 50 iterations. The same happened at rho_inf 0.8 and 0.9 (failing at steps 10 and 7), at 25 steps per cycle (steps 5, 13 and 4 at rho_inf 0.8, 0.9 and 1; at 0.5 the run went on through reversed roots to a mid-span A/D of 5.7), and without the lift (step 38). It is not the lift, the force cache or the cross-step factor reuse (the reuse is off under VIV, and the step fails the same with it disabled), and not an instability of the time integration: the energy was steady up to the jump. The cause is the Newton predictor. The line's seed has unit tangents while its elements are stretched by T/EA = 7.6e-5, so the tangents' stretch, the line's stiffest motion (EA against their small consistent mass, omega ~ 8e3 rad/s, omega dt ~ 300), starts 7.6e-5 off its balance. At rho_inf 1 nothing damps it: it rings between 1 and 1 + 2 T/EA with a committed acceleration of 4.9e3 1/s^2 on the tangents, and the constant-acceleration and Newmark guesses (dt^2/2 a_n = 3.4 and dt^2/4 a_n = 1.7 of the tangent's length) carried every tangent across zero, next to the root with each element folded into a Z along its chord. With rho_inf 0.5 the same mode carries a velocity overshoot (dt v_n = 1.7 at 25 steps per cycle). Seeded at its stretch (tangents 1 + T/EA) the line runs at every rho_inf and step. Fix: where either guess would change the length of a free nodal tangent by more than a quarter (a strain change of 0.25 in one step, which no step resolves), that tangent starts at its committed value, from which the stiff mode's true increment is a Newton step away. The test is on the length alone, since a guess that turns a tangent fast is often right: the line-control test's seabed cable turns two tangents 19 degrees in its first 0.01 s step and does not converge from held tangents. Holding only the length and keeping the turn also converged, but took 132 steps over 12 iterations against 31 on the 25-step runs. And a step that ends with a nodal tangent turned by 90 degrees or more is now a failed attempt with its own message (the next attempt or the step recovery re-solves it) instead of a converged step: with the predictor guard disabled, the line stops at step 2 with that message rather than marching on through reversed roots. A node with some tangent components fixed (a planar model fixes the out-of-plane one) is guarded on its free components: the length change is that of their increment, and only they are held. The line now runs at rho_inf 0.5 to 1 and 25 and 50 steps per cycle. Over 20 cycles its largest mid-span A/D is that of the line seeded at its stretch within 0.75 % and its largest strain energy within 1.2 times; at 50 steps per cycle and rho_inf 1 it runs the 400 cycles of the long-run check (largest A/D 0.568 against 0.567 seeded at the stretch; energy mismatch 7.3e-4 of the VIV work, 8.3e-5 at 100 steps per cycle). The guard changes only a step that would stretch a tangent by a quarter: every example and test-data deck gives bit-identical outputs on the old and new driver (134 decks, the console logs equal up to their progress clock), the full test suite passes on the default and the Prescott OpenBLAS kernel (427 tests), and the 66 example decks run on both kernels with no fallback note. Test: test_hermite_tangent_predictor, the taut line seeded with unit tangents against the same line seeded at its stretch, at rho_inf 0.5, 0.8, 0.9 and 1 and 25 and 50 steps per cycle over 20 cycles, and without the lift at rho_inf 1, also kept in its plane (r_z and m_z fixed at every node). Before, 7 of the 9 runs failed and one ran through reversed roots (9 assertions), and the planar run stopped at step 2 while the guard skipped partly constrained nodes; now every step converges (at most 5.9 iterations per step on average, 23 at most), the strain energy stays within 1.5 times the reference's and the largest A/D within 2 %. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 13 ++ CMakeLists.txt | 8 + doc/theory.rst | 11 ++ src/CableDyn_HermiteCableDynamic.f90 | 66 +++++++- tests/test_hermite_tangent_predictor.f90 | 199 +++++++++++++++++++++++ 5 files changed, 296 insertions(+), 1 deletion(-) create mode 100644 tests/test_hermite_tangent_predictor.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 062478f2..bc87f147 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -170,6 +170,19 @@ All notable changes to CableDyn are recorded in this file. The format follows the force scale and the correction moves no free coordinate by more than `16 eps` times its scale. A step that meets the tolerance is unchanged: every example and test deck gives bit-identical outputs. +- A finite-EI step could converge to a spurious root with every nodal tangent reversed, and the + march then failed: a taut 20 m line locked in by the VIV lift, seeded with unit tangents while + its elements were stretched by 7.6e-5, failed within 13 steps at `rho_inf` 0.8 to 1 at 25 and + 50 steps per VIV cycle (and without the lift too). The tangents' stretch is the line's stiffest + motion; with little numerical damping its seed offset rang on with a committed acceleration of + 4.9e3 1/s^2, and the constant-acceleration and Newmark guesses carried every tangent across + zero (by 3.4 and 1.7 of its length), from where Newton converged to the folded root (2.4e8 J of + strain energy against 3.5 J). A guess that changes the length of a free tangent by more than a + quarter now holds that tangent at its committed value, and a step that ends with a tangent + turned by 90 degrees or more fails, so the step recovery re-solves it. The line now runs at + `rho_inf` 0.5 to 1 and 25 and 50 steps per cycle, with the response of the same line seeded + at its stretch (largest A/D within 0.75 %). Every other step starts as before: every example + and test deck gives bit-identical outputs. ## [0.4.2] - 2026-11-09 diff --git a/CMakeLists.txt b/CMakeLists.txt index 072282f8..31307a6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1387,6 +1387,14 @@ target_link_libraries(test_hermite_viv PRIVATE cabledyn_core) add_test(NAME hermite_viv COMMAND test_hermite_viv) set_tests_properties(hermite_viv PROPERTIES LABELS "fortran;dynamic;viv") +# The Newton predictor against the ringing stretch of the nodal tangents: a taut line seeded with +# unit tangents (off the elements' stretch) at rho_inf 0.5 to 1 and 25 and 50 steps per VIV cycle, +# with and without the lift, against the same line seeded at the stretch. +add_executable(test_hermite_tangent_predictor tests/test_hermite_tangent_predictor.f90) +target_link_libraries(test_hermite_tangent_predictor PRIVATE cabledyn_core) +add_test(NAME hermite_tangent_predictor COMMAND test_hermite_tangent_predictor) +set_tests_properties(hermite_tangent_predictor PROPERTIES LABELS "fortran;dynamic;viv") + add_executable(test_hermite_viv_inline tests/test_hermite_viv_inline.f90) target_link_libraries(test_hermite_viv_inline PRIVATE cabledyn_core) add_test(NAME hermite_viv_inline COMMAND test_hermite_viv_inline) diff --git a/doc/theory.rst b/doc/theory.rst index faaab054..eec0d442 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -2899,6 +2899,17 @@ over the translational free DOFs, and from the Newmark predictor otherwise (and under-resolved mode rings, a loosely converged step would keep the extrapolated acceleration, whereas the zero guess damps it. A failed constant-acceleration attempt is re-solved from the Newmark predictor. The test uses only the committed state, so a restart is exact. +On a Hermite step either guess holds a free nodal tangent at its committed value where it +would change the tangent's length, the stretch, by more than a quarter (a strain change of 0.25 +in one step). A tangent with some components fixed (a planar model fixes the out-of-plane one) +is held on its free components, by their change of the length. The stretch is the line's stiffest motion (:math:`EA` against the tangents' small +consistent mass), and with little numerical damping (:math:`\rho_\infty` near 1) an offset of it +rings on with a committed velocity and acceleration far larger than the motion they make: a +taut line seeded with unit tangents, :math:`7.6\times10^{-5}` off its elements' stretch, had +every tangent carried across zero at 50 steps per VIV cycle, and Newton converged to the root +with every element folded back along its chord. A guess that only turns a tangent is kept (a +line turning fast is often right). A step that still ends with a tangent turned by 90° or more +fails, and the next attempt or the step recovery re-solves it. The ``EI = 0`` path uses an Armijo line search on :math:`\tfrac{1}{2}\lVert\mathbf{G}\rVert^2` and converges when :math:`\lVert\mathbf{G}\rVert_\infty` relative to the larger of the external load and the initial residual falls below the relative tolerance, or below the absolute diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index ef74065d..7e320eef 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -4878,7 +4878,7 @@ SUBROUTINE dyn_step_core(model, dt, max_iter, tol, ErrStat, ErrMsg, iters_out, r INTEGER :: axial_worst_element, iv, attempt, n_attempt INTEGER :: n_ls_tan ! tangents the step's line searches assembled at their accepted trial REAL(wp) :: c_a, c_v, c_a2, am, af, bt, gm, rnorm, fscale, rnt, lambda, chosen, lam_ok, cw, t_alpha, dth_lin - REAL(wp) :: e_bal, e_ma, tors_theta_new, tors_mt_new + REAL(wp) :: e_bal, e_ma, tors_theta_new, tors_mt_new, t_inc, t_len REAL(wp) :: axial_qe(12), axial_min REAL(wp) :: axial_threshold, axial_margin, axial_worst_margin, axial_worst_force, axial_worst_xi REAL(wp) :: axial_worst_threshold @@ -4901,6 +4901,9 @@ SUBROUTINE dyn_step_core(model, dt, max_iter, tol, ErrStat, ErrMsg, iters_out, r REAL(wp), PARAMETER :: MN_CONTRACT = 0.25_wp ! Constant-acceleration predictor gate: relative force imbalance of the committed state. REAL(wp), PARAMETER :: PRED_BALANCE = 0.5_wp + ! Largest change of the length of a free nodal tangent by the predictor, relative to that + ! length; a larger change holds the tangent at its committed value (see the predictor). + REAL(wp), PARAMETER :: PRED_STRETCH_MAX = 0.25_wp ! Cross-step reuse: at most this many accepted iterations on the carried factor per step; ! a solve still short of the tolerance then refreshes (quadratic convergence from there). INTEGER, PARAMETER :: XS_MAX_STALE = 3 @@ -5229,6 +5232,46 @@ SUBROUTINE dyn_step_core(model, dt, max_iter, tol, ErrStat, ErrMsg, iters_out, r model%ws_qk(iv) = model%ws_qn(iv) + dt*model%ws_vn(iv) + (0.5_wp - bt)*dt*dt*model%ws_an(iv) END DO END IF + ! Both guesses assume a resolved motion. The length of a nodal tangent m = dr/ds is the + ! line's stretch there, its stiffest motion (EA against the tangent's small consistent mass), + ! whose committed velocity and acceleration are those of the generalised-alpha recursion far + ! outside its resolved range: with little or no numerical damping (rho_inf near 1) it keeps + ! ringing about its balance at the offset it started from, and dt v_n or dt^2 a_n along the + ! tangent can exceed the tangent itself. A taut 20 m line of 2 m elements (EA 5e7 N) seeded + ! with unit tangents at a strain of 7.6e-5 started that mode 7.6e-5 off its balance, with + ! a_n = 4.9e3 1/s^2 along the tangents (omega ~ 8e3 rad/s, omega dt ~ 300 at dt 0.037 s, 50 + ! steps per cycle of its VIV); at rho_inf 1 both guesses carried every tangent across zero + ! (dt^2/2 a_n = 3.4, dt^2/4 a_n = 1.7), and Newton converged quadratically to the root with + ! every tangent reversed (each element folded into a Z along its chord, 2.4e8 J of strain + ! energy against 3.5 J), from which the march failed a few steps on. A guess that changes + ! the length of a free tangent by more than PRED_STRETCH_MAX of it (a strain change of 0.25 + ! in one step, which no step resolves) took that tangent's committed velocity and + ! acceleration from the ringing, so the tangent starts at its committed value: the stiff + ! mode's true increment, of the order of the strain, is a Newton step from there. Holding + ! only its length and keeping the turn of the guess converged too, but the turn rings as + ! well (the tangent's rotation is under-resolved at that step): over 20 cycles at 25 steps + ! per cycle and rho_inf 0.9 and 1, 132 steps took more than 12 iterations against 31. The + ! test is on the length alone because a guess that turns a tangent fast is often right: a + ! seabed cable whose span was lengthened 1.3 times turns two tangents 19 degrees in its + ! first 0.01 s step, and does not converge from the held tangents. A node with some tangent + ! components fixed (a planar model fixes the out-of-plane one) is guarded on its free + ! components: the length change is that of the free components' increment, and only they are + ! held. Every other start is unchanged. + DO i = 1, model%nn + iv = 6*(i - 1) + IF (.NOT. ANY(model%freemask(iv + 4:iv + 6))) CYCLE + t_len = NORM2(model%ws_qn(iv + 4:iv + 6)) + IF (.NOT. (t_len > CD_ZERO)) CYCLE + t_inc = 0.0_wp + DO ip = iv + 4, iv + 6 + IF (model%freemask(ip)) t_inc = t_inc + (model%ws_qk(ip) - model%ws_qn(ip))*model%ws_qn(ip) + END DO + t_inc = t_inc/t_len + IF (ABS(t_inc) <= PRED_STRETCH_MAX*t_len) CYCLE + DO ip = iv + 4, iv + 6 + IF (model%freemask(ip)) model%ws_qk(ip) = model%ws_qn(ip) + END DO + END DO ! Hold the prescribed DOFs at their target position for the whole solve (Newton never touches ! them -- they are in fixed_dofs, hence not in fmap). IF (has_pres) THEN @@ -5632,6 +5675,27 @@ SUBROUTINE dyn_step_core(model, dt, max_iter, tol, ErrStat, ErrMsg, iters_out, r IF (model%tw_active) CALL tw_accept() rnorm = rnt END DO + ! A nodal tangent turned by 90 degrees or more over one step is a root of the step's + ! equations with the element folded back on itself (the reversed-tangent root above), not a + ! motion one step resolves: the attempt fails (the next one, or the recovering step's + ! subdivision, re-solves the step). + DO i = 1, model%nn + iv = 6*(i - 1) + IF (.NOT. ANY(model%freemask(iv + 4:iv + 6))) CYCLE + IF (DOT_PRODUCT(model%ws_qk(iv + 4:iv + 6), model%ws_qn(iv + 4:iv + 6)) > CD_ZERO) CYCLE + ErrStat = CD_HCDYN_NOCONVERGE + BLOCK + CHARACTER(1024) :: wbuf + INTEGER :: wios + wbuf = '' + WRITE (wbuf, '(A,I0,A)', IOSTAT=wios) 'CD_HermiteCable_Dyn_Step: Newton converged with the tangent of node ', & + i, ' turned by 90 deg or more in one step (a spurious root with the element folded back); '// & + 'a smaller dt resolves the step' + ErrMsg = wbuf + END BLOCK + IF (attempt < n_attempt) CYCLE predict + RETURN + END DO EXIT predict END DO predict model%ws_stash_solves = nsolve_step diff --git a/tests/test_hermite_tangent_predictor.f90 b/tests/test_hermite_tangent_predictor.f90 new file mode 100644 index 00000000..dae1eafc --- /dev/null +++ b/tests/test_hermite_tangent_predictor.f90 @@ -0,0 +1,199 @@ +! File: tests/test_hermite_tangent_predictor.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_hermite_tangent_predictor + !! The Newton predictor of a finite-EI step and the stretch mode of the nodal tangents + !! (CableDyn_HermiteCableDynamic, dyn_step_core). A nodal tangent m = dr/ds carries the line's + !! stiffest motion, its stretch (EA against the tangent's small consistent mass, here omega ~ + !! 8e3 rad/s, omega dt ~ 300 and 600); with little numerical damping it keeps ringing at the offset + !! it starts from, and the committed velocity and acceleration of that mode are far larger than + !! the motion it makes. The constant-acceleration and Newmark guesses extrapolated them and carried + !! the tangents across zero, and Newton converged to the root with every tangent reversed (each + !! element folded into a Z along its chord, 2.4e8 J of strain energy against 3.5 J), from which the + !! march failed a few steps on. A guess that changes the length of a free tangent by more than a + !! quarter of it now holds that tangent at its committed value, and a step that still ends with a + !! tangent turned by 90 degrees or more fails. + !! + !! The line: a weightless taut line (20 m, 10 elements, D 0.1 m, 8.1 kg/m, EA 5e7 N, EI 1e3 N m^2, + !! 3.8 kN, no added mass), pinned at both ends in a 0.3 m/s cross current, Cd 1.2, and the VIV lift + !! (Cl 0.8, cF 0.18, dF 0.08, running RMS window 0.25 s), under which it locks in at about 0.63 Hz + !! with a mid-span A/D of 0.56-0.57 (the lock-in case of the long-run VIV checks). Its seed is the + !! straight line with unit tangents, while the elements are stretched by T/EA = 7.6e-5: the tangent + !! stretch mode starts 7.6e-5 off its balance (|a| = 4.9e3 1/s^2 on the tangents). The reference + !! is the same line seeded with tangents of length 1 + T/EA (balanced), which every predictor ran + !! before and runs unchanged. 20 cycles of the nominal shedding period D/(cF U) = 1.85 s (37 s). + !! + !! Gates, for rho_inf 0.5, 0.8, 0.9 and 1 at 25 and 50 steps per cycle: + !! * G1 every step of the unit-tangent seed converges (before: at rho_inf 0.8, 0.9 and 1 the run + !! failed at step 5, 13, 4 (25 steps per cycle) and 10, 7, 6 (50), each after steps on the + !! reversed root; at 25 steps per cycle and rho_inf 0.5 it ran through reversed roots to a + !! mid-span A/D of 5.7); + !! * G2 its largest strain energy stays within 1.5 times the reference's (measured at most 1.20, + !! at 25 steps per cycle and rho_inf 1; the reversed root has 3e7 times it); + !! * G3 its largest mid-span cross-flow displacement is the reference's within 2 % (measured at + !! most 0.75 %), so the ringing tangent stretch does not change the response; + !! * G4 it takes at most 8 Newton iterations per step on average and no step more than 30 (the deck + !! default budget; measured at most 5.9 and 23, at 25 steps per cycle and rho_inf 1; before, + !! the first step alone took 21 at 50 steps per cycle and rho_inf 1, now 3); + !! * G5 the same line without the lift at 50 steps per cycle and rho_inf 1 (before: failed at step + !! 38 after steps on the reversed root): every step converges, the largest strain energy is + !! within 1.5 times the reference's (measured 1.09) and the mid-span in-line deflection at the end + !! within 1 % (measured to 4 digits); + !! * G6 the same no-lift line kept in its plane (r_z and m_z fixed at every node, the planar + !! constraint pattern): the guard applies to the free tangent components of a partly + !! constrained node, so it runs as G5 (before: the guard skipped every node with a fixed + !! tangent component, and the reversed-root check stopped the run). + USE CableDyn_Precision, ONLY: wp + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & + CD_HermiteCable_Dyn_Set_Drag, CD_HermiteCable_Dyn_Set_VIV, & + CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Energy, & + CD_HermiteCable_Dyn_End, CD_HCDYN_OK + IMPLICIT NONE + + REAL(wp), PARAMETER :: RHOW = 1025.0_wp, D = 0.1_wp, CF = 0.18_wp, DF = 0.08_wp, U = 0.3_wp + REAL(wp), PARAMETER :: EA = 5.0e7_wp, TENS = 3.8e3_wp + INTEGER, PARAMETER :: NCYC = 20 + + !> One run: whether every step converged, the largest strain energy, the largest mid-span + !> cross-flow displacement, the mid-span in-line deflection at the end, the mean iterations. + TYPE :: run_result + LOGICAL :: ok = .FALSE. + INTEGER :: nstep = 0 + INTEGER :: max_iters = 0 + REAL(wp) :: es_max = 0.0_wp, z_max = 0.0_wp, y_end = 0.0_wp, iters = 0.0_wp + END TYPE run_result + + INTEGER :: nfail = 0, ir, ip + REAL(wp), PARAMETER :: RHOS(4) = [0.5_wp, 0.8_wp, 0.9_wp, 1.0_wp] + INTEGER, PARAMETER :: NPERS(2) = [25, 50] + TYPE(run_result) :: unit, ref + CHARACTER(64) :: lab + + DO ip = 1, SIZE(NPERS) + DO ir = 1, SIZE(RHOS) + WRITE (lab, '(A,F4.2,A,I0,A)') 'rho_inf ', RHOS(ir), ', ', NPERS(ip), ' steps per cycle' + CALL run(NPERS(ip), RHOS(ir), .TRUE., .FALSE., 1.0_wp, unit) + CALL run(NPERS(ip), RHOS(ir), .TRUE., .FALSE., 1.0_wp + TENS/EA, ref) + CALL report(lab, unit, ref) + CALL require(ref%ok, 'reference '//TRIM(lab)//': every step converges') + CALL require(unit%ok, 'G1 '//TRIM(lab)//': every step of the unit-tangent seed converges') + IF (.NOT. (unit%ok .AND. ref%ok)) CYCLE + CALL require(unit%es_max <= 1.5_wp*ref%es_max, 'G2 '//TRIM(lab)//': the strain energy stays bounded') + CALL require(ABS(unit%z_max - ref%z_max) <= 0.02_wp*ref%z_max, & + 'G3 '//TRIM(lab)//': the cross-flow response is the balanced seed''s') + CALL require(unit%iters <= 8.0_wp .AND. unit%max_iters <= 30, & + 'G4 '//TRIM(lab)//': Newton converges in a few iterations') + END DO + END DO + CALL run(50, 1.0_wp, .FALSE., .FALSE., 1.0_wp, unit) + CALL run(50, 1.0_wp, .FALSE., .FALSE., 1.0_wp + TENS/EA, ref) + CALL report('no lift, rho_inf 1.00, 50 steps per cycle', unit, ref) + CALL no_lift_gates('G5 no lift', unit, ref) + CALL run(50, 1.0_wp, .FALSE., .TRUE., 1.0_wp, unit) + CALL run(50, 1.0_wp, .FALSE., .TRUE., 1.0_wp + TENS/EA, ref) + CALL report('planar, no lift, rho_inf 1.00, 50 steps per cycle', unit, ref) + CALL no_lift_gates('G6 planar no lift', unit, ref) + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: the predictor holds the ringing tangent stretch' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE no_lift_gates(label, a, b) + CHARACTER(*), INTENT(IN) :: label + TYPE(run_result), INTENT(IN) :: a, b + CALL require(b%ok .AND. a%ok, label//': every step converges') + IF (.NOT. (b%ok .AND. a%ok)) RETURN + CALL require(a%es_max <= 1.5_wp*b%es_max, label//': the strain energy stays bounded') + CALL require(ABS(a%y_end - b%y_end) <= 0.01_wp*ABS(b%y_end), & + label//': the in-line deflection is the balanced seed''s') + END SUBROUTINE no_lift_gates + + SUBROUTINE report(label, a, b) + CHARACTER(*), INTENT(IN) :: label + TYPE(run_result), INTENT(IN) :: a, b + WRITE (*, '(2X,A,A,I0,A,L1,A,3ES11.3,F6.2,I4,A,3ES11.3,F6.2,I4)') TRIM(label), ': unit seed steps ', a%nstep, & + ' ok ', a%ok, ' (Es max, z max/D, y end, mean and max iterations) ', a%es_max, a%z_max/D, a%y_end, a%iters, & + a%max_iters, & + '; balanced ', b%es_max, b%z_max/D, b%y_end, b%iters, b%max_iters + END SUBROUTINE report + + SUBROUTINE run(nper, rho_inf, with_lift, planar, m0, res) + !! The taut line from its straight seed with tangents of length m0, over NCYC nominal cycles; + !! planar fixes r_z and m_z at every node (the line moves in the plane of the current). + INTEGER, INTENT(IN) :: nper + REAL(wp), INTENT(IN) :: rho_inf, m0 + LOGICAL, INTENT(IN) :: with_lift, planar + TYPE(run_result), INTENT(OUT) :: res + INTEGER, PARAMETER :: NE = 10, NN = NE + 1, MIDN = NE/2 + 1 + REAL(wp), PARAMETER :: SPAN = 20.0_wp, Z0 = -50.0_wp, MLIN = 8.1_wp + TYPE(CD_HermiteCableDynType) :: hm + REAL(wp) :: seed(6*NN), l0(NE), eav(NE), eiv(NE), rhoa(NE), wv(NE), hd(NE), hn(NE), ht(NE) + REAL(wp) :: cl(NE), cfv(NE), dfv(NE), dt, ek, es_ + INTEGER :: i, n, es, its, nit + INTEGER, ALLOCATABLE :: fixed(:) + CHARACTER(1024) :: em + dt = D/(CF*U)/REAL(nper, wp) + l0 = SPAN/REAL(NE, wp)/(1.0_wp + TENS/EA) + eav = EA; rhoa = MLIN; eiv = 1.0e3_wp; wv = 0.0_wp + seed = 0.0_wp + DO i = 1, NN + seed(6*(i - 1) + 1) = SPAN*REAL(i - 1, wp)/REAL(NE, wp) + seed(6*(i - 1) + 3) = Z0 + seed(6*(i - 1) + 4) = m0 + END DO + fixed = [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3] + IF (planar) THEN + fixed = [1, 2, 3, 6] + DO i = 2, NN - 1 + fixed = [fixed, 6*(i - 1) + 3, 6*(i - 1) + 6] + END DO + fixed = [fixed, 6*NE + 1, 6*NE + 2, 6*NE + 3, 6*NE + 6] + END IF + CALL CD_HermiteCable_Dyn_Init(hm, l0, eav, eiv, rhoa, wv, seed, fixed, -1.0e4_wp, 0.0_wp, rho_inf, es, em) + IF (es == CD_HCDYN_OK) THEN + hd = D; hn = 1.2_wp; ht = 0.0_wp + CALL CD_HermiteCable_Dyn_Set_Drag(hm, RHOW, hd, hn, ht, 0.0_wp, [0.0_wp, U, 0.0_wp], es, em) + END IF + IF (es == CD_HCDYN_OK .AND. with_lift) THEN + cl = 0.8_wp; cfv = CF; dfv = DF + CALL CD_HermiteCable_Dyn_Set_VIV(hm, cl, cfv, dfv, 0.25_wp, es, em) + END IF + CALL require(es == CD_HCDYN_OK, 'the line sets up: '//TRIM(em)) + IF (es /= CD_HCDYN_OK) RETURN + nit = 0 + res%ok = .TRUE. + DO n = 1, nper*NCYC + CALL CD_HermiteCable_Dyn_Step(hm, dt, 50, 1.0e-8_wp, es, em, iters_out=its) + IF (es /= CD_HCDYN_OK) THEN + res%ok = .FALSE. + WRITE (*, '(A,I0,A)') ' step ', n, ': '//TRIM(em) + EXIT + END IF + res%nstep = n + nit = nit + its + res%max_iters = MAX(res%max_iters, its) + CALL CD_HermiteCable_Dyn_Energy(hm, ek, es_, es, em) + IF (es /= CD_HCDYN_OK) THEN + res%ok = .FALSE. + EXIT + END IF + res%es_max = MAX(res%es_max, es_) + res%z_max = MAX(res%z_max, ABS(hm%q(6*(MIDN - 1) + 3) - Z0)) + END DO + res%y_end = hm%q(6*(MIDN - 1) + 2) + res%iters = REAL(nit, wp)/REAL(MAX(1, res%nstep), wp) + CALL CD_HermiteCable_Dyn_End(hm) + END SUBROUTINE run + +END PROGRAM test_hermite_tangent_predictor From 4b9432126f68a902fab63e3ed2d59de819f65e90 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Mon, 16 Nov 2026 15:10:43 +0900 Subject: [PATCH 27/47] feat: Rayleigh damping of finite-EI cables (EI|-zeta|f1|f2) (#170) The bending damping Bb is stiffness-proportional, zeta = omega Bb/(2 EI), so a ratio set at one frequency cannot hold across a VIV band. The LINE TYPES EI column now takes EI|-zeta|f1|f2: beside Bb = zeta EI/(pi (f1 + f2)) it adds a mass-proportional transverse damping alpha = 4 pi zeta f1 f2/(f1 + f2) [1/s], so zeta(omega) = alpha/(2 omega) + omega Bb/(2 EI) equals zeta at f1 and f2 for a mode whose stiffness is all bending. The new force is alpha m (I - t t^T) v, alpha times the line's own mass on the velocity normal to the tangent: alpha M v in the two transverse directions of a straight span, zero along the axis (axial damping stays with BA). The velocity is absolute, as in the usual Rayleigh model, so rigid transverse and pendulum motion is damped too, increasingly below f1; the theory page says so and why the filtered-velocity frame of the VIV FRAME section is not used (it would add a filter state, lag the damping and break the two-frequency ratio). No state is added. Force and both Jacobians are exact; the term joins the structural damping load, so the end forces, the node recovery, DampPow, the consistent initial acceleration and the OpenFAST linearisation (central differences of the same equations) carry it. The API setter is CD_HermiteCable_Dyn_Set_Mass_Damping (and CD_HFMF_Set_Mass_Damping). EI = 0 lines refuse the form, as the other damping forms. Both deck readers refuse a positive ratio, a non-positive frequency and a fifth part by name; the Python builder writes and reads the form. Tests: kernel Jacobians against central differences (3e-10), the force against an independent dissipation function, alpha M v on a straight element and no damping of axial sliding; free decays of modes 1, 2 and 3 of a pinned cable for alpha alone, Bb alone and both against the Rayleigh ratio (largest error 0.05 %), and the two-frequency pair at the target at f1 and f3 (0.02 %); the energy ledger with alpha and Bb closes to 2.8e-4 of the dissipated work; the deck route and refusals. Every example and test-data deck (134) writes bit-identical outputs. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 9 + CMakeLists.txt | 12 +- doc/capabilities.rst | 5 + doc/driver_format.md | 15 +- doc/outputs.rst | 3 +- doc/theory.rst | 72 +++++++ python/cabledyn/builder.py | 10 +- python/cabledyn/deck_file.py | 30 ++- python/tests/test_builder.py | 8 +- python/tests/test_deck_native_parity.py | 7 +- src/CableDyn_DeckDriver.f90 | 116 +++++++---- src/CableDyn_HermiteCable.f90 | 125 ++++++++++++ src/CableDyn_HermiteCableDynamic.f90 | 153 ++++++++++++--- src/CableDyn_OpenFAST_HermiteFMF.f90 | 25 +++ tests/test_bending_damping_deck.f90 | 64 +++++- tests/test_hermite_load_power.f90 | 17 +- tests/test_hermite_mass_damping.f90 | 203 ++++++++++++++++++++ tests/test_hermite_mass_damping_dynamic.f90 | 170 ++++++++++++++++ 18 files changed, 950 insertions(+), 94 deletions(-) create mode 100644 tests/test_hermite_mass_damping.f90 create mode 100644 tests/test_hermite_mass_damping_dynamic.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index bc87f147..3fd2c679 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,15 @@ All notable changes to CableDyn are recorded in this file. The format follows ### Added +- Rayleigh damping of finite-EI cables: the LINE TYPES EI column takes `EI|-zeta|f1|f2`, the + damping ratio `zeta` at the two frequencies `f1` and `f2` [Hz]. Beside the bending damping + `Bb = zeta EI/(pi (f1 + f2))` it adds a mass-proportional transverse damping + `alpha = 4 pi zeta f1 f2/(f1 + f2)` [1/s], the force `alpha m` on the velocity normal to the + tangent, so a mode has `zeta(omega) = alpha/(2 omega) + omega Bb/(2 EI)` times its bending share + for `Bb`: `zeta` at `f1` and `f2` and less between them. Free decays of modes 1 to 3 of a pinned + cable match this to 0.06 %. The velocity is absolute, so rigid transverse and pendulum motion is + damped as well (more below `f1`). No new state; exact Jacobians; the work is in `DampPow`; the + Python deck reader and builder take the form. Existing decks give bit-identical outputs. - A finite-EI line may end on a `Free` point: the line's free End B, its position free in the static equilibrium and the dynamics, with the point's Mass/Vol/CdA/Ca acting on the end node as an attachment (a free-hanging cable or riser with a clump). The static solve holds the end on diff --git a/CMakeLists.txt b/CMakeLists.txt index 31307a6c..6f36ba4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -774,7 +774,15 @@ add_executable(test_hermite_bending_damping_dynamic tests/test_hermite_bending_d target_link_libraries(test_hermite_bending_damping_dynamic PRIVATE cabledyn_core) add_test(NAME hermite_bending_damping_dynamic COMMAND test_hermite_bending_damping_dynamic) set_tests_properties(hermite_bending_damping_dynamic PROPERTIES LABELS "fortran;unit;dynamic;damping") -# Bending damping on a deck (EI|Bb, EI|-zeta|f): resolution, effect and refusals end to end. +add_executable(test_hermite_mass_damping tests/test_hermite_mass_damping.f90) +target_link_libraries(test_hermite_mass_damping PRIVATE cabledyn_core) +add_test(NAME hermite_mass_damping COMMAND test_hermite_mass_damping) +set_tests_properties(hermite_mass_damping PROPERTIES LABELS "fortran;unit;damping") +add_executable(test_hermite_mass_damping_dynamic tests/test_hermite_mass_damping_dynamic.f90) +target_link_libraries(test_hermite_mass_damping_dynamic PRIVATE cabledyn_core) +add_test(NAME hermite_mass_damping_dynamic COMMAND test_hermite_mass_damping_dynamic) +set_tests_properties(hermite_mass_damping_dynamic PROPERTIES LABELS "fortran;unit;dynamic;damping") +# Bending damping on a deck (EI|Bb, EI|-zeta|f, EI|-zeta|f1|f2): resolution, effect and refusals end to end. add_executable(test_bending_damping_deck tests/test_bending_damping_deck.f90) target_link_libraries(test_bending_damping_deck PRIVATE cabledyn_core) add_test(NAME bending_damping_deck COMMAND test_bending_damping_deck) @@ -3554,6 +3562,8 @@ if(CABLEDYN_ENABLE_COVERAGE) test_hermite_axial_damping test_hermite_bending_damping test_hermite_bending_damping_dynamic + test_hermite_mass_damping + test_hermite_mass_damping_dynamic test_bending_damping_deck test_hermite_cable_control test_control_torsion diff --git a/doc/capabilities.rst b/doc/capabilities.rst index 91070678..6cca977d 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -119,6 +119,11 @@ Line and constitutive capability - a bending Kelvin–Voigt damping on the curvature rate (stiffness-proportional in ``EI``; a mode is damped in its bending share), on every dynamic route that carries the cable, beside the axial (``BA``) and torsional (``GJ|K|Bt``) damping (:doc:`theory`) + * - Rayleigh damping of finite-EI cables (``EI|-zeta|f1|f2``) + - Supported + - the bending damping plus a mass-proportional transverse damping ``alpha m`` on the + velocity normal to the tangent, holding a damping ratio at two frequencies; absolute + velocity, so rigid transverse and pendulum motion is damped too (:doc:`theory`) * - Hockling loops, nonlinear cross-section laws - Not provided - the buckling onset and the post-buckled shape are computed, but a loop that closes on diff --git a/doc/driver_format.md b/doc/driver_format.md index 9ab410a5..ea2569da 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -244,7 +244,7 @@ Inside OUTPUTS, a row whose first token is `END` also closes the channel list. | `MassDenInAir` | dry mass per unstretched metre [kg/m] | submerged weight = (m − ρ_w·πd²/4)·g; its magnitude at most 1e6 where used | | `EA` | axial stiffness [N] | linear (T = EA·ε); at least 1e-3 and at most 1e15 where used; see the viscoelastic and Syrope forms below | | `BA/-zeta` | axial damping: ≥ 0 is BA [N·s], < 0 is −ζ (damping ratio): by default (MoorDyn's convention) of each segment, BA = ζ L0 √(EA m) per element, which damps the line's first axial mode at about ζ π/(2N) on N elements and so depends on the mesh (a run notes the ratio); under `mode1 axialDampingRatio` of the line's first axial mode, on any mesh (see the OPTIONS table) | active in EI = 0 and finite-EI dynamics; ignored in a static-only run | -| `EI` | bending stiffness [N·m²]; `EI|Bb` or `EI|-zeta|f` adds bending damping (below) | finite and ≥ 0; see [EI routing](#ei-routing) | +| `EI` | bending stiffness [N·m²]; `EI|Bb` or `EI|-zeta|f` adds bending damping, `EI|-zeta|f1|f2` Rayleigh damping (below) | finite and ≥ 0; see [EI routing](#ei-routing) | | `Cd_n`, `Cd_t` | normal / tangential drag coefficients | used by EI = 0 dynamic current and Airy-wave runs | | `Ca_n`, `Ca_t` | normal / tangential added-mass coefficients | used by EI = 0 dynamic Froude–Krylov and added-mass runs | @@ -295,6 +295,17 @@ frequency `f` [Hz], `Bb = ζ EI/(π f)`, set once per line type (it does not dep `EI|0` is the plain `EI`. It needs `EI > 0` and acts in the dynamics only (a static solve has no rates). +**Rayleigh damping.** `EI|-zeta|f1|f2` gives the ratio `0 < ζ < 1` at two frequencies `f1` and `f2` +[Hz]: beside the bending damping `Bb = ζ EI/(π (f1 + f2))` it adds a mass-proportional transverse +damping `α = 4π ζ f1 f2/(f1 + f2)` [1/s], the force `α m` (`m` the line's mass per metre) on the +velocity normal to the cable's tangent (see [Mass-proportional damping](theory.rst)). A mode then +has `ζ(ω) = α/(2ω) + ω Bb/(2 EI) · EI k²/(EI k² + T)`: `ζ` at `f1` and `f2` for a mode whose +stiffness is all bending, less between them and more outside. In water the `α` share falls with +the added mass, `m/(m + m_a)`. The velocity is absolute, so the term also damps the rigid +transverse motion and pendulum swing of a span, increasingly below `f1` (`α/(2ω)`): set `f1` at +the lowest frequency of interest. It needs `EI > 0`, is set once per line type and acts in the +dynamics only. + **Cross-flow VIV columns (MoorDyn v2).** A 10-column row may end with `Cl` (11 columns) or `Cl dF cF` (13 columns), and a 14-column row likewise (15 or 17 columns, so a line restrained in torsion can carry VIV): the lift coefficient of the vortex-shedding synchronisation model and @@ -1924,7 +1935,7 @@ bending moment. None of these channels is mandatory. | `Twist` | line L total twist `Phi − Theta = M C`, end-spring windup included; on a line free at one end the twist of its elements, the free end's turn. Only on a line solved in torsion | deg | | `VIVPow` | line L power of the VIV loads (cross-flow lift, and the in-line force of a `VIV` section row) at the committed state, positive into the line ([Outputs](outputs.rst)); 0 in static runs | W | | `DragPow` | line L power of the Morison drag (and, on a finite-EI line, its ATTACHMENTS' drag) | W | -| `DampPow` | line L power of the structural damping (`BA`, and `EI|Bb` on a finite-EI line); never positive | W | +| `DampPow` | line L power of the structural damping (`BA`, and `EI|Bb` and the mass-proportional part of `EI|-zeta|f1|f2` on a finite-EI line); never positive | W | | `VIVPowN`, `DragPowN`, `DampPowN` | the same per unit unstretched length about node J (node J's share: half of each of its elements' power and its own node loads', over half their unstretched length) | W/m | | `VIVAmpN` | line L smoothed cross-flow amplitude estimate at node J (Thorsen et al. 2016, Eq. 9), which a [VIV AMPLITUDE](#viv-amplitude-optional) table reads; only on a line with such a table; 0 at a node without VIV | m | diff --git a/doc/outputs.rst b/doc/outputs.rst index 988ff65e..613ba747 100644 --- a/doc/outputs.rst +++ b/doc/outputs.rst @@ -890,7 +890,8 @@ committed state, positive when the load puts energy into the line: - W * - ``DampPow`` - power of the structural damping: the axial dashpot ``BA`` and, on a finite-EI line, the - bending dashpot (``EI|Bb``); never positive + bending dashpot (``EI|Bb``) and the mass-proportional damping (``EI|-zeta|f1|f2``); never + positive - W * - ``VIVPowN``, ``DragPowN``, ``DampPowN`` - the same per unit unstretched length about node ``J`` diff --git a/doc/theory.rst b/doc/theory.rst index eec0d442..7c6d70f3 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -916,6 +916,78 @@ pinned cable reproduces this ratio to 0.05 % in the bending- and tension-dominat (``test_hermite_bending_damping_dynamic``). The force joins the axial damping as the structural damping load (it is in the reported end forces, not in the elastic ``BendMom`` output). +.. _theory-mass-damping: + +Mass-proportional (Rayleigh) damping +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The bending damping alone gives :math:`\zeta \propto \omega`: a ratio set at one frequency is too +low below it and too high above it, so a broad VIV band cannot hold one :math:`\zeta`. The form +``EI|-zeta|f1|f2`` (LINE TYPES) adds a mass-proportional term, which makes the pair a Rayleigh +damping :math:`\alpha\,\mathbf M + \beta\,\mathbf K_b` with :math:`\beta = B_b/EI`. With +:math:`\mathbf v = \dot{\mathbf r}` the velocity interpolated by the shape functions of the +consistent mass and :math:`m` the line's mass per unstretched length (``MassDenInAir``, with a +stiffener sleeve's where ``STIFFENERS`` adds one), the +element's dissipation function is + +.. math:: + + \psi_\alpha = \int_0^{L_0} \tfrac{1}{2}\,\alpha\,m\, + \lvert(\mathbf{I} - \mathbf{t}\mathbf{t}^\mathsf{T})\,\mathbf v\rvert^2\,\mathrm{d}s , + +and the damping force is :math:`\mathbf f_\alpha = \partial\psi_\alpha/\partial\dot{\mathbf q} = +\int_0^{L_0} \alpha\,m\,\mathbf N^\mathsf{T}(\mathbf I - \mathbf t\mathbf t^\mathsf{T})\,\mathbf v\,\mathrm ds` +(:math:`\mathbf N` the cubic-Hermite position shape functions, four-point Gauss rule as the mass). +Its velocity Jacobian :math:`\int \alpha m\,\mathbf N^\mathsf{T}(\mathbf I - \mathbf t\mathbf t^\mathsf{T}) +\mathbf N\,\mathrm ds` is symmetric; its position Jacobian follows from +:math:`\partial\mathbf t/\partial\mathbf r' = (\mathbf I - \mathbf t\mathbf t^\mathsf{T})/\lvert\mathbf r'\rvert`, + +.. math:: + + \frac{\partial \mathbf f_\alpha}{\partial \mathbf q} = -\int_0^{L_0} \frac{\alpha\,m}{\lvert\mathbf r'\rvert}\, + \mathbf N^\mathsf{T}\Big[(\mathbf I - \mathbf t\mathbf t^\mathsf{T})(\mathbf t\cdot\mathbf v) + + \mathbf t\,\big((\mathbf I - \mathbf t\mathbf t^\mathsf{T})\mathbf v\big)^\mathsf{T}\Big]\, + \mathbf N_{,s}\,\mathrm ds , + +so the Newton tangent stays exact. On a straight span the force is :math:`\alpha\,\mathbf M\,\mathbf v` +in the two transverse directions and zero along the axis: axial motion is left to ``BA``. A +transverse mode whose modal mass is the line's own is damped at :math:`\alpha/(2\omega)`, and with +the bending damping the ratio is + +.. math:: + + \zeta(\omega) = \frac{\alpha}{2\,\omega} + \frac{\omega\,B_b}{2\,EI}\;\frac{EI\,k^2}{EI\,k^2 + T} . + +``EI|-zeta|f1|f2`` sets + +.. math:: + + B_b = \frac{\zeta\,EI}{\pi\,(f_1 + f_2)}, \qquad \alpha = \frac{4\pi\,\zeta\,f_1 f_2}{f_1 + f_2} , + +so a mode whose stiffness is all bending has the ratio :math:`\zeta` at :math:`f_1` and +:math:`f_2`, less between them (at least :math:`2\zeta\sqrt{f_1 f_2}/(f_1 + f_2)`, at +:math:`\sqrt{f_1 f_2}`) and more outside. Free decays of modes 1, 2 and 3 of a pinned cable +reproduce :math:`\zeta(\omega)` for :math:`\alpha` alone, :math:`B_b` alone and both to 0.06 %, and +the target at :math:`f_1` and :math:`f_2` to 0.03 % (``test_hermite_mass_damping_dynamic``). +The +ratio is lower in two cases: :math:`B_b` damps a mode with tension in its bending share only, and +:math:`\alpha` damps a mode in water in the share :math:`m/(m + m_a)` of its modal mass, since the +added mass :math:`m_a` (and an attachment's mass) is not in :math:`\alpha\,\mathbf M`. + +The velocity is absolute (the earth frame), as in the usual Rayleigh model. The term therefore +damps a rigid transverse translation and the pendulum swing of a span, and it opposes the +transverse motion a moving fairlead imposes, as a linear drag :math:`\alpha m\,\mathbf v_n` would in +still water. Its ratio :math:`\alpha/(2\omega)` grows as the frequency falls, so motions well below +:math:`f_1` (slow drift, a moored line's pendulum and the low-frequency response of a coupled +floater) are damped more than the target; set :math:`f_1` at the lowest frequency the analysis +must resolve and compare the low-frequency response against the run without the pair. A velocity +relative to the cable's filtered motion (the frame :ref:`theory-viv-frame` uses) would exempt +slow motions, but it adds a filter state, lags the damping and replaces :math:`\alpha/(2\omega)` +by a factor that depends on the filter, so the pair would no longer hold :math:`\zeta` at +:math:`f_1`; CableDyn keeps the absolute velocity and no state. The force joins the structural +damping load beside ``BA`` and :math:`B_b` (the end forces and ``DampPow`` carry it). ``EI = 0`` +lines have no counterpart: the form needs a finite-EI cable, as the bending damping does. + Viscoelastic rope (MoorDyn ``ElasticMod`` 2 and 3) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index e0bed973..672c70f2 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -195,7 +195,9 @@ class LineType: Bending stiffness, in N m^2; ``(EI, Bb)`` adds the bending damping ``Bb`` in N m^2 s (written ``EI|Bb``), and ``(EI, -zeta, f)`` gives it as the damping ratio ``zeta`` of a bending mode of frequency ``f`` in Hz - (written ``EI|-zeta|f``; ``Bb = zeta EI / (pi f)``). + (written ``EI|-zeta|f``; ``Bb = zeta EI / (pi f)``); ``(EI, -zeta, f1, f2)`` + adds the mass-proportional damping ``alpha`` beside ``Bb``, the Rayleigh + pair that holds ``zeta`` at ``f1`` and ``f2`` (written ``EI|-zeta|f1|f2``). cdn, cdt, can, cat : float Normal and tangential drag and added-mass coefficients. gas, gj, irt, irn : float | None @@ -2768,8 +2770,10 @@ def _line_type_table(self) -> tuple[str, str, list[list[str]]]: row.append(f'"{_render(ea)}"') else: row.append(_multi(item.ea, what)) - if isinstance(item.ei, tuple) and len(item.ei) not in (2, 3): - raise ValueError(f"{what}: ei is EI, (EI, Bb) or (EI, -zeta, f)") + if isinstance(item.ei, tuple) and len(item.ei) not in (2, 3, 4): + raise ValueError( + f"{what}: ei is EI, (EI, Bb), (EI, -zeta, f) or (EI, -zeta, f1, f2)" + ) row += [_multi(item.ba, what), _multi(item.ei, what)] extra = (item.gas, item.gj, item.irt, item.irn) if all(value is not None for value in extra): diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index 3b2b5d33..bec0fbb8 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -4195,7 +4195,7 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: if len(row.tokens) >= 14 and index == 7: continue # the GJ column, GJ, GJ|K or GJ|K|Bt, is read below if index == 5: - continue # the EI column, EI, EI|Bb or EI|-zeta|f, is read below + continue # the EI column (EI, EI|Bb, EI|-zeta|f, EI|-zeta|f1|f2) is read below numeric(row.tokens[index], row, f"LINE TYPES column {index + 1}") ea_parts = row.tokens[3].split("|") ba_parts = row.tokens[4].split("|") @@ -4257,12 +4257,13 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: f"{self._at(row)}: LINE TYPES drag and added-mass coefficients " "(Cd_n Cd_t Ca_n Ca_t) must be non-negative" ) - # native parse_ei_column: EI, EI|Bb (bending damping, N m^2 s) or EI|-zeta|f + # native parse_ei_column: EI, EI|Bb (bending damping, N m^2 s), EI|-zeta|f or + # EI|-zeta|f1|f2 (the Rayleigh pair of Bb and the mass-proportional alpha) ei_parts = row.tokens[5].split("|") - if len(ei_parts) > 3: + if len(ei_parts) > 4: raise DeckFormatError( - f'{self._at(row)}: LINE TYPES EI column "{row.tokens[5]}" takes EI, EI|Bb ' - "or EI|-zeta|f" + f'{self._at(row)}: LINE TYPES EI column "{row.tokens[5]}" takes EI, EI|Bb, ' + "EI|-zeta|f or EI|-zeta|f1|f2" ) ei = numeric(ei_parts[0], row, "EI") bend_damping = 0.0 @@ -4287,9 +4288,24 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: "of EI|-zeta|f must be positive [Hz]" ) bend_damping = -ratio * ei / (math.pi * frequency) - # a damping asked for (the ratio form, or Bb > 0) needs a finite EI: on EI = 0 the + elif len(ei_parts) == 4: + ratio = numeric(ei_parts[1], row, "EI|-zeta|f1|f2 ratio") + f_one = numeric(ei_parts[2], row, "EI|-zeta|f1|f2 frequency f1") + f_two = numeric(ei_parts[3], row, "EI|-zeta|f1|f2 frequency f2") + if not -1.0 < ratio < 0.0: + raise DeckFormatError( + f'{self._at(row)}: LINE TYPES EI column "{row.tokens[5]}": ' + "EI|-zeta|f1|f2 takes a damping ratio 0 < zeta < 1, written negative" + ) + if not (f_one > 0.0 and f_two > 0.0): + raise DeckFormatError( + f'{self._at(row)}: LINE TYPES EI column "{row.tokens[5]}": the ' + "frequencies f1 and f2 of EI|-zeta|f1|f2 must be positive [Hz]" + ) + bend_damping = -ratio * ei / (math.pi * (f_one + f_two)) + # a damping asked for (a ratio form, or Bb > 0) needs a finite EI: on EI = 0 the # ratio form resolves to Bb = 0 and would pass unnoticed - if (len(ei_parts) == 3 or bend_damping > 0.0) and not ei > 0.0: + if (len(ei_parts) >= 3 or bend_damping > 0.0) and not ei > 0.0: raise DeckFormatError( f"{self._at(row)}: LINE TYPES {row.tokens[0]}: bending damping (EI|Bb) needs " "a finite-EI cable (EI > 0)" diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index 7a887fad..d1caf635 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -1155,7 +1155,7 @@ def test_torsional_damping_round_trips_in_the_gj_column(tmp_path: Path) -> None: assert next(t for t in loaded.line_types if t.name == "cable").gj == (1.0e4, 0.0, -0.02) -@pytest.mark.parametrize("ei", [(1.0e4, 250.0), (1.0e4, -0.02, 1.5)]) +@pytest.mark.parametrize("ei", [(1.0e4, 250.0), (1.0e4, -0.02, 1.5), (1.0e4, -0.02, 0.5, 2.0)]) def test_bending_damping_round_trips_in_the_ei_column( tmp_path: Path, ei: tuple[float, ...] ) -> None: @@ -1232,8 +1232,10 @@ def test_no_viv_section_without_inline_viv(tmp_path: Path) -> None: def test_bending_damping_ei_tuple_length_is_checked(tmp_path: Path) -> None: model = _chain_model(tmp_path) - model.add_line_type("cable", diam=0.2, mass=40.0, ea=5.0e8, ei=(1.0e4, 1.0, 2.0, 3.0)) - with pytest.raises(ValueError, match=r"ei is EI, \(EI, Bb\) or \(EI, -zeta, f\)"): + model.add_line_type("cable", diam=0.2, mass=40.0, ea=5.0e8, ei=(1.0e4, -0.02, 1.0, 2.0, 3.0)) + with pytest.raises( + ValueError, match=r"ei is EI, \(EI, Bb\), \(EI, -zeta, f\) or \(EI, -zeta, f1, f2\)" + ): model.to_text() diff --git a/python/tests/test_deck_native_parity.py b/python/tests/test_deck_native_parity.py index 47bfe11e..3f02b2f0 100644 --- a/python/tests/test_deck_native_parity.py +++ b/python/tests/test_deck_native_parity.py @@ -958,7 +958,7 @@ def test_stiffener_rows_are_native(row, message): @pytest.mark.parametrize( "ei", - ["1.99e4|250.0", "1.99e4|0", "1.99e4|-0.02|1.5"], + ["1.99e4|250.0", "1.99e4|0", "1.99e4|-0.02|1.5", "1.99e4|-0.02|0.5|2.0"], ) def test_bending_damping_forms_are_accepted(ei): DeckFile.from_text( @@ -969,7 +969,10 @@ def test_bending_damping_forms_are_accepted(ei): @pytest.mark.parametrize( ("ei", "message"), [ - ("1.99e4|1|2|3", "takes EI, EI|Bb or EI|-zeta|f"), + ("1.99e4|-0.02|1|2|3", "takes EI, EI|Bb, EI|-zeta|f or EI|-zeta|f1|f2"), + ("1.99e4|0.02|0.5|2.0", "EI|-zeta|f1|f2 takes a damping ratio 0 < zeta < 1"), + ("1.99e4|-0.02|0.5|0", "frequencies f1 and f2 of EI|-zeta|f1|f2 must be positive"), + ("0.0|-0.02|0.5|2.0", "bending damping (EI|Bb) needs a finite-EI cable"), ("1.99e4|-250.0", "a negative bending damping is -zeta and needs the frequency"), ("1.99e4|0.02|1.5", "takes a damping ratio 0 < zeta < 1, written negative"), ("1.99e4|-1.5|1.5", "takes a damping ratio 0 < zeta < 1, written negative"), diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 10a15ce7..ec8a5e24 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -79,7 +79,7 @@ MODULE CableDyn_DeckDriver USE CableDyn_HermiteCable, ONLY: CD_HermiteCable_Curvature, & CD_HermiteCable_Peak_Curvature, CD_HermiteCable_Axial_Resultant, & CD_HermiteCable_Axial_Resultant_Range, CD_HermiteCable_Element, CD_HCABLE_OK, & - CD_HCABLE_BADINPUT, CD_HermiteCable_Gauss_Rule + CD_HCABLE_BADINPUT, CD_HermiteCable_Gauss_Rule, CD_HermiteCable_Rayleigh_Pair USE CableDyn_HermiteCableStatic, ONLY: CD_HermiteCable_Static_Solve_AutoMesh, CD_HermiteCable_Static_Solve, & CD_HermiteCable_Prolong_Arc, CD_HermiteCable_Kink_Advice, & CD_HermiteCable_Element_Ratio, CD_HC_OSCILLATION_REL_TOL, & @@ -127,6 +127,7 @@ MODULE CableDyn_DeckDriver USE CableDyn_OpenFAST_HermiteFMF, ONLY: CD_HFMF_ModuleType, CD_HFMF_Init, CD_HFMF_Set_Drag, & CD_HFMF_Set_Section_Reference, CD_HFMF_Section_Curvature, & CD_HFMF_Set_Axial_Damping, CD_HFMF_Set_Bending_Damping, & + CD_HFMF_Set_Mass_Damping, & CD_HFMF_Set_AddedMass, CD_HFMF_Set_ModifiedNewton, & CD_HFMF_Set_Tensile_Monitor, CD_HFMF_Get_Tensile_Diagnostics, & CD_HFMF_Get_Recovery_Diagnostics, & @@ -420,6 +421,10 @@ MODULE CableDyn_DeckDriver ! curvature rate (CD_HermiteCable_Bending_Damping), resolved from EI|-zeta|f (zeta at the ! frequency f [Hz] of a bending mode, Bb = zeta EI/(pi f)) when the row gives a ratio REAL(wp) :: bb = CD_ZERO + ! mass-proportional (Rayleigh alpha) transverse damping [1/s] of a finite-EI cable, the force + ! ralpha m on the velocity normal to the tangent (CD_HermiteCable_Mass_Damping); with bb, resolved + ! from EI|-zeta|f1|f2 (zeta at f1 and f2 [Hz], CD_HermiteCable_Rayleigh_Pair) + REAL(wp) :: ralpha = CD_ZERO REAL(wp) :: i_rt = CD_ZERO, i_rn = CD_ZERO REAL(wp) :: cdn = CD_ZERO, cdt = CD_ZERO, can = CD_ZERO, cat = CD_ZERO ! Viscoelastic stiffness (MoorDyn ElasticMod): the EA column's bar-separated @@ -1923,7 +1928,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :), viv_dva(:), cdy_a(:), cdy_b(:), cdy_c(:) INTEGER, ALLOCATABLE :: viv_ampn(:) REAL(wp), ALLOCATABLE :: wo_cl0(:), wo_st(:), wo_eps(:), wo_a(:), wo_tf(:) - REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:) + REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:), ra_el(:) REAL(wp) :: mode1_omega REAL(wp), ALLOCATABLE :: contact_kn(:), contact_cn(:) REAL(wp) :: anchor(3), fairlead(3), res, tvec(3), tnrm, contact_z, seed_z, seed_floor_a, seed_floor_b @@ -2265,8 +2270,8 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, IF (LEN_TRIM(fine_note) > 0 .AND. standalone_mode) WRITE (error_unit, '(A)') ' Note: '//TRIM(fine_note)//'.' ALLOCATE (ba_raw(SIZE(l0))) CALL finite_raw_ba_array(ln, sections, types, ba_raw) - ALLOCATE (bb_el(SIZE(l0))) - CALL finite_bb_array(ln, sections, types, bb_el) + ALLOCATE (bb_el(SIZE(l0)), ra_el(SIZE(l0))) + CALL finite_bb_array(ln, sections, types, bb_el, ra_el) nnode = SIZE(l0) + 1 ndof = 6*nnode ALLOCATE (w(SIZE(l0)), nodes_ref(3, nnode), q0(ndof)) @@ -3354,6 +3359,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL remap_elem_by_reference_arc(cat, l0, l0_am) CALL remap_elem_by_reference_arc(ba_raw, l0, l0_am) CALL remap_elem_by_reference_arc(bb_el, l0, l0_am) + CALL remap_elem_by_reference_arc(ra_el, l0, l0_am) IF (ALLOCATED(ei_cable)) CALL remap_elem_by_reference_arc(ei_cable, l0, l0_am) END IF ! The node output channels read deck nodes: map each onto the final mesh (set on the cable @@ -3579,6 +3585,12 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL fail(ErrStat, ErrMsg, 'finite-EI cable bending-damping wiring failed: '//TRIM(em)); RETURN END IF END IF + IF (ANY(ra_el > CD_ZERO)) THEN + CALL CD_HFMF_Set_Mass_Damping(cable, ra_el, es, em) + IF (es /= CD_HFMF_OK) THEN + CALL fail(ErrStat, ErrMsg, 'finite-EI cable mass-damping wiring failed: '//TRIM(em)); RETURN + END IF + END IF IF (ANY(endconn_mode /= CD_ENDCONN_PINNED)) THEN ! a connected moving End B is attached to its own parent (end_b_d0_parent), as End A to its IF (moving_b .AND. endconn_mode(1) /= CD_ENDCONN_PINNED .AND. endconn_mode(2) /= CD_ENDCONN_PINNED) THEN @@ -11654,12 +11666,13 @@ SUBROUTINE finite_raw_ba_array(ln, sections, types, ba_raw) ba_raw = ba_raw(SIZE(ba_raw):1:-1) END SUBROUTINE finite_raw_ba_array - SUBROUTINE finite_bb_array(ln, sections, types, bb) - !! The line types' bending damping Bb [N m^2 s] on the deck elements (internal order). + SUBROUTINE finite_bb_array(ln, sections, types, bb, ralpha) + !! The line types' bending damping Bb [N m^2 s] and mass-proportional damping alpha [1/s] on + !! the deck elements (internal order). TYPE(DeckLine), INTENT(IN) :: ln TYPE(DeckSection), INTENT(IN) :: sections(:) TYPE(DeckLineType), INTENT(IN) :: types(:) - REAL(wp), INTENT(OUT) :: bb(:) + REAL(wp), INTENT(OUT) :: bb(:), ralpha(:) INTEGER :: i, j, e e = 0 DO i = 1, SIZE(sections) @@ -11667,9 +11680,11 @@ SUBROUTINE finite_bb_array(ln, sections, types, bb) DO j = 1, sections(i)%nsegs e = e + 1 bb(e) = types(sections(i)%ltype)%bb + ralpha(e) = types(sections(i)%ltype)%ralpha END DO END DO bb = bb(SIZE(bb):1:-1) + ralpha = ralpha(SIZE(ralpha):1:-1) END SUBROUTINE finite_bb_array SUBROUTINE finite_line_type_ei(ln, sections, types, ei) @@ -16097,54 +16112,69 @@ END SUBROUTINE sniff_types_header SUBROUTINE parse_ei_column(ei_str, t, ErrStat, ErrMsg) !! The LINE TYPES EI column: EI, EI|Bb with Bb >= 0 the bending damping [N m^2 s] (the moment - !! Bb times the curvature rate), or EI|-zeta|f with 0 < zeta < 1 the damping ratio of a bending - !! mode of frequency f [Hz] whose energy is all bending, Bb = zeta EI/(pi f). Bending damping - !! needs a finite-EI cable (EI > 0). + !! Bb times the curvature rate), EI|-zeta|f with 0 < zeta < 1 the damping ratio of a bending + !! mode of frequency f [Hz] whose energy is all bending, Bb = zeta EI/(pi f), or EI|-zeta|f1|f2, + !! the Rayleigh pair of the bending damping Bb and the mass-proportional damping alpha [1/s] + !! that holds zeta at f1 and f2 (CD_HermiteCable_Rayleigh_Pair). Damping needs a finite-EI + !! cable (EI > 0). CHARACTER(*), INTENT(IN) :: ei_str TYPE(DeckLineType), INTENT(INOUT) :: t INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - INTEGER :: bar, bar2, ios - REAL(wp) :: second, freq + INTEGER :: bars(3), nbar, k, ios + REAL(wp) :: second, freq, freq2 REAL(wp), PARAMETER :: PI_L = 3.14159265358979323846_wp + CHARACTER(*), PARAMETER :: FORMS = 'EI, EI|Bb, EI|-zeta|f or EI|-zeta|f1|f2' ErrStat = 0; ErrMsg = '' t%bb = CD_ZERO + t%ralpha = CD_ZERO second = CD_ZERO freq = CD_ZERO - bar = INDEX(ei_str, '|') - bar2 = 0 - IF (bar == 0) THEN + freq2 = CD_ZERO + ! the bar positions; a fourth bar is refused + nbar = 0 + bars = 0 + DO k = 1, LEN_TRIM(ei_str) + IF (ei_str(k:k) /= '|') CYCLE + IF (nbar == 3) THEN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'" takes '//FORMS); RETURN + END IF + nbar = nbar + 1 + bars(nbar) = k + END DO + SELECT CASE (nbar) + CASE (0) READ (ei_str, *, IOSTAT=ios) t%ei - ELSE - bar2 = INDEX(ei_str(bar + 1:), '|') - IF (bar2 > 0) THEN - bar2 = bar + bar2 - IF (INDEX(ei_str(bar2 + 1:), '|') > 0) THEN - CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'" takes EI, EI|Bb or EI|-zeta|f'); RETURN - END IF - END IF - READ (ei_str(1:bar - 1), *, IOSTAT=ios) t%ei - IF (bar2 > 0) THEN - IF (ios == 0) READ (ei_str(bar + 1:bar2 - 1), *, IOSTAT=ios) second - IF (ios == 0) READ (ei_str(bar2 + 1:), *, IOSTAT=ios) freq - ELSE - IF (ios == 0) READ (ei_str(bar + 1:), *, IOSTAT=ios) second - END IF - END IF + CASE (1) + READ (ei_str(1:bars(1) - 1), *, IOSTAT=ios) t%ei + IF (ios == 0) READ (ei_str(bars(1) + 1:), *, IOSTAT=ios) second + CASE (2) + READ (ei_str(1:bars(1) - 1), *, IOSTAT=ios) t%ei + IF (ios == 0) READ (ei_str(bars(1) + 1:bars(2) - 1), *, IOSTAT=ios) second + IF (ios == 0) READ (ei_str(bars(2) + 1:), *, IOSTAT=ios) freq + CASE DEFAULT + READ (ei_str(1:bars(1) - 1), *, IOSTAT=ios) t%ei + IF (ios == 0) READ (ei_str(bars(1) + 1:bars(2) - 1), *, IOSTAT=ios) second + IF (ios == 0) READ (ei_str(bars(2) + 1:bars(3) - 1), *, IOSTAT=ios) freq + IF (ios == 0) READ (ei_str(bars(3) + 1:), *, IOSTAT=ios) freq2 + END SELECT IF (ios /= 0) THEN - CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'" is not EI, EI|Bb or EI|-zeta|f'); RETURN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'" is not '//FORMS); RETURN END IF - IF (.NOT. (IEEE_IS_FINITE(t%ei) .AND. IEEE_IS_FINITE(second) .AND. IEEE_IS_FINITE(freq))) THEN + IF (.NOT. (IEEE_IS_FINITE(t%ei) .AND. IEEE_IS_FINITE(second) .AND. IEEE_IS_FINITE(freq) .AND. & + IEEE_IS_FINITE(freq2))) THEN CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'" must be finite'); RETURN END IF - IF (bar == 0) RETURN - IF (bar2 == 0) THEN + SELECT CASE (nbar) + CASE (0) + RETURN + CASE (1) IF (second < CD_ZERO) THEN CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'": a negative bending damping is '// & '-zeta and needs the frequency it holds at, EI|-zeta|f'); RETURN END IF t%bb = second - ELSE + CASE (2) IF (.NOT. (second < CD_ZERO .AND. second > -CD_ONE)) THEN CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'": EI|-zeta|f takes a damping '// & 'ratio 0 < zeta < 1, written negative'); RETURN @@ -16154,10 +16184,20 @@ SUBROUTINE parse_ei_column(ei_str, t, ErrStat, ErrMsg) 'EI|-zeta|f must be positive [Hz]'); RETURN END IF t%bb = -second*t%ei/(PI_L*freq) - END IF + CASE DEFAULT + IF (.NOT. (second < CD_ZERO .AND. second > -CD_ONE)) THEN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'": EI|-zeta|f1|f2 takes a '// & + 'damping ratio 0 < zeta < 1, written negative'); RETURN + END IF + IF (.NOT. (freq > CD_ZERO .AND. freq2 > CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'LINE TYPES EI column "'//TRIM(ei_str)//'": the frequencies f1 and f2 of '// & + 'EI|-zeta|f1|f2 must be positive [Hz]'); RETURN + END IF + CALL CD_HermiteCable_Rayleigh_Pair(-second, freq, freq2, t%ei, t%bb, t%ralpha) + END SELECT ! a damping asked for (a ratio form, or Bb > 0) needs a finite EI: on EI = 0 the ratio form would ! resolve to Bb = 0 and the request would pass unnoticed - IF ((bar2 > 0 .OR. t%bb > CD_ZERO) .AND. .NOT. (t%ei > CD_ZERO)) THEN + IF ((nbar >= 2 .OR. t%bb > CD_ZERO) .AND. .NOT. (t%ei > CD_ZERO)) THEN CALL fail(ErrStat, ErrMsg, 'LINE TYPES '//TRIM(t%name)//': bending damping (EI|Bb) needs a '// & 'finite-EI cable (EI > 0)'); RETURN END IF diff --git a/src/CableDyn_HermiteCable.f90 b/src/CableDyn_HermiteCable.f90 index 39c08462..f3b32c68 100644 --- a/src/CableDyn_HermiteCable.f90 +++ b/src/CableDyn_HermiteCable.f90 @@ -45,6 +45,8 @@ MODULE CableDyn_HermiteCable PUBLIC :: CD_HermiteCable_Gauss_Rule PUBLIC :: CD_HermiteCable_Dry_Buoyancy PUBLIC :: CD_HermiteCable_Bending_Damping + PUBLIC :: CD_HermiteCable_Mass_Damping + PUBLIC :: CD_HermiteCable_Rayleigh_Pair INTEGER, PARAMETER, PUBLIC :: CD_HCABLE_OK = 0, CD_HCABLE_BADINPUT = 1 INTEGER, PARAMETER :: NG = 4 !! default Gauss points per element @@ -615,6 +617,129 @@ END SUBROUTINE fail END SUBROUTINE CD_HermiteCable_Bending_Damping + SUBROUTINE CD_HermiteCable_Mass_Damping(qr, vr, L, cm, fdamp, Kq, Kv, ErrStat, ErrMsg) + !! Mass-proportional (Rayleigh alpha) transverse damping of one cubic-Hermite element: the + !! dissipation function + !! psi = integral_0^L 1/2 cm |(I - t t^T) v|^2 ds, cm = alpha rho_a [N s/m^2], + !! with v = dr/dt the interpolated velocity (the shape functions of the consistent mass), t = + !! a/|a| the unit tangent (a = dr/ds) and s the unstretched arc length. The force is alpha + !! times the line's own mass on the velocity normal to the tangent: on a straight element it is + !! alpha M v in the two transverse directions (M the consistent mass, CD_HermiteCable_Mass) and + !! zero along the axis, so a transverse mode whose mass is the line's own has the damping + !! ratio alpha/(2 omega) and axial sliding is not damped. The velocity is absolute: a rigid + !! transverse translation or a pendulum swing of the line is damped as well. + !! + !! fdamp = d psi / d v is an INTERNAL generalised force (v . fdamp = 2 psi >= 0); Kq = d fdamp/dq + !! and Kv = d fdamp/dv are the exact Jacobians (Kv symmetric, Kq not). qr and vr are the element + !! DOFs [r1, m1, r2, m2] and their rates; L the unstretched length; cm >= 0. Four-point Gauss + !! quadrature, as the consistent mass. + REAL(wp), INTENT(IN) :: qr(12), vr(12), L, cm + REAL(wp), INTENT(OUT) :: fdamp(12) + REAL(wp), INTENT(OUT), OPTIONAL :: Kq(12, 12), Kv(12, 12) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + + REAL(wp) :: gp(MAX_NG), gw(MAX_NG), H(4), dH(4), ddH(4), b1(4), av(3), vv(3), tv(3), un(3) + REAL(wp) :: Pm(3, 3), Dm(3, 3), s2, sp, st, wc, wkm + INTEGER :: qg, c, dd, kn, mn, ic, jc + INTEGER, PARAMETER :: sd(4) = [0, 3, 6, 9] + + ErrStat = CD_HCABLE_OK + ErrMsg = '' + fdamp = CD_ZERO + IF (PRESENT(Kq)) Kq = CD_ZERO + IF (PRESENT(Kv)) Kv = CD_ZERO + IF (.NOT. CD_All_Finite(qr) .OR. .NOT. CD_All_Finite(vr) .OR. .NOT. CD_Is_Finite(L) .OR. & + .NOT. CD_Is_Finite(cm)) THEN + CALL fail('inputs must be finite'); RETURN + END IF + IF (L <= GEOM_TOL) THEN + CALL fail('element length must be positive'); RETURN + END IF + IF (cm < CD_ZERO) THEN + CALL fail('the damping coefficient must be non-negative'); RETURN + END IF + IF (.NOT. (cm > CD_ZERO)) RETURN + + CALL CD_HermiteCable_Gauss_Rule(NG, gp, gw) + DO qg = 1, NG + CALL hermite_shapes(gp(qg), L, H, dH, ddH) + b1 = dH/L + DO c = 1, 3 + av(c) = SUM(b1*qr(sd + c)); vv(c) = SUM(H*vr(sd + c)) + END DO + s2 = SUM(av*av) + IF (s2 <= GEOM_TOL*GEOM_TOL) THEN + CALL fail('degenerate centreline: |dr/ds| ~ 0 at a Gauss point'); RETURN + END IF + sp = SQRT(s2) + tv = av/sp + st = SUM(tv*vv) + un = vv - st*tv ! (I - t t^T) v + wc = gw(qg)*L*cm + DO kn = 1, 4 + DO c = 1, 3 + fdamp(sd(kn) + c) = fdamp(sd(kn) + c) + wc*H(kn)*un(c) + END DO + END DO + IF (.NOT. (PRESENT(Kq) .OR. PRESENT(Kv))) CYCLE + ! P = I - t t^T; D(c, k) = d (P v)_c / d a_k = -((I - t t^T)_ck (t . v) + t_c (P v)_k)/|a| + DO dd = 1, 3 + DO c = 1, 3 + Pm(c, dd) = -tv(c)*tv(dd) + END DO + Pm(dd, dd) = Pm(dd, dd) + CD_ONE + END DO + DO dd = 1, 3 + DO c = 1, 3 + Dm(c, dd) = -(Pm(c, dd)*st + tv(c)*un(dd))/sp + END DO + END DO + DO mn = 1, 4 + DO kn = 1, 4 + wkm = wc*H(kn) + DO dd = 1, 3 + jc = sd(mn) + dd + DO c = 1, 3 + ic = sd(kn) + c + IF (PRESENT(Kv)) Kv(ic, jc) = Kv(ic, jc) + wkm*H(mn)*Pm(c, dd) + IF (PRESENT(Kq)) Kq(ic, jc) = Kq(ic, jc) + wkm*b1(mn)*Dm(c, dd) + END DO + END DO + END DO + END DO + END DO + IF (.NOT. CD_All_Finite(fdamp)) THEN + CALL fail('non-finite mass damping force'); RETURN + END IF + + CONTAINS + + SUBROUTINE fail(msg) + CHARACTER(*), INTENT(IN) :: msg + ErrStat = CD_HCABLE_BADINPUT + ErrMsg = 'CD_HermiteCable_Mass_Damping: '//msg + fdamp = CD_ZERO + IF (PRESENT(Kq)) Kq = CD_ZERO + IF (PRESENT(Kv)) Kv = CD_ZERO + END SUBROUTINE fail + + END SUBROUTINE CD_HermiteCable_Mass_Damping + + PURE SUBROUTINE CD_HermiteCable_Rayleigh_Pair(zeta, f1, f2, EI, Bb, alpha) + !! The bending damping Bb [N m^2 s] and the mass-proportional coefficient alpha [1/s] that give + !! the damping ratio zeta(omega) = alpha/(2 omega) + (Bb/EI) omega/2 the value zeta at the two + !! frequencies f1 and f2 [Hz] (omega = 2 pi f): Bb = zeta EI/(pi (f1 + f2)) and + !! alpha = 4 pi zeta f1 f2/(f1 + f2). Between f1 and f2 the ratio is lower, at least + !! 2 zeta sqrt(f1 f2)/(f1 + f2) at sqrt(f1 f2); outside it is higher. The caller checks + !! 0 < zeta and f1, f2 > 0. + REAL(wp), INTENT(IN) :: zeta, f1, f2, EI + REAL(wp), INTENT(OUT) :: Bb, alpha + REAL(wp), PARAMETER :: PI_L = 3.14159265358979323846_wp + Bb = zeta*EI/(PI_L*(f1 + f2)) + alpha = 4.0_wp*PI_L*zeta*f1*f2/(f1 + f2) + END SUBROUTINE CD_HermiteCable_Rayleigh_Pair + SUBROUTINE CD_HermiteCable_Mass(rho_a, L, M, ErrStat, ErrMsg) !! Consistent (kinetic-energy) mass matrix of the cubic-Hermite bending-cable element. !! diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 7e320eef..1574aa4d 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -62,7 +62,7 @@ MODULE CableDyn_HermiteCableDynamic CD_HermiteCable_Gauss_Rule, & CD_HermiteCable_Axial_Resultant, & CD_HermiteCable_Axial_Strain_Lower_Bound, CD_HermiteCable_Dry_Buoyancy, & - CD_HermiteCable_Bending_Damping, & + CD_HermiteCable_Bending_Damping, CD_HermiteCable_Mass_Damping, & CD_HCABLE_OK USE CableDyn_Linalg, ONLY: CD_Factor_Banded, CD_Solve_Factored_Banded, CD_LINALG_OK USE CableDyn_VIV, ONLY: CD_VIV_Lift_Per_Length, CD_VIV_Crossflow_Along, CD_VIV_Phase_Rate, CD_VIV_Mean_Square, & @@ -99,6 +99,7 @@ MODULE CableDyn_HermiteCableDynamic PUBLIC :: CD_HermiteCable_Dyn_Set_Drag PUBLIC :: CD_HermiteCable_Dyn_Set_Axial_Damping PUBLIC :: CD_HermiteCable_Dyn_Set_Bending_Damping + PUBLIC :: CD_HermiteCable_Dyn_Set_Mass_Damping PUBLIC :: CD_HermiteCable_Dyn_Set_EndConnection PUBLIC :: CD_HermiteCable_Dyn_Set_Torsion PUBLIC :: CD_HermiteCable_Dyn_Torsion_State @@ -277,6 +278,11 @@ MODULE CableDyn_HermiteCableDynamic ! element-load column 2 and the Kvel tangent). Off by default. LOGICAL :: has_bend_damping = .FALSE. REAL(wp), ALLOCATABLE :: Bb(:) + ! Optional mass-proportional (Rayleigh alpha) transverse damping (CD_HermiteCable_Mass_Damping): + ! ray_alpha [1/s] per element, the force ray_alpha rho_a on the velocity normal to the tangent. + ! It joins the structural-damping load (not its bending part). No state. Off by default. + LOGICAL :: has_mass_damping = .FALSE. + REAL(wp), ALLOCATABLE :: ray_alpha(:) ! Active line control (CD_HermiteCable_Dyn_Set_SegmentLength): a host changes the ! unstretched lengths l0 of chosen elements between steps. has_ctrl is set by the first ! change; from then on l0_dot(ne) holds the unstretched-length rate of every element @@ -2292,7 +2298,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Load_Power(model, p_viv, p_drag, p_damp, ErrStat, DO e = 1, model%ne qe(1:6) = model%q(6*(e - 1) + 1:6*e); qe(7:12) = model%q(6*e + 1:6*(e + 1)) ve(1:6) = model%v(6*(e - 1) + 1:6*e); ve(7:12) = model%v(6*e + 1:6*(e + 1)) - IF (model%has_axial_damping .OR. model%has_bend_damping) THEN + IF (model%has_axial_damping .OR. model%has_bend_damping .OR. model%has_mass_damping) THEN ! an internal force: the load on the nodes is -fe CALL structural_damping_element(model, e, qe, ve, fe, ErrStat, ErrMsg) IF (ErrStat /= CD_HCDYN_OK) THEN @@ -4067,14 +4073,80 @@ SUBROUTINE fail(msg) END SUBROUTINE fail END SUBROUTINE CD_HermiteCable_Dyn_Set_Bending_Damping + SUBROUTINE CD_HermiteCable_Dyn_Set_Mass_Damping(model, alpha, ErrStat, ErrMsg) + !! Install the per-element mass-proportional (Rayleigh alpha) coefficients alpha [1/s]: the + !! damping force alpha rho_a on the velocity normal to the tangent (CD_HermiteCable_Mass_Damping), + !! the alpha M part of a Rayleigh damping alpha M + beta K beside the bending damping Bb = beta EI. + !! An all-zero array disables the contribution exactly. Transactional, and it refreshes the + !! consistent acceleration, as CD_HermiteCable_Dyn_Set_Bending_Damping. + TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model + REAL(wp), INTENT(IN) :: alpha(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + + REAL(wp), ALLOCATABLE :: old_alpha(:), new_alpha(:), old_a(:) + LOGICAL :: old_has + INTEGER :: es, istat + CHARACTER(1024) :: em + + ErrStat = CD_HCDYN_OK + model%rc_epoch = model%rc_epoch + 1 + model%fc_valid = .FALSE. + model%fc_clears = model%fc_clears + 1 + model%tr_valid = .FALSE. + ErrMsg = '' + IF (.NOT. model%initialized) THEN + CALL fail('model not initialised'); RETURN + END IF + IF (SIZE(alpha) /= model%ne) THEN + CALL fail('alpha must have length ne'); RETURN + END IF + IF (.NOT. CD_All_Finite(alpha) .OR. ANY(alpha < CD_ZERO)) THEN + CALL fail('alpha must be finite and non-negative'); RETURN + END IF + + ALLOCATE (new_alpha(model%ne), old_a(model%ndof), STAT=istat) + IF (istat /= 0) THEN + CALL fail('workspace allocation failed'); RETURN + END IF + new_alpha = alpha + old_a = model%a + old_has = model%has_mass_damping + CALL MOVE_ALLOC(model%ray_alpha, old_alpha) + IF (ANY(new_alpha > CD_ZERO)) THEN + CALL MOVE_ALLOC(new_alpha, model%ray_alpha) + model%has_mass_damping = .TRUE. + ELSE + model%has_mass_damping = .FALSE. + END IF + + CALL solve_consistent_acceleration(model, es, em) + IF (es /= CD_HCDYN_OK) THEN + IF (ALLOCATED(model%ray_alpha)) DEALLOCATE (model%ray_alpha) + CALL MOVE_ALLOC(old_alpha, model%ray_alpha) + model%has_mass_damping = old_has + model%a = old_a + CALL fail('initial acceleration refresh failed: '//TRIM(em)); RETURN + END IF + + CONTAINS + SUBROUTINE fail(msg) + CHARACTER(*), INTENT(IN) :: msg + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_Mass_Damping: '//msg + END SUBROUTINE fail + END SUBROUTINE CD_HermiteCable_Dyn_Set_Mass_Damping + SUBROUTINE structural_damping_element(model, e, qe, ve, fdamp, ErrStat, ErrMsg, kdq, kdv, fixed_length, & fbend) - !! The structural (Kelvin-Voigt) damping load of element e: the axial dashpot (BA, with the - !! controlled-length rate) and the bending dashpot (Bb), summed, as an internal generalised - !! force, with their exact Jacobians kdq = d/dq, kdv = d/dv when requested. Without bending - !! damping the axial kernel's output is returned as it stands (bit for bit). Under active line - !! control both rates include the controlled-length rate l0_dot; fixed_length = .TRUE. leaves it - !! out (the node recovery's form). fbend (optional) returns the bending part of fdamp alone. + !! The structural damping load of element e: the axial dashpot (BA, with the controlled-length + !! rate), the bending dashpot (Bb) and the mass-proportional transverse damping (ray_alpha), + !! summed in that order, as an internal generalised force, with their exact Jacobians + !! kdq = d/dq, kdv = d/dv when requested. Without bending and mass damping the axial kernel's + !! output is returned as it stands (bit for bit). Under active line control the axial and + !! bending rates include the controlled-length rate l0_dot; fixed_length = .TRUE. leaves it out + !! (the node recovery's form). The mass damping takes the interpolated velocity, as the inertia. + !! fbend (optional) returns the bending part of fdamp alone. TYPE(CD_HermiteCableDynType), INTENT(IN) :: model INTEGER, INTENT(IN) :: e REAL(wp), INTENT(IN) :: qe(12), ve(12) @@ -4087,6 +4159,7 @@ SUBROUTINE structural_damping_element(model, e, qe, ve, fdamp, ErrStat, ErrMsg, REAL(wp) :: fb(12), kbq(12, 12), kbv(12, 12) LOGICAL :: want, ctrl INTEGER :: es + CHARACTER(160) :: emk want = PRESENT(kdq) .AND. PRESENT(kdv) ctrl = model%has_ctrl IF (PRESENT(fixed_length)) ctrl = ctrl .AND. .NOT. fixed_length @@ -4114,26 +4187,47 @@ SUBROUTINE structural_damping_element(model, e, qe, ve, fdamp, ErrStat, ErrMsg, END IF IF (ErrStat /= CD_HCDYN_OK) RETURN END IF - IF (.NOT. model%has_bend_damping) RETURN - IF (.NOT. (model%Bb(e) > CD_ZERO)) RETURN - IF (want .AND. ctrl) THEN - CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, kbq, kbv, es, ErrMsg, & - quadrature_order=model%bending_quadrature_order, l0_dot=model%l0_dot(e)) - ELSE IF (want) THEN - CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, kbq, kbv, es, ErrMsg, & - quadrature_order=model%bending_quadrature_order) - ELSE IF (ctrl) THEN - CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, ErrStat=es, ErrMsg=ErrMsg, & - quadrature_order=model%bending_quadrature_order, l0_dot=model%l0_dot(e)) + IF (model%has_bend_damping) THEN + IF (model%Bb(e) > CD_ZERO) THEN + IF (want .AND. ctrl) THEN + CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, kbq, kbv, es, ErrMsg, & + quadrature_order=model%bending_quadrature_order, & + l0_dot=model%l0_dot(e)) + ELSE IF (want) THEN + CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, kbq, kbv, es, ErrMsg, & + quadrature_order=model%bending_quadrature_order) + ELSE IF (ctrl) THEN + CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, ErrStat=es, ErrMsg=ErrMsg, & + quadrature_order=model%bending_quadrature_order, & + l0_dot=model%l0_dot(e)) + ELSE + CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, ErrStat=es, ErrMsg=ErrMsg, & + quadrature_order=model%bending_quadrature_order) + END IF + IF (es /= CD_HCABLE_OK) THEN + ErrStat = CD_HCDYN_NOCONVERGE; RETURN + END IF + fdamp = fdamp + fb + IF (PRESENT(fbend)) fbend = fb + IF (want) THEN + kdq = kdq + kbq; kdv = kdv + kbv + END IF + END IF + END IF + IF (.NOT. model%has_mass_damping) RETURN + IF (.NOT. (model%ray_alpha(e) > CD_ZERO)) RETURN + ! alpha times the line's own mass rho_a: a transverse mode of the bare cable has alpha/(2 omega) + IF (want) THEN + CALL CD_HermiteCable_Mass_Damping(qe, ve, model%l0(e), model%ray_alpha(e)*model%rho_a(e), fb, kbq, kbv, & + es, emk) ELSE - CALL CD_HermiteCable_Bending_Damping(qe, ve, model%l0(e), model%Bb(e), fb, ErrStat=es, ErrMsg=ErrMsg, & - quadrature_order=model%bending_quadrature_order) + CALL CD_HermiteCable_Mass_Damping(qe, ve, model%l0(e), model%ray_alpha(e)*model%rho_a(e), fb, ErrStat=es, & + ErrMsg=emk) END IF IF (es /= CD_HCABLE_OK) THEN - ErrStat = CD_HCDYN_NOCONVERGE; RETURN + ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = TRIM(emk); RETURN END IF fdamp = fdamp + fb - IF (PRESENT(fbend)) fbend = fb IF (want) THEN kdq = kdq + kbq; kdv = kdv + kbv END IF @@ -7836,7 +7930,7 @@ SUBROUTINE CD_HermiteCable_Dyn_End_Force(model, node, force, ErrStat, ErrMsg) ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'CD_HermiteCable_Dyn_End_Force: '//TRIM(em2); RETURN END IF r3 = fe(i0 + 1:i0 + 3) - IF (model%has_axial_damping .OR. model%has_bend_damping) THEN + IF (model%has_axial_damping .OR. model%has_bend_damping .OR. model%has_mass_damping) THEN CALL structural_damping_element(model, e, qe, ve, fdamp, es, em2) IF (es /= CD_HCDYN_OK) THEN ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'CD_HermiteCable_Dyn_End_Force: '//TRIM(em2); RETURN @@ -8750,7 +8844,7 @@ SUBROUTINE element_end_residual(model, e, g, ErrStat, ErrMsg) bending_quadrature_order=model%bending_quadrature_order) IF (es /= CD_HCABLE_OK) GOTO 900 g = fe - IF (model%has_axial_damping .OR. model%has_bend_damping) THEN + IF (model%has_axial_damping .OR. model%has_bend_damping .OR. model%has_mass_damping) THEN CALL structural_damping_element(model, e, qe, ve, fx, es, em2, fixed_length=.TRUE., fbend=fbd) IF (es /= CD_HCDYN_OK) GOTO 900 g = g + fx @@ -9668,6 +9762,8 @@ SUBROUTINE CD_HermiteCable_Dyn_End(model) model%has_axial_damping = .FALSE. IF (ALLOCATED(model%Bb)) DEALLOCATE (model%Bb) model%has_bend_damping = .FALSE. + IF (ALLOCATED(model%ray_alpha)) DEALLOCATE (model%ray_alpha) + model%has_mass_damping = .FALSE. IF (ALLOCATED(model%trib)) DEALLOCATE (model%trib) IF (ALLOCATED(model%contact_kn)) DEALLOCATE (model%contact_kn) IF (ALLOCATED(model%contact_cn)) DEALLOCATE (model%contact_cn) @@ -10102,7 +10198,8 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta CALL asm_mark(HC_ASM_CONTACT, asm_t) ! Scatter the element-private hydrodynamic tangents in the same phase and element ! order as the serial formulation, retaining its floating-point accumulation order. - IF (tangent_only .AND. (model%has_drag .OR. model%has_axial_damping .OR. model%has_bend_damping)) THEN + IF (tangent_only .AND. (model%has_drag .OR. model%has_axial_damping .OR. model%has_bend_damping .OR. & + model%has_mass_damping)) THEN DO e = 1, ne CALL scatter12_band(Kb, model%ws_elem_Kdrag(:, :, e), e) CALL scatter12_band(Kvb, model%ws_elem_Kv(:, :, e), e) @@ -10122,7 +10219,7 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta CALL asm_mark(HC_ASM_SCATTER, asm_t) ! Axial Kelvin-Voigt damping is an internal constitutive force. It uses the same ! reference-arc Hermite interpolation and axial quadrature as the elastic resultant. - IF ((model%has_axial_damping .OR. model%has_bend_damping) .AND. .NOT. tangent_only) THEN + IF ((model%has_axial_damping .OR. model%has_bend_damping .OR. model%has_mass_damping) .AND. .NOT. tangent_only) THEN DO e = e_lo, e_hi IF (kept) THEN DO a = 1, 12 @@ -11719,7 +11816,7 @@ SUBROUTINE evaluate_tangent_element(model, e, q_cfg, v_cfg, t_eval, Kstruct, Kdr ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'element: '//TRIM(em); RETURN END IF - IF (model%has_axial_damping .OR. model%has_bend_damping) THEN + IF (model%has_axial_damping .OR. model%has_bend_damping .OR. model%has_mass_damping) THEN CALL structural_damping_element(model, e, qe, ve, fload, es, em, djq, djv) IF (es /= CD_HCDYN_OK) THEN ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = TRIM(em); RETURN diff --git a/src/CableDyn_OpenFAST_HermiteFMF.f90 b/src/CableDyn_OpenFAST_HermiteFMF.f90 index 95749dd8..4c96d00e 100644 --- a/src/CableDyn_OpenFAST_HermiteFMF.f90 +++ b/src/CableDyn_OpenFAST_HermiteFMF.f90 @@ -26,6 +26,7 @@ MODULE CableDyn_OpenFAST_HermiteFMF CD_HermiteCable_Dyn_Set_Drag, CD_HermiteCable_Dyn_Set_AddedMass, & CD_HermiteCable_Dyn_Set_Axial_Damping, & CD_HermiteCable_Dyn_Set_Bending_Damping, & + CD_HermiteCable_Dyn_Set_Mass_Damping, & CD_HermiteCable_Dyn_Set_Waves, CD_HermiteCable_Dyn_Set_Held_Fluid, & CD_HermiteCable_Dyn_Set_Contact, CD_HermiteCable_Dyn_Set_Attachments, & CD_HermiteCable_Dyn_Set_EndConnection, & @@ -61,6 +62,7 @@ MODULE CableDyn_OpenFAST_HermiteFMF PUBLIC :: CD_HFMF_Set_Drag PUBLIC :: CD_HFMF_Set_Axial_Damping PUBLIC :: CD_HFMF_Set_Bending_Damping + PUBLIC :: CD_HFMF_Set_Mass_Damping PUBLIC :: CD_HFMF_Set_ModifiedNewton PUBLIC :: CD_HFMF_Set_Tensile_Safety PUBLIC :: CD_HFMF_Set_Tensile_Monitor @@ -398,6 +400,29 @@ SUBROUTINE CD_HFMF_Set_Bending_Damping(self, Bb, ErrStat, ErrMsg) END IF END SUBROUTINE CD_HFMF_Set_Bending_Damping + SUBROUTINE CD_HFMF_Set_Mass_Damping(self, alpha, ErrStat, ErrMsg) + !! Install the per-element mass-proportional (Rayleigh alpha) coefficients alpha [1/s] on the + !! cable (CD_HermiteCable_Dyn_Set_Mass_Damping). + TYPE(CD_HFMF_ModuleType), INTENT(INOUT) :: self + REAL(wp), INTENT(IN) :: alpha(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + INTEGER :: es + CHARACTER(1024) :: em + ErrStat = CD_HFMF_OK + ErrMsg = '' + IF (.NOT. self%initialized) THEN + ErrStat = CD_HFMF_BADINPUT + ErrMsg = 'CD_HFMF_Set_Mass_Damping: module not initialised' + RETURN + END IF + CALL CD_HermiteCable_Dyn_Set_Mass_Damping(self%line, alpha, es, em) + IF (es /= CD_HCDYN_OK) THEN + ErrStat = CD_HFMF_BADINPUT + ErrMsg = 'CD_HFMF_Set_Mass_Damping: '//TRIM(em) + END IF + END SUBROUTINE CD_HFMF_Set_Mass_Damping + SUBROUTINE CD_HFMF_Set_EndConnection(self, k_rot, d0_global, ErrStat, ErrMsg, & coupled_d0_parent, parent_orientation, connection_mode, & end_b_d0_parent, end_b_parent_orientation) diff --git a/tests/test_bending_damping_deck.f90 b/tests/test_bending_damping_deck.f90 index 0d1389ba..c1cff53f 100644 --- a/tests/test_bending_damping_deck.f90 +++ b/tests/test_bending_damping_deck.f90 @@ -2,13 +2,17 @@ ! SPDX-License-Identifier: Apache-2.0 ! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University PROGRAM test_bending_damping_deck - !! Bending damping on a deck (LINE TYPES EI|Bb and EI|-zeta|f): an 80 m power cable hanging from + !! Bending damping on a deck (LINE TYPES EI|Bb, EI|-zeta|f and EI|-zeta|f1|f2): an 80 m power cable hanging from !! a clamped hang-off to a seabed anchor, in a regular sea. !! E1 EI|-zeta|f and the EI|Bb it resolves to (Bb = zeta EI/(pi f)) give the same run, to the !! printed digits; !! E2 the damping lowers the hang-off curvature range against the undamped deck, and EI|0 is !! the undamped deck exactly; !! E3 bending damping on an EI = 0 type (as Bb or as a ratio) and malformed EI columns are + !! refused by name; + !! E4 EI|-zeta|f1|f2 runs; its mass-proportional half acts (the run differs from the EI|Bb deck + !! of the same Bb = zeta EI/(pi (f1 + f2))) and lowers the hang-off curvature range further; + !! E5 the two-frequency form with a positive ratio, a zero frequency or on an EI = 0 type is !! refused by name. USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK @@ -17,6 +21,7 @@ PROGRAM test_bending_damping_deck INTEGER :: nfail = 0 CALL check_runs() + CALL check_pair() CALL check_refusals() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' @@ -175,10 +180,59 @@ SUBROUTINE check_refusals() CALL run('bdd_neg.dat', 'bdd_neg', ok, msg) WRITE (*, '(A)') 'E3 negative without f: '//TRIM(msg) CALL require(.NOT. ok .AND. INDEX(msg, 'needs the frequency it holds at') > 0, 'E3: negative Bb without f') - CALL write_deck('bdd_four.dat', '2.0e4|1|2|3', 0.0_wp) - CALL run('bdd_four.dat', 'bdd_four', ok, msg) - WRITE (*, '(A)') 'E3 four parts: '//TRIM(msg) - CALL require(.NOT. ok .AND. INDEX(msg, 'takes EI, EI|Bb or EI|-zeta|f') > 0, 'E3: four-part EI column') + CALL write_deck('bdd_five.dat', '2.0e4|-0.05|1|2|3', 0.0_wp) + CALL run('bdd_five.dat', 'bdd_five', ok, msg) + WRITE (*, '(A)') 'E3 five parts: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'takes EI, EI|Bb, EI|-zeta|f or EI|-zeta|f1|f2') > 0, & + 'E3: five-part EI column') + CALL write_deck('bdd_pair_pos.dat', '2.0e4|0.05|0.5|2.0', 0.0_wp) + CALL run('bdd_pair_pos.dat', 'bdd_pair_pos', ok, msg) + WRITE (*, '(A)') 'E5 positive ratio: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'EI|-zeta|f1|f2 takes a damping ratio 0 < zeta < 1') > 0, & + 'E5: a positive ratio in the two-frequency form') + CALL write_deck('bdd_pair_f0.dat', '2.0e4|-0.05|0.5|0', 0.0_wp) + CALL run('bdd_pair_f0.dat', 'bdd_pair_f0', ok, msg) + WRITE (*, '(A)') 'E5 zero frequency: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'frequencies f1 and f2 of EI|-zeta|f1|f2 must be positive') > 0, & + 'E5: a zero frequency in the two-frequency form') + CALL write_deck('bdd_rope_pair.dat', '0.0|-0.05|0.5|2.0', 0.0_wp, rope=.TRUE.) + CALL run('bdd_rope_pair.dat', 'bdd_rope_pair', ok, msg) + WRITE (*, '(A)') 'E5 EI = 0, two-frequency form: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'bending damping (EI|Bb) needs a finite-EI cable') > 0, & + 'E5: the two-frequency form on an EI = 0 type') END SUBROUTINE check_refusals + SUBROUTINE check_pair() + REAL(wp), PARAMETER :: F1 = 0.5_wp, F2 = 2.0_wp + REAL(wp), ALLOCATABLE :: tr(:, :), tb(:, :), tp(:, :) + INTEGER :: nr, nb, np + REAL(wp) :: bb, rr, rb, rp + LOGICAL :: ok + CHARACTER(1024) :: msg + CHARACTER(64) :: col + bb = ZETA*EI/(PI*(F1 + F2)) + WRITE (col, '(ES22.15)') bb + CALL write_deck('bdd_pair.dat', '2.0e4|-0.05|0.5|2.0', 20.0_wp) + CALL run('bdd_pair.dat', 'bdd_pair', ok, msg) + CALL require(ok, 'E4: the EI|-zeta|f1|f2 deck runs: '//TRIM(msg)) + CALL write_deck('bdd_pair_bb.dat', '2.0e4|'//TRIM(ADJUSTL(col)), 20.0_wp) + CALL run('bdd_pair_bb.dat', 'bdd_pair_bb', ok, msg) + CALL require(ok, 'E4: the EI|Bb deck of its Bb runs: '//TRIM(msg)) + CALL read_out('bdd_pair.out', tr, nr) + CALL read_out('bdd_pair_bb.out', tb, nb) + CALL read_out('bdd_plain.out', tp, np) + CALL require(nr > 10 .AND. nr == nb .AND. nr == np, 'E4: the runs wrote matching rows') + IF (.NOT. (nr > 10 .AND. nr == nb .AND. nr == np)) RETURN + rr = MAXVAL(tr(4, nr/2:nr)) - MINVAL(tr(4, nr/2:nr)) + rb = MAXVAL(tb(4, nb/2:nb)) - MINVAL(tb(4, nb/2:nb)) + rp = MAXVAL(tp(4, np/2:np)) - MINVAL(tp(4, np/2:np)) + WRITE (*, '(A,ES11.4,A)') 'E4: max |EI|-zeta|f1|f2 - EI|Bb| over the channels ', & + MAXVAL(ABS(tr(:, :nr) - tb(:, :nb))), ' (the alpha share)' + WRITE (*, '(A,3ES11.4,A)') 'E4: hang-off curvature range, Rayleigh pair, its Bb alone, undamped ', rr, rb, rp, & + ' 1/m' + CALL require(MAXVAL(ABS(tr(:, :nr) - tb(:, :nb))) > 1.0e-6_wp*MAXVAL(ABS(tb(:, :nb))), & + 'E4: the mass-proportional half acts') + CALL require(rr < rb .AND. rb < rp, 'E4: the mass-proportional half lowers the curvature range further') + END SUBROUTINE check_pair + END PROGRAM test_bending_damping_deck diff --git a/tests/test_hermite_load_power.f90 b/tests/test_hermite_load_power.f90 index e97efcdd..d2adb346 100644 --- a/tests/test_hermite_load_power.f90 +++ b/tests/test_hermite_load_power.f90 @@ -15,6 +15,8 @@ PROGRAM test_hermite_load_power !! L4 a cable starting straight in a 0.5 m/s current with the cross-flow, in-line and !! higher-harmonic (Chh 1) VIV loads, !! the drag and the bending dashpot; + !! L6 the bending decay with the Rayleigh pair, the mass-proportional transverse damping alpha + !! beside the bending dashpot (its work is in the damping power); !! each within 0.5 % of the largest work; the damping power is never positive at any node, and !! the VIV and drag powers are zero without those loads. L5 power arrays of the wrong size are !! refused. @@ -23,19 +25,21 @@ PROGRAM test_hermite_load_power CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Set_Bending_Damping, & CD_HermiteCable_Dyn_Set_Axial_Damping, CD_HermiteCable_Dyn_Set_Drag, & CD_HermiteCable_Dyn_Set_VIV, CD_HermiteCable_Dyn_Energy, & - CD_HermiteCable_Dyn_Load_Power, CD_HCDYN_OK + CD_HermiteCable_Dyn_Load_Power, CD_HermiteCable_Dyn_Set_Mass_Damping, & + CD_HCDYN_OK IMPLICIT NONE REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp REAL(wp), PARAMETER :: LL = 20.0_wp, EA = 1.0e8_wp, EI = 1.0e5_wp, RHOA = 10.0_wp, TENS = 1.0e4_wp REAL(wp), PARAMETER :: DIAM = 0.1_wp, RHOW = 1025.0_wp INTEGER, PARAMETER :: NE = 40, NN = NE + 1, NDOF = 6*NN - INTEGER, PARAMETER :: BENDING = 1, AXIAL = 2, DRAG = 3, VIV = 4 + INTEGER, PARAMETER :: BENDING = 1, AXIAL = 2, DRAG = 3, VIV = 4, RAYLEIGH = 5 INTEGER :: nfail = 0 CALL balance_case('L1 bending dashpot decay', BENDING) CALL balance_case('L2 axial dashpot decay', AXIAL) CALL balance_case('L3 still-water drag decay', DRAG) CALL balance_case('L4 VIV in a current', VIV) + CALL balance_case('L6 Rayleigh decay', RAYLEIGH) CALL check_refusals() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' @@ -100,7 +104,11 @@ SUBROUTINE balance_case(label, what) CALL CD_HermiteCable_Dyn_Set_Axial_Damping(model, [(2.0e4_wp, k=1, NE)], es, em) CALL require(es == CD_HCDYN_OK, label//': axial damping: '//TRIM(em)) END IF - IF (what == BENDING .OR. what == VIV) THEN + IF (what == RAYLEIGH) THEN + CALL CD_HermiteCable_Dyn_Set_Mass_Damping(model, [(0.3_wp, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK, label//': mass damping: '//TRIM(em)) + END IF + IF (what == BENDING .OR. what == VIV .OR. what == RAYLEIGH) THEN CALL CD_HermiteCable_Dyn_Set_Bending_Damping(model, [(2.0e2_wp, k=1, NE)], es, em) CALL require(es == CD_HCDYN_OK, label//': bending damping: '//TRIM(em)) END IF @@ -142,7 +150,8 @@ SUBROUTINE balance_case(label, what) CALL require(pm_max <= 0.0_wp, label//': the damping power is never positive at a node') CALL require(zero_viv .EQV. what /= VIV, label//': VIV power only with VIV') CALL require(zero_drag .EQV. (what /= DRAG .AND. what /= VIV), label//': drag power only with drag') - IF (what == BENDING .OR. what == AXIAL) CALL require(work(3) < 0.0_wp, label//': the dashpot dissipates') + IF (what == BENDING .OR. what == AXIAL .OR. what == RAYLEIGH) & + CALL require(work(3) < 0.0_wp, label//': the dashpot dissipates') IF (what == DRAG) CALL require(work(2) < 0.0_wp, label//': still-water drag dissipates') IF (what == VIV) CALL require(work(1) > 0.0_wp, label//': the VIV loads put energy in') END SUBROUTINE balance_case diff --git a/tests/test_hermite_mass_damping.f90 b/tests/test_hermite_mass_damping.f90 new file mode 100644 index 00000000..1e3902ca --- /dev/null +++ b/tests/test_hermite_mass_damping.f90 @@ -0,0 +1,203 @@ +! File: tests/test_hermite_mass_damping.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_hermite_mass_damping + !! Kernel gates of the mass-proportional (Rayleigh alpha) transverse damping + !! (CD_HermiteCable_Mass_Damping) and of the two-frequency Rayleigh pair: + !! M1 Kv equals the central difference of fdamp in the rates, Kq that in the positions, on a + !! stretched 3D curved element and on a straight one; Kv is symmetric; + !! M2 fdamp is d psi / d v of the dissipation function 1/2 cm |v|^2 - 1/2 cm (t . v)^2 built + !! independently from the public shape functions, v . fdamp = 2 psi >= 0, and fdamp is + !! linear in the rates and zero for cm = 0; + !! M3 on a straight element along x the force is cm M v in y and z with M the consistent mass + !! matrix (CD_HermiteCable_Mass, per unit mass), zero in x, and an axial sliding is not + !! damped; a rigid transverse translation is (the absolute-velocity convention); + !! M4 bad inputs are refused by name; + !! M5 CD_HermiteCable_Rayleigh_Pair: alpha/(2 omega) + (Bb/EI) omega/2 equals zeta at f1 and + !! f2, and its minimum 2 zeta sqrt(f1 f2)/(f1 + f2) lies at sqrt(f1 f2). + USE CableDyn_Precision, ONLY: wp + USE, INTRINSIC :: IEEE_ARITHMETIC, ONLY: IEEE_VALUE, IEEE_QUIET_NAN + USE CableDyn_HermiteCable, ONLY: CD_HermiteCable_Mass_Damping, CD_HermiteCable_Rayleigh_Pair, CD_HCABLE_OK, & + CD_HermiteCable_Mass, CD_HermiteCable_Shapes, CD_HermiteCable_Gauss_Rule + IMPLICIT NONE + INTEGER :: nfail = 0 + REAL(wp), PARAMETER :: L = 2.5_wp, CM = 13.0_wp, PI = 3.14159265358979323846_wp + + CALL check_jacobians() + CALL check_dissipation() + CALL check_straight() + CALL check_refusals() + CALL check_pair() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: Hermite mass-proportional damping kernel' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE curved_state(q, v) + !! A stretched, out-of-plane curved element with arbitrary nodal rates. + REAL(wp), INTENT(OUT) :: q(12), v(12) + q = [0.0_wp, 0.0_wp, 0.0_wp, 1.02_wp, 0.3_wp, -0.2_wp, & + 2.4_wp, 0.5_wp, -0.3_wp, 0.9_wp, -0.25_wp, 0.35_wp] + v = [0.11_wp, -0.23_wp, 0.31_wp, 0.4_wp, -0.15_wp, 0.27_wp, & + -0.19_wp, 0.08_wp, 0.42_wp, -0.33_wp, 0.21_wp, 0.12_wp] + END SUBROUTINE curved_state + + SUBROUTINE fd_check(q, v, label) + REAL(wp), INTENT(IN) :: q(12), v(12) + CHARACTER(*), INTENT(IN) :: label + REAL(wp) :: f(12), Kq(12, 12), Kv(12, 12), fp(12), fm(12), Kq_fd(12, 12), Kv_fd(12, 12), dq(12), h + REAL(wp) :: eq, ev + INTEGER :: es, j + CHARACTER(256) :: em + CALL CD_HermiteCable_Mass_Damping(q, v, L, CM, f, Kq, Kv, es, em) + CALL require(es == CD_HCABLE_OK, 'M1 '//label//': evaluation: '//TRIM(em)) + DO j = 1, 12 + h = 1.0e-6_wp*MAX(1.0_wp, ABS(q(j))) + dq = 0.0_wp; dq(j) = h + CALL CD_HermiteCable_Mass_Damping(q + dq, v, L, CM, fp, ErrStat=es, ErrMsg=em) + CALL CD_HermiteCable_Mass_Damping(q - dq, v, L, CM, fm, ErrStat=es, ErrMsg=em) + Kq_fd(:, j) = (fp - fm)/(2.0_wp*h) + h = 1.0e-6_wp*MAX(1.0_wp, ABS(v(j))) + dq = 0.0_wp; dq(j) = h + CALL CD_HermiteCable_Mass_Damping(q, v + dq, L, CM, fp, ErrStat=es, ErrMsg=em) + CALL CD_HermiteCable_Mass_Damping(q, v - dq, L, CM, fm, ErrStat=es, ErrMsg=em) + Kv_fd(:, j) = (fp - fm)/(2.0_wp*h) + END DO + eq = MAXVAL(ABS(Kq - Kq_fd))/MAX(1.0e-12_wp, MAXVAL(ABS(Kq_fd))) + ev = MAXVAL(ABS(Kv - Kv_fd))/MAX(1.0e-12_wp, MAXVAL(ABS(Kv_fd))) + WRITE (*, '(A,2ES11.3)') 'M1 '//label//': relative |Kq - FD|, |Kv - FD| ', eq, ev + CALL require(eq < 1.0e-7_wp, 'M1 '//label//': Kq matches the central difference') + CALL require(ev < 1.0e-7_wp, 'M1 '//label//': Kv matches the central difference') + CALL require(MAXVAL(ABS(Kv - TRANSPOSE(Kv))) <= 1.0e-13_wp*MAXVAL(ABS(Kv)), 'M1 '//label//': Kv symmetric') + END SUBROUTINE fd_check + + SUBROUTINE check_jacobians() + REAL(wp) :: q(12), v(12) + CALL curved_state(q, v) + CALL fd_check(q, v, 'curved 3D') + q = [0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, L, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp] + CALL fd_check(q, v, 'straight') + END SUBROUTINE check_jacobians + + REAL(wp) FUNCTION psi(q, v) + !! 1/2 cm integral (|v|^2 - (t . v)^2) ds on the four-point rule, from the public shapes + REAL(wp), INTENT(IN) :: q(12), v(12) + REAL(wp) :: gp(6), gw(6), H(4), dH(4), rp(3), vv(3), t(3) + INTEGER :: g, c + CALL CD_HermiteCable_Gauss_Rule(4, gp, gw) + psi = 0.0_wp + DO g = 1, 4 + CALL CD_HermiteCable_Shapes(gp(g), L, H, dH) + DO c = 1, 3 + rp(c) = dH(1)*q(c) + dH(2)*q(3 + c) + dH(3)*q(6 + c) + dH(4)*q(9 + c) + vv(c) = H(1)*v(c) + H(2)*v(3 + c) + H(3)*v(6 + c) + H(4)*v(9 + c) + END DO + t = rp/NORM2(rp) + psi = psi + 0.5_wp*CM*gw(g)*L*(DOT_PRODUCT(vv, vv) - DOT_PRODUCT(t, vv)**2) + END DO + END FUNCTION psi + + SUBROUTINE check_dissipation() + REAL(wp) :: q(12), v(12), f(12), f2(12), fd(12), dv(12), h, p0 + INTEGER :: es, j + CHARACTER(256) :: em + CALL curved_state(q, v) + CALL CD_HermiteCable_Mass_Damping(q, v, L, CM, f, ErrStat=es, ErrMsg=em) + CALL require(es == CD_HCABLE_OK, 'M2: evaluation: '//TRIM(em)) + DO j = 1, 12 + h = 1.0e-5_wp + dv = 0.0_wp; dv(j) = h + fd(j) = (psi(q, v + dv) - psi(q, v - dv))/(2.0_wp*h) + END DO + p0 = psi(q, v) + WRITE (*, '(A,ES11.3,A,ES11.3)') 'M2: relative |f - d psi/dv| ', MAXVAL(ABS(f - fd))/MAXVAL(ABS(fd)), & + ', |v . f - 2 psi|/psi ', ABS(DOT_PRODUCT(v, f) - 2.0_wp*p0)/p0 + CALL require(MAXVAL(ABS(f - fd)) <= 1.0e-8_wp*MAXVAL(ABS(fd)), 'M2: the force is d psi / d v') + CALL require(ABS(DOT_PRODUCT(v, f) - 2.0_wp*p0) <= 1.0e-12_wp*p0 .AND. p0 > 0.0_wp, & + 'M2: v . f = 2 psi > 0 (dissipative)') + CALL CD_HermiteCable_Mass_Damping(q, 2.0_wp*v, L, CM, f2, ErrStat=es, ErrMsg=em) + CALL require(MAXVAL(ABS(f2 - 2.0_wp*f)) <= 1.0e-14_wp*MAXVAL(ABS(f)), 'M2: linear in the rates') + CALL CD_HermiteCable_Mass_Damping(q, v, L, 0.0_wp, f2, ErrStat=es, ErrMsg=em) + CALL require(es == CD_HCABLE_OK .AND. ALL(f2 == 0.0_wp), 'M2: zero for cm = 0') + END SUBROUTINE check_dissipation + + SUBROUTINE check_straight() + REAL(wp) :: q(12), v(12), f(12), Mm(12, 12), fm(12) + INTEGER :: es, k + CHARACTER(256) :: em + q = [0.0_wp, 0.0_wp, 0.0_wp, 1.01_wp, 0.0_wp, 0.0_wp, 1.01_wp*L, 0.0_wp, 0.0_wp, 1.01_wp, 0.0_wp, 0.0_wp] + v = [0.3_wp, -0.2_wp, 0.5_wp, 0.1_wp, 0.4_wp, -0.3_wp, -0.2_wp, 0.6_wp, 0.1_wp, 0.2_wp, -0.1_wp, 0.25_wp] + CALL CD_HermiteCable_Mass_Damping(q, v, L, CM, f, ErrStat=es, ErrMsg=em) + CALL CD_HermiteCable_Mass(1.0_wp, L, Mm, es, em) + fm = CM*MATMUL(Mm, v) + DO k = 0, 3 + fm(3*k + 1) = 0.0_wp + END DO + WRITE (*, '(A,ES11.3)') 'M3: straight element, relative |f - cm M v_transverse| ', & + MAXVAL(ABS(f - fm))/MAXVAL(ABS(fm)) + CALL require(MAXVAL(ABS(f - fm)) <= 1.0e-13_wp*MAXVAL(ABS(fm)), 'M3: cm M v in y and z, zero in x') + ! axial sliding: every node moves along x, the handles still + v = [0.7_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.7_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp] + CALL CD_HermiteCable_Mass_Damping(q, v, L, CM, f, ErrStat=es, ErrMsg=em) + CALL require(ALL(f == 0.0_wp), 'M3: an axial sliding is not damped') + ! rigid transverse translation: damped as cm M v (the absolute-velocity convention) + v = [0.0_wp, 0.4_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.4_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp] + CALL CD_HermiteCable_Mass_Damping(q, v, L, CM, f, ErrStat=es, ErrMsg=em) + WRITE (*, '(A,ES11.3,A,ES11.3)') 'M3: rigid transverse translation, total force ', f(2) + f(8), & + ' N against cm L v ', CM*L*0.4_wp + CALL require(ABS(f(2) + f(8) - CM*L*0.4_wp) <= 1.0e-13_wp*CM*L*0.4_wp, & + 'M3: a rigid transverse translation is damped at cm L v') + END SUBROUTINE check_straight + + SUBROUTINE check_refusals() + REAL(wp) :: q(12), v(12), f(12) + INTEGER :: es + CHARACTER(256) :: em + CALL curved_state(q, v) + CALL CD_HermiteCable_Mass_Damping(q, v, L, -1.0_wp, f, ErrStat=es, ErrMsg=em) + CALL require(es /= CD_HCABLE_OK .AND. INDEX(em, 'non-negative') > 0, 'M4: negative cm refused') + CALL CD_HermiteCable_Mass_Damping(q, v, 0.0_wp, CM, f, ErrStat=es, ErrMsg=em) + CALL require(es /= CD_HCABLE_OK .AND. INDEX(em, 'length must be positive') > 0, 'M4: zero length refused') + v(3) = IEEE_VALUE(1.0_wp, IEEE_QUIET_NAN) + CALL CD_HermiteCable_Mass_Damping(q, v, L, CM, f, ErrStat=es, ErrMsg=em) + CALL require(es /= CD_HCABLE_OK .AND. INDEX(em, 'finite') > 0 .AND. ALL(f == 0.0_wp), 'M4: NaN rate refused') + q = 0.0_wp + v = 0.0_wp + CALL CD_HermiteCable_Mass_Damping(q, v, L, CM, f, ErrStat=es, ErrMsg=em) + CALL require(es /= CD_HCABLE_OK .AND. INDEX(em, 'degenerate') > 0, 'M4: degenerate centreline refused') + END SUBROUTINE check_refusals + + SUBROUTINE check_pair() + REAL(wp), PARAMETER :: ZETA = 0.015_wp, F1 = 0.4_wp, F2 = 3.0_wp, EI = 2.0e4_wp + REAL(wp) :: bb, alpha, z1, z2, zm, fmid + CALL CD_HermiteCable_Rayleigh_Pair(ZETA, F1, F2, EI, bb, alpha) + z1 = rayleigh_zeta(alpha, bb/EI, F1) + z2 = rayleigh_zeta(alpha, bb/EI, F2) + fmid = SQRT(F1*F2) + zm = rayleigh_zeta(alpha, bb/EI, fmid) + WRITE (*, '(A,2ES11.3,A,2ES12.4,A,ES12.4)') 'M5: Bb, alpha ', bb, alpha, '; zeta at f1, f2 ', z1, z2, & + '; at sqrt(f1 f2) ', zm + CALL require(ABS(z1 - ZETA) <= 1.0e-14_wp .AND. ABS(z2 - ZETA) <= 1.0e-14_wp, 'M5: zeta at f1 and f2') + CALL require(ABS(zm - 2.0_wp*ZETA*fmid/(F1 + F2)) <= 1.0e-14_wp, 'M5: the minimum between them') + CALL require(rayleigh_zeta(alpha, bb/EI, 0.99_wp*fmid) > zm .AND. rayleigh_zeta(alpha, bb/EI, 1.01_wp*fmid) > zm, & + 'M5: sqrt(f1 f2) is the minimum') + END SUBROUTINE check_pair + + PURE REAL(wp) FUNCTION rayleigh_zeta(alpha, beta, f) + !! alpha/(2 omega) + beta omega/2 at omega = 2 pi f + REAL(wp), INTENT(IN) :: alpha, beta, f + rayleigh_zeta = alpha/(4.0_wp*PI*f) + beta*PI*f + END FUNCTION rayleigh_zeta + +END PROGRAM test_hermite_mass_damping diff --git a/tests/test_hermite_mass_damping_dynamic.f90 b/tests/test_hermite_mass_damping_dynamic.f90 new file mode 100644 index 00000000..955d09c5 --- /dev/null +++ b/tests/test_hermite_mass_damping_dynamic.f90 @@ -0,0 +1,170 @@ +! File: tests/test_hermite_mass_damping_dynamic.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_hermite_mass_damping_dynamic + !! Free decays of modes 1, 2 and 3 of a weightless, pinned-pinned finite-EI cable with Rayleigh + !! damping: the mass-proportional transverse damping alpha (CD_HermiteCable_Dyn_Set_Mass_Damping) + !! and the bending damping Bb (CD_HermiteCable_Dyn_Set_Bending_Damping), generalised-alpha with + !! rho_inf = 1 (no numerical damping), 200 steps a period over 12 periods. For the mode + !! sin(k x), k = n pi/L, of frequency omega^2 = (EI k^4 + T k^2)/m the damping ratio is + !! zeta = alpha/(2 omega) + omega Bb/(2 EI) * EI k^2/(EI k^2 + T), + !! alpha acting on the whole modal mass (the cable's own) and Bb on the bending share. + !! R1 alpha alone on a tensioned cable: modes 1 and 3 decay at alpha/(2 omega) to 0.25 %; + !! R2 Bb alone on the same cable: modes 1 and 3 at the bending-share ratio to 0.25 %; + !! R3 both: the sum, to 0.25 %; + !! R4 the two-frequency pair (CD_HermiteCable_Rayleigh_Pair, the EI|-zeta|f1|f2 deck form) on + !! a cable without tension, f1 and f2 the frequencies of modes 1 and 3: both decay at the + !! target zeta to 0.25 %, and mode 2, between them, at the lower Rayleigh ratio to 0.25 %; + !! R5 a negative coefficient or a wrong length is refused, and an all-zero array keeps the + !! configuration off. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_HermiteCable, ONLY: CD_HermiteCable_Rayleigh_Pair + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & + CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Set_Bending_Damping, & + CD_HermiteCable_Dyn_Set_Mass_Damping, CD_HCDYN_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp + REAL(wp), PARAMETER :: LL = 20.0_wp, EA = 1.0e8_wp, EI = 1.0e5_wp, RHOA = 10.0_wp, TENS = 1.0e4_wp + REAL(wp), PARAMETER :: ZT = 0.02_wp + INTEGER, PARAMETER :: NE = 40, NN = NE + 1, NDOF = 6*NN, MID = NE/2 + 1, QUARTER = NE/4 + 1 + INTEGER :: nfail = 0 + REAL(wp) :: alpha, bb, f1, f3 + + ! R1-R3: the tensioned cable; alpha and Bb each give zeta ZT to mode 1 in their own share + alpha = 2.0_wp*ZT*omega(1, TENS) + bb = 2.0_wp*ZT*EI/omega(1, TENS) + CALL decay_case('R1 alpha alone', TENS, 1, alpha, 0.0_wp) + CALL decay_case('R1 alpha alone', TENS, 3, alpha, 0.0_wp) + CALL decay_case('R2 Bb alone', TENS, 1, 0.0_wp, bb) + CALL decay_case('R2 Bb alone', TENS, 3, 0.0_wp, bb) + CALL decay_case('R3 alpha and Bb', TENS, 1, alpha, bb) + CALL decay_case('R3 alpha and Bb', TENS, 3, alpha, bb) + ! R4: the pair holding ZT at the frequencies of modes 1 and 3 of the cable without tension + f1 = omega(1, 0.0_wp)/(2.0_wp*PI) + f3 = omega(3, 0.0_wp)/(2.0_wp*PI) + CALL CD_HermiteCable_Rayleigh_Pair(ZT, f1, f3, EI, bb, alpha) + CALL decay_case('R4 zeta at f1 and f3', 0.0_wp, 1, alpha, bb, ZT) + CALL decay_case('R4 zeta at f1 and f3', 0.0_wp, 3, alpha, bb, ZT) + CALL decay_case('R4 zeta at f1 and f3', 0.0_wp, 2, alpha, bb) + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: Hermite Rayleigh damping dynamic decay' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + PURE REAL(wp) FUNCTION omega(n, tens) + INTEGER, INTENT(IN) :: n + REAL(wp), INTENT(IN) :: tens + REAL(wp) :: k + k = REAL(n, wp)*PI/LL + omega = SQRT((EI*k**4 + tens*k**2)/RHOA) + END FUNCTION omega + + SUBROUTINE setup(model, tens, n, a0) + !! The cable along x, pinned at both ends, at rest in its mode n of amplitude a0 (z). + TYPE(CD_HermiteCableDynType), INTENT(OUT) :: model + REAL(wp), INTENT(IN) :: tens, a0 + INTEGER, INTENT(IN) :: n + REAL(wp) :: l0(NE), ea_(NE), ei_(NE), rho(NE), w(NE), q(NDOF), eps, lt, x, kn + INTEGER :: k, es + CHARACTER(512) :: em + eps = tens/EA; lt = (1.0_wp + eps)*LL + kn = REAL(n, wp)*PI/lt + l0 = LL/REAL(NE, wp); ea_ = EA; ei_ = EI; rho = RHOA; w = 0.0_wp + DO k = 1, NN + x = lt*REAL(k - 1, wp)/REAL(NE, wp) + q(6*k - 5:6*k) = [x, 0.0_wp, a0*SIN(kn*x), (1.0_wp + eps), 0.0_wp, (1.0_wp + eps)*a0*kn*COS(kn*x)] + END DO + CALL CD_HermiteCable_Dyn_Init(model, l0, ea_, ei_, rho, w, q, [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3], & + -1.0e4_wp, 0.0_wp, 1.0_wp, es, em) + CALL require(es == CD_HCDYN_OK, 'init: '//TRIM(em)) + END SUBROUTINE setup + + SUBROUTINE decay_case(label, tens, n, alpha_c, bb_c, zeta_target) + CHARACTER(*), INTENT(IN) :: label + REAL(wp), INTENT(IN) :: tens, alpha_c, bb_c + INTEGER, INTENT(IN) :: n + REAL(wp), INTENT(IN), OPTIONAL :: zeta_target + TYPE(CD_HermiteCableDynType) :: model + REAL(wp) :: kk, om, share, zeta_expect, dt, z, zprev, zprev2, peaks(200), tpk(200), delta, zeta_meas, res, sgn + INTEGER :: m, k, np, es, it, node + CHARACTER(512) :: em + CHARACTER(16) :: tag + kk = REAL(n, wp)*PI/LL + om = omega(n, tens) + share = EI*kk**2/(EI*kk**2 + tens) + zeta_expect = alpha_c/(2.0_wp*om) + om*bb_c/(2.0_wp*EI)*share + WRITE (tag, '(A,I0)') ', mode ', n + CALL setup(model, tens, n, 1.0e-3_wp) + IF (alpha_c > 0.0_wp) THEN + CALL CD_HermiteCable_Dyn_Set_Mass_Damping(model, [(alpha_c, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK, label//TRIM(tag)//': set alpha: '//TRIM(em)) + END IF + IF (bb_c > 0.0_wp) THEN + CALL CD_HermiteCable_Dyn_Set_Bending_Damping(model, [(bb_c, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK, label//TRIM(tag)//': set Bb: '//TRIM(em)) + END IF + ! an antinode of the mode: midspan for modes 1 and 3 (sign -1 for mode 3), the quarter for mode 2 + node = MID + IF (n == 2) node = QUARTER + sgn = SIGN(1.0_wp, SIN(kk*model%q(6*(node - 1) + 1))) + dt = (2.0_wp*PI/om)/200.0_wp + np = 0; zprev = sgn*model%q(6*(node - 1) + 3); zprev2 = zprev + DO m = 1, 200*12 + CALL CD_HermiteCable_Dyn_Step(model, dt, 50, 1.0e-10_wp, es, em, it, res) + IF (es /= CD_HCDYN_OK) THEN + CALL require(.FALSE., label//TRIM(tag)//': step failed: '//TRIM(em)); RETURN + END IF + z = sgn*model%q(6*(node - 1) + 3) + ! a positive peak of the antinode deflection (parabolic refinement of the sampled peak) + IF (m >= 2 .AND. zprev > zprev2 .AND. zprev >= z .AND. zprev > 0.0_wp .AND. np < SIZE(peaks)) THEN + np = np + 1 + peaks(np) = zprev - 0.125_wp*(z - zprev2)**2/(z - 2.0_wp*zprev + zprev2) + tpk(np) = dt*REAL(m - 1, wp) + END IF + zprev2 = zprev; zprev = z + END DO + CALL require(np >= 8, label//TRIM(tag)//': enough peaks') + IF (np < 8) RETURN + delta = LOG(peaks(2)/peaks(np))/REAL(np - 2, wp) + zeta_meas = delta/SQRT(4.0_wp*PI*PI + delta*delta) + WRITE (*, '(A,A,F7.4,A,ES11.4,A,ES11.4,A,ES10.2,A,F8.5)') label//TRIM(tag), ': bending share ', share, & + ', zeta expected ', zeta_expect, ', measured ', zeta_meas, ', rel. error ', & + (zeta_meas - zeta_expect)/zeta_expect, ', period ratio ', (tpk(np) - tpk(2))/REAL(np - 2, wp)*om/(2.0_wp*PI) + CALL require(ABS(zeta_meas - zeta_expect) <= 2.5e-3_wp*zeta_expect, & + label//TRIM(tag)//': decay matches zeta to 0.25 %') + IF (PRESENT(zeta_target)) THEN + WRITE (*, '(A,ES11.4,A,ES10.2)') label//TRIM(tag)//': target zeta ', zeta_target, ', measured rel. error ', & + (zeta_meas - zeta_target)/zeta_target + CALL require(ABS(zeta_meas - zeta_target) <= 2.5e-3_wp*zeta_target, & + label//TRIM(tag)//': the target zeta to 0.25 %') + END IF + END SUBROUTINE decay_case + + SUBROUTINE check_refusals() + TYPE(CD_HermiteCableDynType) :: model + INTEGER :: es, k + CHARACTER(512) :: em + CALL setup(model, TENS, 1, 0.02_wp) + CALL CD_HermiteCable_Dyn_Set_Mass_Damping(model, [(-1.0_wp, k=1, NE)], es, em) + CALL require(es /= CD_HCDYN_OK .AND. INDEX(em, 'finite and non-negative') > 0, 'R5: negative alpha refused') + CALL CD_HermiteCable_Dyn_Set_Mass_Damping(model, [(1.0_wp, k=1, NE - 1)], es, em) + CALL require(es /= CD_HCDYN_OK .AND. INDEX(em, 'length ne') > 0, 'R5: wrong length refused') + CALL CD_HermiteCable_Dyn_Set_Mass_Damping(model, [(0.5_wp, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK .AND. model%has_mass_damping, 'R5: a positive alpha switches it on') + CALL CD_HermiteCable_Dyn_Set_Mass_Damping(model, [(0.0_wp, k=1, NE)], es, em) + CALL require(es == CD_HCDYN_OK .AND. .NOT. model%has_mass_damping, 'R5: all-zero alpha keeps it off') + END SUBROUTINE check_refusals + +END PROGRAM test_hermite_mass_damping_dynamic From f4c99587fc0d63ea117ee41327b8cf3277557516 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Mon, 16 Nov 2026 19:16:35 +0900 Subject: [PATCH 28/47] fix: the coupled VIV response converges at second order in the time step (#171) A taut line locked in by the synchronisation model changed its lock-in frequency by 0.74 %, 0.41 % and 0.27 % per halving of the step from 25 to 200 steps per cycle (the long-run VIV checks), worse than first order, while the same phase update under prescribed motion was second order. The phase sampled the committed generalised-alpha acceleration a_n for its cross-flow phase (and the wake oscillator for its forcing). That acceleration is the line's at t_n + (alpha_m - alpha_f) dt only, a first-order error at rho_inf < 1, and at rho_inf = 1 it carries an undamped alternating mode of the integrator: on the 20 m line the mid-span a_n alternated by +-11 m/s^2 against a physical acceleration of about 1.3 m/s^2. The lock-in at rho_inf = 1 therefore converged to a frequency 3.4 % low (3.940 at 3200 steps per cycle against 4.0797 rad/s), and at rho_inf 0.8 and 0.4 it was first order (0.06/n and 0.25/n at n steps per response period). Prescribed motion imposes the exact acceleration, which is why it did not show there. Candidates switched off one at a time on that line, 25 to 3200 steps per cycle: a second-order running mean square (exact exponential with trapezoidal samples) changed nothing; a fixed normalisation in place of the RMS left it first order; a tighter Newton tolerance changed nothing; the lift at a fixed shedding rate (no phase feedback) was second order (ratios 3.8 to 4.0); the acceleration recomputed from the equations of motion after every step moved the limit to 4.0797 rad/s; and the phase on the step's mid-point motion with the acceleration from the converged velocities restored second order (ratios 3.6 to 5.0, then 4.01 to 4.04 from 400 steps on) at rho_inf 1 and 0.8 alike. No amplitude table, flow frame or in-line VIV is involved in that case. The phase now advances by the implicit mid-point rule, one fixed-point pass, on the node's cross-flow motion at the step's mid-point: the mean position, the velocity (q_n+1 - q_n)/dt and the acceleration (v_n+1 - v_n)/dt, the step means of the velocity and of its derivative (second order at every rho_inf, free of the committed acceleration's lag and alternating mode, and keeping the phase of a harmonic motion exactly). The step's lift takes the phase predicted with the rate of the previous step's mid-point, a new row of the VIV motion statistics (two with in-line VIV), so the step recovery, sub-step slots, snapshots and checkpoints carry it and a restart stays bit-identical; a newly installed VIV model seeds it from the present state. The running mean squares advance by the mid-point rule (1 - exp(-dt/T_w) on the mid-point sample), the in-line phase in the same way slaved to the mid-point cross-flow rate, the flow frame's and the wake filter's filtered velocities exactly for the velocity linear over the step, and the wake oscillator under the mid-point acceleration (held over the step, its integral exact) at the mean of the start and end wake frequencies, that acceleration being its predictor (row 2 of its statistics). The time discretisation of the VIV phase therefore changes on purpose; this is not a round-off change. Measured on the same line from 25 to 3200 steps per cycle (EI = 0 line and rho_inf 0.8 unless noted), the ratio of successive changes per halving of the step, before and after: frequency, rho_inf 1: limit 3.4 % low; 3.6-4.9 frequency, rho_inf 0.8 / 0.4: 2.0-3.4 / 1.5-3.2; 3.6-4.8 / 3.8-4.5 mid-span A/D, in-line VIV: 2.2-2.3; 2.6-4.3 frequency, flow frame: 1.6-2.0; 3.1-4.5 frequency, amplitude table: 1.9-2.3; 3.0-4.5 wake oscillator, frequency: 2.0-2.5; 3.8-4.0 finite-EI cable, frequency: 1.7-2.3; 3.1-4.1 The Richardson limits at rho_inf 1, 0.8 and 0.4 agree to 1e-9 (4.0797304 rad/s), and the errors are about 2.2/n^2 (rho_inf 1, 0.8) and 3.4/n^2 (0.4) in frequency and 1.6/n^2 and 3.4/n^2 in mid-span A/D at n steps per response period, 3.5/n^2 on the finite-EI cable. With the cable seeded at its static stretch, rho_inf 1 reaches the rho_inf 0.8 limit; from unit tangents the undamped tangent-stretch mode rings and moves it at fine steps (the seed, not the VIV update). Under prescribed motion the phase error of the long-run check after 400 cycles at 100 steps per cycle is 0.0167 rad against 0.0334 before, still second order (3.99). The energy closure of that check at 100 steps per cycle is 2.0e-4 of the VIV work against 8.3e-5 before, second order (ratio 4.0): the lift's predicted phase now takes the rate of the previous step's mid-point, half a step behind the old step-start rate. The two VIV example decks change at their default dtM 0.02 s (about 170 steps per response period, rhoInf 0.4) and move toward their results at dtM 0.00125 s. viv_taut_line_crossflow, against dtM 0.00125 s: the mid-span RMS 0.31 % high before, 0.02 % low after; the lock-in frequency 0.15 % low before, 0.018 % after; the fairlead tension RMS 0.29 % high before, 0.027 % low after. viv_taut_cable_inline: the quarter-span in-line RMS 1.56 % low before, 0.34 % after; the cross-flow frequency 0.10 % high before, 0.022 % after; the largest fairlead tension 0.70 % high before, 0.23 % low after; the mid-span RMS 0.21 % and 0.20 % low. Over the 90 s the phase moves, so the time series differ pointwise by up to 12 % (crossflow, fairlead tension) and 36 % (inline, quarter-span y) of the channel's range. Every other example and test-data deck (132 of 134) gives bit-identical output files and console logs. The full test suite (430 tests, on dev with #169 and #170) passes on the default and the Prescott OpenBLAS kernel, and the 66 example decks run with no fallback note on both. Test: viv_step_order, the lock-in frequency of the line second order from 100 to 400 steps per cycle at rho_inf 1 (ratio 3.99) and 0.4 (3.67) and within 1e-4 of each other (4.3e-5), the wake oscillator's crossing frequency (3.90) and the finite-EI cable from 200 to 800 steps per cycle (4.39); on the previous code every check fails (ratios 2.44, 2.27, 2.18 and 2.76, the two rho_inf 3.1 % apart). The VIV state layouts in test_model, test_system, test_viv_coupled, test_hermite_viv_frame and test_hfmf_mirror carry the predictor rows. With the mid-point VIV update the predictor check of the lifted taut line fails one cell, rho_inf 1 at 25 steps per cycle (21 per response period): from the unit-tangent seed z max/D 0.5903 against the balanced seed's 0.5641 (+4.6 %) and Es max 1.51 times it. Every step converges (6.15 iterations on average, at most 21). At rho_inf 1 nothing damps the unit seed's stretch ringing, and at that resolution it leaves a near-Nyquist velocity in the trajectory: the mid-node (v_n+1 - v_n)/dt alternates by 4.8 m/s^2 against a VIV acceleration of 3.2 m/s^2 (a velocity of about 0.09 m/s, 27 % of the VIV velocity; the committed a_n alternates by 32 against 17, 19 against 10.5 on the old update), 10 to 20 times less at 50 steps per cycle. The response then depends on how the VIV update treats that velocity: four equally consistent variants (the last two mid-point accelerations averaged, a three-point second-order Nyquist-free acceleration, an averaged predictor rate, both of the latter) give z max/D 0.623, 0.579, 0.589 and 0.578, +0.8 % to +10 % from the converged 0.5639 with the old update's +0.8 % among them. That value is the fine-step one (200 to 800 steps per cycle), the same at rho_inf 0.8 with either seed and at rho_inf 1 with the balanced seed. The new update reaches it from 50 steps per cycle with either seed (unit seed 0.5632 at 50, 0.5641 at 100, 0.5639 from 200 on), while the old update settled at rho_inf 1 0.23 % high from the unit seed and 0.1 % low from the balanced one. The result is deterministic (Newton tolerance 1e-6 to 1e-10 and a 1e-7 seed tilt change it by under 0.03 %). So that cell measures the VIV update's treatment of an unresolved spurious velocity, not the predictor. It keeps G1 (every step converges) and G4 (iterations) and skips G2 and G3, and a new gate G7 holds the convergence claim: the unit seed at rho_inf 1 and 50 steps per cycle within 0.5 % of the converged z max/D 0.5639 (measured 0.5632). The other cells keep G2 and G3 (measured at most 1.07 times and 0.09 %). doc/theory.rst and the CHANGELOG note that at rho_inf 1 from an unbalanced seed the VIV response is resolution-sensitive below about 50 steps per cycle: keep rhoInf at or below 0.95 or seed the tangents at the stretch. The nine cases and their sensitivity runs (half the time step, 128 elements, 80 s for cases 5, 6, 8 and 9, the 38.1 kN/m top spring) rerun on the second-order VIV phase update. The counts are unchanged: the dominant mode right in 5 of 9 and within one in all, the mean in-line displacement within 17 % in 7 of 9 (-25 % to +34 %). The cross-flow amplitude is -45 % to +4 % against the maxima (-40 % to +18 % against the envelopes; within the 12 % measurement scatter in cases 2, 4, 6 and 7), the cross-flow curvature -39 % to +26 %, the in-line curvature -53 % to +111 %. Half the time step now changes the peak amplitude of cases 1-4, 7 and 8 by at most 2.7 % (4.5 % before) and their in-line curvature by at most 1.2 % (10 % before). Case 5 keeps its peak amplitude within 0.6 % (it moved by up to 20 % before) while its in-line curvature moves by up to 25 %. The peak amplitude of case 6 now depends on the step and the mesh: -11 % at half the time step, kept over an 80 s run, and -13 % with 128 elements, its other metrics within 2 % (in-line curvature 12 %). Case 9 still settles in mode 7 at half the time step. README, provenance.json (new 80 s runs of cases 6 and 8 at both steps), summary.json, response_comparison.csv, VALIDATION.md and the changelog entry follow. The mid-point VIV phase update changes every coupled-VIV result, so the validation case L3-W and the numbers the documents quote from coupled VIV runs are recomputed with it, each as its text describes (deck, options, window, output flag). L3-W (validation/experiments/wang_scr), rerun as its README says, and its two sensitivity runs: the largest r.m.s. strain over the measured largest 1.0729 -> 1.0733, the station mean 1.0362 -> 1.0361, the r.m.s. log error 0.339 -> 0.338, the dominant frequency 0.992 Hz (unchanged), 7 r.m.s. peaks along the span (unchanged); 400 elements 1.0753 -> 1.0759 and half the time step 1.0742 -> 1.0747 (0.24 % and 0.13 % from the base run). Every number and sentence of the README, VALIDATION.md and the CHANGELOG still holds at its printed precision; summary.json, the comparison CSV and provenance.json (commit, date, sensitivity) are updated. Numbers changed: - doc/outputs.rst, examples/viv_taut_cable_inline.dat: the VIV loads' power over 60-90 s 8.52 -> 8.45 W, the drag (and damping) 8.56 -> 8.48 W (balance within 0.5 %, unchanged). - doc/python_postprocessing.rst: the travelling-wave index 0.05 -> 0.04. - doc/theory.rst: the EI = 0 wake-oscillator line locks in at 0.283 Hz (was "the same 0.282 Hz"); the amplitude estimate within 0.04 % (0.1 % on the EI = 0 line; was 0.03 %); Thorsen's damping A/D 1.02 -> 1.01; the moving/held pipe table (peak 0.819/0.819 -> 0.811/0.818, RMS 0.446/0.447 -> 0.446/0.446; without the row 0.711/0.850 -> 0.700/0.851 and 0.349/0.450 -> 0.345/0.450; Cl alone 0.713/0.714 -> 0.713/0.712 and 0.372/0.371 -> 0.372/0.370; without 0.711/0.736 -> 0.700/0.733 and 0.349/0.375 -> 0.345/0.374), the RMS agreement within 0.2 % -> 0.6 % (0.02 % with the table); the towed cable 0.7905 / 0.7906 -> 0.7902 / 0.7903, 0.665 -> 0.663, 0.6764 / 0.6764 -> 0.6758 / 0.6758, Tf on the held cable at most 0.23 % -> 0.24 %. - doc/driver_format.md: towed within 0.01 % -> 0.02 %, at most 0.23 % -> 0.24 %. - VALIDATION.md: L2-VIV zero seed 0.701 -> 0.699 against 0.699; L2-VIV-EI 0.662/0.421 against 0.663/0.421 -> 0.661/0.420 against 0.661/0.420; the coupled VIV row 0.6645 / 0.6646 -> 0.6631 / 0.6625 (standalone 0.665 -> 0.663). The L2-VIV band against MoorDyn-F, rerun over 150-300 s at U 0.06-0.42 m/s: mode 1 at 0.09-0.18 m/s within 0.2 %, mode 3 at 0.39-0.42 m/s within 1.4 %, and at 0.36 m/s MoorDyn-F settles in mode 2 and CableDyn in mode 3 (the earlier phase update gives the same branches, its A/D within 0.5 % of the new one at every speed, so the discrepancy predates this change); the row said "mode 3 at U >= 0.36 m/s within 1.2 %". - CHANGELOG.md: the wake entry's EI = 0 frequency, the amplitude estimate 0.03 % -> 0.04 %, the frame entry's pipe and tow numbers as in the theory, and the #169 entry's largest A/D within 0.75 % -> 0.1 % except at rho_inf 1 and 25 steps per cycle. - tests/test_viv_frame_deck.f90 and tests/test_hermite_viv_frame.f90 (header comments only): the measured values of their gates. Every other quoted coupled-VIV number still holds at its precision (the example decks' A/D 0.66, 0.82, 0.19 and 0.03, their frequencies, the in-line and higher-harmonic gates, the wake, diameter and Thorsen gates, the riser case). The Delta Flume case was rerun before; the NDP case is on another branch. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 43 ++- CMakeLists.txt | 8 + VALIDATION.md | 23 +- doc/driver_format.md | 4 +- doc/outputs.rst | 2 +- doc/python_postprocessing.rst | 2 +- doc/theory.rst | 155 ++++++--- examples/viv_taut_cable_inline.dat | 2 +- src/CableDyn_HermiteCableDynamic.f90 | 272 ++++++++++----- src/CableDyn_Model.f90 | 320 +++++++++++------- src/CableDyn_OpenFAST_HermiteFMF.f90 | 23 +- src/CableDyn_System.f90 | 15 +- src/CableDyn_VIV.f90 | 35 +- tests/test_hermite_tangent_predictor.f90 | 40 ++- tests/test_hermite_viv_frame.f90 | 19 +- tests/test_hfmf_mirror.f90 | 2 +- tests/test_model.f90 | 2 +- tests/test_system.f90 | 4 +- tests/test_viv_coupled.f90 | 15 +- tests/test_viv_frame_deck.f90 | 6 +- tests/test_viv_step_order.f90 | 243 +++++++++++++ validation/experiments/delta_flume/README.md | 47 +-- .../experiments/delta_flume/provenance.json | 314 +++++++++-------- .../delta_flume/response_comparison.csv | 18 +- .../experiments/delta_flume/summary.json | 180 +++++----- .../experiments/wang_scr/provenance.json | 8 +- .../wang_scr/rms_strain_comparison.csv | 50 +-- validation/experiments/wang_scr/summary.json | 10 +- 28 files changed, 1255 insertions(+), 607 deletions(-) create mode 100644 tests/test_viv_step_order.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fd2c679..e5b5d886 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,7 +58,7 @@ All notable changes to CableDyn are recorded in this file. The format follows 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 %; 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 + the cable's A/D, at a frequency 0.001 Hz from it. 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 @@ -66,9 +66,9 @@ All notable changes to CableDyn are recorded in this file. The format follows coefficient `Cv` that replaces its `Cl` and a factor `CdAmp` of its normal drag coefficient, read at the amplitude estimate of Thorsen et al. (2016, Eq. 8 and 9) of each node, on `EI = 0` lines and finite-EI cables, standalone and coupled. `VIVAmpN` writes the estimate. On the taut - example line it follows the steady response amplitude within 0.03 %, a falling `Cv` limits the - response inside its falling range, and a table with `Cv = Cl` and `CdAmp = 1` is the line - without it, bit for bit. The estimate is in the step-recovery, snapshot and checkpoint state; + example line it follows the steady response amplitude within 0.04 % (0.1 % on an `EI = 0` + line), a falling `Cv` limits the response inside its falling range, and a table with + `Cv = Cl` and `CdAmp = 1` is the line without it, bit for bit. The estimate is in the step-recovery, snapshot and checkpoint state; the Python deck reader and builder take the section. - Cross-flow damping: an optional `VIV DAMPING` section row `TypeName a b [c]` splits the drag of a finite-EI line type about the ambient normal flow: Morison's drag in line, and across it @@ -116,7 +116,7 @@ All notable changes to CableDyn are recorded in this file. The format follows Delta Flume riser in the nine blind-trial stepped-current cases of Chaplin et al. (2005b), with one generic coefficient set and the drag amplification on the in-line drag alone, against the experimenters' measured envelopes and summaries: dominant mode right in 5 of 9 and within one in - all, mean in-line displacement within 17 % in 7 of 9, cross-flow amplitude −44 % to +4 %. + all, mean in-line displacement within 17 % in 7 of 9, cross-flow amplitude −45 % to +4 %. - Theory manual, Published coefficient sets: the VIV coefficient sets of Thorsen et al. (2016, 2017), Ulveseter et al. (2018), Andersen et al. (2024a, b) and Facchinetti et al. (2004), each with its source, its test data and the line-type columns it maps to, and Thorsen et al.'s @@ -138,10 +138,10 @@ All notable changes to CableDyn are recorded in this file. The format follows estimate (and so `Cv` and `CdAmp`) and of the axes and blend of the `VIV DAMPING` split. A cable moved through still water had a phase input of zero cross-flow velocity, `y0 = 0`, `Cv(0)`, `CdAmp(0)` and Morison's drag. A pipe moved at 0.6 m/s amplitude and 40 s period in still water - now gives peak A/D 0.819 against 0.819 for the same pipe held in the moving water with the - amplitude table and damping (0.711 against 0.850 without the row), and 0.713 against 0.714 with - the lift alone (0.711 against 0.736); a cable towed at 0.15 m/s gives the A/D of the cable held - in the current with the same row within 0.01 %. On `EI = 0` lines and finite-EI cables, the + now gives peak A/D 0.811 against 0.818 for the same pipe held in the moving water with the + amplitude table and damping (0.700 against 0.851 without the row), and 0.713 against 0.712 with + the lift alone (0.700 against 0.733); a cable towed at 0.15 m/s gives the A/D of the cable held + in the current with the same row within 0.02 %. On `EI = 0` lines and finite-EI cables, the filtered velocity in rows 7-9 of the VIV motion statistics, so in the step-recovery, snapshot and checkpoint state; `Tf` 0 or no row leaves runs unchanged to the bit. A VIV FRAME row now needs LINE TYPES `Cl > 0` or a WAKE OSCILLATOR row; the Python deck reader and builder follow. @@ -190,8 +190,29 @@ All notable changes to CableDyn are recorded in this file. The format follows quarter now holds that tangent at its committed value, and a step that ends with a tangent turned by 90 degrees or more fails, so the step recovery re-solves it. The line now runs at `rho_inf` 0.5 to 1 and 25 and 50 steps per cycle, with the response of the same line seeded - at its stretch (largest A/D within 0.75 %). Every other step starts as before: every example - and test deck gives bit-identical outputs. + at its stretch (largest A/D within 0.1 %, except at `rho_inf` 1 and 25 steps per cycle, where + the VIV response is resolution-sensitive; see the time-step entry below). Every other step + starts as before: every example and test deck gives bit-identical outputs. +- A locked-in VIV response converged at first order in the time step, and at `rhoInf` 1 to a + wrong frequency: the phase of the synchronisation model (and the forcing of the wake + oscillator) sampled the generalised-alpha acceleration, which is the line's acceleration at + `t_n + (alpha_m - alpha_f) dt` only and at `rhoInf` 1 carries an undamped alternating mode of + the integrator. On a taut 20 m line locked in at 0.65 Hz the frequency changed 0.74 %, 0.41 % + and 0.27 % per halving of the step from 25 to 200 steps per cycle, and at `rhoInf` 1 it + converged 3.4 % low. The phase now advances by the implicit mid-point rule on the step's + mid-point motion, its velocity and acceleration the step means of the converged positions and + velocities, and the lift is predicted with the rate of the previous step's mid-point, a new row + of the VIV state (two with in-line VIV) carried by the step recovery, snapshots and checkpoints; + the running mean squares, the in-line phase, the flow frame's and the wake filter's filtered + velocities and the wake oscillator follow the same mid-point treatment. The response is now + second order at every `rhoInf` and does not depend on it (limits within 1e-9): the frequency + is low by about 2.2/n^2 to 3.4/n^2 at n steps per response period (doc/theory.rst; test + `viv_step_order`). The two VIV example decks change at their default `dtM` and move toward + their fine-step results (the cross-flow example's mid-span RMS from 0.31 % to 0.02 % off, its + frequency from 0.15 % to 0.018 %); every other example and test deck gives bit-identical + outputs. At `rhoInf` 1 from an unbalanced seed (tangent lengths not at the static stretch) the + response is resolution-sensitive below about 50 steps per cycle; keep `rhoInf` at or below 0.95 + or seed at the stretch. ## [0.4.2] - 2026-11-09 diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f36ba4f..4d853fd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1324,6 +1324,14 @@ target_link_libraries(test_viv_kernels PRIVATE cabledyn_core) add_test(NAME viv_kernels COMMAND test_viv_kernels) set_tests_properties(viv_kernels PROPERTIES LABELS "fortran;unit;dynamic;viv") +# Time-step convergence of a locked-in VIV response (the line and the synchronisation model or the +# wake oscillator coupled): second order in the step at rho_inf 1 and 0.4 on an EI = 0 line, and +# on a finite-EI cable; the lock-in does not move with the numerical damping. +add_executable(test_viv_step_order tests/test_viv_step_order.f90) +target_link_libraries(test_viv_step_order PRIVATE cabledyn_core) +add_test(NAME viv_step_order COMMAND test_viv_step_order) +set_tests_properties(viv_step_order PROPERTIES LABELS "fortran;integration;dynamic;viv" TIMEOUT 1200) + # Wake-oscillator kernel (Facchinetti et al. 2004): the free limit cycle, the forced lift # magnification of their Eq. 17, and the sub-stepped Runge-Kutta advance. add_executable(test_viv_wake_kernel tests/test_viv_wake_kernel.f90) diff --git a/VALIDATION.md b/VALIDATION.md index cdb2564f..9d8aa6ef 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -62,9 +62,9 @@ article's methods, are compared in | **L2-V** | VolturnUS-S anchor tension | closed-form catenary | 0.77% | <3% | Pass | | **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-C v2.7.2 (RK2, `dtM` 5e-4 s) and 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% of MoorDyn-F, frequency within one spectral bin; same response at `dtM` 5e-4 to 1e-2 s. At 0.21–0.33 m/s two branches coexist (a run ramped up from 0.18 m/s stays in mode 1, one ramped down from 0.30 m/s stays in mode 2): from rest CableDyn and MoorDyn-C settle in mode 2 (U 0.24 m/s: A/D 0.575 against 0.574 at x/L 0.24, same frequency); MoorDyn-F, whose phases start at zero (it does not carry its seed into its state), in mode 1, which `zero VIVphaseSeed` reproduces (0.701 against 0.699, transient to four digits) | A/D <3%, frequency within one spectral bin; band: 3% (MoorDyn-C), 1% (MoorDyn-F) (`viv_lockin`) | Pass | +| **L2-VIV** | Cross-flow VIV lock-in of a taut 100 m line, U = 0.06–0.42 m/s | MoorDyn-C v2.7.2 (RK2, `dtM` 5e-4 s) and MoorDyn-F (OpenFAST v5 `moordyn_driver`, `dtM` 5e-4 s) | over 150–300 s, mode-1 lock-in at U 0.09–0.18 m/s: mid-span A/D within 0.2% of MoorDyn-F (0.017 against 0.018 at 0.06 m/s, below lock-in); mode 3 at 0.39–0.42 m/s within 1.4%; at 0.36 m/s MoorDyn-F settles in mode 2 and CableDyn in mode 3; frequency within one spectral bin wherever the modes agree; same response at `dtM` 5e-4 and 1e-2 s. At 0.21–0.33 m/s two branches coexist (a run ramped up from 0.18 m/s stays in mode 1, one ramped down from 0.30 m/s stays in mode 2): from rest CableDyn and MoorDyn-C settle in mode 2 (U 0.24 m/s: A/D 0.575 against 0.574 at x/L 0.24, same frequency); MoorDyn-F, whose phases start at zero (it does not carry its seed into its state), in mode 1, which `zero VIVphaseSeed` reproduces (0.699 against 0.699) | A/D <3%, frequency within one spectral bin; band: 3% (MoorDyn-C), 1% (MoorDyn-F) (`viv_lockin`) | Pass | | **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 | +| **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.661/0.420 against 0.661/0.420, 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 | | **L3-3** | Current-deflected static | OrcaFlex | 0.07–0.67% | <2% | Pass | @@ -82,7 +82,7 @@ article's methods, are compared in | **L3-H** | Holcombe static lazy-wave experiment | measured marker geometry | position RMSE 1.07–1.89% of suspended length; peak marker-curvature error 0.34–5.54% | end-restraint bracket | Pass | | **L3-B** | Bergdahl chain experiment, 30 orbit conditions | measured upper-end force | RMSE 1.58 N; MAPE 3.11%; Pearson 0.993; Lin concordance 0.989 | full published matrix | Pass | | **L3-C** | Chaplin Delta Flume riser, still-water natural frequencies | measured modes 1–7 at five tensions | mean error +1.87%, mean absolute 2.28%, largest 4.88% (34 of 35; one outlier reported) | full published table, no fitted parameter | Pass | -| **L3-D** | Chaplin Delta Flume riser in a stepped current, blind-trial cases 1–9, cross-flow and in-line VIV | measured dominant mode, peak cross-flow amplitude, mean in-line displacement, curvature standard deviations | mode right in 5/9, within one in 9/9; mean in-line within ±17% in 7/9 (−25% to +34%); cross-flow amplitude −44% to +4%; cross-flow curvature −39% to +26% | generic coefficient set, no fitted parameter | Pass measured | +| **L3-D** | Chaplin Delta Flume riser in a stepped current, blind-trial cases 1–9, cross-flow and in-line VIV | measured dominant mode, peak cross-flow amplitude, mean in-line displacement, curvature standard deviations | mode right in 5/9, within one in 9/9; mean in-line within ±17% in 7/9 (−25% to +34%); cross-flow amplitude −45% to +4%; cross-flow curvature −39% to +26% | generic coefficient set, no fitted parameter | Pass measured | | **L3-W** | SJTU steel catenary riser in 0.2 m/s current, cross-flow VIV | measured r.m.s. strain (25 stations) and dominant frequency | frequency 0.992 vs 1.00 Hz; max r.m.s. strain +7.3%, station mean +3.6% | published coefficient set, no fitted parameter | Pass | | **L-fig** | Along-arc curvature overlay (CableDyn / OrcaFlex / MoorDyn-F ±4×) | 3-code committed record | CableDyn peak 0.11% from OrcaFlex | <0.5% | Pass | | **L4-1** | Coupled platform + mooring | synthetic reference | bit-for-bit | — | Pass | @@ -351,12 +351,15 @@ scripts, results, and source provenance are in graphics of their blind-trial presentation: the dominant cross-flow mode is right in 5 of 9 cases and within one in the rest; the largest mean in-line displacement is within ±17% in 7 of 9 (+34% in case 2, −25% in case 9; the blind predictions under-predicted it by 20–40%); - the largest cross-flow amplitude is −44% to +4%, and the overall standard deviation of the - cross-flow curvature −39% to +26%. Half the time step and 128 elements leave the mode and - change the mean in-line displacement and the cross-flow curvature by at most 2.6% (the in-line - curvature by up to 10%), except in two cases: case 5 beats in the 40 s window (its peak - amplitude moves by up to 20%), and case 9 settles in mode 7 instead of 8 at half the time - step. + the largest cross-flow amplitude is −45% to +4%, and the overall standard deviation of the + cross-flow curvature −39% to +26%. In cases 1–4 and 6–8, half the time step and 128 elements + leave the mode and change the mean in-line displacement and the cross-flow curvature by at + most 2.7%; the in-line curvature moves by up to 3.1%, except in case 6 (+12%) and case 8 (+19% + with 128 elements). Case 5 keeps its mode with the other metrics within 6.4% but its in-line + curvature moves by up to 25%; the peak amplitude of case 6 depends on the step and the mesh + (−11% at half the time step, kept over an 80 s run, and −13% with 128 elements); case 9 + settles in mode 7 instead of 8 at half the time step and keeps mode 8 with 128 elements + (metrics within 6.1%). - **L3-W SJTU steel catenary riser, cross-flow VIV in uniform current** ([Wang et al., 2014](https://cabledyn.readthedocs.io/en/latest/references.html#ref-wang2014); @@ -938,7 +941,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. The line takes the seabed, Morison loads, current, waves, host fluid and VIV of any `EI = 0` line: a taut 88.5 m polyester line in water whose fairlead sways 2 m matches MoorDyn-C v2.7.2 within 10.6 N over a 44.8 kN tension range (1.03 MN mean; t = 0 within 0.5 N), and its range grows 4.8 % without drag and added mass (`syrope_hydro`). Composite lines (a 400 m Syrope polyester section between chains, `syrope_composite`): every polyester element starts on its OWC to 2e-11 across its 1.005–1.012 MN tension range, a still run keeps the fairlead tension to the printed digits (one secant per section moved it by 1.4e-5 within 2 s), the chains keep their `BA` damping, a `SYROPE IC` history puts the section on the `Tmax0` working curve, a line split into two Syrope sections reaches the single section's tensions to 1e-8, and a tension above the OWC table stops with a named error. Finite-EI combinations stop with a named error | -| 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 | +| 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.6631 / 0.6625 and 0.292 Hz (MoorDyn-F 0.662 at 0.293 Hz; standalone 0.663); 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 diff --git a/doc/driver_format.md b/doc/driver_format.md index ea2569da..8b2cb0fe 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -1409,9 +1409,9 @@ Behaviour: lags a motion at `omega_m` by `atan(omega_m Tf)`. A taut cable towed at 0.15 m/s through still water (VIV at 0.28 Hz) with `Tf` 10 s locks in as the same cable held in a 0.15 m/s current: with the wake oscillator A/D within 0.6 % and frequency within 0.001 Hz, where the ambient flow - gave it no lock-in; with the synchronisation model A/D within 0.01 % of the held cable with the + gave it no lock-in; with the synchronisation model A/D within 0.02 % of the held cable with the same row (within 0.25 % without the row), with or without a VIV AMPLITUDE table and VIV DAMPING. On a - held cable in a current `Tf` changes A/D by 0.03 % (wake oscillator) and at most 0.23 % + held cable in a current `Tf` changes A/D by 0.03 % (wake oscillator) and at most 0.24 % (synchronisation model). - The filtered velocity is part of the step-recovery, snapshot and checkpoint state. A row with `Tf = 0` leaves the run exactly as without it. It acts on `EI = 0` lines and finite-EI cables, diff --git a/doc/outputs.rst b/doc/outputs.rst index 613ba747..1575da62 100644 --- a/doc/outputs.rst +++ b/doc/outputs.rst @@ -914,7 +914,7 @@ viscoelastic and Syrope laws is not in them. Where those do no net work, the ene only oscillates in a steady response, so the means balance: :math:`\overline{P}_\text{VIV} + \overline{P}_\text{drag} + \overline{P}_\text{damp} \approx 0`. On the locked-in taut line of ``viv_taut_cable_inline.dat`` (pinned ends, steady current) the VIV -loads put in 8.52 W over 60-90 s, the drag takes out 8.56 W and the axial damping 0.002 W: the +loads put in 8.45 W over 60-90 s, the drag takes out 8.48 W and the axial damping 0.002 W: the three balance within 0.5 % of the VIV power, the line's loss of energy over the window as its response settles, and as an ``EI = 0`` line the same. Integrating a channel over the output times gives the work of its load, :math:`W = \int P\,dt`; a static run reports 0. diff --git a/doc/python_postprocessing.rst b/doc/python_postprocessing.rst index dc2763e1..2a172a64 100644 --- a/doc/python_postprocessing.rst +++ b/doc/python_postprocessing.rst @@ -480,7 +480,7 @@ The frequency measures need uniform sampling. On the in-line VIV example ``viv_taut_cable_inline.dat``, run with the line output flag ``p``, over 60-90 s the mid-span cross-flow amplitude is A/D 0.82 at 0.295 Hz (``f D/U_n`` 0.20), the quarter-span in-line amplitude 0.19 at 0.57 Hz, the cross-flow response is mode 1 and the in-line mode 2, and the travelling-wave index of the cross-flow motion -is 0.05, a standing wave between the pinned ends. +is 0.04, a standing wave between the pinned ends. .. code-block:: python diff --git a/doc/theory.rst b/doc/theory.rst index 7c6d70f3..e0a540ca 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1239,17 +1239,65 @@ the state vector it integrates, so its phases start at zero at every node: a uni excites the symmetric modes only, after which the line stays in its first mode. ``zero VIVphaseSeed`` starts every phase at zero, and reproduces that start (:doc:`options`). -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), -and the committed phase is the trapezoidal (Heun) update with the rate at the converged end -state. The lift's position and velocity derivatives enter the tangent. The cross-flow motion of -the phase and the velocity in the lift are the node values averaged with the neighbours, +In the implicit step the phase is explicit. The step's lift takes the phase predicted at +:math:`t_{n+1}` (the generalised-α level under the configuration blend) with the predictor rate +:math:`\dot\phi_p`, the rate at the mid-point of the previous step, and the committed phase +advances by the implicit mid-point rule on the cross-flow motion at the step's mid-point, solved +by one fixed-point pass from :math:`\dot\phi_p`, + +.. math:: + + \dot\phi_1 = \dot\phi\bigl(\dot y_m, \ddot y_m, \phi_n + \tfrac12\delta t\,\dot\phi_p\bigr),\qquad + \phi_{n+1} = \phi_n + \delta t\,\dot\phi\bigl(\dot y_m, \ddot y_m, + \phi_n + \tfrac12\delta t\,\dot\phi_1\bigr), + + \dot y_m = \frac{\mathbf r_{n+1} - \mathbf r_n}{\delta t}\cdot\mathbf e_m,\qquad + \ddot y_m = \frac{\dot{\mathbf r}_{n+1} - \dot{\mathbf r}_n}{\delta t}\cdot\mathbf e_m, + +the step means of the velocity and of its derivative, so a harmonic motion keeps its phase +between them exactly, with the axis :math:`\mathbf e_m` and the speed :math:`U` of the mean of +the step's two states. The mid-point rate becomes the next step's :math:`\dot\phi_p` and is part +of the VIV state. The +running mean squares advance by the mid-point rule as well, the mean square of a sample +:math:`s` as :math:`\overline{s^2} + (1 - e^{-\delta t/T_w})(s_m^2 - \overline{s^2})`, over +:math:`\delta t/2` for the mid-point rate. The acceleration comes from the converged velocities +because the generalised-α acceleration :math:`\mathbf a_n` is not the line's: it approximates +:math:`\ddot{\mathbf r}(t_n + (\alpha_m - \alpha_f)\,\delta t)`, so a phase sampling it is +first order in the step, and at :math:`\rho_\infty = 1` it carries an undamped alternating mode +of the integrator, while :math:`(\mathbf v_{n+1} - \mathbf v_n)/\delta t` is the mid-point +acceleration to second order at every :math:`\rho_\infty`. The lift's position and velocity +derivatives enter the tangent. The cross-flow motion of the phase and the velocity in the lift +are the node values averaged with the neighbours, :math:`(\mathbf{x}_{i-1} + 2\mathbf{x}_i + \mathbf{x}_{i+1})/4`. That keeps a resolved mode of wavenumber :math:`k` to :math:`\cos^2(k l_0/2)` and removes the mesh-scale zig-zag mode exactly. With the node's own kinematics, a step that resolves the zig-zag mode lets the synchronisation loop pump it until the line loses lock-in; a coarse step only hides this behind the integrator's numerical damping. +The locked-in response is second order in the time step at every :math:`\rho_\infty`. On the taut +line of the ``viv_step_order`` test (20 m, 10 elements, pinned in a 0.3 m/s cross current, lock-in +at 0.65 Hz with a mid-span A/D of 0.57), with :math:`n` steps per response period, the lock-in +frequency is low by about :math:`2.2/n^2` at :math:`\rho_\infty` 1 and 0.8 and :math:`3.4/n^2` at +0.4, and the mid-span RMS A/D high by about :math:`1.6/n^2` and :math:`3.4/n^2` (fitted from 80 to +2700 steps per period against the Richardson limit, which is the same at every +:math:`\rho_\infty` to 1e-9). The finite-EI cable gives :math:`3.5/n^2` for its frequency at +:math:`\rho_\infty` 0.8, and the same limit at :math:`\rho_\infty = 1` when its seed carries the +static stretch of the tangents (from unit tangents the undamped tangent-stretch mode rings at +:math:`\rho_\infty = 1` and moves the response by up to 0.4 % at fine steps). 100 steps per +response period therefore keep the frequency and the +amplitude within 0.04 %, 30 within 0.4 %. A phase that samples :math:`\mathbf a_n`, as +CableDyn's did before, is first order: the frequency low by about :math:`0.06/n` at +:math:`\rho_\infty` 0.8 and :math:`0.25/n` at 0.4 (0.25 % at 100 steps per period), and at +:math:`\rho_\infty = 1` it converges to a frequency 3.4 % low. The amplitude estimate of +:ref:`theory-viv-amplitude` keeps the smoothing of Thorsen et al., :math:`k_a\,\delta t = 0.1` +per step, a time of ten steps; it lags only a changing amplitude, and with an amplitude table the +locked-in response of the same line is second order as well (the frequency low by about +:math:`2.4/n^2`). The default ``VIVrmsWindow``, 500 steps as in MoorDyn, ties the averaging time +to ``dtM``: a time-step study gives it in seconds. At :math:`\rho_\infty = 1` from an unbalanced +seed (tangent lengths not at the static stretch) the VIV response is resolution-sensitive below +about 50 steps per cycle (on the taut line 4.7 % high in amplitude at 25): keep ``rhoInf`` at or +below 0.95 (:doc:`options`) or seed the tangents at the stretch. + On a finite-EI (cubic-Hermite) cable the lift is a distributed load per unit deformed length, .. math:: @@ -1263,7 +1311,7 @@ points of the drag (a point above the surface carries none), and its exact posit velocity derivatives enter the tangent. Each node carries a phase, driven as above by the node's cross-flow motion along its own tangent, the slope degrees of freedom; :math:`d`, :math:`c_F` and :math:`d_F` at a node are the length-weighted averages over its lifting -elements. The phase is explicit with the Heun commit as on ``EI = 0`` lines, and no smoothing is +elements. The phase advances as on ``EI = 0`` lines, and no smoothing is 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 @@ -1273,9 +1321,9 @@ deck waves and current through the held fluid field, on a line with one or two m 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 coupled routes the phase follows the host's fluid field (a SeaState current or waves), and the -phases, the running mean squares and the averaging time are part of the checkpoint state, so a -restart continues the uninterrupted run bit for bit. The OpenFAST correction iterations rewind -them with the rest of the state. +phases, the running mean squares, the predictor and the averaging time are part of the +checkpoint state, so a restart continues the uninterrupted run bit for bit. The OpenFAST +correction iterations rewind them with the rest of the state. .. _theory-viv-inline: @@ -1315,12 +1363,13 @@ lift, with the lift's wetted fractions, node tangent and neighbour-averaged kinematics (for the phase and in the force). On a finite-EI cable it is integrated with the lift at the same Gauss points, :math:`\cos\phi_x` interpolated between the element's end nodes. Its exact position and velocity -derivatives enter the tangent on both. The phase is explicit with the Heun commit, -its end-state rate taken from the end-state cross-flow rate. The phase and the two mean squares -are part of the step-recovery, snapshot and checkpoint state, and a ``ClX`` of zero leaves the -run exactly as without the row. On the taut line of ``viv_taut_cable_inline.dat`` the quarter -span moves in line at twice the cross-flow frequency, A/D 0.19 against 0.03 with the cross-flow -lift alone, and the same line as an ``EI = 0`` line gives the cable's amplitudes within 1 %. +derivatives enter the tangent on both. The phase advances as the cross-flow one, by the +mid-point rule with its rate slaved to the mid-point cross-flow rate and its own predictor rate. +The phase, the two mean squares and the predictor are part of the step-recovery, snapshot and +checkpoint state, and a ``ClX`` of zero leaves the run exactly as without the row. On the taut +line of ``viv_taut_cable_inline.dat`` the quarter span moves in line at twice the cross-flow +frequency, A/D 0.19 against 0.03 with the cross-flow lift alone, and the same line as an +``EI = 0`` line gives the cable's amplitudes within 1 %. A fourth column ``Chh`` adds the higher-harmonic force of :ref:`Ulveseter et al. (2019) `, the lift's form at the sum of the two phases, @@ -1368,10 +1417,11 @@ water, which then never sheds; a ``VIV FRAME`` row with the filter time :math:`T .. math:: U_a = \bigl|(\mathbf u - \bar{\mathbf v})_n\bigr|,\qquad - \bar{\mathbf v}_{n+1} = \bar{\mathbf v}_n + \bigl(1 - e^{-\delta t/T_f}\bigr) - (\mathbf v_{n+1} - \bar{\mathbf v}_n), + \bar{\mathbf v}_{n+1} = e^{-h}\,\bar{\mathbf v}_n + \bigl(1 - e^{-h}\bigr)\mathbf v_n + + \Bigl(1 - \frac{1 - e^{-h}}{h}\Bigr)(\mathbf v_{n+1} - \mathbf v_n),\qquad + h = \delta t/T_f, -the exact first-order filter of the converged end velocity held over the step, started at the +the exact first-order filter of the converged velocity linear over the step, started at the node's initial velocity. The slow motion (a tow, a floater's response) then counts as flow, and the VIV velocity, far faster than :math:`T_f`, is filtered out. On a cable towed at 0.15 m/s through still water (the taut cable of the deck gate, VIV at 0.28 Hz) :math:`T_f` 10 s gives the lock-in of @@ -1393,10 +1443,14 @@ fluid-added damping :math:`\gamma\,\omega_f\,\rho D^2\dot y` with in full, and their inviscid added mass is the Morison :math:`C_a`; the wake adds the lift only. The wake state :math:`(q, \dot q)` of a node is integrated beside the cable, as the phase of the -synchronisation model is. At the start of a step it is advanced under the step-start -acceleration to give the :math:`q` the step's lift takes; at the converged end it is advanced -again from the committed state with the acceleration linear between the step's ends, at the -step-start :math:`\omega_f`, and committed. Both use classical Runge-Kutta in equal sub-steps of +synchronisation model is. At the start of a step it is advanced under the predictor, the +cross-flow acceleration at the mid-point of the previous step, at the step-start +:math:`\omega_f`, to give the :math:`q` the step's lift takes; at the converged end it is advanced +again from the committed state under the mid-point acceleration +:math:`(\dot{\mathbf r}_{n+1} - \dot{\mathbf r}_n)\cdot\mathbf e_m/\delta t` (held over the +step, its integral exact), at the mean of the start and end :math:`\omega_f`, and committed, the +mid-point acceleration becoming the next predictor: second order in the step, as the phase of the +synchronisation model. Both use classical Runge-Kutta in equal sub-steps of :math:`r\,\delta t \le 0.1`, :math:`r = \omega_f\max(1, \varepsilon q^2)` the faster of the oscillation and the van der Pol damping rate at the start of the interval, so a large :math:`\varepsilon` stays resolved; should the rate exceed :math:`0.2/\delta t` on the way, or the @@ -1404,10 +1458,10 @@ result not be finite, the interval is redone with twice the sub-steps. The lift 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`. 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 (with :math:`T_f`, :math:`\bar{\mathbf v}` the next three statistics, and three -more state rows on a finite-EI cable). :math:`q` starts on +with the node's smoothed velocity (the average with its two neighbours) in the forcing, and +:math:`(q, \dot q)` takes the place of the phase and the first motion statistic in the line's +VIV state, the predictor the second (with :math:`T_f`, :math:`\bar{\mathbf v}` the next three +statistics, and three more state rows on a finite-EI cable). :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. @@ -1419,9 +1473,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 -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. +same line with ``EI = 0`` locks in at 0.283 Hz (one 0.001 Hz step from the cable) 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: @@ -1463,8 +1517,8 @@ once, and it is part of the step-recovery, snapshot and checkpoint state. On the taut line of the wake-oscillator gate (Cl 0.8, ``EI = 0`` and finite-EI alike) the smoothed mid-span estimate follows the half peak-to-peak cross-flow displacement of the steady -response within 0.03 % at A/D 0.68; a table whose :math:`C_v` falls from 0.8 at A/D 0.1 to zero -at 0.3 holds the response at A/D 0.28; :math:`C_v = 0` with a drag factor 2 settles at the static +response within 0.04 % at A/D 0.68 (0.1 % on the ``EI = 0`` line); a table whose :math:`C_v` +falls from 0.8 at A/D 0.1 to zero at 0.3 holds the response at A/D 0.28; :math:`C_v = 0` with a drag factor 2 settles at the static offset of ``Cd`` 2.4 to six digits; and a table with :math:`C_v` = ``Cl`` and factor 1 is the line without it, bit for bit. @@ -1531,7 +1585,7 @@ The row serves two uses: On the taut gate line, :math:`(0, 0, 1)` with factor 1 is the line without the row to round-off; with :math:`C_v = 0` and factor 2 the line settles at the static in-line offset of ``Cd`` 2.4 to the -printed digits; Thorsen's form raises the steady cross-flow amplitude from :math:`A/D` 0.68 to 1.02; +printed digits; Thorsen's form raises the steady cross-flow amplitude from :math:`A/D` 0.68 to 1.01; and the drag, damping and VIV powers balance within 0.2 %. .. _theory-viv-frame: @@ -1569,10 +1623,11 @@ velocity): nodes. :math:`\bar{\mathbf v}` is held over a step (the step-start value), so the Jacobians are -unchanged, and it is updated at the converged end. The lift and the drag act on the relative -velocity, which does not depend on the frame, and are unchanged. For a frame moving at a constant -velocity (a steady tow) the model is that of the held cable exactly. The velocity relative to -:math:`\bar{\mathbf v}` loses the part of the VIV velocity that passes the filter: for a response +unchanged, and it is updated at the converged end, exactly for the velocity linear over the step; +the phases take the mean of its start and end values, at the step's mid-point. The lift and the +drag act on the relative velocity, which does not depend on the frame, and are unchanged. For a +frame moving at a constant velocity (a steady tow) the model is that of the held cable exactly. +The velocity relative to :math:`\bar{\mathbf v}` loses the part of the VIV velocity that passes the filter: for a response at :math:`\omega` it is scaled by :math:`\omega T_f/\sqrt{1 + \omega^2 T_f^2}` and led by :math:`\arctan(1/\omega T_f)` (0.9985 and 3.1° at 0.29 Hz with :math:`T_f` 10 s). For a motion at :math:`\omega_m` the filter lags by :math:`\arctan\omega_m T_f`. :math:`T_f` is therefore taken @@ -1592,28 +1647,28 @@ differ by :math:`(m - \rho A)\dot V`), with :math:`T_f` 0.6 s: - RMS A/D moving / held * - Amplitude table and Thorsen's damping - ``Tf`` 0.6 s - - 0.819 / 0.819 - - 0.446 / 0.447 + - 0.811 / 0.818 + - 0.446 / 0.446 * - - none - - 0.711 / 0.850 - - 0.349 / 0.450 + - 0.700 / 0.851 + - 0.345 / 0.450 * - ``Cl`` alone - ``Tf`` 0.6 s - - 0.713 / 0.714 - - 0.372 / 0.371 + - 0.713 / 0.712 + - 0.372 / 0.370 * - - none - - 0.711 / 0.736 - - 0.349 / 0.375 + - 0.700 / 0.733 + - 0.345 / 0.374 -With the row the RMS of the two frames agrees within 0.2 % and the peak within 1 % (the moving -pipe's peak, a single extreme, ranges 0.811-0.819 over builds, OpenBLAS kernels and platforms), -the rest being the filter's lag +With the row the RMS of the two frames agrees within 0.6 % (0.02 % with the table) and the peak, +a single extreme, within 1 % (with the step-start phase update the moving pipe's peak ranged +0.811-0.819 over builds, OpenBLAS kernels and platforms), the rest being the filter's lag (:math:`\omega_m T_f` = 0.094). A taut cable towed at 0.15 m/s with :math:`T_f` 10 s gives A/D -0.7905 against 0.7906 held in the current with the same row (0.792 without it; 0.665 towed without -the row) with the table and damping, and 0.6764 against 0.6764 with ``Cl`` alone. On the held -cable :math:`T_f` changes A/D by at most 0.23 % on both line kinds. :math:`\bar{\mathbf v}` takes +0.7902 against 0.7903 held in the current with the same row (0.792 without it; 0.663 towed without +the row) with the table and damping, and 0.6758 against 0.6758 with ``Cl`` alone. On the held +cable :math:`T_f` changes A/D by at most 0.24 % on both line kinds. :math:`\bar{\mathbf v}` takes rows 7-9 of the node's motion statistics on both line kinds (nine rows; rows 3-6, the amplitude estimate, stay 0 without a table), so it is part of the step-recovery, snapshot and checkpoint state; an ``EI = 0`` line filters its smoothed node velocity. :math:`T_f` 0 or no row leaves the diff --git a/examples/viv_taut_cable_inline.dat b/examples/viv_taut_cable_inline.dat index 0f388d4d..0e1237a6 100644 --- a/examples/viv_taut_cable_inline.dat +++ b/examples/viv_taut_cable_inline.dat @@ -11,7 +11,7 @@ CableDyn driver deck -- cross-flow and in-line VIV of a taut cable in a uniform -- cross-flow lift alone (drop the VIV section) they are 0.03 and 0.66. The Outputs flag V writes -- the VIV force, lift and in-line, at every node to .Line1.V.out. VIVPow1, DragPow1 and -- DampPow1 are the power the VIV loads, the drag and the axial damping deliver to the line: over --- 60-90 s the VIV loads put in 8.52 W and the drag and damping take out 8.56 W. +-- 60-90 s the VIV loads put in 8.45 W and the drag and damping take out 8.48 W. --------------------- LINE TYPES --------------------------------------- TypeName Diam MassDenInAir EA BA/-zeta EI Cd_n Cd_t Ca_n Ca_t Cl dF cF (-) (m) (kg/m) (N) (N-s/-) (N-m^2) (-) (-) (-) (-) (-) (-) (-) diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 1574aa4d..68473b30 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -69,7 +69,8 @@ MODULE CableDyn_HermiteCableDynamic CD_VIV_Wrap_Phase, CD_VIV_TWO_PI, CD_VIV_NM, CD_VIV_Inline_Per_Length, & CD_VIV_Inline_Phase_Rate, CD_VIV_Wake_Advance, CD_VIV_NMS, CD_VIV_NMS_AMP, & CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, CD_VIV_Check_Amp_Table, & - CD_VIV_Ambient_Crossflow_Rate, CD_VIV_NMS_FRAME + CD_VIV_Ambient_Crossflow_Rate, CD_VIV_NMS_FRAME, CD_VIV_Mean_Square_Weight, & + CD_VIV_Filter_Linear USE CableDyn_Hydro, ONLY: CD_Morison_Drag_Per_Length_Jac, CD_Airy_Wave_Kinematics_Precomputed, & CD_Morison_Drag_Split_Per_Length_Jac, & CD_Component_Wave_Kinematics, CD_Solve_Dispersion_Wavenumber, CD_HYDRO_OK @@ -332,9 +333,11 @@ MODULE CableDyn_HermiteCableDynamic REAL(wp), ALLOCATABLE :: fr_anchor(:, :), fr_k(:), ws_recovery_fr(:, :), snap_fr_anchor(:, :) ! Cross-flow VIV (CD_HermiteCable_Dyn_Set_VIV, CableDyn_VIV): viv_k(e) = 1/2 rho D Cl of each ! element (0: no lift), the synchronisation band and diameter per node, the shedding phase - ! and the running mean squares of the cross-flow velocity and acceleration per node. The lift - ! of a step takes viv_phi_eval (the committed phase for F_n, the step's predicted phase in - ! the Newton iterations); viv_rate/viv_ms_next hold the step-start rate and mean squares. + ! and the running mean squares of the cross-flow velocity and acceleration per node, and after + ! the motion statistics the step predictor (viv_pred_row: the phase rate at the mid-point of + ! the last step, the in-line one after it). The lift of a step takes viv_phi_eval (the + ! committed phase for F_n, the step's predicted phase in the Newton iterations); viv_rate and + ! viv_ms_next hold the step's predicted rate and its end statistics. ! ws_recovery_viv_* is the step-start copy of the recovering step, snap_viv_* the snapshot. LOGICAL :: has_viv = .FALSE. ! the cross-flow phase of a node at rest (CD_VIV_Phase_Rate phi_rest): pi where the material @@ -363,8 +366,9 @@ MODULE CableDyn_HermiteCableDynamic ! lift taking viv_k = 1/2 rho D viv_cl with viv_cl = C_L0/2. Per node the Strouhal number, ! van der Pol eps and coupling A (length-weighted over its lifting elements), the state ! wo_s(:, k) = (q, dq/dt), q at the step's evaluation point (wo_q_eval, as viv_phi_eval), the - ! step-start cross-flow acceleration and wake frequency (wo_ydd0, wo_om0) the step end - ! integrates from, and the recovery and snapshot copies of the state. With a filter time + ! step predictor in row 2 of viv_ms (the cross-flow acceleration at the mid-point of the last + ! step; wo_ydd0 its copy in a step), the step-start wake frequency wo_om0, and the recovery and + ! snapshot copies of the state. With a filter time ! wo_tf(k) > 0 on some node (wo_filter) wo_s has three more rows, the node's velocity ! low-pass filtered over wo_tf (first order), and the wake frequency takes the flow normal to ! the line relative to it: a cable moved through still water sheds, the cable's own VIV @@ -1476,6 +1480,8 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err END IF nms = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, want_amp) IF (want_frame) nms = CD_VIV_NMS_FRAME + ! the step predictor after the motion statistics (viv_pred_row; row 2 on a wake cable) + IF (.NOT. want_wake) nms = nms + MERGE(2, 1, want_il) ALLOCATE (model%viv_cl(ne), model%viv_k(ne), model%viv_cf(nn), model%viv_df(nn), model%viv_dn(nn), & model%viv_phi(nn), & model%viv_phi_eval(nn), model%viv_rate(nn), model%viv_ms(nms, nn), model%viv_ms_next(nms, nn), & @@ -1640,6 +1646,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err model%has_viv = .TRUE. ! the lift is part of the committed load: the first step's predictor and phase rate need it CALL refresh_acceleration() + IF (ErrStat == CD_HCDYN_OK) CALL viv_seed_predictor(model) CONTAINS SUBROUTINE refresh_acceleration() @@ -1945,26 +1952,101 @@ SUBROUTINE viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) END IF END SUBROUTINE viv_node_motion + PURE INTEGER FUNCTION viv_pred_row(model) RESULT(r) + !! The row of viv_ms holding the step predictor (CableDyn_VIV): after the motion statistics on a + !! synchronisation-model cable (the in-line rate in the row after it), row 2 on a wake cable. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + r = 2 + IF (model%viv_wake) RETURN + r = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp) + IF (model%viv_frame) r = CD_VIV_NMS_FRAME + r = r + 1 + END FUNCTION viv_pred_row + + SUBROUTINE viv_node_motion_mid(model, k, dt, vf, yd, ydd, un, ok, xd, xdd) + !! Cross-flow velocity and acceleration of node k at the mid-point of the step just committed, + !! as viv_node_motion: the tangent the mean of the step-start (ws_qn, ws_vn) and the committed + !! end one, the velocity and acceleration the step means (q_n+1 - q_n)/dt and (v_n+1 - v_n)/dt + !! (the means of the velocity and of its derivative, so a harmonic motion keeps its phase + !! between them exactly), the node's velocity and the flow relative to vf (the flow frame's + !! velocity at the mid-point; zero without it); optionally (both or neither) the in-line ones. + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: k + REAL(wp), INTENT(IN) :: dt, vf(3) + REAL(wp), INTENT(OUT) :: yd, ydd, un + LOGICAL, INTENT(OUT) :: ok + REAL(wp), INTENT(OUT), OPTIONAL :: xd, xdd + REAL(wp) :: uu(3), tm(3), vm(3), am(3) + INTEGER :: i0 + i0 = 6*(k - 1) + uu = model%current + IF (model%has_held_field) uu = uu + model%hf_u(:, k) + tm = 0.5_wp*(model%ws_qn(i0 + 4:i0 + 6) + model%q(i0 + 4:i0 + 6)) + vm = (model%q(i0 + 1:i0 + 3) - model%ws_qn(i0 + 1:i0 + 3))/dt - vf + am = (model%v(i0 + 1:i0 + 3) - model%ws_vn(i0 + 1:i0 + 3))/dt + IF (PRESENT(xd)) THEN + CALL CD_VIV_Crossflow_Along(tm, vm, am, uu - vf, yd, ydd, un, ok, xd, xdd) + ELSE + CALL CD_VIV_Crossflow_Along(tm, vm, am, uu - vf, yd, ydd, un, ok) + END IF + END SUBROUTINE viv_node_motion_mid + + SUBROUTINE viv_seed_predictor(model) + !! The step predictor of a newly installed VIV model (viv_pred_row of viv_ms and its next, + !! recovery and snapshot copies): the phase rates at the present state, from the node's + !! velocity and consistent acceleration and the mean squares at zero (MoorDyn's unnormalised + !! start), and on a wake cable the cross-flow acceleration there. Only the first step predicts + !! from it; every step then leaves the rate at its own mid-point (viv_step_end). + TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model + INTEGER :: k, ir + REAL(wp) :: yd, ydd, un, xd, xdd + LOGICAL :: ok + ir = viv_pred_row(model) + DO k = 1, model%nn + IF (.NOT. model%viv_node(k)) CYCLE + CALL viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) + IF (.NOT. (ok .AND. CD_Is_Finite(yd) .AND. CD_Is_Finite(ydd))) THEN + yd = CD_ZERO; ydd = CD_ZERO; xd = CD_ZERO; xdd = CD_ZERO + END IF + IF (model%viv_wake) THEN + model%viv_ms(ir, k) = ydd + CYCLE + END IF + model%viv_ms(ir, k) = CD_VIV_Phase_Rate(yd, ydd, CD_ZERO, CD_ZERO, model%viv_phi(k), un, model%viv_dn(k), & + model%viv_cf(k), model%viv_df(k), phi_rest=model%viv_phi_rest) + IF (.NOT. model%has_viv_il) CYCLE + IF (.NOT. model%vil_node(k)) CYCLE + model%viv_ms(ir + 1, k) = CD_VIV_Inline_Phase_Rate(xd, xdd, CD_ZERO, CD_ZERO, model%vil_phi(k), & + model%viv_ms(ir, k), model%vil_alpha(k)) + END DO + model%viv_ms_next = model%viv_ms + model%ws_recovery_viv_ms = model%viv_ms + model%snap_viv_ms = model%viv_ms + END SUBROUTINE viv_seed_predictor + SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) - !! Step-start VIV quantities from the committed state (q, v, a, phi): the mean squares with - !! the step-start cross-flow sample (viv_ms_next), the phase rate (viv_rate) and the phase the - !! step's lift takes (viv_phi_eval): the explicit phase at t_{n+1} under the force blend, - !! whose in-step force is R(q_{n+1}, v_{n+1}) (F_n keeps phi_n), and at the generalised-alpha - !! level under the configuration blend. + !! Step-start VIV quantities from the committed state (q, v, phi and the step predictor, the + !! phase rate at the mid-point of the last step in viv_pred_row of viv_ms): that rate + !! (viv_rate) and the phase the step's lift takes (viv_phi_eval): the explicit phase at + !! t_{n+1} under the force blend, whose in-step force is R(q_{n+1}, v_{n+1}) (F_n keeps phi_n), + !! and at the generalised-alpha level under the configuration blend. The committed + !! acceleration is not sampled (see the EI = 0 model's viv_step_begin): it is the cable's to + !! O(dt) only and at rho_inf = 1 carries an undamped alternating mode. On a wake cable the wake + !! state is predicted at the evaluation point under the last step's mid-point acceleration + !! (row 2 of viv_ms) and the step-start wake frequency. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: dt INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - INTEGER :: k - REAL(wp) :: w, frac, yd, ydd, un, xd, xdd, sw(2) + INTEGER :: k, ir + REAL(wp) :: frac, yd, ydd, un, sw(2) LOGICAL :: ok ErrStat = CD_HCDYN_OK; ErrMsg = '' IF (.NOT. (model%viv_tw > CD_ZERO)) model%viv_tw = REAL(CD_VIV_NM, wp)*dt - w = MIN(CD_ONE, dt/model%viv_tw) frac = CD_ONE IF (.NOT. model%force_blend) frac = CD_ONE - model%alpha_f + ir = viv_pred_row(model) IF (model%viv_wake) THEN - ! the wake state predicted at the step's evaluation point under the step-start forcing model%wo_q_eval = model%wo_s(1, :) DO k = 1, model%nn IF (.NOT. model%viv_node(k)) CYCLE @@ -1985,10 +2067,10 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) ELSE model%wo_om0(k) = CD_VIV_TWO_PI*model%wo_st(k)*viv_node_ambient_speed(model, k)/model%viv_dn(k) END IF - model%wo_ydd0(k) = ydd + model%wo_ydd0(k) = model%viv_ms(ir, k) sw = model%wo_s(1:2, k) - CALL CD_VIV_Wake_Advance(sw, model%wo_om0(k), model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), ydd, ydd, & - frac*dt) + CALL CD_VIV_Wake_Advance(sw, model%wo_om0(k), model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), & + model%wo_ydd0(k), model%wo_ydd0(k), frac*dt) model%wo_q_eval(k) = sw(1) END DO RETURN @@ -2003,109 +2085,145 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) END IF DO k = 1, model%nn IF (.NOT. model%viv_node(k)) CYCLE - CALL viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) + CALL viv_node_motion(model, k, yd, ydd, un, ok) IF (.NOT. ok) THEN ErrStat = CD_HCDYN_NOCONVERGE; ErrMsg = 'VIV phase: degenerate node tangent'; RETURN END IF - model%viv_ms_next(1, k) = CD_VIV_Mean_Square(model%viv_ms(1, k), yd, w) - model%viv_ms_next(2, k) = CD_VIV_Mean_Square(model%viv_ms(2, k), ydd, w) - model%viv_rate(k) = CD_VIV_Phase_Rate(yd, ydd, model%viv_ms_next(1, k), model%viv_ms_next(2, k), & - model%viv_phi(k), un, model%viv_dn(k), model%viv_cf(k), & - model%viv_df(k), phi_rest=model%viv_phi_rest) + model%viv_rate(k) = model%viv_ms(ir, k) model%viv_phi_eval(k) = model%viv_phi(k) + frac*dt*model%viv_rate(k) IF (.NOT. model%has_viv_il) CYCLE IF (.NOT. model%vil_node(k)) CYCLE - model%vil_ms_next(1, k) = CD_VIV_Mean_Square(model%vil_ms(1, k), xd, w) - model%vil_ms_next(2, k) = CD_VIV_Mean_Square(model%vil_ms(2, k), xdd, w) - model%vil_rate(k) = CD_VIV_Inline_Phase_Rate(xd, xdd, model%vil_ms_next(1, k), model%vil_ms_next(2, k), & - model%vil_phi(k), model%viv_rate(k), model%vil_alpha(k)) + model%vil_rate(k) = model%viv_ms(ir + 1, k) model%vil_phi_eval(k) = model%vil_phi(k) + frac*dt*model%vil_rate(k) END DO END SUBROUTINE viv_step_begin SUBROUTINE viv_step_end(model, dt) - !! Commit the VIV state at the converged end state (q, v, a just committed): the phase by - !! Heun's rule phi_n + dt/2 (rate_n + rate(state_n+1, phi_n + dt rate_n)), with the end-state - !! sample added to the mean squares for that rate only, and the step-start mean squares. The - !! lift then takes the committed phase again. It cannot fail, so the step it ends is never - !! left half committed: a node whose end tangent is degenerate, or whose end rate is not - !! finite, takes the step-start rate over the step (phi_n + dt rate_n). + !! Commit the VIV state at the converged end state (q, v just committed; the step-start state + !! in ws_qn, ws_vn): the phase by the implicit mid-point rule, one fixed-point pass from the + !! step predictor rate_p (rate_1 = rate(mid-point motion, phi_n + dt/2 rate_p), phi_n + dt + !! rate(mid-point motion, phi_n + dt/2 rate_1)), on the node's cross-flow motion at the step's + !! mid-point with the velocity and acceleration over the step (viv_node_motion_mid), the mean + !! squares by the mid-point rule, the flow frame's and the wake filter's velocities exactly for + !! the velocity linear over the step, and the mid-point rate as the next step's predictor (as + !! the EI = 0 model's viv_step_end). The lift then takes the committed phase again. It cannot + !! fail, so the step it ends is never left half committed: a node whose mid-point tangent is + !! degenerate, or whose rate is not finite, takes the predicted rate over the step + !! (phi_n + dt rate_p), and a wake node the predictor's acceleration. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: dt - INTEGER :: k - REAL(wp) :: w, yd, ydd, un, ms1, ms2, rate_end, xd, xdd, rate_end_x, sw(2), st(4), yda + INTEGER :: k, ir, i0, ip + REAL(wp) :: wf, wh, yd, ydd, un, ms1, ms2, rate_mid, xd, xdd, rate_mid_x, sw(2), st(4), yda, vf(3), om, ap LOGICAL :: ok, il + ir = viv_pred_row(model) IF (model%viv_wake) THEN - ! the wake state over the step with the cross-flow acceleration linear from its step-start - ! value to the converged end one (held where the end tangent is degenerate), at the - ! step-start wake frequency; a non-finite result keeps the step-start forcing alone + ! the wake state over the step under the mid-point cross-flow acceleration (held over the + ! step, its integral exact) at the mean of the start and end wake frequencies; a non-finite + ! result keeps the step-start frequency and the predictor's forcing DO k = 1, model%nn IF (.NOT. model%viv_node(k)) CYCLE - CALL viv_node_motion(model, k, yd, ydd, un, ok) - IF (.NOT. (ok .AND. CD_Is_Finite(ydd))) ydd = model%wo_ydd0(k) + i0 = 6*(k - 1) + ap = model%wo_ydd0(k) + CALL viv_node_motion_mid(model, k, dt, [CD_ZERO, CD_ZERO, CD_ZERO], yd, ydd, un, ok) + IF (.NOT. (ok .AND. CD_Is_Finite(ydd))) ydd = ap + ! the filtered velocity, exact for the first-order filter of the velocity linear over the + ! step (a non-finite end velocity keeps it), and the wake frequency at the step end + IF (model%wo_filter) THEN + IF (model%wo_tf(k) > CD_ZERO .AND. CD_All_Finite(model%v(i0 + 1:i0 + 3))) & + model%wo_s(3:5, k) = CD_VIV_Filter_Linear(model%wo_s(3:5, k), model%ws_vn(i0 + 1:i0 + 3), & + model%v(i0 + 1:i0 + 3), dt/model%wo_tf(k)) + END IF + om = viv_node_ambient_speed(model, k) + IF (model%wo_filter) THEN + IF (model%wo_tf(k) > CD_ZERO) om = viv_node_ambient_speed(model, k, model%wo_s(3:5, k)) + END IF + om = 0.5_wp*(model%wo_om0(k) + CD_VIV_TWO_PI*model%wo_st(k)*om/model%viv_dn(k)) + IF (.NOT. CD_Is_Finite(om)) om = model%wo_om0(k) sw = model%wo_s(1:2, k) - CALL CD_VIV_Wake_Advance(sw, model%wo_om0(k), model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), & - model%wo_ydd0(k), ydd, dt) + CALL CD_VIV_Wake_Advance(sw, om, model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), ydd, ydd, dt) IF (.NOT. (CD_Is_Finite(sw(1)) .AND. CD_Is_Finite(sw(2)))) THEN + ydd = ap sw = model%wo_s(1:2, k) CALL CD_VIV_Wake_Advance(sw, model%wo_om0(k), model%wo_eps(k), model%wo_a(k)/model%viv_dn(k), & - model%wo_ydd0(k), model%wo_ydd0(k), dt) + ydd, ydd, dt) END IF model%wo_s(1:2, k) = sw - ! the filtered velocity, exact for the first-order filter of the converged end velocity - ! held over the step (a non-finite end velocity keeps it) - IF (model%wo_filter) THEN - IF (model%wo_tf(k) > CD_ZERO .AND. CD_All_Finite(model%v(6*(k - 1) + 1:6*(k - 1) + 3))) & - model%wo_s(3:5, k) = model%wo_s(3:5, k) + (CD_ONE - EXP(-dt/model%wo_tf(k)))* & - (model%v(6*(k - 1) + 1:6*(k - 1) + 3) - model%wo_s(3:5, k)) - END IF + model%viv_ms(ir, k) = ydd END DO model%wo_q_eval = model%wo_s(1, :) + model%viv_ms_next = model%viv_ms RETURN END IF - w = MIN(CD_ONE, dt/model%viv_tw) + wf = CD_VIV_Mean_Square_Weight(dt/model%viv_tw) + wh = CD_VIV_Mean_Square_Weight(0.5_wp*dt/model%viv_tw) DO k = 1, model%nn IF (.NOT. model%viv_node(k)) CYCLE + i0 = 6*(k - 1) il = .FALSE. IF (model%has_viv_il) il = model%vil_node(k) - rate_end = model%viv_rate(k) - rate_end_x = CD_ZERO - IF (il) rate_end_x = model%vil_rate(k) - CALL viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) + rate_mid = model%viv_rate(k) + rate_mid_x = CD_ZERO + IF (il) rate_mid_x = model%vil_rate(k) IF (model%has_viv_amp) THEN - ! the amplitude estimate over the step on the cross-flow velocity across the ambient flow; - ! a non-finite one holds y' (no crossing) + ! the amplitude estimate over the step on the cross-flow velocity across the ambient flow + ! (with the flow frame, relative to the step-start filtered velocity); a non-finite one + ! holds y' (no crossing) st = model%viv_ms(3:6, k) yda = viv_node_ambient_yd(model, k) IF (.NOT. CD_Is_Finite(yda)) yda = st(4) CALL CD_VIV_Amplitude_Update(st, yda, dt) model%viv_ms_next(3:6, k) = st END IF + ! the flow frame's velocity at the mid-point: the filtered velocity at the step end (exact + ! for the first-order filter of the velocity linear over the step; a non-finite end velocity + ! keeps it) averaged with the step-start one + vf = CD_ZERO IF (model%viv_frame) THEN - ! the flow frame's filtered velocity, exact for the first-order filter of the converged end - ! velocity held over the step (a non-finite end velocity keeps it); the estimate above took - ! the step-start one - IF (model%viv_ftf(k) > CD_ZERO .AND. CD_All_Finite(model%v(6*(k - 1) + 1:6*(k - 1) + 3))) & - model%viv_ms_next(7:9, k) = model%viv_ms(7:9, k) + (CD_ONE - EXP(-dt/model%viv_ftf(k)))* & - (model%v(6*(k - 1) + 1:6*(k - 1) + 3) - model%viv_ms(7:9, k)) + IF (model%viv_ftf(k) > CD_ZERO) THEN + IF (CD_All_Finite(model%v(i0 + 1:i0 + 3))) & + model%viv_ms_next(7:9, k) = CD_VIV_Filter_Linear(model%viv_ms(7:9, k), model%ws_vn(i0 + 1:i0 + 3), & + model%v(i0 + 1:i0 + 3), dt/model%viv_ftf(k)) + vf = 0.5_wp*(model%viv_ms(7:9, k) + model%viv_ms_next(7:9, k)) + END IF END IF + CALL viv_node_motion_mid(model, k, dt, vf, yd, ydd, un, ok, xd, xdd) IF (ok) THEN - ms1 = CD_VIV_Mean_Square(model%viv_ms_next(1, k), yd, w) - ms2 = CD_VIV_Mean_Square(model%viv_ms_next(2, k), ydd, w) - rate_end = CD_VIV_Phase_Rate(yd, ydd, ms1, ms2, model%viv_phi(k) + dt*model%viv_rate(k), un, & - model%viv_dn(k), model%viv_cf(k), model%viv_df(k), phi_rest=model%viv_phi_rest) - IF (.NOT. CD_Is_Finite(rate_end)) rate_end = model%viv_rate(k) + ms1 = CD_VIV_Mean_Square(model%viv_ms(1, k), yd, wh) + ms2 = CD_VIV_Mean_Square(model%viv_ms(2, k), ydd, wh) + ! the implicit mid-point rule by one fixed-point pass: the mid-point phase from the + ! predictor, then from the rate it gives + DO ip = 1, 2 + rate_mid = CD_VIV_Phase_Rate(yd, ydd, ms1, ms2, model%viv_phi(k) + 0.5_wp*dt*rate_mid, un, & + model%viv_dn(k), model%viv_cf(k), model%viv_df(k), phi_rest=model%viv_phi_rest) + END DO + IF (CD_Is_Finite(rate_mid)) THEN + model%viv_ms_next(1, k) = CD_VIV_Mean_Square(model%viv_ms(1, k), yd, wf) + model%viv_ms_next(2, k) = CD_VIV_Mean_Square(model%viv_ms(2, k), ydd, wf) + ELSE + rate_mid = model%viv_rate(k) + END IF IF (il) THEN - ! the in-line rate at the end state is slaved to the end cross-flow rate (Eq. 6) - ms1 = CD_VIV_Mean_Square(model%vil_ms_next(1, k), xd, w) - ms2 = CD_VIV_Mean_Square(model%vil_ms_next(2, k), xdd, w) - rate_end_x = CD_VIV_Inline_Phase_Rate(xd, xdd, ms1, ms2, model%vil_phi(k) + dt*model%vil_rate(k), & - rate_end, model%vil_alpha(k)) - IF (.NOT. CD_Is_Finite(rate_end_x)) rate_end_x = model%vil_rate(k) + ! the in-line rate at the mid-point is slaved to the mid-point cross-flow rate (Eq. 6) + ms1 = CD_VIV_Mean_Square(model%vil_ms(1, k), xd, wh) + ms2 = CD_VIV_Mean_Square(model%vil_ms(2, k), xdd, wh) + DO ip = 1, 2 + rate_mid_x = CD_VIV_Inline_Phase_Rate(xd, xdd, ms1, ms2, model%vil_phi(k) + 0.5_wp*dt*rate_mid_x, & + rate_mid, model%vil_alpha(k)) + END DO + IF (CD_Is_Finite(rate_mid_x)) THEN + model%vil_ms_next(1, k) = CD_VIV_Mean_Square(model%vil_ms(1, k), xd, wf) + model%vil_ms_next(2, k) = CD_VIV_Mean_Square(model%vil_ms(2, k), xdd, wf) + ELSE + rate_mid_x = model%vil_rate(k) + END IF END IF END IF - model%viv_phi(k) = CD_VIV_Wrap_Phase(model%viv_phi(k) + 0.5_wp*dt*(model%viv_rate(k) + rate_end)) - IF (il) model%vil_phi(k) = CD_VIV_Wrap_Phase(model%vil_phi(k) + 0.5_wp*dt*(model%vil_rate(k) + rate_end_x)) + model%viv_ms_next(ir, k) = rate_mid + model%viv_phi(k) = CD_VIV_Wrap_Phase(model%viv_phi(k) + dt*rate_mid) + IF (il) THEN + model%viv_ms_next(ir + 1, k) = rate_mid_x + model%vil_phi(k) = CD_VIV_Wrap_Phase(model%vil_phi(k) + dt*rate_mid_x) + END IF END DO model%viv_ms = model%viv_ms_next model%viv_phi_eval = model%viv_phi diff --git a/src/CableDyn_Model.f90 b/src/CableDyn_Model.f90 index 4f849d67..8782e624 100644 --- a/src/CableDyn_Model.f90 +++ b/src/CableDyn_Model.f90 @@ -60,7 +60,7 @@ MODULE CableDyn_Model CD_VIV_Wrap_Phase, CD_VIV_NM, CD_VIV_TWO_PI, CD_VIV_Node_Inline, CD_VIV_Inline_Phase_Rate, & CD_VIV_NMS, CD_VIV_NMS_AMP, CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, & CD_VIV_Check_Amp_Table, CD_VIV_Ambient_Crossflow_Rate, CD_VIV_Wake_Advance, & - CD_VIV_NMS_FRAME + CD_VIV_NMS_FRAME, CD_VIV_Mean_Square_Weight, CD_VIV_Filter_Linear USE CableDyn_Dynamic, ONLY: GenAlphaConfig, CD_CableGenAlphaWorkspace, CD_Clear_GenAlpha_Workspace, & CD_Cable_Initial_Acceleration, CD_Cable_Gen_Alpha_Step, CD_Cable_Step_Loads, & CD_DYN_OK, CD_DYN_ALLOCFAIL, & @@ -402,8 +402,11 @@ MODULE CableDyn_Model ! viv_tw is the averaging time of the mean squares [s]; 0 until CD_Latch_Model_VIV_Window ! (or the first step) sets MoorDyn's 500 steps. viv_phi_eval is the phase the lift ! contributor uses: the committed phase, except inside CD_Step_Model, where it is the - ! explicit generalised-alpha force-level phase. viv_rate (phase rate at the step start) - ! and viv_ms_next (mean squares updated with the step-start sample) are step scratch. + ! explicit generalised-alpha force-level phase. Row viv_pred_row of viv_ms (after the motion + ! statistics) is the step predictor, the phase rate at the mid-point of the last step (the + ! in-line one in the row after it, with in-line VIV): the step predicts the phase its lift + ! takes with it (viv_step_begin). viv_rate (that rate in a step) and viv_ms_next (the + ! end-of-step statistics) are step scratch. LOGICAL :: has_viv = .FALSE. ! the cross-flow phase of a node at rest (CD_VIV_Phase_Rate phi_rest): pi where the node ! tangent runs against MoorDyn's (End B to End A), 0 where it runs as MoorDyn's @@ -454,8 +457,8 @@ MODULE CableDyn_Model ! (length-weighted over its lifting elements). The state rides in the VIV state slots, so the ! rollback, step-recovery, sub-step and checkpoint copies carry it unchanged: viv_phi holds q ! (viv_phi_eval q at the step's evaluation point, viv_phi_next q at the step end) and row 1 of - ! viv_ms dq/dt; in a step, viv_rate holds the step-start wake frequency and row 2 of viv_ms_next - ! the step-start cross-flow acceleration (row 2 of viv_ms stays 0). With a wake filter time + ! viv_ms dq/dt, row 2 the step predictor, the cross-flow acceleration at the mid-point of the + ! last step; in a step, viv_rate holds the step-start wake frequency. With a wake filter time ! wo_tf > 0 on some node (wo_filter) viv_ms has CD_VIV_NMS_AMP rows, rows 3:5 the node's ! velocity low-pass filtered over wo_tf (first order), and the wake frequency takes the flow ! normal to the line relative to it (a line moved through still water sheds). @@ -2801,10 +2804,9 @@ SUBROUTINE step_model_plain(model, dt, converged, stalled, n_iter, ErrStat, ErrM CALL step_start_load(ErrStat, ErrMsg) IF (force_lengths) CALL leave_committed_lengths(model, aside) IF (ErrStat /= CD_MODEL_OK) RETURN - ! VIV: phase rate and mean squares at the step-start state (after the committed-state - ! load above, which takes the committed phase), and the explicit phase for the in-step - ! lift (see viv_step_begin). Nothing is - ! committed until the step succeeds; viv_phi_eval returns to the committed phase on + ! VIV: the predicted phase rate and the explicit phase for the in-step lift (after the + ! committed-state load above, which takes the committed phase; see viv_step_begin). Nothing + ! is committed until the step succeeds; viv_phi_eval returns to the committed phase on ! every exit, as ve_dt below. IF (model%has_viv) THEN IF (.NOT. (CD_Is_Finite(dt) .AND. dt > CD_ZERO)) THEN @@ -3006,7 +3008,8 @@ SUBROUTINE step_model_plain(model, dt, converged, stalled, n_iter, ErrStat, ErrM RETURN END IF END IF - ! VIV pass 1: the end-of-step phase (Heun) into viv_phi_next; committed below. + ! VIV pass 1: the end-of-step phase (mid-point rule) and statistics into viv_phi_next and + ! viv_ms_next; committed below. IF (model%has_viv) THEN CALL viv_step_end(model, dt, ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) THEN @@ -3068,8 +3071,7 @@ SUBROUTINE step_model_plain(model, dt, converged, stalled, n_iter, ErrStat, ErrM END BLOCK END IF IF (model%has_viv) THEN - ! VIV pass 2 (mutate): the phase and the mean squares updated with the step-start - ! sample (the next step starts by adding its own sample, the end state of this one) + ! VIV pass 2 (mutate): the phase, the statistics and the step predictor at the step end model%viv_phi = model%viv_phi_next model%viv_ms = model%viv_ms_next model%viv_phi_eval = model%viv_phi @@ -4200,6 +4202,8 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, END DO nms = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, want_amp .OR. (want_wake .AND. want_filter)) IF (want_frame) nms = CD_VIV_NMS_FRAME + ! the step predictor after the motion statistics (viv_pred_row; row 2 on a wake line) + IF (.NOT. want_wake) nms = nms + MERGE(2, 1, want_il) ALLOCATE (model%viv_cl(n_elem), model%viv_d(n_elem), model%viv_node(n_nodes), model%viv_cf(n_nodes), & model%viv_df(n_nodes), model%viv_dn(n_nodes), model%viv_phi(n_nodes), model%viv_ms(nms, n_nodes), & model%viv_phi_rollback(n_nodes), model%viv_ms_rollback(nms, n_nodes), & @@ -4333,7 +4337,10 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, model%viv_wake = .TRUE. END IF model%has_viv = .TRUE. - IF (.NOT. want_il) RETURN + IF (.NOT. want_il) THEN + CALL viv_seed_predictor(model) + RETURN + END IF ALLOCATE (model%vil_cx(n_elem), model%vil_alpha(n_nodes), model%vil_node(n_nodes), model%vil_phi(n_nodes), & model%vil_ms(2, n_nodes), model%vil_phi_rollback(n_nodes), model%vil_ms_rollback(2, n_nodes), & model%recovery_vil_phi(n_nodes), model%recovery_vil_ms(2, n_nodes), model%vil_phi_eval(n_nodes), & @@ -4373,6 +4380,7 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, model%vil_ms_next = model%vil_ms model%vil_phi_next = model%vil_phi model%has_viv_il = .TRUE. + CALL viv_seed_predictor(model) END SUBROUTINE CD_Set_Model_VIV SUBROUTINE CD_Latch_Model_VIV_Window(model, dt) @@ -4389,11 +4397,13 @@ END SUBROUTINE CD_Latch_Model_VIV_Window SUBROUTINE CD_Get_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi_x, ms_x) !! Copy the committed VIV state for a checkpoint: the shedding phase per node (n_nodes), - !! the running mean squares of the cross-flow velocity and acceleration (2, n_nodes), and - !! the averaging time (0 while unlatched). A model without VIV returns zeros. phi_x and ms_x - !! (both or neither, same shapes) take the in-line phase and mean squares, zero without - !! in-line VIV. On a wake-oscillator line phi is the wake variable q and row 1 of ms its rate - !! dq/dt (row 2 zero). + !! the motion statistics (CD_Model_VIV_NMS, n_nodes: the running mean squares of the + !! cross-flow velocity and acceleration, the amplitude estimate and the flow frame where the + !! line has them, and the step predictor), and the averaging time (0 while unlatched). A model + !! without VIV returns zeros. phi_x and ms_x (both or neither, shapes (n_nodes) and (2, + !! n_nodes)) take the in-line phase and mean squares, zero without in-line VIV. On a + !! wake-oscillator line phi is the wake variable q, row 1 of ms its rate dq/dt and row 2 the + !! step predictor. TYPE(CD_ModelType), INTENT(IN) :: model REAL(wp), INTENT(OUT) :: phi(:), ms(:, :), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -4466,14 +4476,12 @@ SUBROUTINE CD_Set_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi RETURN END IF ! the mean squares (rows 1:2) and the amplitudes y0, y0s (rows 4:5) cannot be negative; the - ! travel and the last cross-flow velocity of the amplitude estimate (rows 3, 6) are signed - ! (a wake-oscillator line holds dq/dt in row 1, signed, and 0 in row 2) - IF (model%viv_wake) THEN - neg = ANY(ms(2, :) < CD_ZERO) - ELSE - neg = ANY(ms(1:2, :) < CD_ZERO) - END IF - IF (SIZE(ms, 1) >= 5 .AND. .NOT. model%viv_wake) neg = neg .OR. ANY(ms(4:5, :) < CD_ZERO) + ! travel and the last cross-flow velocity of the amplitude estimate (rows 3, 6) and the step + ! predictor's rates (row viv_pred_row on) are signed (a wake-oscillator line holds dq/dt in row 1 + ! and its predictor, the mid-point cross-flow acceleration, in row 2, both signed) + neg = .FALSE. + IF (.NOT. model%viv_wake) neg = ANY(ms(1:2, :) < CD_ZERO) + IF (model%has_viv_amp .OR. model%viv_frame) neg = neg .OR. ANY(ms(4:5, :) < CD_ZERO) IF (neg .OR. t_window < CD_ZERO) THEN CALL fail(ErrStat, ErrMsg, 'VIV mean squares, amplitudes and averaging time must be non-negative') RETURN @@ -4703,10 +4711,13 @@ END FUNCTION CD_Model_Has_VIV PURE INTEGER FUNCTION CD_Model_VIV_NMS(model) RESULT(n) !! Rows of the VIV motion statistics of a node in the VIV state (CD_Get_Model_VIV_State ms): !! CD_VIV_NMS_AMP with amplitude tables (the amplitude estimate after the mean squares) or the - !! wake filter (the filtered velocity in rows 3:5), CD_VIV_NMS otherwise. + !! wake filter (the filtered velocity in rows 3:5), CD_VIV_NMS_FRAME with the flow frame, + !! CD_VIV_NMS otherwise; on a synchronisation-model line one more, the step predictor (two + !! with in-line VIV; viv_pred_row). TYPE(CD_ModelType), INTENT(IN) :: model n = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp .OR. model%wo_filter) IF (model%viv_frame) n = CD_VIV_NMS_FRAME + IF (model%has_viv .AND. .NOT. model%viv_wake) n = n + MERGE(2, 1, model%has_viv_il) END FUNCTION CD_Model_VIV_NMS SUBROUTINE CD_Get_Model_VIV_Amplitude(model, amp, ErrStat, ErrMsg) @@ -4810,24 +4821,85 @@ SUBROUTINE viv_node_coef(model, q, nd, coef, uu, coefx, coefh) IF (ALLOCATED(model%fluid_velocity)) uu = model%fluid_velocity(:, nd) END SUBROUTINE viv_node_coef + PURE INTEGER FUNCTION viv_pred_row(model) RESULT(r) + !! The row of viv_ms holding the step predictor (CableDyn_VIV): after the motion statistics on a + !! synchronisation-model line (the in-line rate in the row after it), row 2 on a wake line. + TYPE(CD_ModelType), INTENT(IN) :: model + r = 2 + IF (model%viv_wake) RETURN + r = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp) + IF (model%viv_frame) r = CD_VIV_NMS_FRAME + r = r + 1 + END FUNCTION viv_pred_row + + SUBROUTINE viv_seed_predictor(model) + !! The step predictor of a newly installed VIV model (row viv_pred_row of viv_ms, and of its + !! recovery and next copies): the phase rates at the present state, from the node's velocity and + !! committed acceleration and the mean squares at zero (MoorDyn's unnormalised start), and on a + !! wake line the cross-flow acceleration there. Only the first step predicts from it; every + !! step then leaves the rate at its own mid-point (viv_step_end). + TYPE(CD_ModelType), INTENT(INOUT) :: model + INTEGER :: nd, ia, ir + REAL(wp) :: coef, uu(3), yd, ydd, un, xd, xdd, vrel(3), urel(3) + LOGICAL :: ok + ir = viv_pred_row(model) + DO nd = 2, model%n_dof/3 - 1 + IF (.NOT. model%viv_node(nd)) CYCLE + CALL viv_node_coef(model, model%q, nd, coef, uu) + ia = 3*nd - 2 + vrel = smoothed(model%v, ia) + urel = uu + IF (frame_node(model, nd)) THEN + vrel = vrel - model%viv_ms(7:9, nd) + urel = uu - model%viv_ms(7:9, nd) + END IF + CALL CD_VIV_Crossflow_Motion(model%q(ia - 3:ia - 1), model%q(ia + 3:ia + 5), vrel, smoothed(model%a, ia), & + urel, yd, ydd, un, ok, xd, xdd) + IF (.NOT. (ok .AND. CD_Is_Finite(yd) .AND. CD_Is_Finite(ydd))) THEN + yd = CD_ZERO + ydd = CD_ZERO + xd = CD_ZERO + xdd = CD_ZERO + END IF + IF (model%viv_wake) THEN + model%viv_ms(ir, nd) = ydd + CYCLE + END IF + model%viv_ms(ir, nd) = CD_VIV_Phase_Rate(yd, ydd, CD_ZERO, CD_ZERO, model%viv_phi(nd), un, model%viv_dn(nd), & + model%viv_cf(nd), model%viv_df(nd), phi_rest=model%viv_phi_rest) + IF (.NOT. model%has_viv_il) CYCLE + IF (.NOT. model%vil_node(nd)) CYCLE + model%viv_ms(ir + 1, nd) = CD_VIV_Inline_Phase_Rate(xd, xdd, CD_ZERO, CD_ZERO, model%vil_phi(nd), & + model%viv_ms(ir, nd), model%vil_alpha(nd)) + END DO + model%viv_ms_rollback = model%viv_ms + model%recovery_viv_ms = model%viv_ms + model%viv_ms_next = model%viv_ms + END SUBROUTINE viv_seed_predictor + SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) - !! Step-start VIV quantities from the committed state (q_n, v_n, a_n, phi_n): the mean - !! squares with the step-start cross-flow sample (viv_ms_next), the phase rate - !! (viv_rate), and the explicit phase the in-step lift uses (viv_phi_eval): at t_{n+1}, - !! phi_n + dt rate_n, under the force blend, whose in-step force is r(q_{n+1}, v_{n+1}) - !! (the committed-state force F_n keeps phi_n); at the generalised-alpha level, - !! phi_n + (1 - alpha_f) dt rate_n, under the configuration blend. + !! Step-start VIV quantities from the committed state (q_n, v_n, phi_n and the step predictor, + !! the phase rate at the mid-point of the last step in row viv_pred_row of viv_ms): that rate + !! (viv_rate) and the explicit phase the in-step lift uses (viv_phi_eval): at t_{n+1}, + !! phi_n + dt rate, under the force blend, whose in-step force is r(q_{n+1}, v_{n+1}) (the + !! committed-state force F_n keeps phi_n); at the generalised-alpha level, phi_n + (1 - alpha_f) + !! dt rate, under the configuration blend. The rate of the last step's mid-point is O(dt) off + !! the step's, so the predicted phase is O(dt^2) off. The committed acceleration is not + !! sampled: the generalised-alpha acceleration is the line's to O(dt) only (it is that of + !! t_n + (alpha_m - alpha_f) dt) and at rho_inf = 1 it carries an undamped alternating mode of + !! its own. On a wake line the wake state is predicted at the evaluation point under the last + !! step's mid-point acceleration (row 2) and the step-start wake frequency (viv_rate). TYPE(CD_ModelType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: dt INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - INTEGER :: nd, ia - REAL(wp) :: w, alpha_f, yd, ydd, un, coef, uu(3), xd, xdd, sw(2) + INTEGER :: nd, ia, ir + REAL(wp) :: alpha_f, yd, ydd, un, coef, uu(3), sw(2) LOGICAL :: ok ErrStat = CD_MODEL_OK ErrMsg = '' CALL CD_Latch_Model_VIV_Window(model, dt) - w = MIN(CD_ONE, dt/model%viv_tw) + ir = viv_pred_row(model) alpha_f = model%cfg%rho_inf/(model%cfg%rho_inf + CD_ONE) IF (model%cfg%force_blend) alpha_f = CD_ZERO model%viv_rate = CD_ZERO @@ -4842,107 +4914,117 @@ SUBROUTINE viv_step_begin(model, dt, ErrStat, ErrMsg) IF (.NOT. model%viv_node(nd)) CYCLE CALL viv_node_coef(model, model%q, nd, coef, uu) ia = 3*nd - 2 - IF (frame_node(model, nd)) THEN - ! with the flow frame, the node's velocity relative to its filtered one (the relative flow, - ! and so the axes and the shedding speed, unchanged; viv_frame) - CALL CD_VIV_Crossflow_Motion(model%q(ia - 3:ia - 1), model%q(ia + 3:ia + 5), & - smoothed(model%v, ia) - model%viv_ms(7:9, nd), smoothed(model%a, ia), & - uu - model%viv_ms(7:9, nd), yd, ydd, un, ok, xd, xdd) - ELSE - CALL CD_VIV_Crossflow_Motion(model%q(ia - 3:ia - 1), model%q(ia + 3:ia + 5), smoothed(model%v, ia), & - smoothed(model%a, ia), uu, yd, ydd, un, ok, xd, xdd) - END IF + ! the node tangent must exist at the step start + CALL CD_VIV_Crossflow_Motion(model%q(ia - 3:ia - 1), model%q(ia + 3:ia + 5), [CD_ZERO, CD_ZERO, CD_ZERO], & + [CD_ZERO, CD_ZERO, CD_ZERO], uu, yd, ydd, un, ok) IF (.NOT. ok) THEN CALL fail(ErrStat, ErrMsg, 'VIV phase: the neighbours of a node coincide (no line tangent)') RETURN END IF IF (model%viv_wake) THEN ! the wake frequency of the ambient flow normal to the line (the free stream of the - ! paper), not of the relative flow, which the line's own cross-flow motion modulates; the - ! wake state predicted at the step's evaluation point under the step-start forcing + ! paper), not of the relative flow, which the line's own cross-flow motion modulates IF (model%wo_filter) THEN ! with the wake filter, of the flow relative to the node's slowly filtered motion IF (model%wo_tf(nd) > CD_ZERO) uu = uu - model%viv_ms(3:5, nd) END IF model%viv_rate(nd) = CD_VIV_TWO_PI*model%wo_st(nd)*viv_node_ambient_speed(model%q, ia, uu)/model%viv_dn(nd) - model%viv_ms_next(2, nd) = ydd sw = [model%viv_phi(nd), model%viv_ms(1, nd)] CALL CD_VIV_Wake_Advance(sw, model%viv_rate(nd), model%wo_eps(nd), model%wo_a(nd)/model%viv_dn(nd), & - ydd, ydd, (CD_ONE - alpha_f)*dt) + model%viv_ms(ir, nd), model%viv_ms(ir, nd), (CD_ONE - alpha_f)*dt) model%viv_phi_eval(nd) = sw(1) CYCLE END IF - model%viv_ms_next(1, nd) = CD_VIV_Mean_Square(model%viv_ms(1, nd), yd, w) - model%viv_ms_next(2, nd) = CD_VIV_Mean_Square(model%viv_ms(2, nd), ydd, w) - model%viv_rate(nd) = CD_VIV_Phase_Rate(yd, ydd, model%viv_ms_next(1, nd), model%viv_ms_next(2, nd), & - model%viv_phi(nd), un, model%viv_dn(nd), model%viv_cf(nd), & - model%viv_df(nd), phi_rest=model%viv_phi_rest) + model%viv_rate(nd) = model%viv_ms(ir, nd) model%viv_phi_eval(nd) = model%viv_phi(nd) + (CD_ONE - alpha_f)*dt*model%viv_rate(nd) IF (.NOT. model%has_viv_il) CYCLE IF (.NOT. model%vil_node(nd)) CYCLE - model%vil_ms_next(1, nd) = CD_VIV_Mean_Square(model%vil_ms(1, nd), xd, w) - model%vil_ms_next(2, nd) = CD_VIV_Mean_Square(model%vil_ms(2, nd), xdd, w) - model%vil_rate(nd) = CD_VIV_Inline_Phase_Rate(xd, xdd, model%vil_ms_next(1, nd), model%vil_ms_next(2, nd), & - model%vil_phi(nd), model%viv_rate(nd), model%vil_alpha(nd)) + model%vil_rate(nd) = model%viv_ms(ir + 1, nd) model%vil_phi_eval(nd) = model%vil_phi(nd) + (CD_ONE - alpha_f)*dt*model%vil_rate(nd) END DO END SUBROUTINE viv_step_begin SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) - !! End-of-step VIV phase by Heun's rule (the trapezoidal corrector of the explicit Euler - !! predictor): phi_n+1 = phi_n + dt/2 (rate_n + rate(state_n+1, phi_n + dt rate_n)), with - !! the end-state cross-flow sample added to the mean squares for that rate (not stored: - !! the next step adds it itself). Writes viv_phi_next only. + !! End-of-step VIV state from the step-start state (q, v) and the converged end state (q_step, + !! v_step), into viv_phi_next and viv_ms_next. The phase advances by the implicit mid-point + !! rule, solved by one fixed-point pass from the step predictor rate_p, + !! + !! rate_1 = rate(y'_m, y''_m, ms_m, phi_n + dt/2 rate_p), + !! phi_n+1 = phi_n + dt rate(y'_m, y''_m, ms_m, phi_n + dt/2 rate_1), + !! + !! on the node's cross-flow motion at the step's mid-point: the mean position, the velocity + !! (q_n+1 - q_n)/dt and the acceleration (v_n+1 - v_n)/dt, the step means of the velocity and of + !! its derivative (that of the mid-point to O(dt^2) at any rho_inf, and free of the committed + !! acceleration's lag and alternating mode). The mean squares advance by the + !! mid-point rule as well (the exact average of the mid-point sample over dt, and over dt/2 for + !! the mid-point rate), and the filtered velocities of the flow frame and the wake filter + !! exactly for the velocity linear over the step. The mid-point rate becomes the next step's + !! predictor. On a wake line the wake state advances under the mid-point acceleration (held + !! over the step, its integral exact) at the mean of the start and end wake frequencies, and + !! that acceleration becomes the predictor. TYPE(CD_ModelType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: dt INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - INTEGER :: nd, ia - REAL(wp) :: w, yd, ydd, un, coef, uu(3), ms1, ms2, rate_end, xd, xdd, rate_end_x, st(4), sw(2), ydd0, vsm(3) + INTEGER :: nd, ia, ir, ip + REAL(wp) :: wf, wh, yd, ydd, un, coef, uu(3), ms1, ms2, rate_mid, xd, xdd, rate_mid_x, st(4), sw(2), ap + REAL(wp) :: vs0(3), vs1(3), vf(3), qm(9), om LOGICAL :: ok ErrStat = CD_MODEL_OK ErrMsg = '' - w = MIN(CD_ONE, dt/model%viv_tw) + ir = viv_pred_row(model) + wf = CD_VIV_Mean_Square_Weight(dt/model%viv_tw) + wh = CD_VIV_Mean_Square_Weight(0.5_wp*dt/model%viv_tw) model%viv_phi_next = model%viv_phi IF (model%has_viv_il) model%vil_phi_next = model%vil_phi DO nd = 2, model%n_dof/3 - 1 IF (.NOT. model%viv_node(nd)) CYCLE CALL viv_node_coef(model, model%q_step, nd, coef, uu) ia = 3*nd - 2 + vs0 = smoothed(model%v, ia) + vs1 = smoothed(model%v_step, ia) + ! the flow frame's velocity at the mid-point: the filtered velocity at the step end (exact for + ! the first-order filter of the velocity linear over the step; a non-finite end velocity + ! keeps it) averaged with the step-start one + vf = CD_ZERO IF (frame_node(model, nd)) THEN - CALL CD_VIV_Crossflow_Motion(model%q_step(ia - 3:ia - 1), model%q_step(ia + 3:ia + 5), & - smoothed(model%v_step, ia) - model%viv_ms(7:9, nd), & - smoothed(model%a_step, ia), uu - model%viv_ms(7:9, nd), yd, ydd, un, ok, & - xd, xdd) - ELSE - CALL CD_VIV_Crossflow_Motion(model%q_step(ia - 3:ia - 1), model%q_step(ia + 3:ia + 5), & - smoothed(model%v_step, ia), smoothed(model%a_step, ia), uu, yd, ydd, un, ok, & - xd, xdd) - END IF + IF (CD_All_Finite(vs1)) & + model%viv_ms_next(7:9, nd) = CD_VIV_Filter_Linear(model%viv_ms(7:9, nd), vs0, vs1, dt/model%viv_ftf(nd)) + vf = 0.5_wp*(model%viv_ms(7:9, nd) + model%viv_ms_next(7:9, nd)) + END IF + ! the mid-point motion: the mean position, and the velocity and acceleration over the step, + ! (q_n+1 - q_n)/dt and (v_n+1 - v_n)/dt, the step means of the velocity and of its + ! derivative, so a harmonic motion keeps its phase between them exactly + qm = 0.5_wp*(model%q(ia - 3:ia + 5) + model%q_step(ia - 3:ia + 5)) + CALL CD_VIV_Crossflow_Motion(qm(1:3), qm(7:9), (smoothed(model%q_step, ia) - smoothed(model%q, ia))/dt - vf, & + (vs1 - vs0)/dt, uu - vf, yd, ydd, un, ok, xd, xdd) IF (model%viv_wake) THEN - ! the wake state over the step with the cross-flow acceleration linear from its step-start - ! value to the converged end one (held where the end tangent is degenerate), at the - ! step-start wake frequency; a non-finite result keeps the step-start forcing alone - ydd0 = model%viv_ms_next(2, nd) - IF (.NOT. (ok .AND. CD_Is_Finite(ydd))) ydd = ydd0 + ! the mid-point acceleration (the predictor's where the mid-point tangent is degenerate or + ! the acceleration not finite) + ap = model%viv_ms(ir, nd) + IF (.NOT. (ok .AND. CD_Is_Finite(ydd))) ydd = ap + ! the filtered velocity at the step end, exact for the velocity linear over the step (a + ! non-finite end velocity keeps it), and the wake frequency there + om = model%viv_rate(nd) + IF (model%wo_filter) THEN + IF (model%wo_tf(nd) > CD_ZERO .AND. CD_All_Finite(vs1)) & + model%viv_ms_next(3:5, nd) = CD_VIV_Filter_Linear(model%viv_ms(3:5, nd), vs0, vs1, dt/model%wo_tf(nd)) + IF (model%wo_tf(nd) > CD_ZERO) uu = uu - model%viv_ms_next(3:5, nd) + END IF + om = 0.5_wp*(om + CD_VIV_TWO_PI*model%wo_st(nd)*viv_node_ambient_speed(model%q_step, ia, uu)/model%viv_dn(nd)) + IF (.NOT. CD_Is_Finite(om)) om = model%viv_rate(nd) sw = [model%viv_phi(nd), model%viv_ms(1, nd)] - CALL CD_VIV_Wake_Advance(sw, model%viv_rate(nd), model%wo_eps(nd), model%wo_a(nd)/model%viv_dn(nd), & - ydd0, ydd, dt) + CALL CD_VIV_Wake_Advance(sw, om, model%wo_eps(nd), model%wo_a(nd)/model%viv_dn(nd), ydd, ydd, dt) IF (.NOT. (CD_Is_Finite(sw(1)) .AND. CD_Is_Finite(sw(2)))) THEN + ! a non-finite result keeps the step-start frequency and the predictor's forcing + ydd = ap sw = [model%viv_phi(nd), model%viv_ms(1, nd)] CALL CD_VIV_Wake_Advance(sw, model%viv_rate(nd), model%wo_eps(nd), model%wo_a(nd)/model%viv_dn(nd), & - ydd0, ydd0, dt) + ydd, ydd, dt) END IF model%viv_phi_next(nd) = sw(1) model%viv_ms_next(1, nd) = sw(2) - ! the filtered velocity, exact for the first-order filter of the converged end velocity - ! held over the step (a non-finite end velocity keeps it) - IF (model%wo_filter) THEN - vsm = smoothed(model%v_step, ia) - IF (model%wo_tf(nd) > CD_ZERO .AND. CD_All_Finite(vsm)) & - model%viv_ms_next(3:5, nd) = model%viv_ms(3:5, nd) + (CD_ONE - EXP(-dt/model%wo_tf(nd)))* & - (vsm - model%viv_ms(3:5, nd)) - END IF + model%viv_ms_next(ir, nd) = ydd CYCLE END IF IF (.NOT. ok) THEN @@ -4957,51 +5039,53 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) IF (frame_node(model, nd)) THEN CALL CD_VIV_Amplitude_Update(st, CD_VIV_Ambient_Crossflow_Rate(model%q_step(ia + 3:ia + 5) - & model%q_step(ia - 3:ia - 1), & - smoothed(model%v_step, ia) - & - model%viv_ms(7:9, nd), & + vs1 - model%viv_ms(7:9, nd), & uu - model%viv_ms(7:9, nd)), dt) ELSE CALL CD_VIV_Amplitude_Update(st, CD_VIV_Ambient_Crossflow_Rate(model%q_step(ia + 3:ia + 5) - & - model%q_step(ia - 3:ia - 1), & - smoothed(model%v_step, ia), uu), dt) + model%q_step(ia - 3:ia - 1), vs1, uu), dt) END IF model%viv_ms_next(3:6, nd) = st END IF - IF (frame_node(model, nd)) THEN - ! the filtered velocity follows the converged end velocity held over the step (exact for - ! the first-order filter; a non-finite end velocity keeps it) - vsm = smoothed(model%v_step, ia) - IF (CD_All_Finite(vsm)) & - model%viv_ms_next(7:9, nd) = model%viv_ms(7:9, nd) + (CD_ONE - EXP(-dt/model%viv_ftf(nd)))* & - (vsm - model%viv_ms(7:9, nd)) - END IF - ms1 = CD_VIV_Mean_Square(model%viv_ms_next(1, nd), yd, w) - ms2 = CD_VIV_Mean_Square(model%viv_ms_next(2, nd), ydd, w) - rate_end = CD_VIV_Phase_Rate(yd, ydd, ms1, ms2, model%viv_phi(nd) + dt*model%viv_rate(nd), un, & - model%viv_dn(nd), model%viv_cf(nd), model%viv_df(nd), phi_rest=model%viv_phi_rest) - model%viv_phi_next(nd) = CD_VIV_Wrap_Phase(model%viv_phi(nd) + 0.5_wp*dt*(model%viv_rate(nd) + rate_end)) + ms1 = CD_VIV_Mean_Square(model%viv_ms(1, nd), yd, wh) + ms2 = CD_VIV_Mean_Square(model%viv_ms(2, nd), ydd, wh) + ! the implicit mid-point rule by one fixed-point pass: the mid-point phase from the predictor, + ! then from the rate it gives + rate_mid = model%viv_rate(nd) + DO ip = 1, 2 + rate_mid = CD_VIV_Phase_Rate(yd, ydd, ms1, ms2, model%viv_phi(nd) + 0.5_wp*dt*rate_mid, un, & + model%viv_dn(nd), model%viv_cf(nd), model%viv_df(nd), phi_rest=model%viv_phi_rest) + END DO + model%viv_ms_next(1, nd) = CD_VIV_Mean_Square(model%viv_ms(1, nd), yd, wf) + model%viv_ms_next(2, nd) = CD_VIV_Mean_Square(model%viv_ms(2, nd), ydd, wf) + model%viv_ms_next(ir, nd) = rate_mid + model%viv_phi_next(nd) = CD_VIV_Wrap_Phase(model%viv_phi(nd) + dt*rate_mid) IF (.NOT. model%has_viv_il) CYCLE IF (.NOT. model%vil_node(nd)) CYCLE - ! the in-line rate at the end state is slaved to the end cross-flow rate (Eq. 6) - ms1 = CD_VIV_Mean_Square(model%vil_ms_next(1, nd), xd, w) - ms2 = CD_VIV_Mean_Square(model%vil_ms_next(2, nd), xdd, w) - rate_end_x = CD_VIV_Inline_Phase_Rate(xd, xdd, ms1, ms2, model%vil_phi(nd) + dt*model%vil_rate(nd), & - rate_end, model%vil_alpha(nd)) - model%vil_phi_next(nd) = CD_VIV_Wrap_Phase(model%vil_phi(nd) + 0.5_wp*dt*(model%vil_rate(nd) + rate_end_x)) + ! the in-line rate at the mid-point is slaved to the mid-point cross-flow rate (Eq. 6) + ms1 = CD_VIV_Mean_Square(model%vil_ms(1, nd), xd, wh) + ms2 = CD_VIV_Mean_Square(model%vil_ms(2, nd), xdd, wh) + rate_mid_x = model%vil_rate(nd) + DO ip = 1, 2 + rate_mid_x = CD_VIV_Inline_Phase_Rate(xd, xdd, ms1, ms2, model%vil_phi(nd) + 0.5_wp*dt*rate_mid_x, rate_mid, & + model%vil_alpha(nd)) + END DO + model%vil_ms_next(1, nd) = CD_VIV_Mean_Square(model%vil_ms(1, nd), xd, wf) + model%vil_ms_next(2, nd) = CD_VIV_Mean_Square(model%vil_ms(2, nd), xdd, wf) + model%viv_ms_next(ir + 1, nd) = rate_mid_x + model%vil_phi_next(nd) = CD_VIV_Wrap_Phase(model%vil_phi(nd) + dt*rate_mid_x) END DO IF (model%viv_wake) THEN - ! row 2 held the step-start acceleration (scratch); the committed row stays 0 - model%viv_ms_next(2, :) = CD_ZERO IF (.NOT. (CD_All_Finite(model%viv_phi_next) .AND. CD_All_Finite(model%viv_ms_next))) THEN CALL fail(ErrStat, ErrMsg, 'VIV wake oscillator update produced a non-finite state') END IF RETURN END IF - IF (.NOT. CD_All_Finite(model%viv_phi_next)) THEN + IF (.NOT. (CD_All_Finite(model%viv_phi_next) .AND. CD_All_Finite(model%viv_ms_next))) THEN CALL fail(ErrStat, ErrMsg, 'VIV phase update produced a non-finite phase') END IF IF (model%has_viv_il) THEN - IF (.NOT. CD_All_Finite(model%vil_phi_next)) THEN + IF (.NOT. (CD_All_Finite(model%vil_phi_next) .AND. CD_All_Finite(model%vil_ms_next))) THEN CALL fail(ErrStat, ErrMsg, 'in-line VIV phase update produced a non-finite phase') END IF END IF diff --git a/src/CableDyn_OpenFAST_HermiteFMF.f90 b/src/CableDyn_OpenFAST_HermiteFMF.f90 index 4c96d00e..b71628b4 100644 --- a/src/CableDyn_OpenFAST_HermiteFMF.f90 +++ b/src/CableDyn_OpenFAST_HermiteFMF.f90 @@ -2277,11 +2277,13 @@ END FUNCTION CD_HFMF_ForceMirrorSize INTEGER FUNCTION CD_HFMF_VIVMirrorSize(self) RESULT(n) !! Mirror slots of the VIV state, before the torsion block: the cross-flow shedding phase - !! per node, the running mean squares of the cross-flow velocity and acceleration per node and, - !! with amplitude tables, the four values of the amplitude estimate after them (2 or 6 values a - !! node, interleaved), and the averaging time (3 nn + 1 values, 7 nn + 1 with amplitude tables); - !! with in-line VIV then the in-line phase and mean squares (3 nn more); with the wake - !! oscillator its state (q, dq/dt) per node (2 nn more); zero without VIV. + !! per node, the motion statistics per node (interleaved: the running mean squares of the + !! cross-flow velocity and acceleration, the four values of the amplitude estimate with + !! amplitude tables, the filtered velocity with the flow frame, and on a synchronisation cable + !! the step predictor, one rate or two with in-line VIV; on a wake cable row 2 holds the + !! predictor), and the averaging time ((1 + rows) nn + 1 values); with in-line VIV then the + !! in-line phase and mean squares (3 nn more); with the wake oscillator its state (q, dq/dt) + !! per node (2 nn more); zero without VIV. TYPE(CD_HFMF_ModuleType), INTENT(IN) :: self n = 0 IF (.NOT. self%initialized) RETURN @@ -2464,14 +2466,19 @@ SUBROUTINE CD_HFMF_UnpackMirror(self, buf, t, ErrStat, ErrMsg) ! and the VIV block's mean squares, amplitudes and averaging time, which cannot be negative ! (per node the rows of the motion statistics: the mean squares, rows 1:2, and the amplitudes ! y0, y0s of the amplitude estimate, rows 4:5; its travel and last cross-flow velocity, rows - ! 3 and 6, are signed) + ! 3 and 6, and the step predictor's rates after the statistics are signed, as is a wake + ! cable's predictor, the mid-point cross-flow acceleration, in row 2) IF (self%line%has_viv) THEN nv = SIZE(self%line%viv_ms, 1) kb = SIZE(buf) - CD_HFMF_TorsionMirrorSize(self) - CD_HFMF_VIVMirrorSize(self) + self%line%nn bad_viv = buf(kb + nv*self%line%nn + 1) < CD_ZERO DO i = 1, self%line%nn - IF (ANY(buf(kb + (i - 1)*nv + 1:kb + (i - 1)*nv + 2) < CD_ZERO)) bad_viv = .TRUE. - IF (nv >= 5) THEN + IF (self%line%viv_wake) THEN + IF (buf(kb + (i - 1)*nv + 1) < CD_ZERO) bad_viv = .TRUE. + ELSE + IF (ANY(buf(kb + (i - 1)*nv + 1:kb + (i - 1)*nv + 2) < CD_ZERO)) bad_viv = .TRUE. + END IF + IF (self%line%has_viv_amp .OR. self%line%viv_frame) THEN IF (ANY(buf(kb + (i - 1)*nv + 4:kb + (i - 1)*nv + 5) < CD_ZERO)) bad_viv = .TRUE. END IF END DO diff --git a/src/CableDyn_System.f90 b/src/CableDyn_System.f90 index f0416c45..c4c11342 100644 --- a/src/CableDyn_System.f90 +++ b/src/CableDyn_System.f90 @@ -959,8 +959,10 @@ END SUBROUTINE CD_Get_System_Line_Syrope_State PURE INTEGER FUNCTION CD_System_Line_VIV_MirrorSize(system, line_index) RESULT(n) !! Reals of one contained line's VIV checkpoint block (CD_Get_System_Line_VIV_State): - !! 3 per node plus the averaging time, 3 per node more with in-line VIV, 4 per node more with - !! amplitude tables, or 0 for a line without VIV. + !! 3 per node plus the averaging time, 3 per node more with in-line VIV, and per node the rows + !! of the motion statistics after the two mean squares (CD_Model_VIV_NMS - CD_VIV_NMS: the + !! amplitude estimate, the flow frame and the step predictor where the line has them), or 0 + !! for a line without VIV. TYPE(CD_SystemType), INTENT(IN) :: system INTEGER, INTENT(IN) :: line_index INTEGER :: nn @@ -977,8 +979,9 @@ SUBROUTINE CD_Get_System_Line_VIV_State(system, line_index, buf, ErrStat, ErrMsg !! One contained line's committed VIV state as a flat checkpoint block: the shedding !! phases (n_nodes), the cross-flow velocity and acceleration mean squares interleaved !! per node (2 n_nodes), then the averaging time; with in-line VIV then the in-line phases - !! and mean squares the same way (3 n_nodes); with amplitude tables then the four values of - !! the amplitude estimate interleaved per node (4 n_nodes). + !! and mean squares the same way (3 n_nodes); then the further rows of the motion statistics + !! interleaved per node (the amplitude estimate, the flow frame and the step predictor where + !! the line has them; (CD_Model_VIV_NMS - CD_VIV_NMS) n_nodes). TYPE(CD_SystemType), INTENT(IN) :: system INTEGER, INTENT(IN) :: line_index REAL(wp), INTENT(OUT) :: buf(:) @@ -3493,8 +3496,8 @@ END FUNCTION viv_pack_size PURE SUBROUTINE pack_viv(line, buf) !! A line's committed VIV state (viv_pack_size reals): the phases, then the motion - !! statistics per node (the two mean squares, and the amplitude estimate with amplitude - !! tables). + !! statistics per node (the two mean squares, the amplitude estimate with amplitude tables, + !! the flow frame and the step predictor). TYPE(CD_ModelType), INTENT(IN) :: line REAL(wp), INTENT(OUT) :: buf(:) INTEGER :: nn, nms diff --git a/src/CableDyn_VIV.f90 b/src/CableDyn_VIV.f90 index 6bcf50e5..af7f719c 100644 --- a/src/CableDyn_VIV.f90 +++ b/src/CableDyn_VIV.f90 @@ -57,6 +57,8 @@ MODULE CableDyn_VIV PUBLIC :: CD_VIV_Crossflow_Along PUBLIC :: CD_VIV_Phase_Rate PUBLIC :: CD_VIV_Mean_Square + PUBLIC :: CD_VIV_Mean_Square_Weight + PUBLIC :: CD_VIV_Filter_Linear PUBLIC :: CD_VIV_Wrap_Phase PUBLIC :: CD_VIV_Node_Inline PUBLIC :: CD_VIV_Inline_Per_Length @@ -88,7 +90,11 @@ MODULE CableDyn_VIV !> velocity and acceleration (CD_VIV_NMS), and with an amplitude table (VIV AMPLITUDE section) !> the four values of the amplitude estimate after them (CD_VIV_NMS_AMP; CD_VIV_Amplitude_Update). !> With a flow frame as well (VIV FRAME section, filter time Tf > 0) the node's velocity low-pass - !> filtered over Tf follows them in rows 7:9 (CD_VIV_NMS_FRAME). + !> filtered over Tf follows them in rows 7:9 (CD_VIV_NMS_FRAME). The model layers append the step + !> predictor of the synchronisation model after these rows: the cross-flow phase rate at the + !> mid-point of the last step (and the in-line one after it with in-line VIV), from which the next + !> step predicts the phase its lift takes. On a wake-oscillator line row 2 holds the predictor + !> instead, the cross-flow acceleration at the mid-point of the last step. INTEGER, PARAMETER, PUBLIC :: CD_VIV_NMS = 2 INTEGER, PARAMETER, PUBLIC :: CD_VIV_NMS_AMP = 6 INTEGER, PARAMETER, PUBLIC :: CD_VIV_NMS_FRAME = 9 @@ -324,11 +330,36 @@ END SUBROUTINE CD_VIV_Crossflow_Along ELEMENTAL REAL(wp) FUNCTION CD_VIV_Mean_Square(ms_old, sample, weight) RESULT(ms) !! One step of the running mean square, ms_old + weight (sample^2 - ms_old); weight = - !! 1/n_m is MoorDyn's ((n_m - 1) old^2 + new^2)/n_m. + !! 1/n_m is MoorDyn's ((n_m - 1) old^2 + new^2)/n_m, and 1 - exp(-h) over a time h T_w + !! (CD_VIV_Mean_Square_Weight) the exact average over that time of a sample held there. REAL(wp), INTENT(IN) :: ms_old, sample, weight ms = ms_old + weight*(sample*sample - ms_old) END FUNCTION CD_VIV_Mean_Square + ELEMENTAL REAL(wp) FUNCTION CD_VIV_Mean_Square_Weight(h) RESULT(w) + !! The weight 1 - exp(-h) of CD_VIV_Mean_Square over a time h T_w: the running mean square is + !! the first-order filter d ms/dt = (s^2 - ms)/T_w of the squared sample s^2, and with the + !! sample at the interval's mid-point it advances by the mid-point rule (second order). + REAL(wp), INTENT(IN) :: h + w = CD_ONE - EXP(-h) + END FUNCTION CD_VIV_Mean_Square_Weight + + ELEMENTAL REAL(wp) FUNCTION CD_VIV_Filter_Linear(xbar, x0, x1, h) RESULT(xn) + !! The first-order low-pass filter d xbar/dt = (x - xbar)/T_f over a time h T_f, exact for the + !! input linear from x0 to x1 over it (the converged velocities of a step): exp(-h) xbar + + !! (1 - exp(-h)) x0 + c (x1 - x0), c = 1 - (1 - exp(-h))/h (h/2 - h^2/6 below h = 1e-4, where the + !! difference loses its digits). The limits: x1 as h grows, xbar as h vanishes. + REAL(wp), INTENT(IN) :: xbar, x0, x1, h + REAL(wp) :: e, c + e = EXP(-h) + IF (h < 1.0e-4_wp) THEN + c = h*(0.5_wp - h/6.0_wp) + ELSE + c = CD_ONE - (CD_ONE - e)/h + END IF + xn = e*xbar + (CD_ONE - e)*x0 + c*(x1 - x0) + END FUNCTION CD_VIV_Filter_Linear + PURE REAL(wp) FUNCTION CD_VIV_Phase_Rate(yd, ydd, ms_yd, ms_ydd, phi, un, diameter, cf, df, phi_rest) RESULT(rate) !! Rate of the vortex-shedding phase, d phi/dt = 2 pi (cF + dF sin(phi_y - phi)) U/D, with !! the cross-flow velocity phase phi_y from y', y'' normalised by their running RMS values diff --git a/tests/test_hermite_tangent_predictor.f90 b/tests/test_hermite_tangent_predictor.f90 index dae1eafc..6b36f549 100644 --- a/tests/test_hermite_tangent_predictor.f90 +++ b/tests/test_hermite_tangent_predictor.f90 @@ -28,12 +28,21 @@ PROGRAM test_hermite_tangent_predictor !! failed at step 5, 13, 4 (25 steps per cycle) and 10, 7, 6 (50), each after steps on the !! reversed root; at 25 steps per cycle and rho_inf 0.5 it ran through reversed roots to a !! mid-span A/D of 5.7); - !! * G2 its largest strain energy stays within 1.5 times the reference's (measured at most 1.20, - !! at 25 steps per cycle and rho_inf 1; the reversed root has 3e7 times it); + !! * G2 its largest strain energy stays within 1.5 times the reference's (measured at most 1.07; + !! the reversed root has 3e7 times it); !! * G3 its largest mid-span cross-flow displacement is the reference's within 2 % (measured at - !! most 0.75 %), so the ringing tangent stretch does not change the response; + !! most 0.09 %), so the ringing tangent stretch does not change the response; + !! * G2 and G3 are not applied at rho_inf 1 and 25 steps per cycle (21 per response period): with + !! no numerical damping the unit seed's undamped stretch ringing leaves a near-Nyquist velocity + !! of about 27 % of the VIV velocity, and equally consistent second-order VIV updates then land + !! +0.8 % to +10 % from the converged z max/D 0.5639 (this one +4.7 %, Es 1.51 times), so that + !! cell measures the VIV update's treatment of the spurious velocity, not the predictor; G1 and + !! G4 apply there; + !! * G7 from 50 steps per cycle the response converges to the reference with either seed: the + !! unit seed at rho_inf 1 and 50 steps per cycle is within 0.5 % of the converged z max/D + !! 0.5639 (measured 0.5632; 0.5639 from 200 steps per cycle on); !! * G4 it takes at most 8 Newton iterations per step on average and no step more than 30 (the deck - !! default budget; measured at most 5.9 and 23, at 25 steps per cycle and rho_inf 1; before, + !! default budget; measured at most 6.2 and 21, at 25 steps per cycle and rho_inf 1; before, !! the first step alone took 21 at 50 steps per cycle and rho_inf 1, now 3); !! * G5 the same line without the lift at 50 steps per cycle and rho_inf 1 (before: failed at step !! 38 after steps on the reversed root): every step converges, the largest strain energy is @@ -53,6 +62,10 @@ PROGRAM test_hermite_tangent_predictor REAL(wp), PARAMETER :: RHOW = 1025.0_wp, D = 0.1_wp, CF = 0.18_wp, DF = 0.08_wp, U = 0.3_wp REAL(wp), PARAMETER :: EA = 5.0e7_wp, TENS = 3.8e3_wp INTEGER, PARAMETER :: NCYC = 20 + !> The converged largest mid-span cross-flow displacement over D of the lifted line (G7): the + !> fine-step value (200 to 800 steps per cycle), the same for rho_inf 0.8 with either seed and for + !> rho_inf 1 with the balanced seed (0.56389 to 0.56398). + REAL(wp), PARAMETER :: Z_CONV = 0.5639_wp !> One run: whether every step converged, the largest strain energy, the largest mid-span !> cross-flow displacement, the mid-span in-line deflection at the end, the mean iterations. @@ -78,9 +91,22 @@ PROGRAM test_hermite_tangent_predictor CALL require(ref%ok, 'reference '//TRIM(lab)//': every step converges') CALL require(unit%ok, 'G1 '//TRIM(lab)//': every step of the unit-tangent seed converges') IF (.NOT. (unit%ok .AND. ref%ok)) CYCLE - CALL require(unit%es_max <= 1.5_wp*ref%es_max, 'G2 '//TRIM(lab)//': the strain energy stays bounded') - CALL require(ABS(unit%z_max - ref%z_max) <= 0.02_wp*ref%z_max, & - 'G3 '//TRIM(lab)//': the cross-flow response is the balanced seed''s') + IF (RHOS(ir) == 1.0_wp .AND. NPERS(ip) == 25) THEN + ! G2 and G3 do not apply here (see the header): at rho_inf 1 and 21 steps per response + ! period the ringing stretch leaves a near-Nyquist velocity of about 27 % of the VIV velocity, + ! and the response measures the VIV update's treatment of it, not the predictor + WRITE (*, '(2X,A)') TRIM(lab)//': G2 and G3 not applied (unresolved ringing velocity)' + ELSE + CALL require(unit%es_max <= 1.5_wp*ref%es_max, 'G2 '//TRIM(lab)//': the strain energy stays bounded') + CALL require(ABS(unit%z_max - ref%z_max) <= 0.02_wp*ref%z_max, & + 'G3 '//TRIM(lab)//': the cross-flow response is the balanced seed''s') + END IF + IF (RHOS(ir) == 1.0_wp .AND. NPERS(ip) == 50) THEN + WRITE (*, '(2X,A,F8.5,A,F8.5)') TRIM(lab)//': unit-seed z max/D ', unit%z_max/D, ' against the converged ', & + Z_CONV + CALL require(ABS(unit%z_max/D - Z_CONV) <= 5.0e-3_wp*Z_CONV, & + 'G7 '//TRIM(lab)//': the unit-seed response is the converged one') + END IF CALL require(unit%iters <= 8.0_wp .AND. unit%max_iters <= 30, & 'G4 '//TRIM(lab)//': Newton converges in a few iterations') END DO diff --git a/tests/test_hermite_viv_frame.f90 b/tests/test_hermite_viv_frame.f90 index d472015c..59b291a5 100644 --- a/tests/test_hermite_viv_frame.f90 +++ b/tests/test_hermite_viv_frame.f90 @@ -29,15 +29,16 @@ PROGRAM test_hermite_viv_frame !! without tf bit for bit; !! * F2 with Tf 0.6 s the moving and the fixed pipe agree, with the tables and with the lift !! alone: the RMS cross-flow response of the mid node over the second period within 1 %, its - !! peak within 2 %. The RMS agrees within 0.2 % on every build and kernel; the peak of the moving - !! pipe ranges 0.811-0.819 D over the Release and Debug builds, the two OpenBLAS kernels and - !! Linux/Windows (fixed pipe 0.819 D), a single extreme of the response. What is left is the + !! peak within 2 %. The RMS agrees within 0.6 % (measured 0.02 % with the tables and 0.6 % with the + !! lift alone), the peak within 0.8 % (0.811 against 0.818 D with the tables), a single extreme + !! of the response (with the step-start phase update it ranged 0.811-0.819 D over the builds, + !! OpenBLAS kernels and platforms). What is left is the !! filter's lag of the imposed velocity, about omega Tf = 0.094 rad; !! * F3 without the frame they differ: in still water the moving pipe's phase sees no cross-flow !! velocity (r'.e = u.e = 0 across the relative flow), and with the tables it takes Cv and CdAmp !! at A/D 0 and the Morison drag; with the tables the peak response is more than 10 % (measured - !! 16 %) and the RMS more than 15 % (measured 23 %) from the fixed pipe's, with the lift alone - !! the RMS more than 4 % (measured 7 %); + !! 18 %) and the RMS more than 15 % (measured 23 %) from the fixed pipe's, with the lift alone + !! the RMS more than 4 % (measured 8 %); !! * F4 a snapshot taken mid-run and restored replays the following steps bit for bit, the !! filtered velocity included. USE, INTRINSIC :: IEEE_ARITHMETIC, ONLY: IEEE_VALUE, IEEE_QUIET_NAN @@ -104,9 +105,9 @@ PROGRAM test_hermite_viv_frame CALL require(.NOT. model%has_viv .AND. .NOT. model%viv_frame, 'F1: a refused call installs nothing') CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, tf=tfv) CALL require(es == CD_HCDYN_OK .AND. model%viv_frame .AND. .NOT. model%has_viv_amp .AND. & - SIZE(model%viv_ms, 1) == CD_VIV_NMS_FRAME, 'F1: the frame installs on the lift alone: '//TRIM(em)) + SIZE(model%viv_ms, 1) == CD_VIV_NMS_FRAME + 1, 'F1: the frame installs on the lift alone: '//TRIM(em)) CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy, tf=tf0) - CALL require(es == CD_HCDYN_OK .AND. .NOT. model%viv_frame .AND. SIZE(model%viv_ms, 1) == 6, & + CALL require(es == CD_HCDYN_OK .AND. .NOT. model%viv_frame .AND. SIZE(model%viv_ms, 1) == 7, & 'F1: an all-zero tf installs no frame: '//TRIM(em)) CALL build(twin) CALL CD_HermiteCable_Dyn_Set_VIV(twin, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy) @@ -147,7 +148,7 @@ PROGRAM test_hermite_viv_frame INTEGER :: s CALL build(model) CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy, tf=tfv) - CALL require(es == CD_HCDYN_OK .AND. model%viv_frame .AND. SIZE(model%viv_ms, 1) == CD_VIV_NMS_FRAME, & + CALL require(es == CD_HCDYN_OK .AND. model%viv_frame .AND. SIZE(model%viv_ms, 1) == CD_VIV_NMS_FRAME + 1, & 'F4: the frame installs: '//TRIM(em)) DO s = 1, 1500 CALL advance(model, s, .TRUE.) @@ -155,7 +156,7 @@ PROGRAM test_hermite_viv_frame CALL require(MAXVAL(ABS(model%viv_ms(8, :))) > 0.1_wp*U0, 'F4: the filtered velocity follows the motion') CALL CD_HermiteCable_Dyn_Snapshot(model, es, em) CALL require(es == CD_HCDYN_OK, 'F4: snapshot: '//TRIM(em)) - ALLOCATE (q_ref(SIZE(model%q), 200), ms_ref(CD_VIV_NMS_FRAME, NN, 200)) + ALLOCATE (q_ref(SIZE(model%q), 200), ms_ref(CD_VIV_NMS_FRAME + 1, NN, 200)) DO s = 1, 200 CALL advance(model, 1500 + s, .TRUE.) q_ref(:, s) = model%q diff --git a/tests/test_hfmf_mirror.f90 b/tests/test_hfmf_mirror.f90 index be409d82..97a102eb 100644 --- a/tests/test_hfmf_mirror.f90 +++ b/tests/test_hfmf_mirror.f90 @@ -123,7 +123,7 @@ PROGRAM test_hfmf_mirror CALL require(es == CD_HCDYN_OK, 'in-line VIV on the cable: '//TRIM(em)) CALL CD_HermiteCable_Dyn_Set_VIV(twin%line, cl, cf, df, 0.25_wp, es, em, clx=clx, il_alpha=al) CALL require(es == CD_HCDYN_OK, 'in-line VIV on the twin: '//TRIM(em)) - CALL require(CD_HFMF_VIVMirrorSize(cable) == 6*nn + 1, 'VIV block with in-line VIV: 6 nn + 1 values') + CALL require(CD_HFMF_VIVMirrorSize(cable) == 8*nn + 1, 'VIV block with in-line VIV: 8 nn + 1 values') ALLOCATE (vb(CD_HFMF_MirrorSize(cable)), vb2(CD_HFMF_MirrorSize(cable))) CALL CD_HFMF_PackMirror(cable, vb, es, em) CALL require(es == CD_HFMF_OK, 'pack with in-line VIV: '//TRIM(em)) diff --git a/tests/test_model.f90 b/tests/test_model.f90 index e0dc7d22..d805b8f9 100644 --- a/tests/test_model.f90 +++ b/tests/test_model.f90 @@ -1856,7 +1856,7 @@ SUBROUTINE case_substeps_restore_viv_state(inline) WRITE (*, '(A,I0,A,L1)') ' sub-stepped steps with tables: ', auto_m%sub_stats%events - ev0, & ', converged ', all_conv CALL require(all_conv .AND. auto_m%sub_stats%events > ev0, 'substep-viv:tables-after-stepping-sub-steps') - CALL require(SIZE(auto_m%sub_slot(1)%viv_ms, 1) == 6 .AND. SIZE(auto_m%sub_slot(2)%viv_ms, 1) == 6, & + CALL require(SIZE(auto_m%sub_slot(1)%viv_ms, 1) == 7 .AND. SIZE(auto_m%sub_slot(2)%viv_ms, 1) == 7, & 'substep-viv:slots-follow-the-statistics-rows') END IF CALL CD_End_Model(auto_m, es, em) diff --git a/tests/test_system.f90 b/tests/test_system.f90 index b269dd13..838aa3a1 100644 --- a/tests/test_system.f90 +++ b/tests/test_system.f90 @@ -1169,7 +1169,7 @@ SUBROUTINE case_viv_layout_snapshot() CALL CD_System_Snapshot(system, es, em) CALL require(es == CD_SYSTEM_OK, 'viv-layout:snapshot-without-tables: '//TRIM(em)) CALL CD_Set_Model_VIV(system%lines(1), 1025.0_wp, cl, dia, cf, df, 0.25_wp, es, em, amp=amp, amp_n=amp_n) - CALL require(es == CD_MODEL_OK .AND. CD_Model_VIV_NMS(system%lines(1)) == 6, 'viv-layout:tables: '//TRIM(em)) + CALL require(es == CD_MODEL_OK .AND. CD_Model_VIV_NMS(system%lines(1)) == 7, 'viv-layout:tables: '//TRIM(em)) q_moved = system%lines(1)%q q_moved(8) = q_moved(8) + 0.01_wp system%lines(1)%q = q_moved @@ -1178,7 +1178,7 @@ SUBROUTINE case_viv_layout_snapshot() 'viv-layout:restore-across-layouts-refused: '//TRIM(em)) CALL require(ALL(system%lines(1)%q == q_moved), 'viv-layout:nothing-restored') CALL CD_System_Snapshot(system, es, em) - CALL require(es == CD_SYSTEM_OK .AND. SIZE(system%snap_viv) == 7*NN, 'viv-layout:snapshot-resized: '//TRIM(em)) + CALL require(es == CD_SYSTEM_OK .AND. SIZE(system%snap_viv) == 8*NN, 'viv-layout:snapshot-resized: '//TRIM(em)) system%lines(1)%viv_ms(5, 3) = 0.25_wp CALL CD_System_Restore(system, es, em) CALL require(es == CD_SYSTEM_OK .AND. system%lines(1)%viv_ms(5, 3) == 0.0_wp, & diff --git a/tests/test_viv_coupled.f90 b/tests/test_viv_coupled.f90 index 3b91a048..3376c49c 100644 --- a/tests/test_viv_coupled.f90 +++ b/tests/test_viv_coupled.f90 @@ -399,8 +399,11 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) a_interior=aL(4:ndof - 3)) ok = ok .AND. es == CD_SYSTEM_OK nv = CD_System_Line_VIV_MirrorSize(a%sys%fast%system, il) + ! per node the phases and mean squares, the further motion statistics and, on a + ! synchronisation line, the step predictor (two rows with in-line VIV) ok = ok .AND. nv == (MERGE(6, 3, il_case) + MERGE(4, 0, amp_case .OR. wakef_case) + & - MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case))*(ndof/3) + 1 + MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case) + & + MERGE(0, MERGE(2, 1, il_case), wake_case))*(ndof/3) + 1 IF (with_viv .AND. nv > 0) THEN ALLOCATE (buf(nv)) CALL CD_Get_System_Line_VIV_State(a%sys%fast%system, il, buf, es, em) @@ -414,8 +417,8 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) CALL CD_HFMF_PackMirror(a%cables(1), buf, es, em) nvc = CD_HFMF_VIVMirrorSize(a%cables(1)) ok = ok .AND. nvc == (MERGE(6, 3, il_case) + MERGE(MERGE(5, 2, wakef_case), 0, wake_case) + & - MERGE(4, 0, amp_case) + MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case))* & - a%cables(1)%line%nn + 1 + MERGE(4, 0, amp_case) + MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case) + & + MERGE(0, MERGE(2, 1, il_case), wake_case))*a%cables(1)%line%nn + 1 IF (.NOT. with_viv) THEN ! the cable's VIV block as the fresh build has it (the torsion-free cable ends with it) CALL CD_HFMF_PackMirror(b%cables(1), fresh, es, em) @@ -445,15 +448,15 @@ LOGICAL FUNCTION identical(a, b) RESULT(same) ! the filtered velocity in rows 7-9 of the motion statistics on both lines, no tables same = a%cables(1)%line%viv_frame .AND. .NOT. a%cables(1)%line%has_viv_amp .AND. & a%sys%fast%system%lines(1)%viv_frame .AND. .NOT. a%sys%fast%system%lines(1)%has_viv_amp .AND. & - SIZE(a%cables(1)%line%viv_ms, 1) == 9 .AND. SIZE(a%sys%fast%system%lines(1)%viv_ms, 1) == 9 .AND. & + SIZE(a%cables(1)%line%viv_ms, 1) == 10 .AND. SIZE(a%sys%fast%system%lines(1)%viv_ms, 1) == 10 .AND. & MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_ms - b%sys%fast%system%lines(1)%viv_ms)) <= 0.0_wp .AND. & MAXVAL(ABS(a%cables(1)%line%viv_ms - b%cables(1)%line%viv_ms)) <= 0.0_wp END IF IF (same .AND. amp_case) THEN ! the motion statistics with the amplitude estimate (rows 3-6) on both lines same = a%sys%fast%system%lines(1)%has_viv_amp .AND. a%cables(1)%line%has_viv_amp .AND. & - SIZE(a%cables(1)%line%viv_ms, 1) == MERGE(9, 6, ampf_case) .AND. & - SIZE(a%sys%fast%system%lines(1)%viv_ms, 1) == MERGE(9, 6, ampf_case) .AND. & + SIZE(a%cables(1)%line%viv_ms, 1) == MERGE(10, 7, ampf_case) .AND. & + SIZE(a%sys%fast%system%lines(1)%viv_ms, 1) == MERGE(10, 7, ampf_case) .AND. & (a%cables(1)%line%viv_frame .EQV. ampf_case) .AND. & (a%sys%fast%system%lines(1)%viv_frame .EQV. ampf_case) .AND. & MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_ms - b%sys%fast%system%lines(1)%viv_ms)) <= 0.0_wp .AND. & diff --git a/tests/test_viv_frame_deck.f90 b/tests/test_viv_frame_deck.f90 index 41049303..98cd1681 100644 --- a/tests/test_viv_frame_deck.f90 +++ b/tests/test_viv_frame_deck.f90 @@ -14,15 +14,15 @@ PROGRAM test_viv_frame_deck !! EI = 0 line, with and without the tables; !! G2 the finite-EI cable towed through still water (both ends at 0.15 m/s against y after a !! 10 s half-cosine ramp) with Tf 10 s responds as the cable held in a 0.15 m/s current: the - !! A/D over 50-80 s within 1 % of the held cable's (measured 0.24 % with the tables, 0.16 % + !! A/D over 50-80 s within 1 % of the held cable's (measured 0.25 % with the tables, 0.15 % !! with the lift alone) and within 0.2 % of the held cable's with Tf 10 s (measured 0.01 %; !! the frame moves at a constant velocity, so the two are the same problem), the frequency !! within 0.005 and 0.0015 Hz (the 30 s window resolves 0.033 Hz; the scan peak moves by !! 0.002 Hz). With the tables the towed cable without the frame takes Cv and CdAmp at A/D 0 !! and the Morison drag (no ambient flow) and responds otherwise (A/D more than 10 % off; - !! measured 16 %); with the lift alone it is reported (1.9 % off); + !! measured 16 %); with the lift alone it is reported (2.0 % off); !! G3 held in the current, Tf 10 s leaves the response as the ambient flow gives it (A/D within - !! 0.5 %, measured at most 0.23 %, frequency within 0.005 Hz), on both cores, with and without + !! 0.5 %, measured at most 0.24 %, frequency within 0.005 Hz), on both cores, with and without !! the tables (an EI = 0 line cannot run between two moving points, so the towed case is !! finite-EI only); !! G4 refusals by name: a VIV FRAME row on a type without VIV (no Cl, no WAKE OSCILLATOR row). diff --git a/tests/test_viv_step_order.f90 b/tests/test_viv_step_order.f90 new file mode 100644 index 00000000..7b5373c0 --- /dev/null +++ b/tests/test_viv_step_order.f90 @@ -0,0 +1,243 @@ +! File: tests/test_viv_step_order.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_step_order + !! Time-step convergence of a locked-in VIV response, the line and the synchronisation model + !! coupled: a weightless taut line (20 m, 10 elements, D 0.1 m, 8.1 kg/m, EA 5e7 N, 3.8 kN; the + !! finite-EI cable with EI 1e3 N m^2), pinned at both ends in a 0.3 m/s cross current, Cl 0.8, + !! cF 0.18, dF 0.08, Cd 1.2, running RMS window 0.25 s. It locks in at about 0.65 Hz with a + !! mid-span A/D of 0.57 (0.55 on the cable). The lock-in frequency is the mean shedding rate of + !! the mid-span node over the second half of 200 nominal cycles D/(cF U) = 1.85 s, at n steps per + !! cycle. + !! + !! The phase advances by the implicit mid-point rule on the mid-step motion, the velocity and + !! acceleration the step means from the converged positions and velocities, and its lift is + !! predicted from the last step's mid-point rate: the + !! coupled response is second order in the step at any rho_inf. Sampling the committed + !! generalised-alpha acceleration instead made it first order (that acceleration is the line's + !! at t_n + (alpha_m - alpha_f) dt) and, at rho_inf = 1, where it carries an undamped alternating + !! mode, it converged to a frequency 3.4 % low (over 400 cycles 3.9403 rad/s at 3200 steps per + !! cycle against 4.0797). On that code every check below fails: the ratios were 2.44, 2.27, 2.18 + !! and 2.76, and the rho_inf = 0.4 frequency 3.1 % off the rho_inf = 1 one. Tolerances from a + !! gfortran Release run, the measured value with each: + !! + !! S1 EI = 0 line, rho_inf = 1: the frequency changes from 100 to 200 and from 200 to 400 steps + !! per cycle in a ratio in [3, 5.5] (second order 4; measured 3.99), and at 200 steps per cycle + !! it is within 2e-4 of the 400-step one (measured 5.3e-5); + !! S2 the same line at the deck default rho_inf = 0.4: second order the same way (measured 3.67), + !! and its frequency at 200 steps per cycle within 1e-4 of the rho_inf = 1 one (measured + !! 4.3e-5): the numerical damping no longer moves the lock-in; + !! S3 the wake oscillator on the EI = 0 line (St 0.2, eps 0.3, A 12, C_L0 0.3, rho_inf 0.8): the + !! mid-span frequency from upward zero crossings, second order the same way (measured 3.90); + !! S4 the finite-EI cable, rho_inf = 0.8, 200 to 800 steps per cycle: second order the same way + !! (measured 4.39). + USE CableDyn_Precision, ONLY: wp + USE CableDyn_VIV, ONLY: CD_VIV_TWO_PI + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & + CD_HermiteCable_Dyn_Set_Drag, CD_HermiteCable_Dyn_Set_VIV, & + CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_End, CD_HCDYN_OK + USE CableDyn_Dynamic, ONLY: GenAlphaConfig + USE CableDyn_Model, ONLY: CD_ModelType, CD_Init_Model, CD_Set_Model_VIV, CD_Step_Model, CD_End_Model, & + CD_Recompute_Model_Acceleration, CD_MODEL_OK + IMPLICIT NONE + + REAL(wp), PARAMETER :: RHOW = 1025.0_wp, D = 0.1_wp, CF = 0.18_wp, DF = 0.08_wp, U = 0.3_wp + INTEGER, PARAMETER :: NCYC = 200 + INTEGER :: nfail = 0 + REAL(wp) :: r(3), r04(3), ratio + + ! S1 + CALL sweep(.FALSE., 1.0_wp, .FALSE., [100, 200, 400], r) + ratio = (r(2) - r(1))/(r(3) - r(2)) + WRITE (*, '(A,3F14.9,A,F7.3)') ' S1 EI = 0 line, rho_inf 1, 100/200/400 steps: ', r, ' rad/s, ratio ', ratio + CALL require(ratio >= 3.0_wp .AND. ratio <= 5.5_wp, 'S1: the lock-in frequency is second order in the step') + CALL require(ABS(r(2) - r(3)) <= 2.0e-4_wp*r(3), 'S1: at 200 steps per cycle it is within 2e-4 of 400') + ! S2 + CALL sweep(.FALSE., 0.4_wp, .FALSE., [100, 200, 400], r04) + ratio = (r04(2) - r04(1))/(r04(3) - r04(2)) + WRITE (*, '(A,3F14.9,A,F7.3,A,ES10.2)') ' S2 rho_inf 0.4: ', r04, ' rad/s, ratio ', ratio, & + ', against rho_inf 1 at 200 steps ', ABS(r04(2) - r(2))/r(2) + CALL require(ratio >= 3.0_wp .AND. ratio <= 5.5_wp, 'S2: second order at rho_inf 0.4') + CALL require(ABS(r04(2) - r(2)) <= 1.0e-4_wp*r(2), 'S2: the lock-in does not depend on rho_inf') + ! S3 + CALL sweep(.FALSE., 0.8_wp, .TRUE., [100, 200, 400], r) + ratio = (r(2) - r(1))/(r(3) - r(2)) + WRITE (*, '(A,3F14.9,A,F7.3)') ' S3 wake oscillator, crossing frequency: ', r, ' rad/s, ratio ', ratio + CALL require(ratio >= 3.0_wp .AND. ratio <= 5.5_wp, 'S3: the wake response is second order in the step') + ! S4 + CALL sweep(.TRUE., 0.8_wp, .FALSE., [200, 400, 800], r) + ratio = (r(2) - r(1))/(r(3) - r(2)) + WRITE (*, '(A,3F14.9,A,F7.3)') ' S4 finite-EI cable, rho_inf 0.8, 200/400/800 steps: ', r, ' rad/s, ratio ', ratio + CALL require(ratio >= 3.0_wp .AND. ratio <= 5.5_wp, 'S4: the cable lock-in is second order in the step') + + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: coupled VIV response second order in the time step' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE sweep(finite_ei, rho_inf, wake, nper, freq) + !! The lock-in frequency at each of the steps per cycle nper. + LOGICAL, INTENT(IN) :: finite_ei, wake + REAL(wp), INTENT(IN) :: rho_inf + INTEGER, INTENT(IN) :: nper(3) + REAL(wp), INTENT(OUT) :: freq(3) + INTEGER :: k + DO k = 1, 3 + freq(k) = lockin(finite_ei, rho_inf, wake, nper(k)) + END DO + END SUBROUTINE sweep + + REAL(wp) FUNCTION lockin(finite_ei, rho_inf, wake, nper) RESULT(freq) + !! The mean shedding rate of the mid-span node over the second half of NCYC cycles (with the + !! wake oscillator, the mean frequency of the upward zero crossings of its cross-flow + !! displacement there), 0 on a failed set-up or step. + LOGICAL, INTENT(IN) :: finite_ei, wake + REAL(wp), INTENT(IN) :: rho_inf + INTEGER, INTENT(IN) :: nper + INTEGER, PARAMETER :: NE = 10, NN = NE + 1, MIDN = NE/2 + 1 + REAL(wp), PARAMETER :: SPAN = 20.0_wp, Z0 = -50.0_wp, EA = 5.0e7_wp, MLIN = 8.1_wp, TENS = 3.8e3_wp + REAL(wp), PARAMETER :: TW = 0.25_wp + TYPE(CD_HermiteCableDynType) :: hm + TYPE(CD_ModelType) :: em0 + TYPE(GenAlphaConfig) :: cfg + REAL(wp) :: seed(6*NN), l0(NE), eav(NE), eiv(NE), rhoa(NE), wv(NE), hd(NE), hn(NE), ht(NE), wk(3, NE) + REAL(wp) :: cl(NE), cfv(NE), dfv(NE), dt, q0(3*NN), v0(3*NN), fext(3*NN), fluid(3, NN), wl(NN) + REAL(wp) :: z, zold, ph, phold, phu, ph0, tc1, tcn, t + INTEGER :: conn(2, NE), i, n, nstep, n0, es, n_iter, ncross + CHARACTER(1024) :: em + LOGICAL :: conv, stalled, ok + freq = 0.0_wp + dt = D/(CF*U)/REAL(nper, wp) + nstep = nper*NCYC + n0 = nstep/2 + cl = MERGE(0.3_wp, 0.8_wp, wake) + cfv = CF + dfv = DF + wk(1, :) = 0.2_wp + wk(2, :) = 0.3_wp + wk(3, :) = 12.0_wp + l0 = SPAN/REAL(NE, wp)/(1.0_wp + TENS/EA) + eav = EA + rhoa = MLIN + IF (finite_ei) THEN + seed = 0.0_wp + DO i = 1, NN + seed(6*(i - 1) + 1) = SPAN*REAL(i - 1, wp)/REAL(NE, wp) + seed(6*(i - 1) + 3) = Z0 + seed(6*(i - 1) + 4) = 1.0_wp + END DO + eiv = 1.0e3_wp + wv = 0.0_wp + CALL CD_HermiteCable_Dyn_Init(hm, l0, eav, eiv, rhoa, wv, seed, [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3], & + -1.0e4_wp, 0.0_wp, rho_inf, es, em) + ok = es == CD_HCDYN_OK + IF (ok) THEN + hd = D + hn = 1.2_wp + ht = 0.0_wp + CALL CD_HermiteCable_Dyn_Set_Drag(hm, RHOW, hd, hn, ht, 0.0_wp, [0.0_wp, U, 0.0_wp], es, em) + ok = es == CD_HCDYN_OK + END IF + IF (ok) THEN + IF (wake) THEN + CALL CD_HermiteCable_Dyn_Set_VIV(hm, cl, cfv, dfv, TW, es, em, wake=wk) + ELSE + CALL CD_HermiteCable_Dyn_Set_VIV(hm, cl, cfv, dfv, TW, es, em) + END IF + ok = es == CD_HCDYN_OK + END IF + CALL require(ok, 'set-up of the finite-EI cable: '//TRIM(em)) + IF (.NOT. ok) RETURN + phold = hm%viv_phi(MIDN) + ELSE + DO i = 1, NE + conn(:, i) = [i, i + 1] + END DO + q0 = 0.0_wp + DO i = 1, NN + q0(3*i - 2) = SPAN*REAL(i - 1, wp)/REAL(NE, wp) + q0(3*i) = Z0 + END DO + v0 = 0.0_wp + fext = 0.0_wp + fluid = 0.0_wp + fluid(2, :) = U + wl = 0.0_wp + cfg%rho_inf = rho_inf + CALL CD_Init_Model(em0, q0, v0, conn, l0, eav, rhoa, .TRUE., fext, [1, 2, 3, 3*NN - 2, 3*NN - 1, 3*NN], cfg, & + es, em, fluid_velocity=fluid, drag_waterline_z=wl, drag_rho=RHOW, drag_diameter=D, & + drag_cdn=1.2_wp, drag_cdt=0.0_wp) + ok = es == CD_MODEL_OK + IF (ok) THEN + hd = D + IF (wake) THEN + CALL CD_Set_Model_VIV(em0, RHOW, cl, hd, cfv, dfv, TW, es, em, wake=wk) + ELSE + CALL CD_Set_Model_VIV(em0, RHOW, cl, hd, cfv, dfv, TW, es, em) + END IF + ok = es == CD_MODEL_OK + END IF + IF (ok) THEN + CALL CD_Recompute_Model_Acceleration(em0, es, em) + ok = es == CD_MODEL_OK + END IF + CALL require(ok, 'set-up of the EI = 0 line: '//TRIM(em)) + IF (.NOT. ok) RETURN + phold = em0%viv_phi(MIDN) + END IF + phu = phold + ph0 = 0.0_wp + zold = 0.0_wp + ncross = 0 + tc1 = 0.0_wp + tcn = 0.0_wp + DO n = 1, nstep + IF (finite_ei) THEN + CALL CD_HermiteCable_Dyn_Step(hm, dt, 50, 1.0e-8_wp, es, em) + ok = es == CD_HCDYN_OK + ph = hm%viv_phi(MIDN) + z = hm%q(6*(MIDN - 1) + 3) - Z0 + ELSE + CALL CD_Step_Model(em0, dt, conv, stalled, n_iter, es, em) + ok = es == CD_MODEL_OK .AND. conv + ph = em0%viv_phi(MIDN) + z = em0%q(3*MIDN) - Z0 + END IF + CALL require(ok, 'step: '//TRIM(em)) + IF (.NOT. ok) EXIT + phu = phu + (ph - phold) - CD_VIV_TWO_PI*ANINT((ph - phold)/CD_VIV_TWO_PI) + phold = ph + t = REAL(n, wp)*dt + IF (n == n0) ph0 = phu + IF (n > n0 .AND. zold <= 0.0_wp .AND. z > 0.0_wp) THEN + IF (ncross == 0) tc1 = t - dt*z/(z - zold) + tcn = t - dt*z/(z - zold) + ncross = ncross + 1 + END IF + zold = z + END DO + IF (ok) THEN + IF (wake) THEN + IF (ncross > 1) freq = CD_VIV_TWO_PI*REAL(ncross - 1, wp)/(tcn - tc1) + ELSE + freq = (phu - ph0)/(REAL(nstep - n0, wp)*dt) + END IF + END IF + IF (finite_ei) THEN + CALL CD_HermiteCable_Dyn_End(hm) + ELSE + CALL CD_End_Model(em0, es, em) + END IF + END FUNCTION lockin +END PROGRAM test_viv_step_order diff --git a/validation/experiments/delta_flume/README.md b/validation/experiments/delta_flume/README.md index af9b45f0..97dea3e1 100644 --- a/validation/experiments/delta_flume/README.md +++ b/validation/experiments/delta_flume/README.md @@ -87,14 +87,14 @@ peak-to-peak of the measured envelope in brackets. | Case | U (m/s) | Mode | A_CF/D | Mean IL/D | Std κD, CF | Std κD, IL | Mean top tension (N) | | --- | --- | --- | --- | --- | --- | --- | --- | | 1 | 0.16 | 2 / 2 | 0.653 / 0.757 (0.763) | 1.19 / 1.06 | 5.7e-5 / 9.3e-5 | 3.5e-5 / 5.0e-5 | 409 / 405 | -| 2 | 0.21 | 3 / 3 | 0.601 / 0.579 (0.561) | 1.60 / 1.19 | 1.12e-4 / 0.89e-4 | 7.2e-5 / 3.4e-5 | 413 / 407 | -| 3 | 0.31 | 4 / 4 | 0.629 / 0.779 (0.809) | 3.27 / 3.45 | 2.06e-4 / 2.70e-4 | 0.91e-4 / 1.95e-4 | 476 / 457 | -| 4 | 0.40 | **4** / 5 | 0.692 / 0.674 (0.595) | 4.78 / 4.97 | 2.30e-4 / 3.18e-4 | 1.37e-4 / 2.69e-4 | 541 / 506 | -| 5 | 0.54 | 6 / 6 | 0.779 / 0.843 (0.889) | 6.39 / 6.69 | 4.10e-4 / 4.81e-4 | 2.10e-4 / 2.31e-4 | 656 / 598 | -| 6 | 0.60 | 6 / 6 | 0.606 / 0.709 (0.779) | 6.78 / 8.13 | 4.39e-4 / 4.77e-4 | 2.57e-4 / 4.57e-4 | 734 / 670 | -| 7 | 0.70 | **6** / 7 | 0.737 / 0.777 (0.717) | 8.32 / 8.90 | 4.68e-4 / 6.47e-4 | 2.64e-4 / 3.03e-4 | 836 / 743 | -| 8 | 0.85 | **6** / 7 | 0.781 / 0.907 (0.890) | 9.65 / 11.18 | 4.91e-4 / 6.89e-4 | 2.99e-4 / 4.48e-4 | 1046 / 923 | -| 9 | 0.95 | **8** / 7 | 0.599 / 1.074 (0.996) | 10.16 / 13.51 | 6.88e-4 / 7.36e-4 | 3.70e-4 / 6.24e-4 | 1128 / 1002 | +| 2 | 0.21 | 3 / 3 | 0.602 / 0.579 (0.561) | 1.60 / 1.19 | 1.11e-4 / 0.89e-4 | 7.2e-5 / 3.4e-5 | 413 / 407 | +| 3 | 0.31 | 4 / 4 | 0.628 / 0.779 (0.809) | 3.27 / 3.45 | 2.05e-4 / 2.70e-4 | 0.92e-4 / 1.95e-4 | 476 / 457 | +| 4 | 0.40 | **4** / 5 | 0.700 / 0.674 (0.595) | 4.78 / 4.97 | 2.30e-4 / 3.18e-4 | 1.36e-4 / 2.69e-4 | 541 / 506 | +| 5 | 0.54 | 6 / 6 | 0.658 / 0.843 (0.889) | 6.53 / 6.69 | 4.45e-4 / 4.81e-4 | 2.00e-4 / 2.31e-4 | 660 / 598 | +| 6 | 0.60 | 6 / 6 | 0.679 / 0.709 (0.779) | 6.94 / 8.13 | 4.55e-4 / 4.77e-4 | 2.32e-4 / 4.57e-4 | 738 / 670 | +| 7 | 0.70 | **6** / 7 | 0.738 / 0.777 (0.717) | 8.28 / 8.90 | 4.63e-4 / 6.47e-4 | 2.69e-4 / 3.03e-4 | 835 / 743 | +| 8 | 0.85 | **6** / 7 | 0.769 / 0.907 (0.890) | 9.66 / 11.18 | 4.94e-4 / 6.89e-4 | 2.68e-4 / 4.48e-4 | 1046 / 923 | +| 9 | 0.95 | **8** / 7 | 0.595 / 1.074 (0.996) | 10.15 / 13.51 | 6.87e-4 / 7.36e-4 | 3.67e-4 / 6.24e-4 | 1128 / 1002 | - **Dominant cross-flow mode:** right in 5 of 9 cases and within one in the other four (one low in cases 4, 7 and 8, one high in case 9). Four of the eleven blind predictions found 7 or 8 of the 9 @@ -102,28 +102,33 @@ peak-to-peak of the measured envelope in brackets. - **Mean in-line displacement:** within ±17 % in 7 of 9 cases; +34 % in case 2, where the measured maximum is 1.2 D, and −25 % in case 9. The blind predictions under-predicted the drag amplification, and with it the mean in-line displacement, by 20–40 % (slide 26). -- **Cross-flow amplitude:** −44 % to +4 % against the slide-18 maxima (−40 % to +16 % against - the envelopes), within ±12 %, the scatter between the two measured values, in cases 2, 4, 5 - and 7. The −44 % of case 9 goes with the response in mode 8. +- **Cross-flow amplitude:** −45 % to +4 % against the slide-18 maxima (−40 % to +18 % against + the envelopes), within ±12 %, the scatter between the two measured values, in cases 2, 4, 6 + and 7. The −45 % of case 9 goes with the response in mode 8. - **Curvature:** the cross-flow standard deviation is −39 % to +26 %, low in every case but 2 - (−6 % to −29 % in cases 3–9); the in-line one −53 % to +110 %. The blind predictions' r.m.s. + (−5 % to −28 % in cases 3–9); the in-line one −53 % to +111 %. The blind predictions' r.m.s. curvatures were 20 % to 180 % of the measured (slide 26). - **Top tension:** the static top tension in the current is the measured mean, but the drag amplification bows the riser further: the mean top tension of the run is 1–13 % above the measured mean (7–13 % in cases 4–9), so the run is stiffer than the test at the higher speeds. - **Convergence (`provenance.json`):** - - cases 1–4 and 6–8: half the time step leaves the mode and changes the mean in-line + - cases 1–4, 7 and 8: half the time step leaves the mode and changes the mean in-line displacement and the cross-flow curvature standard deviation by at most 0.6 %, the peak - amplitude by at most 4.5 % and the in-line curvature by at most 10 % (case 8); 128 elements - leave the mode and change them by at most 2.6 %, 4.2 % and 9 %; - - case 5 beats in the 40 s window: its peak amplitude changes by −17 % and −20 % and its - in-line curvature by −10 % and +25 %, while the other metrics move by at most 9 %; - - case 9 has two responses: at half the time step it settles in mode 7 (5.80 Hz, A/D 0.725, - mean in-line displacement 10.63 D), with the base step and with 128 elements in mode 8 - (6.60 Hz), which an 80 s run keeps. + amplitude by at most 2.7 % and the in-line curvature by at most 1.2 %; 128 elements leave the + mode and change them by at most 2.7 %, 5.9 % and 3.1 %, except the in-line curvature of case + 8 (+19 %); + - case 5: half the time step and 128 elements change its in-line curvature by +22 % and +25 % + and the other metrics by at most 6.4 %; an 80 s run raises its peak amplitude by 2.6 %; + - case 6: its peak amplitude depends on the step and the mesh, −11 % at half the time step + (kept over an 80 s run: 0.604 against 0.679) and −13 % with 128 elements, while the mean + in-line displacement and the cross-flow curvature move by at most 2 % and the in-line + curvature by at most 12 %; + - case 9 has two responses: at half the time step it settles in mode 7 (5.80 Hz, A/D 0.751, + mean in-line displacement 10.68 D), with the base step and with 128 elements in mode 8 + (6.60 and 6.64 Hz), which an 80 s run keeps. - **Top spring 38.1 kN/m (`--spring 38.1e3`):** the mean top tension of the run is up to 14 % - higher and the mean in-line displacement 2–16 % lower, within ±17 % in 4 of 9 cases; the mode + higher and the mean in-line displacement 2–17 % lower, within ±17 % in 4 of 9 cases; the mode is right in 5 of 9 (case 9 in mode 7, case 5 in mode 5, case 8 in mode 5). `response_comparison.csv` holds the per-case values with their errors, and `summary.json` the diff --git a/validation/experiments/delta_flume/provenance.json b/validation/experiments/delta_flume/provenance.json index 5db6580c..c86d40f1 100644 --- a/validation/experiments/delta_flume/provenance.json +++ b/validation/experiments/delta_flume/provenance.json @@ -12,8 +12,8 @@ "extraction": "the slides are vector graphics: the measured points (filled circles of the measurement colour) and curves (polylines of 102 nearly equally spaced vertices along the riser, resampled to 101 equally spaced stations) are read as plotted coordinates and mapped linearly through the panel tick labels; the recovered towing speeds match slide 3 within 0.006 m/s; the envelope maxima of the mean in-line displacement match slide 17 within 0.05 D", "assumptions": "fresh water, Ca 1 (as L3-C); the 11.4 kN/m top spring of the two the page lists; the structural damping as bending damping of a pure bending mode at 2 Hz; the static top tension in the current (drag unamplified) set to the measured mean; the curvature panels of slides 7-15 have no scale, so each envelope curvature shape is scaled so that its r.m.s. over the stations equals the slide-19 overall standard deviation", "coefficients": "generic, not fitted to these measurements: Cl 0.8, cF 0.18, dF 0.08; in-line ClX 0.85, alpha 0.15 (Ulveseter et al. 2018); Cd 1.2; VIV AMPLITUDE Cv 0.8 constant with CdAmp = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2) (Chaplin et al. 2005a, Eq. 4); VIV DAMPING 0 0 1 (the amplification on the in-line drag only)", - "CableDyn_commit": "7d3998f (dev)", - "validation_date": "2026-11-15", + "CableDyn_commit": "041337e (dev) with the mid-point VIV phase update (fix/viv-coupled-order)", + "validation_date": "2026-11-16", "executable_name": "cabledyn.exe", "executable_sha256": "see summary.json", "compiler": "GNU Fortran 16.2.0", @@ -28,267 +28,307 @@ "f_cf_hz": 0.92, "max_cf_half_pp_D": 0.6535, "max_il_mean_D": 1.19, - "std_curv_cf_kD": 5.6604e-05, - "std_curv_il_kD": 3.5373e-05, + "std_curv_cf_kD": 5.6569e-05, + "std_curv_il_kD": 3.5342e-05, "mean_top_tension_N": 408.5 }, "2": { "mode": 3, "f_cf_hz": 1.36, - "max_cf_half_pp_D": 0.5973, - "max_il_mean_D": 1.603, - "std_curv_cf_kD": 0.00011179, - "std_curv_il_kD": 7.1936e-05, + "max_cf_half_pp_D": 0.6072, + "max_il_mean_D": 1.602, + "std_curv_cf_kD": 0.00011154, + "std_curv_il_kD": 7.2075e-05, "mean_top_tension_N": 412.8 }, "3": { "mode": 4, "f_cf_hz": 2.0, - "max_cf_half_pp_D": 0.6162, - "max_il_mean_D": 3.266, - "std_curv_cf_kD": 0.00020525, - "std_curv_il_kD": 9.146e-05, + "max_cf_half_pp_D": 0.6299, + "max_il_mean_D": 3.265, + "std_curv_cf_kD": 0.00020482, + "std_curv_il_kD": 9.2011e-05, "mean_top_tension_N": 475.5 }, "4": { "mode": 4, "f_cf_hz": 2.24, - "max_cf_half_pp_D": 0.7077, + "max_cf_half_pp_D": 0.6829, "max_il_mean_D": 4.782, - "std_curv_cf_kD": 0.00022964, - "std_curv_il_kD": 0.00013684, + "std_curv_cf_kD": 0.00022942, + "std_curv_il_kD": 0.00013668, "mean_top_tension_N": 541.4 }, "5": { "mode": 6, - "f_cf_hz": 3.72, - "max_cf_half_pp_D": 0.6485, - "max_il_mean_D": 6.542, - "std_curv_cf_kD": 0.00044751, - "std_curv_il_kD": 0.00018971, - "mean_top_tension_N": 660.1 + "f_cf_hz": 3.68, + "max_cf_half_pp_D": 0.6622, + "max_il_mean_D": 6.309, + "std_curv_cf_kD": 0.00041604, + "std_curv_il_kD": 0.00024332, + "mean_top_tension_N": 653.9 }, "6": { "mode": 6, "f_cf_hz": 3.92, - "max_cf_half_pp_D": 0.6093, - "max_il_mean_D": 6.804, - "std_curv_cf_kD": 0.00044174, - "std_curv_il_kD": 0.00025254, - "mean_top_tension_N": 734.5 + "max_cf_half_pp_D": 0.6018, + "max_il_mean_D": 6.841, + "std_curv_cf_kD": 0.00044566, + "std_curv_il_kD": 0.00024711, + "mean_top_tension_N": 735.6 }, "7": { "mode": 6, "f_cf_hz": 4.24, - "max_cf_half_pp_D": 0.7339, - "max_il_mean_D": 8.319, - "std_curv_cf_kD": 0.00046749, - "std_curv_il_kD": 0.00026398, - "mean_top_tension_N": 836.1 + "max_cf_half_pp_D": 0.726, + "max_il_mean_D": 8.302, + "std_curv_cf_kD": 0.000466, + "std_curv_il_kD": 0.0002655, + "mean_top_tension_N": 835.6 }, "8": { "mode": 6, "f_cf_hz": 4.8, - "max_cf_half_pp_D": 0.7462, - "max_il_mean_D": 9.654, - "std_curv_cf_kD": 0.00049254, - "std_curv_il_kD": 0.0002702, - "mean_top_tension_N": 1045.6 + "max_cf_half_pp_D": 0.7893, + "max_il_mean_D": 9.645, + "std_curv_cf_kD": 0.00049194, + "std_curv_il_kD": 0.00027017, + "mean_top_tension_N": 1045.2 }, "9": { "mode": 7, "f_cf_hz": 5.8, - "max_cf_half_pp_D": 0.7249, - "max_il_mean_D": 10.632, - "std_curv_cf_kD": 0.00064422, - "std_curv_il_kD": 0.00031337, - "mean_top_tension_N": 1145.9 + "max_cf_half_pp_D": 0.7513, + "max_il_mean_D": 10.675, + "std_curv_cf_kD": 0.00064805, + "std_curv_il_kD": 0.00030531, + "mean_top_tension_N": 1147.4 } }, "segments_128": { "1": { "mode": 2, "f_cf_hz": 0.92, - "max_cf_half_pp_D": 0.6526, - "max_il_mean_D": 1.204, - "std_curv_cf_kD": 5.6747e-05, - "std_curv_il_kD": 3.5554e-05, + "max_cf_half_pp_D": 0.6533, + "max_il_mean_D": 1.203, + "std_curv_cf_kD": 5.6652e-05, + "std_curv_il_kD": 3.5525e-05, "mean_top_tension_N": 408.6 }, "2": { "mode": 3, "f_cf_hz": 1.36, - "max_cf_half_pp_D": 0.5946, - "max_il_mean_D": 1.637, - "std_curv_cf_kD": 0.00011292, - "std_curv_il_kD": 7.2924e-05, + "max_cf_half_pp_D": 0.596, + "max_il_mean_D": 1.636, + "std_curv_cf_kD": 0.00011273, + "std_curv_il_kD": 7.3035e-05, "mean_top_tension_N": 413.0 }, "3": { "mode": 4, "f_cf_hz": 2.0, - "max_cf_half_pp_D": 0.6143, - "max_il_mean_D": 3.319, - "std_curv_cf_kD": 0.00020749, - "std_curv_il_kD": 9.4304e-05, - "mean_top_tension_N": 476.1 + "max_cf_half_pp_D": 0.626, + "max_il_mean_D": 3.317, + "std_curv_cf_kD": 0.00020668, + "std_curv_il_kD": 9.449e-05, + "mean_top_tension_N": 476.0 }, "4": { "mode": 4, "f_cf_hz": 2.24, - "max_cf_half_pp_D": 0.6642, - "max_il_mean_D": 4.865, - "std_curv_cf_kD": 0.00023121, - "std_curv_il_kD": 0.00014079, - "mean_top_tension_N": 542.6 + "max_cf_half_pp_D": 0.6581, + "max_il_mean_D": 4.862, + "std_curv_cf_kD": 0.00023173, + "std_curv_il_kD": 0.00014027, + "mean_top_tension_N": 542.5 }, "5": { "mode": 6, "f_cf_hz": 3.68, - "max_cf_half_pp_D": 0.6224, - "max_il_mean_D": 6.369, - "std_curv_cf_kD": 0.00041739, - "std_curv_il_kD": 0.00026224, - "mean_top_tension_N": 654.6 + "max_cf_half_pp_D": 0.6618, + "max_il_mean_D": 6.412, + "std_curv_cf_kD": 0.00042566, + "std_curv_il_kD": 0.00025004, + "mean_top_tension_N": 655.8 }, "6": { "mode": 6, "f_cf_hz": 3.92, - "max_cf_half_pp_D": 0.5816, - "max_il_mean_D": 6.908, - "std_curv_cf_kD": 0.00044891, - "std_curv_il_kD": 0.00026562, - "mean_top_tension_N": 736.4 + "max_cf_half_pp_D": 0.588, + "max_il_mean_D": 6.938, + "std_curv_cf_kD": 0.0004522, + "std_curv_il_kD": 0.00025942, + "mean_top_tension_N": 737.3 }, "7": { "mode": 6, "f_cf_hz": 4.24, - "max_cf_half_pp_D": 0.7081, - "max_il_mean_D": 8.43, - "std_curv_cf_kD": 0.0004708, - "std_curv_il_kD": 0.00028325, - "mean_top_tension_N": 838.5 + "max_cf_half_pp_D": 0.7051, + "max_il_mean_D": 8.469, + "std_curv_cf_kD": 0.00047584, + "std_curv_il_kD": 0.00027317, + "mean_top_tension_N": 839.8 }, "8": { "mode": 6, - "f_cf_hz": 4.8, - "max_cf_half_pp_D": 0.7484, - "max_il_mean_D": 9.845, - "std_curv_cf_kD": 0.00050403, - "std_curv_il_kD": 0.00027331, - "mean_top_tension_N": 1051.0 + "f_cf_hz": 4.84, + "max_cf_half_pp_D": 0.723, + "max_il_mean_D": 9.789, + "std_curv_cf_kD": 0.00049747, + "std_curv_il_kD": 0.00031993, + "mean_top_tension_N": 1049.4 }, "9": { "mode": 8, "f_cf_hz": 6.64, - "max_cf_half_pp_D": 0.5947, - "max_il_mean_D": 10.354, - "std_curv_cf_kD": 0.00071066, - "std_curv_il_kD": 0.0003868, - "mean_top_tension_N": 1134.1 + "max_cf_half_pp_D": 0.5999, + "max_il_mean_D": 10.343, + "std_curv_cf_kD": 0.00070879, + "std_curv_il_kD": 0.00038944, + "mean_top_tension_N": 1133.7 } }, "tmax_80_s_cases_5_9": { "5": { "mode": 6, "f_cf_hz": 3.692, - "max_cf_half_pp_D": 0.7786, - "max_il_mean_D": 6.427, - "std_curv_cf_kD": 0.00043051, - "std_curv_il_kD": 0.00020686, - "mean_top_tension_N": 657.3 + "max_cf_half_pp_D": 0.6748, + "max_il_mean_D": 6.428, + "std_curv_cf_kD": 0.0004324, + "std_curv_il_kD": 0.00022074, + "mean_top_tension_N": 657.0 }, "9": { "mode": 8, "f_cf_hz": 6.615, - "max_cf_half_pp_D": 0.6091, - "max_il_mean_D": 10.155, - "std_curv_cf_kD": 0.00068799, - "std_curv_il_kD": 0.00036953, - "mean_top_tension_N": 1128.1 + "max_cf_half_pp_D": 0.6148, + "max_il_mean_D": 10.151, + "std_curv_cf_kD": 0.00068681, + "std_curv_il_kD": 0.00036845, + "mean_top_tension_N": 1127.9 + } + }, + "tmax_80_s_cases_6_8": { + "6": { + "mode": 6, + "f_cf_hz": 3.908, + "max_cf_half_pp_D": 0.6792, + "max_il_mean_D": 6.859, + "std_curv_cf_kD": 0.00044732, + "std_curv_il_kD": 0.0002437, + "mean_top_tension_N": 736.0 + }, + "8": { + "mode": 6, + "f_cf_hz": 4.8, + "max_cf_half_pp_D": 0.7821, + "max_il_mean_D": 9.644, + "std_curv_cf_kD": 0.00049169, + "std_curv_il_kD": 0.00027079, + "mean_top_tension_N": 1045.2 + } + }, + "tmax_80_s_dt_half_cases_6_8": { + "6": { + "mode": 6, + "f_cf_hz": 3.908, + "max_cf_half_pp_D": 0.6042, + "max_il_mean_D": 6.829, + "std_curv_cf_kD": 0.00044457, + "std_curv_il_kD": 0.00024848, + "mean_top_tension_N": 735.2 + }, + "8": { + "mode": 6, + "f_cf_hz": 4.8, + "max_cf_half_pp_D": 0.7893, + "max_il_mean_D": 9.633, + "std_curv_cf_kD": 0.00049061, + "std_curv_il_kD": 0.00027237, + "mean_top_tension_N": 1044.8 } }, "top_spring_38p1_kN_per_m": { "1": { "mode": 2, "f_cf_hz": 0.92, - "max_cf_half_pp_D": 0.65, - "max_il_mean_D": 1.162, - "std_curv_cf_kD": 5.6486e-05, - "std_curv_il_kD": 3.4978e-05, + "max_cf_half_pp_D": 0.6492, + "max_il_mean_D": 1.161, + "std_curv_cf_kD": 5.6423e-05, + "std_curv_il_kD": 3.4946e-05, "mean_top_tension_N": 415.7 }, "2": { "mode": 3, "f_cf_hz": 1.4, - "max_cf_half_pp_D": 0.6153, + "max_cf_half_pp_D": 0.6099, "max_il_mean_D": 1.532, - "std_curv_cf_kD": 0.00010964, - "std_curv_il_kD": 7.2096e-05, + "std_curv_cf_kD": 0.00010957, + "std_curv_il_kD": 7.2268e-05, "mean_top_tension_N": 423.7 }, "3": { "mode": 4, "f_cf_hz": 2.08, - "max_cf_half_pp_D": 0.6316, - "max_il_mean_D": 2.982, - "std_curv_cf_kD": 0.00019748, - "std_curv_il_kD": 9.1888e-05, - "mean_top_tension_N": 504.2 + "max_cf_half_pp_D": 0.6112, + "max_il_mean_D": 2.984, + "std_curv_cf_kD": 0.00019718, + "std_curv_il_kD": 9.1364e-05, + "mean_top_tension_N": 504.3 }, "4": { "mode": 4, "f_cf_hz": 2.32, - "max_cf_half_pp_D": 0.6453, - "max_il_mean_D": 4.293, - "std_curv_cf_kD": 0.00023093, - "std_curv_il_kD": 0.00012918, - "mean_top_tension_N": 591.5 + "max_cf_half_pp_D": 0.6729, + "max_il_mean_D": 4.292, + "std_curv_cf_kD": 0.00023152, + "std_curv_il_kD": 0.00012869, + "mean_top_tension_N": 591.4 }, "5": { "mode": 5, "f_cf_hz": 3.24, - "max_cf_half_pp_D": 0.7159, - "max_il_mean_D": 5.681, - "std_curv_cf_kD": 0.00034362, - "std_curv_il_kD": 0.00014224, - "mean_top_tension_N": 728.3 + "max_cf_half_pp_D": 0.7171, + "max_il_mean_D": 5.649, + "std_curv_cf_kD": 0.00033914, + "std_curv_il_kD": 0.0001492, + "mean_top_tension_N": 726.0 }, "6": { "mode": 6, "f_cf_hz": 4.04, - "max_cf_half_pp_D": 0.5454, - "max_il_mean_D": 5.702, - "std_curv_cf_kD": 0.00037648, - "std_curv_il_kD": 0.00030899, - "mean_top_tension_N": 787.9 + "max_cf_half_pp_D": 0.5776, + "max_il_mean_D": 5.785, + "std_curv_cf_kD": 0.00039448, + "std_curv_il_kD": 0.00028874, + "mean_top_tension_N": 795.1 }, "7": { "mode": 6, "f_cf_hz": 4.48, - "max_cf_half_pp_D": 0.6894, - "max_il_mean_D": 7.184, - "std_curv_cf_kD": 0.00044718, - "std_curv_il_kD": 0.00025784, - "mean_top_tension_N": 934.3 + "max_cf_half_pp_D": 0.6833, + "max_il_mean_D": 7.188, + "std_curv_cf_kD": 0.0004468, + "std_curv_il_kD": 0.00025551, + "mean_top_tension_N": 934.6 }, "8": { "mode": 5, "f_cf_hz": 4.32, - "max_cf_half_pp_D": 0.7633, - "max_il_mean_D": 8.507, - "std_curv_cf_kD": 0.00040298, - "std_curv_il_kD": 0.00021852, - "mean_top_tension_N": 1187.5 + "max_cf_half_pp_D": 0.7426, + "max_il_mean_D": 8.509, + "std_curv_cf_kD": 0.00040291, + "std_curv_il_kD": 0.00021742, + "mean_top_tension_N": 1187.7 }, "9": { "mode": 7, "f_cf_hz": 6.16, - "max_cf_half_pp_D": 0.7137, - "max_il_mean_D": 9.123, - "std_curv_cf_kD": 0.00060676, - "std_curv_il_kD": 0.00028333, - "mean_top_tension_N": 1283.9 + "max_cf_half_pp_D": 0.7124, + "max_il_mean_D": 9.131, + "std_curv_cf_kD": 0.0006037, + "std_curv_il_kD": 0.00026373, + "mean_top_tension_N": 1284.3 } } } diff --git a/validation/experiments/delta_flume/response_comparison.csv b/validation/experiments/delta_flume/response_comparison.csv index 892ab8db..f391228b 100644 --- a/validation/experiments/delta_flume/response_comparison.csv +++ b/validation/experiments/delta_flume/response_comparison.csv @@ -1,10 +1,10 @@ case,U_m_per_s,top_tension_N,dt_s,mode_measured,mode_cabledyn,f_cf_cabledyn_hz,max_cf_D_measured,max_cf_half_pp_D_measured_envelope,max_cf_half_pp_D_cabledyn,max_cf_error_percent,max_cf_envelope_error_percent,max_il_mean_D_measured,max_il_mean_D_cabledyn,max_il_mean_error_percent,std_curv_cf_kD_measured,std_curv_cf_kD_cabledyn,std_curv_cf_error_percent,std_curv_il_kD_measured,std_curv_il_kD_cabledyn,std_curv_il_error_percent,mean_top_tension_N_cabledyn -1,0.16,405.0,0.0025,2,2,0.92,0.7565,0.7632,0.6534,-13.6,-14.4,1.061,1.191,12.2,9.2666e-05,5.6648e-05,-38.9,5.0494e-05,3.5410e-05,-29.9,408.5 -2,0.21,407.0,0.0025,3,3,1.36,0.5788,0.5612,0.6012,3.9,7.1,1.194,1.604,34.3,8.8590e-05,1.1170e-04,26.1,3.4247e-05,7.1892e-05,109.9,412.8 -3,0.31,457.0,0.0025,4,4,2.0,0.7793,0.8089,0.6285,-19.4,-22.3,3.451,3.27,-5.2,2.7041e-04,2.0558e-04,-24.0,1.9471e-04,9.1215e-05,-53.2,475.6 -4,0.4,506.0,0.001,5,4,2.24,0.6738,0.5948,0.6918,2.7,16.3,4.973,4.782,-3.8,3.1790e-04,2.2974e-04,-27.7,2.6884e-04,1.3698e-04,-49.0,541.4 -5,0.54,598.0,0.001,6,6,3.72,0.8428,0.8885,0.7786,-7.6,-12.4,6.689,6.386,-4.5,4.8076e-04,4.0956e-04,-14.8,2.3125e-04,2.1049e-04,-9.0,655.8 -6,0.6,670.0,0.001,6,6,3.92,0.7093,0.7792,0.6057,-14.6,-22.3,8.127,6.779,-16.6,4.7728e-04,4.3901e-04,-8.0,4.5723e-04,2.5676e-04,-43.8,733.8 -7,0.7,743.0,0.001,7,6,4.24,0.777,0.717,0.737,-5.1,2.8,8.899,8.321,-6.5,6.4703e-04,4.6781e-04,-27.7,3.0285e-04,2.6416e-04,-12.8,836.2 -8,0.85,923.0,0.0005,7,6,4.8,0.9066,0.8896,0.781,-13.9,-12.2,11.184,9.652,-13.7,6.8866e-04,4.9143e-04,-28.6,4.4819e-04,2.9917e-04,-33.3,1046.0 -9,0.95,1002.0,0.0005,7,8,6.6,1.0745,0.9961,0.599,-44.2,-39.9,13.508,10.155,-24.8,7.3551e-04,6.8775e-04,-6.5,6.2385e-04,3.6999e-04,-40.7,1128.1 +1,0.16,405.0,0.0025,2,2,0.92,0.7565,0.7632,0.6534,-13.6,-14.4,1.061,1.19,12.1,9.2666e-05,5.6583e-05,-38.9,5.0494e-05,3.5349e-05,-30.0,408.5 +2,0.21,407.0,0.0025,3,3,1.36,0.5788,0.5612,0.6018,4.0,7.2,1.194,1.602,34.1,8.8590e-05,1.1148e-04,25.8,3.4247e-05,7.2081e-05,110.5,412.8 +3,0.31,457.0,0.0025,4,4,2.0,0.7793,0.8089,0.6282,-19.4,-22.3,3.451,3.265,-5.4,2.7041e-04,2.0469e-04,-24.3,1.9471e-04,9.1770e-05,-52.9,475.5 +4,0.4,506.0,0.001,5,4,2.24,0.6738,0.5948,0.6997,3.8,17.6,4.973,4.784,-3.8,3.1790e-04,2.2964e-04,-27.8,2.6884e-04,1.3606e-04,-49.4,541.4 +5,0.54,598.0,0.001,6,6,3.72,0.8428,0.8885,0.658,-21.9,-25.9,6.689,6.527,-2.4,4.8076e-04,4.4463e-04,-7.5,2.3125e-04,2.0013e-04,-13.5,659.6 +6,0.6,670.0,0.001,6,6,3.92,0.7093,0.7792,0.6792,-4.2,-12.8,8.127,6.935,-14.7,4.7728e-04,4.5466e-04,-4.7,4.5723e-04,2.3189e-04,-49.3,738.1 +7,0.7,743.0,0.001,7,6,4.24,0.777,0.717,0.7382,-5.0,3.0,8.899,8.279,-7.0,6.4703e-04,4.6324e-04,-28.4,3.0285e-04,2.6879e-04,-11.2,834.8 +8,0.85,923.0,0.0005,7,6,4.8,0.9066,0.8896,0.7685,-15.2,-13.6,11.184,9.658,-13.6,6.8866e-04,4.9356e-04,-28.3,4.4819e-04,2.6811e-04,-40.2,1045.7 +9,0.95,1002.0,0.0005,7,8,6.6,1.0745,0.9961,0.5945,-44.7,-40.3,13.508,10.151,-24.9,7.3551e-04,6.8680e-04,-6.6,6.2385e-04,3.6721e-04,-41.1,1127.9 diff --git a/validation/experiments/delta_flume/summary.json b/validation/experiments/delta_flume/summary.json index eb3a8779..2a0e5ef7 100644 --- a/validation/experiments/delta_flume/summary.json +++ b/validation/experiments/delta_flume/summary.json @@ -20,24 +20,24 @@ "modes_within_one": 9, "il_mean_within_17_percent": 7, "il_mean_error_percent_range": [ - -24.8, - 34.3 + -24.9, + 34.1 ], "max_cf_error_percent_range": [ - -44.2, - 3.9 + -44.7, + 4.0 ], "max_cf_envelope_error_percent_range": [ - -39.9, - 16.3 + -40.3, + 17.6 ], "std_curv_cf_error_percent_range": [ -38.9, - 26.1 + 25.8 ], "std_curv_il_error_percent_range": [ - -53.2, - 109.9 + -52.9, + 110.5 ], "per_case": [ { @@ -54,14 +54,14 @@ "max_cf_error_percent": -13.6, "max_cf_envelope_error_percent": -14.4, "max_il_mean_D_measured": 1.061, - "max_il_mean_D_cabledyn": 1.191, - "max_il_mean_error_percent": 12.2, + "max_il_mean_D_cabledyn": 1.19, + "max_il_mean_error_percent": 12.1, "std_curv_cf_kD_measured": "9.2666e-05", - "std_curv_cf_kD_cabledyn": "5.6648e-05", + "std_curv_cf_kD_cabledyn": "5.6583e-05", "std_curv_cf_error_percent": -38.9, "std_curv_il_kD_measured": "5.0494e-05", - "std_curv_il_kD_cabledyn": "3.5410e-05", - "std_curv_il_error_percent": -29.9, + "std_curv_il_kD_cabledyn": "3.5349e-05", + "std_curv_il_error_percent": -30.0, "mean_top_tension_N_cabledyn": 408.5 }, { @@ -74,18 +74,18 @@ "f_cf_cabledyn_hz": 1.36, "max_cf_D_measured": 0.5788, "max_cf_half_pp_D_measured_envelope": 0.5612, - "max_cf_half_pp_D_cabledyn": 0.6012, - "max_cf_error_percent": 3.9, - "max_cf_envelope_error_percent": 7.1, + "max_cf_half_pp_D_cabledyn": 0.6018, + "max_cf_error_percent": 4.0, + "max_cf_envelope_error_percent": 7.2, "max_il_mean_D_measured": 1.194, - "max_il_mean_D_cabledyn": 1.604, - "max_il_mean_error_percent": 34.3, + "max_il_mean_D_cabledyn": 1.602, + "max_il_mean_error_percent": 34.1, "std_curv_cf_kD_measured": "8.8590e-05", - "std_curv_cf_kD_cabledyn": "1.1170e-04", - "std_curv_cf_error_percent": 26.1, + "std_curv_cf_kD_cabledyn": "1.1148e-04", + "std_curv_cf_error_percent": 25.8, "std_curv_il_kD_measured": "3.4247e-05", - "std_curv_il_kD_cabledyn": "7.1892e-05", - "std_curv_il_error_percent": 109.9, + "std_curv_il_kD_cabledyn": "7.2081e-05", + "std_curv_il_error_percent": 110.5, "mean_top_tension_N_cabledyn": 412.8 }, { @@ -98,19 +98,19 @@ "f_cf_cabledyn_hz": 2.0, "max_cf_D_measured": 0.7793, "max_cf_half_pp_D_measured_envelope": 0.8089, - "max_cf_half_pp_D_cabledyn": 0.6285, + "max_cf_half_pp_D_cabledyn": 0.6282, "max_cf_error_percent": -19.4, "max_cf_envelope_error_percent": -22.3, "max_il_mean_D_measured": 3.451, - "max_il_mean_D_cabledyn": 3.27, - "max_il_mean_error_percent": -5.2, + "max_il_mean_D_cabledyn": 3.265, + "max_il_mean_error_percent": -5.4, "std_curv_cf_kD_measured": "2.7041e-04", - "std_curv_cf_kD_cabledyn": "2.0558e-04", - "std_curv_cf_error_percent": -24.0, + "std_curv_cf_kD_cabledyn": "2.0469e-04", + "std_curv_cf_error_percent": -24.3, "std_curv_il_kD_measured": "1.9471e-04", - "std_curv_il_kD_cabledyn": "9.1215e-05", - "std_curv_il_error_percent": -53.2, - "mean_top_tension_N_cabledyn": 475.6 + "std_curv_il_kD_cabledyn": "9.1770e-05", + "std_curv_il_error_percent": -52.9, + "mean_top_tension_N_cabledyn": 475.5 }, { "case": 4, @@ -122,18 +122,18 @@ "f_cf_cabledyn_hz": 2.24, "max_cf_D_measured": 0.6738, "max_cf_half_pp_D_measured_envelope": 0.5948, - "max_cf_half_pp_D_cabledyn": 0.6918, - "max_cf_error_percent": 2.7, - "max_cf_envelope_error_percent": 16.3, + "max_cf_half_pp_D_cabledyn": 0.6997, + "max_cf_error_percent": 3.8, + "max_cf_envelope_error_percent": 17.6, "max_il_mean_D_measured": 4.973, - "max_il_mean_D_cabledyn": 4.782, + "max_il_mean_D_cabledyn": 4.784, "max_il_mean_error_percent": -3.8, "std_curv_cf_kD_measured": "3.1790e-04", - "std_curv_cf_kD_cabledyn": "2.2974e-04", - "std_curv_cf_error_percent": -27.7, + "std_curv_cf_kD_cabledyn": "2.2964e-04", + "std_curv_cf_error_percent": -27.8, "std_curv_il_kD_measured": "2.6884e-04", - "std_curv_il_kD_cabledyn": "1.3698e-04", - "std_curv_il_error_percent": -49.0, + "std_curv_il_kD_cabledyn": "1.3606e-04", + "std_curv_il_error_percent": -49.4, "mean_top_tension_N_cabledyn": 541.4 }, { @@ -146,19 +146,19 @@ "f_cf_cabledyn_hz": 3.72, "max_cf_D_measured": 0.8428, "max_cf_half_pp_D_measured_envelope": 0.8885, - "max_cf_half_pp_D_cabledyn": 0.7786, - "max_cf_error_percent": -7.6, - "max_cf_envelope_error_percent": -12.4, + "max_cf_half_pp_D_cabledyn": 0.658, + "max_cf_error_percent": -21.9, + "max_cf_envelope_error_percent": -25.9, "max_il_mean_D_measured": 6.689, - "max_il_mean_D_cabledyn": 6.386, - "max_il_mean_error_percent": -4.5, + "max_il_mean_D_cabledyn": 6.527, + "max_il_mean_error_percent": -2.4, "std_curv_cf_kD_measured": "4.8076e-04", - "std_curv_cf_kD_cabledyn": "4.0956e-04", - "std_curv_cf_error_percent": -14.8, + "std_curv_cf_kD_cabledyn": "4.4463e-04", + "std_curv_cf_error_percent": -7.5, "std_curv_il_kD_measured": "2.3125e-04", - "std_curv_il_kD_cabledyn": "2.1049e-04", - "std_curv_il_error_percent": -9.0, - "mean_top_tension_N_cabledyn": 655.8 + "std_curv_il_kD_cabledyn": "2.0013e-04", + "std_curv_il_error_percent": -13.5, + "mean_top_tension_N_cabledyn": 659.6 }, { "case": 6, @@ -170,19 +170,19 @@ "f_cf_cabledyn_hz": 3.92, "max_cf_D_measured": 0.7093, "max_cf_half_pp_D_measured_envelope": 0.7792, - "max_cf_half_pp_D_cabledyn": 0.6057, - "max_cf_error_percent": -14.6, - "max_cf_envelope_error_percent": -22.3, + "max_cf_half_pp_D_cabledyn": 0.6792, + "max_cf_error_percent": -4.2, + "max_cf_envelope_error_percent": -12.8, "max_il_mean_D_measured": 8.127, - "max_il_mean_D_cabledyn": 6.779, - "max_il_mean_error_percent": -16.6, + "max_il_mean_D_cabledyn": 6.935, + "max_il_mean_error_percent": -14.7, "std_curv_cf_kD_measured": "4.7728e-04", - "std_curv_cf_kD_cabledyn": "4.3901e-04", - "std_curv_cf_error_percent": -8.0, + "std_curv_cf_kD_cabledyn": "4.5466e-04", + "std_curv_cf_error_percent": -4.7, "std_curv_il_kD_measured": "4.5723e-04", - "std_curv_il_kD_cabledyn": "2.5676e-04", - "std_curv_il_error_percent": -43.8, - "mean_top_tension_N_cabledyn": 733.8 + "std_curv_il_kD_cabledyn": "2.3189e-04", + "std_curv_il_error_percent": -49.3, + "mean_top_tension_N_cabledyn": 738.1 }, { "case": 7, @@ -194,19 +194,19 @@ "f_cf_cabledyn_hz": 4.24, "max_cf_D_measured": 0.777, "max_cf_half_pp_D_measured_envelope": 0.717, - "max_cf_half_pp_D_cabledyn": 0.737, - "max_cf_error_percent": -5.1, - "max_cf_envelope_error_percent": 2.8, + "max_cf_half_pp_D_cabledyn": 0.7382, + "max_cf_error_percent": -5.0, + "max_cf_envelope_error_percent": 3.0, "max_il_mean_D_measured": 8.899, - "max_il_mean_D_cabledyn": 8.321, - "max_il_mean_error_percent": -6.5, + "max_il_mean_D_cabledyn": 8.279, + "max_il_mean_error_percent": -7.0, "std_curv_cf_kD_measured": "6.4703e-04", - "std_curv_cf_kD_cabledyn": "4.6781e-04", - "std_curv_cf_error_percent": -27.7, + "std_curv_cf_kD_cabledyn": "4.6324e-04", + "std_curv_cf_error_percent": -28.4, "std_curv_il_kD_measured": "3.0285e-04", - "std_curv_il_kD_cabledyn": "2.6416e-04", - "std_curv_il_error_percent": -12.8, - "mean_top_tension_N_cabledyn": 836.2 + "std_curv_il_kD_cabledyn": "2.6879e-04", + "std_curv_il_error_percent": -11.2, + "mean_top_tension_N_cabledyn": 834.8 }, { "case": 8, @@ -218,19 +218,19 @@ "f_cf_cabledyn_hz": 4.8, "max_cf_D_measured": 0.9066, "max_cf_half_pp_D_measured_envelope": 0.8896, - "max_cf_half_pp_D_cabledyn": 0.781, - "max_cf_error_percent": -13.9, - "max_cf_envelope_error_percent": -12.2, + "max_cf_half_pp_D_cabledyn": 0.7685, + "max_cf_error_percent": -15.2, + "max_cf_envelope_error_percent": -13.6, "max_il_mean_D_measured": 11.184, - "max_il_mean_D_cabledyn": 9.652, - "max_il_mean_error_percent": -13.7, + "max_il_mean_D_cabledyn": 9.658, + "max_il_mean_error_percent": -13.6, "std_curv_cf_kD_measured": "6.8866e-04", - "std_curv_cf_kD_cabledyn": "4.9143e-04", - "std_curv_cf_error_percent": -28.6, + "std_curv_cf_kD_cabledyn": "4.9356e-04", + "std_curv_cf_error_percent": -28.3, "std_curv_il_kD_measured": "4.4819e-04", - "std_curv_il_kD_cabledyn": "2.9917e-04", - "std_curv_il_error_percent": -33.3, - "mean_top_tension_N_cabledyn": 1046.0 + "std_curv_il_kD_cabledyn": "2.6811e-04", + "std_curv_il_error_percent": -40.2, + "mean_top_tension_N_cabledyn": 1045.7 }, { "case": 9, @@ -242,20 +242,20 @@ "f_cf_cabledyn_hz": 6.6, "max_cf_D_measured": 1.0745, "max_cf_half_pp_D_measured_envelope": 0.9961, - "max_cf_half_pp_D_cabledyn": 0.599, - "max_cf_error_percent": -44.2, - "max_cf_envelope_error_percent": -39.9, + "max_cf_half_pp_D_cabledyn": 0.5945, + "max_cf_error_percent": -44.7, + "max_cf_envelope_error_percent": -40.3, "max_il_mean_D_measured": 13.508, - "max_il_mean_D_cabledyn": 10.155, - "max_il_mean_error_percent": -24.8, + "max_il_mean_D_cabledyn": 10.151, + "max_il_mean_error_percent": -24.9, "std_curv_cf_kD_measured": "7.3551e-04", - "std_curv_cf_kD_cabledyn": "6.8775e-04", - "std_curv_cf_error_percent": -6.5, + "std_curv_cf_kD_cabledyn": "6.8680e-04", + "std_curv_cf_error_percent": -6.6, "std_curv_il_kD_measured": "6.2385e-04", - "std_curv_il_kD_cabledyn": "3.6999e-04", - "std_curv_il_error_percent": -40.7, - "mean_top_tension_N_cabledyn": 1128.1 + "std_curv_il_kD_cabledyn": "3.6721e-04", + "std_curv_il_error_percent": -41.1, + "mean_top_tension_N_cabledyn": 1127.9 } ], - "executable_sha256": "a95b9df931e7f416674785413d8da8a79a204567ef0d4809f455fb41a660a647" + "executable_sha256": "790c034e908a795af84e678c36c51cfa35df8ac1136a7d1f93f02bcdb1a5bf1b" } diff --git a/validation/experiments/wang_scr/provenance.json b/validation/experiments/wang_scr/provenance.json index a719dbbd..e2f3ebdc 100644 --- a/validation/experiments/wang_scr/provenance.json +++ b/validation/experiments/wang_scr/provenance.json @@ -3,8 +3,8 @@ "doi": ["10.1016/j.marstruc.2014.07.002", "10.1016/j.marstruc.2016.10.007"], "data_used": "the model riser properties; the 25 measured r.m.s. dynamic cross-flow strains of Fig. 17 (read from the vector figure, axes calibrated on its tick marks; the simulated maximum of the same figure reads 99.6 % of the measured one, as the text states); the measured dominant frequency 1.00 Hz 8.25 m from the lower end", "coefficients": "Thorsen et al. (2017) for this case, not tuned: Cv 0.7, f0 0.18, df 0.08 (cross-flow only), CD 1.2, CM 2", - "CableDyn_commit": "1847a0d (dev)", - "validation_date": "2026-11-14", + "CableDyn_commit": "4b94321 (dev) with the mid-point VIV phase update", + "validation_date": "2026-11-16", "executable_name": "cabledyn.exe", "executable_sha256": "see summary.json", "compiler": "GNU Fortran 16.2.0", @@ -13,7 +13,7 @@ "segments": 200, "dt_s": 0.005, "sensitivity": { - "segments_400": {"max_ratio": 1.0753, "mean_ratio_at_stations": 1.0367, "dominant_frequency_hz": 0.9917}, - "dt_0p0025": {"max_ratio": 1.0742, "mean_ratio_at_stations": 1.0366, "dominant_frequency_hz": 0.9917} + "segments_400": {"max_ratio": 1.0759, "mean_ratio_at_stations": 1.0365, "dominant_frequency_hz": 0.9917}, + "dt_0p0025": {"max_ratio": 1.0747, "mean_ratio_at_stations": 1.0365, "dominant_frequency_hz": 0.9917} } } diff --git a/validation/experiments/wang_scr/rms_strain_comparison.csv b/validation/experiments/wang_scr/rms_strain_comparison.csv index 7d03e871..8ed6894d 100644 --- a/validation/experiments/wang_scr/rms_strain_comparison.csv +++ b/validation/experiments/wang_scr/rms_strain_comparison.csv @@ -1,26 +1,26 @@ s_m,measured_rms_strain,cabledyn_rms_strain,ratio -1.0440,4.5870e-05,1.8708e-05,0.4079 -1.9427,3.5715e-05,4.0653e-05,1.1383 -2.8415,3.9650e-05,3.2249e-05,0.8134 -3.7493,5.3852e-05,4.7770e-05,0.8871 -4.6479,4.5683e-05,3.2998e-05,0.7223 -5.5467,2.5858e-05,1.8495e-05,0.7153 -6.4454,2.9980e-05,4.1456e-05,1.3828 -7.3441,4.7144e-05,4.9755e-05,1.0554 -8.2428,5.1266e-05,3.4480e-05,0.6726 -9.1416,3.9199e-05,2.6913e-05,0.6866 -10.0493,2.9081e-05,4.7323e-05,1.6273 -10.9479,4.0136e-05,5.3446e-05,1.3316 -11.8468,4.8156e-05,4.1079e-05,0.8531 -12.7454,4.5607e-05,4.0281e-05,0.8832 -13.6441,3.3653e-05,5.5683e-05,1.6546 -14.5428,3.3615e-05,5.4886e-05,1.6328 -15.4416,4.0436e-05,4.0594e-05,1.0039 -16.3494,4.2572e-05,3.8404e-05,0.9021 -17.2481,3.9012e-05,4.6681e-05,1.1966 -18.1467,2.5709e-05,4.3938e-05,1.7090 -19.0456,2.8369e-05,3.0334e-05,1.0693 -19.9442,3.7176e-05,2.5013e-05,0.6728 -20.8429,3.3653e-05,2.9946e-05,0.8899 -21.7416,2.8107e-05,2.9305e-05,1.0426 -22.6495,2.2223e-05,2.1199e-05,0.9539 +1.0440,4.5870e-05,1.8728e-05,0.4083 +1.9427,3.5715e-05,4.0661e-05,1.1385 +2.8415,3.9650e-05,3.2307e-05,0.8148 +3.7493,5.3852e-05,4.7825e-05,0.8881 +4.6479,4.5683e-05,3.3000e-05,0.7224 +5.5467,2.5858e-05,1.8539e-05,0.7170 +6.4454,2.9980e-05,4.1568e-05,1.3865 +7.3441,4.7144e-05,4.9799e-05,1.0563 +8.2428,5.1266e-05,3.4437e-05,0.6717 +9.1416,3.9199e-05,2.6991e-05,0.6886 +10.0493,2.9081e-05,4.7442e-05,1.6314 +10.9479,4.0136e-05,5.3466e-05,1.3321 +11.8468,4.8156e-05,4.1015e-05,0.8517 +12.7454,4.5607e-05,4.0325e-05,0.8842 +13.6441,3.3653e-05,5.5747e-05,1.6565 +14.5428,3.3615e-05,5.4845e-05,1.6316 +15.4416,4.0436e-05,4.0492e-05,1.0014 +16.3494,4.2572e-05,3.8411e-05,0.9023 +17.2481,3.9012e-05,4.6689e-05,1.1968 +18.1467,2.5709e-05,4.3858e-05,1.7059 +19.0456,2.8369e-05,3.0204e-05,1.0647 +19.9442,3.7176e-05,2.4982e-05,0.6720 +20.8429,3.3653e-05,2.9929e-05,0.8893 +21.7416,2.8107e-05,2.9243e-05,1.0404 +22.6495,2.2223e-05,2.1115e-05,0.9501 diff --git a/validation/experiments/wang_scr/summary.json b/validation/experiments/wang_scr/summary.json index 4fd4d163..7436d15d 100644 --- a/validation/experiments/wang_scr/summary.json +++ b/validation/experiments/wang_scr/summary.json @@ -6,12 +6,12 @@ 150.0 ], "frequency_resolution_hz": 0.00833333333332907, - "max_rms_strain": 5.777620876413861e-05, + "max_rms_strain": 5.7799927402857905e-05, "measured_max_rms_strain": 5.3852e-05, - "max_ratio": 1.072870251135308, - "mean_ratio_at_stations": 1.0361663237798966, - "rms_log_error_at_stations": 0.3385758147803219, + "max_ratio": 1.0733106923207663, + "mean_ratio_at_stations": 1.0360992762509706, + "rms_log_error_at_stations": 0.3384790204846645, "dominant_frequency_hz": 0.9916666666661592, "measured_dominant_frequency_hz": 1.0, - "executable_sha256": "dd80f0b2b0ba5a526b46da7961b8ea7e18ed8c650c42583107b4df6eee3a8a74" + "executable_sha256": "7810cc2efd3449cceb8825d543beacadfdf6cd86253f6bad1b1a8207ad7beca9" } From 05a4f143a76ca686c77097c6d83bf4b9f761e070 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Mon, 16 Nov 2026 21:27:18 +0900 Subject: [PATCH 29/47] validation: NDP 38 m high-mode riser VIV in uniform flow (L3-N) (#172) The bare riser of the Norwegian Deepwater Programme tests (Trim et al. 2005, J. Fluids Struct. 21(3), 335-361) towed horizontally at its 22 uniform-flow speeds, 0.3-2.4 m/s, responding at up to 12.5 Hz across the flow. It tests high-mode cross-flow VIV against four coefficient sets on one model, one of them blind. validation/experiments/ndp_riser/ndp_riser_viv.py writes a deck per set and speed: 38 m between universal joints, D 27 mm, EI 598.8 N m^2, EA 8.19e6 N, 0.933 kg/m flooded (Fontaine et al. 2011, Table 1), fresh water (the mass ratio 1.62 implies 1006 kg/m^3), the clump-weight rig as an axial spring in series, EA_eff = L/(1/k_ax + L/EA), with T0 4 kN in still water and k_ax 3.5 kN/m derived from the reported 4-6 kN range, not tuned. 200 elements, dt 1 ms, 25 s, statistics after 10 s, CurvX and CurvY at every node. It runs the sets in parallel (--sets, --speeds; the default 25 runs take about two minutes, the full 110-run sweep of the committed record about twelve on 24 cores) and compares the maximum r.m.s. cross-flow strain (fundamental, band-passed about the dominant frequency as Thorsen et al. 2016 filter the measurement), the dominant frequency f D/U and the spatial-mean sigma/D. CurvX is the cross-flow curvature (the section axis starts vertical at End A); the dominant frequency is searched for in f D/U 0.05-0.30, which keeps a slow swing and the third harmonic out. Sets, each as its source gives it, checked against the articles: - b1, the generic set of the Delta Flume case (Cl 0.8, cF 0.18, dF 0.08, ClX 0.85, alpha 0.15, Chaplin's drag amplification on the in-line drag via VIV DAMPING 0 0 1): blind; - and24b, Andersen et al. (2024b), Table 3, cross-flow average (Cl 1.28, cF 0.131, dF 0.066, Cd 1.16), fitted to the sheared-flow tests of the same riser; - uls19, Ulveseter et al. (2019), Table 1 (Cl 0.85, cF 0.144, dF 0.064, ClX 0.75, alpha 0.15, Chh 1.5), fitted to these tests; - th16, Thorsen et al. (2016), the C_v curve of their Fig. 7 and their cross-flow damping (VIV DAMPING 0.31 0.89 0), fitted to these tests; th16c keeps Morison's linear cross-flow damping (a variant). Measurements: the maximum r.m.s. cross-flow strain of each test with Thorsen et al.'s own simulation, read from the vector graphics of their Fig. 8 (extract_thorsen2016.py, which also reads the Fig. 7 curve), and sigma/D and the dominant frequencies of Trim et al.'s Figs. 16 and 18, read by eye on enlarged guided crops of the raster figures (digitise_trim2005.py draws them; +-0.01 in sigma/D, +-0.3 Hz). Result on the second-order VIV phase (22 speeds; r.m.s. log error of the strain, f D/U against the measured 0.143, sigma/D CF against 0.436): - uls19 0.178, 0.145, 0.461: the only set that matches strain, frequency and amplitude together (sigma/D within 6 % CF and 3 % IL); Thorsen et al.'s own fitted simulation scores 0.187; - and24b 0.186, 0.134, 0.687 (sigma/D 57 % high: a lower mode at a larger amplitude gives the same curvature); - b1 0.277, 0.192, 0.429 (blind; frequency a third high); - th16 0.363, 0.193; th16c 0.365, 0.153: the damping form sets the frequency. At 1.0 m/s half the time step and 400 elements move the strain of four sets by at most 0.8 % (uls19 +1.9 % and +18.5 %, at 5.60 Hz instead of 5.80 Hz). At 2.4 m/s the response is not converged speed by speed: the strain moves by -14 % to +12 % with half the time step and by +0.6 % to +20 % with 400 elements, and a 55 s run moves th16c by +12.5 %, so a longer window does not remove the spread (the mix of neighbouring high modes, of the size of the speed-to-speed scatter). The 22-speed statistics hold: the full sweep at half the time step gives 0.280, 0.187, 0.184, 0.375 and 0.376, f D/U within 0.001 and sigma/D within 1.4 %. Sea water (U >= 0.5 m/s): 0.299, 0.181, 0.154, 0.434, 0.353. Added to VALIDATION.md as L3-N, to the experiments index, the changelog and the references (Trim et al. 2005, Fontaine et al. 2011, checked against Crossref); the top-level README now names the six published experiments. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 6 + README.md | 5 +- VALIDATION.md | 27 + doc/references.rst | 14 + validation/README.md | 2 +- validation/experiments/README.md | 5 +- validation/experiments/ndp_riser/README.md | 188 ++++++ .../ndp_riser/digitise_trim2005.py | 133 ++++ .../ndp_riser/extract_thorsen2016.py | 157 +++++ .../ndp_riser/measured_trim2005_fig16.csv | 25 + .../ndp_riser/measured_trim2005_fig18.csv | 8 + .../experiments/ndp_riser/ndp_riser_viv.py | 570 ++++++++++++++++++ .../experiments/ndp_riser/provenance.json | 308 ++++++++++ .../ndp_riser/response_comparison.csv | 111 ++++ validation/experiments/ndp_riser/summary.json | 262 ++++++++ .../ndp_riser/thorsen2016_fig7_cv.csv | 22 + .../ndp_riser/thorsen2016_fig8_strain.csv | 133 ++++ 17 files changed, 1971 insertions(+), 5 deletions(-) create mode 100644 validation/experiments/ndp_riser/README.md create mode 100644 validation/experiments/ndp_riser/digitise_trim2005.py create mode 100644 validation/experiments/ndp_riser/extract_thorsen2016.py create mode 100644 validation/experiments/ndp_riser/measured_trim2005_fig16.csv create mode 100644 validation/experiments/ndp_riser/measured_trim2005_fig18.csv create mode 100644 validation/experiments/ndp_riser/ndp_riser_viv.py create mode 100644 validation/experiments/ndp_riser/provenance.json create mode 100644 validation/experiments/ndp_riser/response_comparison.csv create mode 100644 validation/experiments/ndp_riser/summary.json create mode 100644 validation/experiments/ndp_riser/thorsen2016_fig7_cv.csv create mode 100644 validation/experiments/ndp_riser/thorsen2016_fig8_strain.csv diff --git a/CHANGELOG.md b/CHANGELOG.md index e5b5d886..6bf2c0bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -117,6 +117,12 @@ All notable changes to CableDyn are recorded in this file. The format follows one generic coefficient set and the drag amplification on the in-line drag alone, against the experimenters' measured envelopes and summaries: dominant mode right in 5 of 9 and within one in all, mean in-line displacement within 17 % in 7 of 9, cross-flow amplitude −45 % to +4 %. +- Validation case L3-N (`validation/experiments/ndp_riser`): cross-flow VIV of the NDP 38 m + high-mode riser of Trim et al. (2005) at its 22 uniform-flow tow speeds, with four coefficient + sets against the measured maximum r.m.s. cross-flow strain (Thorsen et al. 2016, Fig. 8), the + dominant frequency and σ/D: the set Ulveseter et al. (2019) fitted to these tests matches strain + (r.m.s. log error 0.178), frequency and amplitude together; Andersen et al.'s (2024b) + sheared-flow average 0.186; the generic set, blind, 0.277. - Theory manual, Published coefficient sets: the VIV coefficient sets of Thorsen et al. (2016, 2017), Ulveseter et al. (2018), Andersen et al. (2024a, b) and Facchinetti et al. (2004), each with its source, its test data and the line-type columns it maps to, and Thorsen et al.'s diff --git a/README.md b/README.md index 9ee384f5..5d9a19ec 100644 --- a/README.md +++ b/README.md @@ -171,8 +171,9 @@ layout is described in the architecture notes in the repository. ## Validation CableDyn is verified against analytical solutions and compared with MoorDyn, -OrcaFlex, two physical experiments (Holcombe lazy-wave, Bergdahl dynamic chain), -the IEA 15 MW VolturnUS-S reference systems, and coupled OpenFAST runs. Results, +OrcaFlex, six published physical experiments (Holcombe lazy-wave, Bergdahl dynamic +chain, Chaplin riser natural frequencies and stepped-current VIV, Wang catenary-riser VIV, +NDP high-mode riser VIV), the IEA 15 MW VolturnUS-S reference systems, and coupled OpenFAST runs. Results, acceptance criteria, and reproduction commands are in the [validation record](https://cabledyn.readthedocs.io/en/latest/validation.html); data and scripts are in [`validation/`](https://cabledyn.readthedocs.io/en/latest/validation.html). diff --git a/VALIDATION.md b/VALIDATION.md index 9d8aa6ef..3b523dae 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -84,6 +84,7 @@ article's methods, are compared in | **L3-C** | Chaplin Delta Flume riser, still-water natural frequencies | measured modes 1–7 at five tensions | mean error +1.87%, mean absolute 2.28%, largest 4.88% (34 of 35; one outlier reported) | full published table, no fitted parameter | Pass | | **L3-D** | Chaplin Delta Flume riser in a stepped current, blind-trial cases 1–9, cross-flow and in-line VIV | measured dominant mode, peak cross-flow amplitude, mean in-line displacement, curvature standard deviations | mode right in 5/9, within one in 9/9; mean in-line within ±17% in 7/9 (−25% to +34%); cross-flow amplitude −45% to +4%; cross-flow curvature −39% to +26% | generic coefficient set, no fitted parameter | Pass measured | | **L3-W** | SJTU steel catenary riser in 0.2 m/s current, cross-flow VIV | measured r.m.s. strain (25 stations) and dominant frequency | frequency 0.992 vs 1.00 Hz; max r.m.s. strain +7.3%, station mean +3.6% | published coefficient set, no fitted parameter | Pass | +| **L3-N** | NDP 38 m high-mode riser in uniform flow, 0.3–2.4 m/s (22 tests), cross-flow VIV | measured maximum r.m.s. cross-flow strain, dominant frequency, spatial-mean σ/D | strain r.m.s. log error: Ulveseter et al. (2019) set 0.178, Andersen et al. (2024b) 0.186, generic set 0.277, Thorsen et al. (2016) 0.363 (their own simulation 0.187); f D/U 0.145 / 0.134 / 0.192 / 0.193 vs 0.143 measured | generic set blind; the other sets fitted by their authors to NDP tests (implementation check) | Pass measured | | **L-fig** | Along-arc curvature overlay (CableDyn / OrcaFlex / MoorDyn-F ±4×) | 3-code committed record | CableDyn peak 0.11% from OrcaFlex | <0.5% | Pass | | **L4-1** | Coupled platform + mooring | synthetic reference | bit-for-bit | — | Pass | | **L4-1b** | VolturnUS-S coupled platform + power cable | OpenFAST v5.0.0 (CompMooring 5 vs 3) | platform DOFs <0.6% (3-seed DLC-1.1); fairlead and anchor <0.001% static | <3% platform | Pass | @@ -373,6 +374,32 @@ scripts, results, and source provenance are in the test, as theirs, so the station-by-station ratio scatters. 400 elements and half the time step change the largest r.m.s. strain by 0.2% and 0.1%. +- **L3-N NDP high-mode riser, cross-flow VIV in uniform flow** + ([Trim et al., 2005](https://cabledyn.readthedocs.io/en/latest/references.html#ref-trim2005); + [Thorsen et al., 2016](https://cabledyn.readthedocs.io/en/latest/references.html#ref-thorsen2016)): + the 38 m bare riser towed horizontally at the 22 uniform-flow speeds, 0.3–2.4 m/s, with the + rig's clump-weight tension as an axial spring in series (4 kN in still water, 3.5 kN/m from the + reported 4–6 kN range). Four coefficient sets on the same model, compared with the maximum + r.m.s. cross-flow strain of each test (Thorsen et al.'s Fig. 8, read from the vector figure), the + dominant frequency and the spatial-mean σ/D (Trim et al.'s Figs. 18 and 16, read by eye from + raster figures): + - the set Ulveseter et al. (2019) fitted to these tests matches every metric: strain r.m.s. log + error 0.178 (Thorsen et al.'s own fitted simulation 0.187), f D/U 0.145 against 0.143 + measured, σ/D within 6% cross-flow and 3% in line, an implementation check of the + synchronisation, in-line and higher-harmonic forces; + - the cross-flow average Andersen et al. (2024b) fitted to the sheared-flow tests gives 0.186 at + f D/U 0.134, with σ/D 57% high; + - the generic set, blind, gives 0.277 with σ/D within 2%, at f D/U 0.192; + - Thorsen et al.'s own fitted curve and damping give 0.363 at f D/U 0.193; keeping Morison's + linear cross-flow damping moves the frequency to 0.153. + + At single speeds the response converges at 1.0 m/s for four of the five sets (half the time + step and 400 elements move the strain by at most 0.8%; 18.5% for the fifth) but not at 2.4 m/s, + where the mix of neighbouring high modes moves the strain by up to 20%. The statistics over + the 22 speeds hold: the full sweep at half the time step gives r.m.s. log errors 0.280, 0.187, + 0.184 and 0.375 for the generic, Andersen, Ulveseter and Thorsen sets, f D/U within 0.001 and + σ/D within 1.4%. + ## L4 coupled OpenFAST - **L4-1 synthetic** (`l4_platform_mooring`): 6-DOF platform moored by three taut diff --git a/doc/references.rst b/doc/references.rst index 98501191..74e5fa93 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -294,6 +294,20 @@ Verification and validation references laboratory measurements of vortex-induced vibrations of a tension riser. *Journal of Fluids and Structures* **21**\ (1), 25–40. https://doi.org/10.1016/j.jfluidstructs.2005.05.016 +.. _ref-trim2005: + +- **Trim, A. D., Braaten, H., Lie, H. & Tognarelli, M. A. (2005).** Experimental investigation + of vortex-induced vibration of long marine risers. *Journal of Fluids and Structures* + **21**\ (3), 335–361. https://doi.org/10.1016/j.jfluidstructs.2005.07.014 + +.. _ref-fontaine2011: + +- **Fontaine, E., Marcollo, H., Vandiver, K., Triantafyllou, M., Larsen, C., Tognarelli, M., + Constantinides, Y. & Oakley, O. (2011).** Reliability based factors of safety for VIV fatigue + using NDP riser high mode VIV tests. *ASME 2011 30th International Conference on Ocean, + Offshore and Arctic Engineering (OMAE2011)*, Volume 7: CFD and VIV; Offshore Geotechnics, + 511–522. https://doi.org/10.1115/OMAE2011-49820 + Comparison codes ---------------- diff --git a/validation/README.md b/validation/README.md index b8612bfd..1e0d17db 100644 --- a/validation/README.md +++ b/validation/README.md @@ -16,7 +16,7 @@ redistributed. | [`RELEASE_0_1_1.md`](RELEASE_0_1_1.md) | The same for v0.1.1 | | [`RELEASE_0_1_0.md`](RELEASE_0_1_0.md) | The same for v0.1.0 | | [`bodies/`](bodies/README.md) | Rigid-body, rod and shared-anchor cases with MoorDyn-C twins, stored references and pass limits | -| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, and Wang et al. (2014) catenary-riser VIV comparisons | +| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, Wang et al. (2014) catenary-riser VIV and Trim et al. (2005) NDP high-mode riser VIV comparisons | | [`PERFORMANCE_0_1_0.md`](PERFORMANCE_0_1_0.md) | Wall time of CableDyn 0.1.0, MoorDyn-C and MoorDyn-F at equal accuracy on five mooring, cable, buoy and coupled cases | | [`performance/`](performance/README.md) | Same-host wall-clock records of the L5 cases: the resolved lazy-wave spans, the one-hour VolturnUS-S mooring and the tension-only chain | | [`PAPER_REPRODUCTION.md`](PAPER_REPRODUCTION.md) | Every CableDyn result in the journal article, re-run with the release defaults and in paper mode | diff --git a/validation/experiments/README.md b/validation/experiments/README.md index 0aa20ebf..71f4091a 100644 --- a/validation/experiments/README.md +++ b/validation/experiments/README.md @@ -2,7 +2,7 @@ # Experimental comparisons -This directory lets reviewers reproduce CableDyn's comparisons with five published physical +This directory lets reviewers reproduce CableDyn's comparisons with six published physical experiments. Each subdirectory gives the data source, the translation of the published parameters into a CableDyn model, the assessed quantity, the reproduction commands and the committed results. @@ -14,5 +14,6 @@ committed results. | [`chaplin/`](chaplin/README.md) | Chaplin et al. (2005), 13.12 m vertical tension riser, still-water natural frequencies | Finite-EI riser, modal analysis | | [`delta_flume/`](delta_flume/README.md) | Chaplin et al. (2005), 13.12 m vertical tension riser, stepped current, blind-trial cases 1–9 | Finite-EI riser, synchronisation VIV, cross-flow and in-line | | [`wang_scr/`](wang_scr/README.md) | Wang et al. (2014), truncated steel catenary riser in uniform current, cross-flow VIV | Finite-EI riser, synchronisation VIV | +| [`ndp_riser/`](ndp_riser/README.md) | Trim et al. (2005), NDP 38 m high-mode riser in uniform flow, cross-flow VIV with a generic and three published coefficient sets | Finite-EI riser, synchronisation VIV | -The results are summarised as cases L3-H, L3-B, L3-C, L3-D and L3-W in [`VALIDATION.md`](../../VALIDATION.md). +The results are summarised as cases L3-H, L3-B, L3-C, L3-D, L3-W and L3-N in [`VALIDATION.md`](../../VALIDATION.md). diff --git a/validation/experiments/ndp_riser/README.md b/validation/experiments/ndp_riser/README.md new file mode 100644 index 00000000..515d0a16 --- /dev/null +++ b/validation/experiments/ndp_riser/README.md @@ -0,0 +1,188 @@ + + +# NDP 38 m riser in uniform flow: high-mode cross-flow VIV + +This directory compares CableDyn's VIV with the bare-riser, uniform-flow tests of the Norwegian +Deepwater Programme's high-mode riser: Trim et al. (2005), +. A 38 m riser of 27 mm diameter was towed +horizontally at 22 speeds from 0.3 to 2.4 m/s and responded at up to 12.5 Hz cross-flow. The +same riser model runs with four coefficient sets. One is generic and not fitted to these tests. +The other three were fitted by their authors to NDP data, two of them to these very tests, so +for those the comparison checks CableDyn's implementation of the model, not its predictive +power. + +## Model and data + +- **Riser (Fontaine et al. 2011, Table 1; Thorsen et al. 2016, Table 1):** 38.00 m between + universal joints (pinned), D 27 mm, EI 598.8 N m², EA 8.19e6 N, 0.933 kg/m flooded, as tested. +- **Water:** fresh, 1000 kg/m³. The mass ratio 1.62 of Fontaine et al. is 0.933 kg/m over the + displaced water at 1006 kg/m³; 1000 kg/m³ gives 1.63 and sea water 1.59. +- **Tension (Trim et al. 2005, Sec. 2.1):** clump weights on inclined pendulum arms held the + riser at about 4–6 kN over the test speeds. The tension of each test is not published + (Ulveseter et al. 2019 give the range 4067–6285 N). The rig is modelled as an axial spring + k_ax in series with the riser, EA_eff = L/(1/k_ax + L/EA), with T0 = 4 kN in still water. + - k_ax = 3.5 kN/m comes from the reported range, not from the response: at 2.4 m/s the Morison + drag (C_D 1.2) of about 93 N/m sags a 6 kN string by wL²/(8T) ≈ 2.8 m, which takes + 8s²/(3L) ≈ 0.55 m more length, and 2 kN over 0.55 m is about 3.6 kN/m. + - The resulting mean tension of each set is in the table below. +- **Assumed:** the riser 5 m below the surface (not given; the current is uniform), in 10 m of + water. +- **Current:** uniform, normal to the riser and horizontal, so cross-flow (CF) is vertical and + in-line (IL) horizontal. +- **CableDyn:** one finite-EI line, 200 elements (0.19 m), dt 1 ms, 25 s, statistics over + t > 10 s (frequency resolution 0.067 Hz); `VIVrmsWindow` 0.5 s. +- **Analysis (`ndp_riser_viv.py`):** + - `CurvX` at every node is the CF curvature and `CurvY` the IL one: the section axis x starts + at End A as global +z projected normal to the line and is carried along it, which keeps it + within 2° of vertical on the bowed riser. Strain = κ D/2. + - The dominant CF frequency is the peak of the CF curvature spectra summed over the nodes, + searched for in f D/U = 0.05–0.30. This covers the synchronisation band of every set + (0.065–0.26) and excludes a slow swing of the riser below it and the third harmonic of the + Ulveseter et al. set above it. The IL frequency is searched for in 0.10–0.60. + - The fundamental CF strain is band-passed to 0.5–1.5 times the dominant CF frequency, as + Thorsen et al. (2016) filter the measured strain. The compared value is its largest r.m.s. + along the riser. + - σ/D is the spatial mean, over every fourth node, of the standard deviation of the + displacement band-passed in the same way, as Trim et al. reconstruct the vibration from + modes. + +### Coefficient sets + +`--sets` selects them. C_a = 1 (C_M = 2) in all. + +| Set | Source | Values | Fitted to | +| --- | --- | --- | --- | +| `b1` | The generic set of the [Delta Flume case](../delta_flume/README.md) | C_l 0.8, f̂0 0.18 ± 0.08, C_D 1.2; in-line C_x 0.85, α 0.15 (Ulveseter et al. 2018, Table 3); `VIV AMPLITUDE` C_v 0.8 with the drag amplification of Chaplin et al. (2005, Eq. 4); `VIV DAMPING` `0 0 1` (the amplification on the in-line drag only) | nothing from the NDP tests: blind | +| `and24b` | Andersen et al. (2024b), Table 3, cross-flow average | C_v,y 1.28, f̂0,y 0.131, Δf̂y 0.066, C_D 1.16; Morison drag | the 22 sheared-flow tests of this riser: semi-blind here. Their in-line set (C_v,x 1.09, f̂0,x 0.321, Δf̂x 0.161) belongs to an independent in-line synchronisation, not CableDyn's `VIV` row, and is left out | +| `uls19` | Ulveseter et al. (2019), Table 1 and Sec. 4.1 | C_D 1.2, C_v,y 0.85, f̂0 0.144 ± 0.064, in-line C_v,x 0.75, α 0.15, C_hh 1.5; Morison drag | these 22 uniform-flow tests ("a visual best fit with cross-flow strain measurements"): an implementation check | +| `th16` | Thorsen et al. (2016), Fig. 7 and Eq. 1 | `VIV AMPLITUDE` with their fitted C_v(y0/D) (`thorsen2016_fig7_cv.csv`); `VIV DAMPING` `0.31 0.89 0`, their cross-flow damping without Morison's linear term; band 0.18 ± 0.08 for the 0.10–0.26 range of their Fig. 4; C_D 1.2 in line | these 22 uniform and the 22 sheared-flow tests: an implementation check. Their model is cross-flow only | +| `th16c` | `th16` with Morison's linear cross-flow damping kept (`VIV DAMPING` `0.31 0.89 1`) | as `th16` | a variant, not a published set | + +The published values were checked against the source articles. CableDyn's synchronisation +frequency is f̂0 + Δf̂ sin(...), so `th16` matches the range of Thorsen et al.'s synchronisation +function (their Fig. 4), not its shape. + +### Measurements + +- `thorsen2016_fig8_strain.csv`: the maximum r.m.s. CF strain of each test, at the fundamental + frequency and in total, with Thorsen et al.'s own simulation using their fitted curve (their + Fig. 8; the uniform panel is compared, the sheared one is kept). The figure is vector + graphics: `extract_thorsen2016.py` maps the plotted coordinates through the plot frames, whose + ends are the tick labels 0 and 2.5 m/s and 0 and 5e-4. Each series has 22 points, one per tested + speed. `thorsen2016_fig7_cv.csv` is their fitted C_v curve from the same page (0.35 at 0, a + maximum of 1.00 at y0/D 0.46, zero from 0.67). +- `measured_trim2005_fig16.csv`: the spatial mean of σ/D, CF and IL, at all 22 speeds (Trim et + al. 2005, Fig. 16). `measured_trim2005_fig18.csv`: the peak frequency of the dominant + displacement mode, CF and IL, at five speeds (Fig. 18). The figures are raster images and their + markers overlap, so the values were read by eye on four-times enlarged crops with a guide line + at every speed and every 0.01 or 1 Hz (`digitise_trim2005.py` calibrates the axes on the + panel frames and grid lines and draws the guides). Uncertainty: ±0.01 in σ/D, about ±0.02 where + markers of neighbouring speeds overlap; ±0.3 Hz, ±0.5 Hz for CF at 2.0 m/s. The measured CF + frequency follows f D/U ≈ 0.14 and the IL one twice that. + +The two extraction scripts need the articles (not distributed), PyMuPDF and Pillow; the +comparison needs only the CSV files. + +## Reproduce + +From the repository root, with `path/to/cabledyn.exe` the release executable or a local build: + +```powershell +python validation/experiments/ndp_riser/ndp_riser_viv.py ` + path/to/cabledyn.exe validation/experiments/ndp_riser/work +``` + +The default runs the five sets at 0.5, 1.0, 1.5, 2.0 and 2.4 m/s, 25 runs in parallel, in +about two minutes on a 24-core workstation, and prints the statistics over those speeds; each +run reproduces its row of the record. The committed record is the full sweep, 110 runs in about +twelve minutes with 24 parallel runs: + +```powershell +python validation/experiments/ndp_riser/ndp_riser_viv.py ` + path/to/cabledyn.exe validation/experiments/ndp_riser/work ` + --speeds all --jobs 24 --summary validation/experiments/ndp_riser +``` + +`--sets` and `--speeds` take comma lists (quote them in PowerShell, `--speeds "1.0,2.4"`); +`--segments`, `--dt`, `--tension` and `--kax` change the mesh, the time step and the rig. A run +whose folder holds the same deck, executable and statistics window is not repeated; `--keep` +keeps the output tables (about 150 MB a run) so that the analysis can be redone without them. + +## Results + +All 22 speeds; the strain ratio is CableDyn's fundamental over the measured fundamental, and +the r.m.s. log error is √(mean (ln ratio)²). + +| Set | Fitted to these tests | Strain ratio, median (range) | r.m.s. log error | U ≥ 0.5 m/s | f D/U, CF | σ/D, CF | σ/D, IL | Mean tension (kN) | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | +| Measured | | 1 | 0 | 0 | 0.143 | 0.436 | 0.149 | 4–6 | +| `b1` | no | 1.26 (0.99–1.57) | 0.277 | 0.277 | 0.192 | 0.429 | 0.041 | 4.0–10.0 | +| `and24b` | sheared tests | 1.00 (0.67–1.27) | 0.186 | 0.181 | 0.134 | 0.687 | 0.088 | 4.0–7.5 | +| `uls19` | yes | 0.89 (0.64–1.33) | **0.178** | **0.156** | **0.145** | 0.461 | **0.146** | 4.0–6.9 | +| `th16` | yes | 1.40 (0.91–1.86) | 0.363 | 0.377 | 0.193 | 0.390 | 0.067 | 4.0–6.5 | +| `th16c` | variant | 0.73 (0.51–1.06) | 0.365 | 0.376 | 0.153 | 0.307 | 0.025 | 4.0–6.4 | +| Thorsen et al.'s own simulation (their Fig. 8a) | yes | 1.12 (0.75–1.51) | 0.187 | 0.182 | | | | | + +f D/U is the mean at the five speeds of Fig. 18; σ/D the mean over the 22 speeds. +`response_comparison.csv` holds every run, `summary.json` the statistics and the SHA-256 of the +executable. + +- **Implementation check:** with the set Ulveseter et al. fitted to these tests, CableDyn's + three-dimensional model matches every metric: the strain with an r.m.s. log error of 0.178 + (0.184 at half the time step), comparable to Thorsen et al.'s own cross-flow-only fit (0.187), f + D/U 0.145 against the measured 0.143, and σ/D within 6 % cross-flow and 3 % in line, with the + higher-harmonic force (C_hh 1.5) of their set. +- **Semi-blind:** the cross-flow set Andersen et al. fitted to the sheared-flow tests predicts the + uniform-flow strain as well as Thorsen et al.'s fit (0.186 against 0.187) at f D/U 0.134, but + with σ/D 57 % high: a lower mode at a larger amplitude gives the same curvature. +- **Blind:** the generic set gives σ/D within 2 % and the strain 26 % high in the median (r.m.s. + log error 0.277), and responds at f D/U 0.19, a third above the measured frequency. Its + amplified drag raises the mean tension to 10.0 kN at 2.4 m/s, above the reported 6 kN. +- **The damping form sets the frequency:** with Thorsen et al.'s curve and band, dropping + Morison's linear cross-flow damping (`th16`, as they do) gives f D/U 0.193; keeping it + (`th16c`) 0.153, consistent with the higher modes being less damped without it. `th16` also + develops a slow cross-flow swing, at 0.6–0.8 Hz up to 1.9 m/s (raw σ/D up to 2.0, excluded from + the band-passed values), the known consequence of dropping the linear term while an in-line + force acts (theory guide, Cross-flow damping). Neither reproduces the strain of their own fit + (0.363 and 0.365 against 0.187): their curve was fitted in a cross-flow-only model run at the + tension of each test, and both differ here. +- **One metric does not discriminate:** `and24b` matches the strain with the wrong amplitude, + `b1` the amplitude with the wrong frequency, `th16c` the frequency with the wrong strain. Only + `uls19` matches strain, amplitude and frequency together. +- **In-line:** `b1` and `uls19` also swing slowly in line at 0.3–0.9 Hz, more at the higher + speeds (raw IL σ/D up to 3.1 and 2.6). The band-passed values exclude the swing; the measured + σ/D, a modal reconstruction of the vibration, could not show it, and whether the tests had + one is not reported. +- **Sensitivity to the water density:** with sea water (1025 kg/m³) the r.m.s. log errors from + 0.5 m/s are 0.299 (`b1`), 0.181 (`and24b`), 0.154 (`uls19`), 0.434 (`th16`) and 0.353 + (`th16c`). The change of `th16` (0.377 to 0.434) shows how much the mode chosen at single + speeds moves the statistic. + +### Convergence + +- **Single speeds** (1.0 and 2.4 m/s, every set; `provenance.json`): + - at 1.0 m/s, half the time step and 400 elements change the fundamental strain by at most + 0.8 % and σ/D by at most 3 % for `b1`, `and24b`, `th16` and `th16c`, at the same frequency + within one bin; `uls19` moves by +1.9 % and +18.5 % in strain and responds at 5.60 Hz instead + of 5.80 Hz with both (σ/D −2 %); + - at 2.4 m/s the response is not converged speed by speed: the strain moves by −14 % to +12 % + with half the time step and by +0.6 % to +20 % with 400 elements, and the dominant frequency + moves by more than one bin in 7 of the 10 pairs; + - 55 s runs (45 s of statistics) of `b1`, `and24b` and `th16c` at 2.4 m/s change the strain of + the 25 s runs by −0.3 %, −1.2 % and +12.5 %, and at 55 s half the time step and 400 elements + still move it by −0.7 % to +12 % and −7.8 % to +21 %: a longer window does not remove the + spread. It comes from the mix of neighbouring high modes the response settles in, which a + small change of the model moves; it is of the size of the speed-to-speed scatter of the + ratios. +- **The statistics over the 22 speeds hold:** the full sweep at half the time step gives + r.m.s. log errors of 0.280 (`b1`), 0.187 (`and24b`), 0.184 (`uls19`), 0.375 (`th16`) and + 0.376 (`th16c`), f D/U within 0.001 and σ/D within 1.4 % of the record. Differences of a few + hundredths in the r.m.s. log error between sets are within this spread. + +## Limitations + +- The tension of each test is not published; the rig spring gives the reported range, but each + run's tension differs from the test's by an unknown amount, up to the 10 kN of `b1`. +- The σ/D and frequency data are read by eye from raster figures. +- The 3D model carries in-line drag and slow swings that the 2D cross-flow model of Thorsen et + al. does not, so their fitted curve is not expected to transfer exactly. diff --git a/validation/experiments/ndp_riser/digitise_trim2005.py b/validation/experiments/ndp_riser/digitise_trim2005.py new file mode 100644 index 00000000..97b86e38 --- /dev/null +++ b/validation/experiments/ndp_riser/digitise_trim2005.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Reading aids for the bare-riser, uniform-flow panels of Trim et al. (2005), Figs. 16 and 18. + +Both figures are raster images embedded in the article (962 px wide). The panel 'bare riser, +uniform flow' is the top-left one of each: + +- Fig. 16 (article page 21): the spatial mean of the temporal standard deviation of the + displacement over the diameter, sigma/D, cross-flow (blue diamonds) and in-line (red stars); +- Fig. 18 (page 23): the peak frequency of the dominant displacement mode [Hz]. + +The markers (about 10 px) are wider than the speed step (0.1 m/s, about 5.7 px) and overlap, so +an automatic marker search does not separate them. This script calibrates the axes on the +panel frame and its dotted grid lines (x: the 0.5 m/s grid lines and the frame's right edge at +2.5 m/s; y: the frame bottom at zero and the horizontal grid lines) and writes a four-times +enlarged crop of each panel with a guide line at every tested speed and every 0.01 (Fig. 16) or +1 Hz (Fig. 18). measured_trim2005_fig16.csv and measured_trim2005_fig18.csv were read by eye on +these crops: the centre of the marker on each speed's guide. + + python digitise_trim2005.py path/to/article.pdf [--out DIR] + +writes DIR/trim2005_fig16_guides.png and DIR/trim2005_fig18_guides.png and prints the axis +calibration. Needs PyMuPDF and Pillow. + +Source: A.D. Trim, H. Braaten, H. Lie, M.A. Tognarelli (2005), Experimental investigation of +vortex-induced vibration of long marine risers, Journal of Fluids and Structures 21(3), 335-361, +https://doi.org/10.1016/j.jfluidstructs.2005.07.014 +""" + +from __future__ import annotations + +import argparse +from pathlib import Path + +import numpy as np + +HERE = Path(__file__).resolve().parent +# figure: (zero-based page, search region x0 y0 x1 y1 [px] around the panel frame, y tick values +# from the frame bottom up, guide step in y) +FIGS = { + "fig16": (20, (100, 60, 262, 345), [0.0, 0.1, 0.2, 0.3, 0.4, 0.5], 0.01), + "fig18": (22, (60, 60, 250, 345), [0.0, 10.0, 20.0, 30.0], 1.0), +} +SPEEDS = np.round(np.arange(0.3, 2.45, 0.1), 2) # the 22 tested speeds [m/s] + + +def frame(rgb: np.ndarray, reg) -> tuple[int, int, int, int]: + """The panel frame: the dark columns and rows that span most of the region.""" + x0, y0, x1, y1 = reg + dark = rgb[y0:y1, x0:x1].sum(axis=2) < 250 + cols = np.where(dark.sum(axis=0) > 0.45 * dark.shape[0])[0] + rows = np.where(dark.sum(axis=1) > 0.3 * dark.shape[1])[0] + return ( + int(x0 + cols.min()), + int(y0 + rows.min()), + int(x0 + cols.max()), + int(y0 + rows.max()), + ) + + +def grid(rgb: np.ndarray, box, axis: int) -> list[float]: + """The dotted grey grid lines inside the frame; axis 0: vertical lines, 1: horizontal.""" + x0, y0, x1, y1 = box + sub = rgb[y0 + 3 : y1 - 2, x0 + 3 : x1 - 2].astype(int) + grey = (sub.sum(axis=2) < 450) & (np.ptp(sub, axis=2) < 60) + prof = grey.sum(axis=axis) + groups: list[list[int]] = [] + for i in np.where(prof > 0.12 * grey.shape[axis])[0]: + if groups and i - groups[-1][-1] <= 2: + groups[-1].append(int(i)) + else: + groups.append([int(i)]) + off = (x0 if axis == 0 else y0) + 3 + return [float(np.mean(g)) + off for g in groups] + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + ap.add_argument("pdf") + ap.add_argument("--out", default=str(HERE)) + a = ap.parse_args() + import pymupdf + from PIL import Image, ImageDraw + + doc = pymupdf.open(a.pdf) + out = Path(a.out) + out.mkdir(parents=True, exist_ok=True) + for fig, (page, reg, yt, step) in FIGS.items(): + pix = pymupdf.Pixmap(doc, doc[page].get_images(full=True)[0][0]) + if pix.n - pix.alpha > 3: + pix = pymupdf.Pixmap(pymupdf.csRGB, pix) + img = Image.frombytes("RGB", (pix.width, pix.height), pix.samples) + rgb = np.asarray(img).astype(int) + box = frame(rgb, reg) + gx = grid(rgb, box, 0) + gy = grid(rgb, box, 1) + # the vertical grid lines are at multiples of 0.5 m/s; the right frame edge is 2.5 m/s + sp = np.median(np.diff(gx)) + gx = [g for g in gx if g < box[2] - 3] + [float(box[2])] + ticks = [2.5 - 0.5 * round((box[2] - g) / sp) for g in gx] + ax, bx = np.polyfit(ticks, gx, 1) # pixel x = ax U + bx + ypix = [box[3]] + sorted((y for y in gy if y < box[3] - 5), reverse=True) + n = min(len(ypix), len(yt)) + ay, by = np.polyfit(yt[:n], ypix[:n], 1) # pixel y = ay value + by + print( + f"{fig}: frame {box}; x ticks {ticks} at {[round(g, 1) for g in gx]} px " + f"({ax:.2f} px per m/s); y ticks {yt[:n]} at {[round(y, 1) for y in ypix[:n]]} px " + f"({-ay:.2f} px per unit)" + ) + x0, y0, x1, y1 = box[0] - 7, box[1] - 10, box[2] + 7, box[3] + 8 + k = 4 + crop = img.crop((x0, y0, x1, y1)).resize( + ((x1 - x0) * k, (y1 - y0) * k), Image.NEAREST + ) + dr = ImageDraw.Draw(crop) + for u in SPEEDS: + px = (ax * u + bx - x0) * k + dr.line([(px, 0), (px, crop.height)], fill=(0, 190, 0), width=1) + dr.text((px + 1, 2), f"{u:.1f}", fill=(0, 0, 0)) + for j in range(int(round(yt[-1] / step)) + 1): + py = (ay * j * step + by - y0) * k + major = j % 10 == 0 if step < 0.1 else j % 5 == 0 + dr.line( + [(0, py), (crop.width, py)], + fill=(200, 100, 0) if major else (255, 190, 0), + width=1, + ) + crop.save(out / f"trim2005_{fig}_guides.png") + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/ndp_riser/extract_thorsen2016.py b/validation/experiments/ndp_riser/extract_thorsen2016.py new file mode 100644 index 00000000..3e0327c8 --- /dev/null +++ b/validation/experiments/ndp_riser/extract_thorsen2016.py @@ -0,0 +1,157 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Read Figs. 7 and 8 of Thorsen et al. (2016) from the vector graphics of the article's page 8. + +Fig. 7 is their excitation curve C_v(y0/D), fitted to the NDP riser tests; Fig. 8 the maximum +r.m.s. cross-flow strain of the 22 uniform-flow (a) and 22 sheared-flow (b) tests, measured at +the fundamental frequency (blue squares) and in total (red circles), with their simulation using +the fitted curve (blue line). The figures are vector paths, so the values are the plotted +coordinates mapped through the axes, not a pixel digitisation. The tick labels are drawn glyphs, +not text, so the axes come from the plot frames: + +- Fig. 7: y0/D = 0 and 1 at x = 191.7 and 381.1 pt (the frame, where the curve starts and + ends), C_v = 0 and 1.5 at y = 161.25 and 59.7 pt (the bottom and top ticks); +- Fig. 8: x from 0 to 2.5 m/s across the frame, y from 0 to 5e-4 (a) and 0 to 3.5e-4 (b) up it, + the end tick labels of each axis on the rendered page. + +The legend symbols, in the upper left of each panel, are dropped. + + python extract_thorsen2016.py path/to/article.pdf [--out DIR] + +writes DIR/thorsen2016_fig7_cv.csv (the curve sampled every 0.05 in y0/D) and +DIR/thorsen2016_fig8_strain.csv (panel, series, U, strain in units of 1e-4). Needs PyMuPDF. + +Source: M.J. Thorsen, S. Saevik, C.M. Larsen (2016), Time domain simulation of vortex-induced +vibrations in stationary and oscillating flows, Journal of Fluids and Structures 61, 1-19, +https://doi.org/10.1016/j.jfluidstructs.2015.11.006 +""" + +from __future__ import annotations + +import argparse +import csv +from collections import defaultdict +from pathlib import Path + +import numpy as np + +HERE = Path(__file__).resolve().parent +PAGE = 7 # zero-based: the article's page 8 holds Figs. 7 and 8 + + +def fig7(draws) -> np.ndarray: + """The C_v curve: the polyline with the most vertices above y = 175 pt.""" + + def fx(px: float) -> float: + return (px - 191.7) / (381.1 - 191.7) + + def fy(py: float) -> float: + return 1.5 * (161.25 - py) / (161.25 - 59.7) + + best: list[tuple[float, float]] = [] + for d in draws: + if d["rect"].y1 > 175 or d.get("color") is None or d.get("width") is None: + continue + pts: list[tuple[float, float]] = [] + for it in d["items"]: + if it[0] == "l": + if not pts: + pts.append((it[1].x, it[1].y)) + pts.append((it[2].x, it[2].y)) + if len(pts) > 20 and len(pts) > len(best): + best = pts + arr = np.array([(fx(x), fy(y)) for x, y in best]) + return arr[np.argsort(arr[:, 0])] + + +def fig8(draws) -> list[tuple[str, str, float, float]]: + # the white plot frames from top to bottom: Fig. 7, Fig. 8(a), Fig. 8(b) + boxes = sorted( + { + ( + round(d["rect"].x0, 1), + round(d["rect"].y0, 1), + round(d["rect"].x1, 1), + round(d["rect"].y1, 1), + ) + for d in draws + if d.get("fill") == (1.0, 1.0, 1.0) and d["rect"].width > 100 + }, + key=lambda b: b[1], + ) + panels = {"uniform": (boxes[1], 5.0), "sheared": (boxes[2], 3.5)} + rows = [] + for name, (box, ymax) in panels.items(): + x0, y0, x1, y1 = box + ax, bx = 2.5 / (x1 - x0), -2.5 * x0 / (x1 - x0) + ay, by = -ymax / (y1 - y0), ymax * y1 / (y1 - y0) + print(f"Fig. 8 {name}: frame {box}, y 0..{ymax}e-4") + series = defaultdict(list) + for d in draws: + r = d["rect"] + col = d.get("color") + if col is None or not (y0 - 5 < r.y0 < y1 + 5 and x0 - 5 < r.x0 < x1 + 5): + continue + cx, cy = 0.5 * (r.x0 + r.x1), 0.5 * (r.y0 + r.y1) + kinds = {it[0] for it in d["items"]} + if 2 < r.width < 8 and 2 < r.height < 8: + if col[2] > 0.8 and col[0] < 0.3 and "re" in kinds: + series["exp_fundamental"].append((ax * cx + bx, ay * cy + by)) + elif col[0] > 0.8 and col[2] < 0.3 and "c" in kinds: + series["exp_total"].append((ax * cx + bx, ay * cy + by)) + elif col[2] > 0.8 and col[0] < 0.3 and "l" in kinds and r.width > 20: + for it in d["items"]: + if it[0] == "l": + for p in (it[1], it[2]): + series["sim"].append((ax * p.x + bx, ay * p.y + by)) + for s, pts in series.items(): + # drop the legend symbols (upper left, above every data point there) + pts = [(u, v) for u, v in pts if not (u < 1.35 and v > 0.5 * ymax)] + pts = sorted({(round(u, 3), round(v, 4)) for u, v in pts}) + if s == "sim": # polyline vertices, one per test speed + pts = sorted({round(u, 1): v for u, v in pts}.items()) + rows += [(name, s, u, v) for u, v in pts] + print(f" {s}: {len(pts)} points") + return rows + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + ap.add_argument("pdf") + ap.add_argument("--out", default=str(HERE)) + a = ap.parse_args() + import pymupdf # only this script needs it + + draws = pymupdf.open(a.pdf)[PAGE].get_drawings() + out = Path(a.out) + out.mkdir(parents=True, exist_ok=True) + + cv = fig7(draws) + i = int(np.argmax(cv[:, 1])) + zero = cv[cv[:, 1] <= 1e-3][:, 0] + print( + f"Fig. 7: {len(cv)} vertices; Cv(0) {cv[0, 1]:.4f}, maximum {cv[i, 1]:.4f} at y0/D " + f"{cv[i, 0]:.4f}, zero from y0/D {zero.min():.4f}" + ) + grid = np.arange(0.0, 1.0001, 0.05) + table = np.clip(np.interp(grid, cv[:, 0], cv[:, 1], right=0.0), 0.0, None) + # the curve runs on along the axis, a line width above it, from its zero crossing: the + # fitted curve is zero there (their Sec. 3: C_v is positive or zero) + table[grid >= zero.min()] = 0.0 + with open(out / "thorsen2016_fig7_cv.csv", "w", newline="", encoding="utf-8") as fh: + w = csv.writer(fh, lineterminator="\n") + w.writerow(["y0_over_D", "Cv"]) + w.writerows((f"{g:.2f}", f"{c:.4f}") for g, c in zip(grid, table, strict=True)) + + rows = fig8(draws) + with open( + out / "thorsen2016_fig8_strain.csv", "w", newline="", encoding="utf-8" + ) as fh: + w = csv.writer(fh, lineterminator="\n") + w.writerow(["panel", "series", "U", "strain_1e-4"]) + w.writerows(rows) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/ndp_riser/measured_trim2005_fig16.csv b/validation/experiments/ndp_riser/measured_trim2005_fig16.csv new file mode 100644 index 00000000..e03e5a41 --- /dev/null +++ b/validation/experiments/ndp_riser/measured_trim2005_fig16.csv @@ -0,0 +1,25 @@ +# Trim et al. (2005) Fig. 16, bare riser, uniform flow: spatial mean of the temporal standard deviation of the displacement, sigma/D +# read by eye on the 4x guided crop of digitise_trim2005.py; +-0.01, about +-0.02 where markers of neighbouring speeds overlap +U,CF,IL +0.3,0.304,0.097 +0.4,0.401,0.129 +0.5,0.463,0.133 +0.6,0.395,0.142 +0.7,0.320,0.121 +0.8,0.395,0.125 +0.9,0.454,0.155 +1.0,0.415,0.136 +1.1,0.450,0.142 +1.2,0.418,0.136 +1.3,0.469,0.155 +1.4,0.452,0.155 +1.5,0.476,0.157 +1.6,0.469,0.170 +1.7,0.417,0.129 +1.8,0.433,0.133 +1.9,0.463,0.155 +2.0,0.427,0.157 +2.1,0.502,0.195 +2.2,0.484,0.183 +2.3,0.490,0.168 +2.4,0.505,0.215 diff --git a/validation/experiments/ndp_riser/measured_trim2005_fig18.csv b/validation/experiments/ndp_riser/measured_trim2005_fig18.csv new file mode 100644 index 00000000..63148705 --- /dev/null +++ b/validation/experiments/ndp_riser/measured_trim2005_fig18.csv @@ -0,0 +1,8 @@ +# Trim et al. (2005) Fig. 18, bare riser, uniform flow: peak frequency of the dominant displacement mode [Hz] +# read by eye on the 4x guided crop of digitise_trim2005.py at five speeds (the markers of the other speeds overlap); +-0.3 Hz, +-0.5 Hz for CF at 2.0 m/s (overlapping markers) +U,CF,IL +0.3,1.6,3.8 +1.0,5.6,11.1 +1.5,8.0,16.1 +2.0,9.9,20.4 +2.4,12.5,25.5 diff --git a/validation/experiments/ndp_riser/ndp_riser_viv.py b/validation/experiments/ndp_riser/ndp_riser_viv.py new file mode 100644 index 00000000..848efbad --- /dev/null +++ b/validation/experiments/ndp_riser/ndp_riser_viv.py @@ -0,0 +1,570 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Cross-flow VIV of the NDP 38 m high-mode riser in uniform flow, against the measurements. + +The bare riser of the Norwegian Deepwater Programme tests (Trim et al. 2005), towed horizontally +at 0.3-2.4 m/s. Writes a deck per coefficient set and tow speed, runs them in parallel and +compares the maximum r.m.s. cross-flow strain along the riser (fundamental and total) with the +measured values of Thorsen et al. (2016, Fig. 8a), and the dominant cross-flow frequency and the +spatial mean of the cross-flow sigma/D with Trim et al. (2005, Figs. 18 and 16). + + python ndp_riser_viv.py path/to/cabledyn.exe WORKDIR [--sets b1,and24b,uls19,th16,th16c] + [--speeds 0.5,1.0,1.5,2.0,2.4 | all] [--segments 200] [--dt 0.001] [--tmax 25] + [--t0 10] [--tension 4000] [--kax 3500] [--jobs N] [--keep] [--summary DIR] + +Sources: + A.D. Trim, H. Braaten, H. Lie, M.A. Tognarelli (2005), Experimental investigation of + vortex-induced vibration of long marine risers, Journal of Fluids and Structures 21(3), + 335-361, https://doi.org/10.1016/j.jfluidstructs.2005.07.014 (the rig, Sec. 2.1; Figs. 16 + and 18) + E. Fontaine, H. Marcollo, K. Vandiver, M. Triantafyllou, C. Larsen, M. Tognarelli, + Y. Constantinides, O. Oakley (2011), Reliability based factors of safety for VIV fatigue using + NDP riser high mode VIV tests, OMAE2011, Vol. 7, 511-522, https://doi.org/10.1115/OMAE2011-49820 + (Table 1: the riser properties) + M.J. Thorsen, S. Saevik, C.M. Larsen (2016), Time domain simulation of vortex-induced + vibrations in stationary and oscillating flows, Journal of Fluids and Structures 61, 1-19, + https://doi.org/10.1016/j.jfluidstructs.2015.11.006 (Table 1, Eq. 1, Figs. 7 and 8) + J.V. Ulveseter, M.J. Thorsen, S. Saevik, C.M. Larsen (2019), Simulating fundamental and higher + harmonic VIV of slender structures, Applied Ocean Research 90, 101856, + https://doi.org/10.1016/j.apor.2019.101856 (Table 1, Sec. 4.1) + M.L. Andersen, S. Saevik, J. Wu, B.J. Leira, H. Langseth (2024b), Simulating vortex-induced + vibrations in sheared current by using an empirical time-domain model with adaptive + parameters, Applied Ocean Research 153, 104284, https://doi.org/10.1016/j.apor.2024.104284 + (Table 3) + J.R. Chaplin, P.W. Bearman, F.J. Huera Huarte, R.J. Pattenden (2005), Laboratory measurements + of vortex-induced vibrations of a vertical tension riser in a stepped current, Journal of + Fluids and Structures 21(1), 3-24, https://doi.org/10.1016/j.jfluidstructs.2005.04.010 (Eq. 4) +""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import json +import math +import os +import shutil +import subprocess +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path + +import numpy as np + +HERE = Path(__file__).resolve().parent + +# The riser (Fontaine et al. 2011, Table 1; Thorsen et al. 2016, Table 1): 38.00 m between +# universal joints, OD 27 mm, EI 598.8 N m^2, EA 8.19e6 N, 0.933 kg/m flooded (as tested). +LENGTH = 38.0 # m +DIAMETER = 0.027 # m +EI = 598.8 # N m^2 +EA_RISER = 8.19e6 # N +MASS = 0.933 # kg/m +# Fresh water: the mass ratio 1.62 of Fontaine et al. (2011, Table 1) is 0.933 kg/m over the +# mass of the displaced water at 1006 kg/m^3 (1.63 at 1000, 1.59 at 1025). +RHO_W = 1000.0 # kg/m^3 +GRAVITY = 9.80665 # m/s^2 +# The rig (Trim et al. 2005, Sec. 2.1): clump weights on inclined pendulum arms set the tension, +# 4-6 kN over the test speeds (not given per test). Modelled as an axial spring in series with +# the riser, T0 in still water; the default k_ax is derived from that range (see the README). +TENSION0 = 4000.0 # N +K_AX = 3500.0 # N/m +DEPTH = 5.0 # m, the riser's depth (not given; the current is uniform) +WATER_DEPTH = 10.0 # m +VIV_RMS_WINDOW = 0.5 # s: 500 steps of the default dtM, held fixed when dt changes +SPEEDS = [round(0.1 * k, 1) for k in range(3, 25)] # the 22 uniform-flow tests [m/s] +DEFAULT_SPEEDS = "0.5,1.0,1.5,2.0,2.4" + + +def chaplin_amplification(ad: float) -> float: + """Chaplin et al. (2005, Eq. 4): Cd/Cd0 = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2).""" + s = ad / math.sqrt(2.0) + return 1.0 + 2.3 * s + 1.7 * s * s + + +def thorsen_cv() -> list[tuple[float, float]]: + """Thorsen et al. (2016, Fig. 7) C_v(y0/D), from extract_thorsen2016.py.""" + with open(HERE / "thorsen2016_fig7_cv.csv", encoding="utf-8") as fh: + return [(float(r["y0_over_D"]), float(r["Cv"])) for r in csv.DictReader(fh)] + + +# Coefficient sets: LINE TYPES Cd, Cl dF cF; VIV row (ClX, alpha, Chh); VIV AMPLITUDE table; +# VIV DAMPING (a, b, c). Each as its source gives it; "fitted" says whether the source fitted +# it to these NDP tests. +SETS: dict[str, dict] = { + "b1": { + "label": "generic set (Delta Flume case)", + "fitted": "no", + "cd": 1.2, + "cl": (0.8, 0.08, 0.18), + "viv": (0.85, 0.15, None), + "amp": "chaplin", + "damping": (0, 0, 1), + }, + "and24b": { + "label": "Andersen et al. (2024b), Table 3, cross-flow average", + "fitted": "sheared-flow tests of this riser", + "cd": 1.16, + "cl": (1.28, 0.066, 0.131), + "viv": None, + "amp": None, + "damping": None, + }, + "uls19": { + "label": "Ulveseter et al. (2019), Table 1, Chh 1.5", + "fitted": "these uniform-flow tests", + "cd": 1.2, + "cl": (0.85, 0.064, 0.144), + "viv": (0.75, 0.15, 1.5), + "amp": None, + "damping": None, + }, + "th16": { + "label": "Thorsen et al. (2016), Fig. 7 and Eq. 1", + "fitted": "these uniform and sheared-flow tests", + "cd": 1.2, + "cl": (1.0, 0.08, 0.18), # the C_v table replaces Cl + "viv": None, + "amp": "thorsen", + "damping": (0.31, 0.89, 0), + }, + "th16c": { + "label": "th16 with Morison's linear cross-flow damping kept (variant)", + "fitted": "variant of th16", + "cd": 1.2, + "cl": (1.0, 0.08, 0.18), + "viv": None, + "amp": "thorsen", + "damping": (0.31, 0.89, 1), + }, +} + + +def effective_ea(kax: float) -> float: + """The rig spring in series with the riser, as one axial stiffness of the line.""" + return LENGTH / (1.0 / kax + LENGTH / EA_RISER) + + +def deck_text( + hset: str, + u: float, + segments: int, + dt: float, + tmax: float, + tension: float, + kax: float, +) -> str: + s = SETS[hset] + ea = effective_ea(kax) + l0 = LENGTH / (1.0 + tension / ea) # unstretched length: T0 in still water + cl, df, cf = s["cl"] + viv = "" + if s["viv"]: + clx, alpha, chh = s["viv"] + cols, vals = "ClX alpha", f"{clx} {alpha}" + if chh is not None: + cols, vals = cols + " Chh", vals + f" {chh}" + viv += ( + "--------------------- VIV ----------------------------------------------\n" + f"TypeName {cols}\n(-){' (-)' * len(cols.split())}\nndp {vals}\n" + ) + if s["amp"] == "chaplin": # C_v = Cl constant, Chaplin's drag amplification + rows = "".join( + f"ndp {0.1 * k:.2f} {cl} {chaplin_amplification(0.1 * k):.5f}\n" + for k in range(16) + ) + elif s["amp"] == "thorsen": + rows = "".join(f"ndp {ad:.2f} {c:.4f} 1.0\n" for ad, c in thorsen_cv()) + if s["amp"]: + viv += ( + "--------------------- VIV AMPLITUDE ------------------------------------\n" + f"TypeName AD Cv CdAmp\n(-) (-) (-) (-)\n{rows}" + ) + if s["damping"]: + a, b, c = s["damping"] + viv += ( + "--------------------- VIV DAMPING ------------------------------------\n" + f"TypeName a b c\n(-) (-) (-) (-)\nndp {a} {b} {c}\n" + ) + nodes = segments + 1 + outs = "FairTen1\n" + "".join( + f"CurvX1N{j}\nCurvY1N{j}\n" for j in range(1, nodes + 1) + ) + outs += "".join(f"L1N{j}py\nL1N{j}pz\n" for j in range(1, nodes + 1, 4)) + return f"""--------------------- CableDyn Input File --------------------------------- +NDP 38 m riser, uniform {u} m/s, T0 {tension:g} N, k_ax {kax:g} N/m, set {hset} +----------------------- LINE TYPES ------------------------------------------ +TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t Cl dF cF +(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) (-) (-) (-) +ndp {DIAMETER} {MASS} {ea:.6e} 0.0 {EI} {s["cd"]} 0.0 1.0 0.0 {cl} {df} {cf} +----------------------- POINTS ---------------------------------------------- +ID Attachment X Y Z M V CdA CA +(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) +1 Coupled 0.0 0.0 {-DEPTH} 0 0 0 0 +2 Fixed {LENGTH} 0.0 {-DEPTH} 0 0 0 0 +----------------------- LINES ----------------------------------------------- +ID LineType AttachA AttachB UnstrLen NumSegs Outputs +(-) (-) (-) (-) (m) (-) (-) +1 ndp 1 2 {l0:.9f} {segments} - +{viv}---------------------- OPTIONS ---------------------------------------------- +{RHO_W} rhoW +{GRAVITY} g +{WATER_DEPTH} WtrDpth +{dt:.6f} dtM +{round(tmax / dt) * dt:.6f} TMax +1 Currents +{VIV_RMS_WINDOW} VIVrmsWindow +---------------------- OUTPUTS ----------------------------------------------- +{outs}END +------------------------- need this line -------------------------------------- +""" + + +# Search bands of the dominant frequencies, in f D/U: the cross-flow one covers the +# synchronisation band of every set (0.065-0.26) and excludes a slow swing of the riser below it +# and the third harmonic above it; the in-line one is twice that. +CF_BAND = (0.05, 0.30) +IL_BAND = (0.10, 0.60) +ANALYSIS = "1" # part of the reuse key: bump when analyse() changes + + +def spectrum_peak(x: np.ndarray, dt: float, lo: float, hi: float) -> float: + """Peak of the spectra summed over the rows, between lo and hi [Hz].""" + xm = x - x.mean(axis=-1, keepdims=True) + sp = (np.abs(np.fft.rfft(xm, axis=-1)) ** 2).sum(axis=0) + f = np.fft.rfftfreq(xm.shape[-1], dt) + sp[(f < lo) | (f > hi)] = 0.0 + return float(f[int(np.argmax(sp))]) + + +def bandpass(x: np.ndarray, dt: float, lo: float, hi: float) -> np.ndarray: + xm = x - x.mean(axis=-1, keepdims=True) + f = np.fft.rfftfreq(xm.shape[-1], dt) + sp = np.fft.rfft(xm, axis=-1) + sp[..., (f < lo) | (f > hi)] = 0.0 + return np.fft.irfft(sp, xm.shape[-1], axis=-1) + + +def analyse(out: Path, u: float, t0: float) -> dict: + """Reduce a run to the compared quantities (statistics over t > t0). + + Cross-flow is vertical (z) and in-line horizontal (y). The section axis x of a line not + restrained in torsion starts at End A as the projection of global +z normal to the line and + is carried along it, so CurvX is the cross-flow curvature (the static bow tilts it by + under 2 degrees) and CurvY the in-line one. The dominant frequencies are the peaks of the + curvature spectra summed over the nodes, inside CF_BAND and IL_BAND. The strain is + kappa D/2 at the outer surface; its fundamental part is band-passed to 0.5-1.5 times the + dominant cross-flow frequency, as Thorsen et al. (2016) filter the measured strain. sigma/D + is band-passed the same way about the dominant frequency of its direction, as the measured + modal reconstruction holds the vibration; the raw values keep any slow swing. + """ + with open(out, encoding="utf-8") as fh: + fh.readline() + head = fh.readline().split() + fh.readline() + a = np.loadtxt(fh) + t = a[:, 0] + k = t > t0 + dt = float(t[1] - t[0]) + s = u / DIAMETER # f D/U = 1 at s Hz + nodes = sorted({int(c[7:]) for c in head if c.startswith("CurvX1N")}) + cf = np.array([a[k, head.index(f"CurvX1N{j}")] for j in nodes]) + il = np.array([a[k, head.index(f"CurvY1N{j}")] for j in nodes]) + f_cf = spectrum_peak(cf, dt, CF_BAND[0] * s, CF_BAND[1] * s) + f_il = spectrum_peak(il, dt, IL_BAND[0] * s, IL_BAND[1] * s) + eps_cf = (cf - cf.mean(axis=1, keepdims=True)) * DIAMETER / 2.0 + eps_il = (il - il.mean(axis=1, keepdims=True)) * DIAMETER / 2.0 + rms_cf = np.sqrt((eps_cf**2).mean(axis=1)) + rms_cf_f = np.sqrt((bandpass(eps_cf, dt, 0.5 * f_cf, 1.5 * f_cf) ** 2).mean(axis=1)) + rms_il = np.sqrt((eps_il**2).mean(axis=1)) + pn = sorted( + {int(c[3:-2]) for c in head if c.startswith("L1N") and c.endswith("pz")} + ) + inner = pn[1:-1] # the end nodes are pinned + pz = np.array([a[k, head.index(f"L1N{j}pz")] for j in inner]) + py = np.array([a[k, head.index(f"L1N{j}py")] for j in inner]) + sd_cf = bandpass(pz, dt, 0.5 * f_cf, 1.5 * f_cf).std(axis=1) / DIAMETER + sd_il = bandpass(py, dt, 0.5 * f_il, 1.5 * f_il).std(axis=1) / DIAMETER + ten = a[k, head.index("FairTen1")] + return { + "mean_tension_N": float(ten.mean()), + "f_cf_hz": f_cf, + "f_il_hz": f_il, + "fD_over_U_cf": f_cf / s, + "f_cf_displacement_hz": spectrum_peak(pz, dt, CF_BAND[0] * s, CF_BAND[1] * s), + "f_cf_displacement_above_0p3hz": spectrum_peak(pz, dt, 0.3, np.inf), + "f_il_displacement_above_0p3hz": spectrum_peak(py, dt, 0.3, np.inf), + "frequency_resolution_hz": 1.0 / (k.sum() * dt), + "max_rms_strain_cf_fundamental": float(rms_cf_f.max()), + "max_rms_strain_cf_total": float(rms_cf.max()), + "max_rms_strain_il_total": float(rms_il.max()), + "sigma_over_D_cf_mean": float(sd_cf.mean()), + "sigma_over_D_il_mean": float(sd_il.mean()), + "sigma_over_D_cf_raw_mean": float((pz.std(axis=1) / DIAMETER).mean()), + "sigma_over_D_il_raw_mean": float((py.std(axis=1) / DIAMETER).mean()), + } + + +def run_case( + exe: Path, folder: Path, text: str, u: float, t0: float, keep: bool, sha: str +) -> dict: + """Write the deck, run it and analyse it. A folder that holds the same deck run by the + same executable is not run again: its result is reused when the statistics window and + the analysis are also the same, and its output is analysed again if it was kept.""" + folder.mkdir(parents=True, exist_ok=True) + deck, result, out = folder / "ndp.dat", folder / "result.json", folder / "ndp.out" + key = f"{sha}:{t0:g}:{ANALYSIS}" + same = deck.is_file() and deck.read_text(encoding="utf-8") == text + if same and result.is_file(): + old = json.loads(result.read_text(encoding="utf-8")) + if old.pop("reuse_key", None) == key: + return old + ran = folder / "executable_sha256.txt" + if not ( + same and out.is_file() and ran.is_file() and ran.read_text().strip() == sha + ): + deck.write_text(text, encoding="utf-8") + (folder / "current_profile.txt").write_text( + f"z ux uy uz\n(m) (m/s) (m/s) (m/s)\n{-WATER_DEPTH:.2f} 0 {u} 0\n0.0 0 {u} 0\n", + encoding="utf-8", + ) + env = dict(os.environ, OMP_NUM_THREADS="1") + proc = subprocess.run( + [str(exe), deck.name, "ndp"], + cwd=folder, + capture_output=True, + text=True, + encoding="utf-8", + errors="replace", + env=env, + check=False, + ) + (folder / "console.txt").write_text(proc.stdout + proc.stderr, encoding="utf-8") + if proc.returncode != 0: + raise SystemExit(f"{folder}: CableDyn exited with {proc.returncode}") + ran.write_text(sha + "\n", encoding="utf-8") + res = analyse(out, u, t0) + result.write_text( + json.dumps({**res, "reuse_key": key}, indent=1) + "\n", encoding="utf-8" + ) + if not keep: + out.unlink() + return res + + +def read_csv(name: str) -> list[dict]: + with open(HERE / name, encoding="utf-8") as fh: + return list(csv.DictReader(r for r in fh if not r.startswith("#"))) + + +def measured() -> dict: + """The measurements, keyed by speed rounded to 0.1 m/s.""" + m: dict = {"fig8": {}, "fig16": {}, "fig18": {}} + for r in read_csv("thorsen2016_fig8_strain.csv"): + if r["panel"] == "uniform": + key = (r["series"], round(float(r["U"]), 1)) + m["fig8"][key] = float(r["strain_1e-4"]) * 1e-4 + for r in read_csv("measured_trim2005_fig16.csv"): + m["fig16"][round(float(r["U"]), 1)] = (float(r["CF"]), float(r["IL"])) + for r in read_csv("measured_trim2005_fig18.csv"): + m["fig18"][round(float(r["U"]), 1)] = (float(r["CF"]), float(r["IL"])) + return m + + +def rms_log(ratios: list[float]) -> float | None: + return float(np.sqrt(np.mean(np.log(ratios) ** 2))) if ratios else None + + +def parse_speeds(text: str) -> list[float]: + if text == "all": + return SPEEDS + out = sorted({round(float(v), 1) for v in text.split(",")}) + if not out or any(v not in SPEEDS for v in out): + raise SystemExit( + f"--speeds: the tests are 0.3, 0.4, ..., 2.4 m/s, got {text!r}" + ) + return out + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + ap.add_argument("exe") + ap.add_argument("workdir") + ap.add_argument( + "--sets", default=",".join(SETS), help="comma list of " + ", ".join(SETS) + ) + ap.add_argument( + "--speeds", + default=DEFAULT_SPEEDS, + help="comma list of tow speeds [m/s], or all", + ) + ap.add_argument("--segments", type=int, default=200) + ap.add_argument("--dt", type=float, default=0.001) + ap.add_argument("--tmax", type=float, default=25.0) + ap.add_argument( + "--t0", type=float, default=10.0, help="start of the statistics [s]" + ) + ap.add_argument( + "--tension", type=float, default=TENSION0, help="T0 in still water [N]" + ) + ap.add_argument("--kax", type=float, default=K_AX, help="rig spring [N/m]") + ap.add_argument("--jobs", type=int, default=os.cpu_count() or 1) + ap.add_argument("--keep", action="store_true", help="keep the output tables") + ap.add_argument( + "--summary", + default=None, + help="directory for the comparison CSV and summary JSON", + ) + a = ap.parse_args() + found = a.exe if Path(a.exe).is_file() else shutil.which(a.exe) + if found is None: + raise SystemExit(f"CableDyn executable not found: {a.exe}") + exe = Path(found).resolve() + sets = [s.strip() for s in a.sets.split(",") if s.strip()] + if not sets or any(s not in SETS for s in sets): + raise SystemExit(f"--sets: choose from {', '.join(SETS)}, got {a.sets!r}") + speeds = parse_speeds(a.speeds) + tag = f"n{a.segments}_dt{a.dt:g}_T{a.tension:g}_k{a.kax:g}_t{a.tmax:g}" + jobs = [(s, u) for s in sets for u in speeds] + sha = hashlib.sha256(exe.read_bytes()).hexdigest() + + def one(job: tuple[str, float]) -> dict: + s, u = job + folder = Path(a.workdir).resolve() / f"{s}_u{u:.1f}_{tag}" + text = deck_text(s, u, a.segments, a.dt, a.tmax, a.tension, a.kax) + res = run_case(exe, folder, text, u, a.t0, a.keep, sha) + return {"set": s, "U_m_per_s": u, **res} + + with ThreadPoolExecutor(max_workers=max(1, min(a.jobs, len(jobs)))) as pool: + results = list(pool.map(one, jobs)) + + m = measured() + rows, per_set = [], {} + for s in sets: + rs = [r for r in results if r["set"] == s] + ratio, ratio_u5, ratio_th, ratio_th_u5, ratio_total = [], [], [], [], [] + fdu, fdu_meas, sd, sd_meas, sdi, sdi_meas = [], [], [], [], [], [] + for r in rs: + u = r["U_m_per_s"] + ef = m["fig8"][("exp_fundamental", u)] + et = m["fig8"][("exp_total", u)] + th = m["fig8"][("sim", u)] + q = r["max_rms_strain_cf_fundamental"] / ef + ratio.append(q) + ratio_th.append(th / ef) + ratio_total.append(r["max_rms_strain_cf_total"] / et) + if u >= 0.5: + ratio_u5.append(q) + ratio_th_u5.append(th / ef) + row = { + "set": s, + "U_m_per_s": u, + "mean_tension_N": round(r["mean_tension_N"], 0), + "strain_fund_measured": f"{ef:.4e}", + "strain_fund_cabledyn": f"{r['max_rms_strain_cf_fundamental']:.4e}", + "strain_fund_ratio": round(q, 3), + "strain_fund_thorsen2016_sim": f"{th:.4e}", + "strain_total_measured": f"{et:.4e}", + "strain_total_cabledyn": f"{r['max_rms_strain_cf_total']:.4e}", + "f_cf_cabledyn_hz": round(r["f_cf_hz"], 3), + "f_il_cabledyn_hz": round(r["f_il_hz"], 3), + "fD_U_cf_cabledyn": round(r["fD_over_U_cf"], 4), + "f_cf_measured_hz": "", + "f_il_measured_hz": "", + "sigma_D_cf_cabledyn": round(r["sigma_over_D_cf_mean"], 3), + "sigma_D_il_cabledyn": round(r["sigma_over_D_il_mean"], 3), + "sigma_D_cf_measured": "", + "sigma_D_il_measured": "", + } + if u in m["fig18"]: + fc, fi = m["fig18"][u] + row["f_cf_measured_hz"], row["f_il_measured_hz"] = fc, fi + fdu.append(r["fD_over_U_cf"]) + fdu_meas.append(fc * DIAMETER / u) + if u in m["fig16"]: + c, i = m["fig16"][u] + row["sigma_D_cf_measured"], row["sigma_D_il_measured"] = c, i + sd.append(r["sigma_over_D_cf_mean"]) + sd_meas.append(c) + sdi.append(r["sigma_over_D_il_mean"]) + sdi_meas.append(i) + rows.append(row) + per_set[s] = { + "label": SETS[s]["label"], + "fitted_to": SETS[s]["fitted"], + "speeds": [r["U_m_per_s"] for r in rs], + "strain_fund_ratio_median": float(np.median(ratio)), + "strain_fund_ratio_range": [float(min(ratio)), float(max(ratio))], + "strain_fund_rms_log_error": rms_log(ratio), + "strain_fund_rms_log_error_U_ge_0p5": rms_log(ratio_u5), + "thorsen2016_sim_rms_log_error_same_speeds": rms_log(ratio_th), + "thorsen2016_sim_rms_log_error_U_ge_0p5": rms_log(ratio_th_u5), + "strain_total_ratio_median": float(np.median(ratio_total)), + "strain_total_rms_log_error": rms_log(ratio_total), + "fD_U_cf_mean_at_fig18_speeds": float(np.mean(fdu)) if fdu else None, + "fD_U_cf_measured_mean_at_fig18_speeds": ( + float(np.mean(fdu_meas)) if fdu else None + ), + "fD_U_cf_mean_all_speeds": float(np.mean([r["fD_over_U_cf"] for r in rs])), + "sigma_D_cf_mean": float(np.mean(sd)) if sd else None, + "sigma_D_cf_measured_mean": float(np.mean(sd_meas)) if sd else None, + "sigma_D_il_mean": float(np.mean(sdi)) if sdi else None, + "sigma_D_il_measured_mean": float(np.mean(sdi_meas)) if sdi else None, + "mean_tension_N_range": [ + round(min(r["mean_tension_N"] for r in rs)), + round(max(r["mean_tension_N"] for r in rs)), + ], + } + ps = per_set[s] + print( + f"{s}: strain fund/measured median {ps['strain_fund_ratio_median']:.2f} " + f"({ps['strain_fund_ratio_range'][0]:.2f}-{ps['strain_fund_ratio_range'][1]:.2f}), " + f"rms log {ps['strain_fund_rms_log_error']:.3f}" + + ( + f" (U >= 0.5: {ps['strain_fund_rms_log_error_U_ge_0p5']:.3f}; Thorsen's sim " + f"{ps['thorsen2016_sim_rms_log_error_U_ge_0p5']:.3f})" + if ratio_u5 + else "" + ) + + f"; fD/U {ps['fD_U_cf_mean_all_speeds']:.3f}" + + ( + f" (Fig. 18 speeds {ps['fD_U_cf_mean_at_fig18_speeds']:.3f} vs " + f"{ps['fD_U_cf_measured_mean_at_fig18_speeds']:.3f})" + if fdu + else "" + ) + + ( + f"; sigma/D CF {ps['sigma_D_cf_mean']:.3f} vs {ps['sigma_D_cf_measured_mean']:.3f}" + if sd + else "" + ) + + f"; T {ps['mean_tension_N_range'][0]}-{ps['mean_tension_N_range'][1]} N" + ) + summary = { + "segments": a.segments, + "dt_s": a.dt, + "tmax_s": a.tmax, + "statistics_after_s": a.t0, + "tension0_N": a.tension, + "rig_spring_N_per_m": a.kax, + "effective_axial_stiffness_N": round(effective_ea(a.kax), 1), + "per_set": per_set, + "executable_sha256": sha, + } + if a.summary: + out = Path(a.summary) + out.mkdir(parents=True, exist_ok=True) + with open( + out / "response_comparison.csv", "w", newline="", encoding="utf-8" + ) as fh: + w = csv.DictWriter(fh, fieldnames=list(rows[0]), lineterminator="\n") + w.writeheader() + w.writerows(rows) + (out / "summary.json").write_text( + json.dumps(summary, indent=2) + "\n", encoding="utf-8", newline="\n" + ) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/ndp_riser/provenance.json b/validation/experiments/ndp_riser/provenance.json new file mode 100644 index 00000000..b3a109d7 --- /dev/null +++ b/validation/experiments/ndp_riser/provenance.json @@ -0,0 +1,308 @@ +{ + "source": "Trim, Braaten, Lie & Tognarelli (2005), Journal of Fluids and Structures 21(3), 335-361 (the rig, Sec. 2.1; Figs. 16 and 18); Fontaine, Marcollo, Vandiver, Triantafyllou, Larsen, Tognarelli, Constantinides & Oakley (2011), OMAE2011, Vol. 7, 511-522 (Table 1, the riser); Thorsen, Saevik & Larsen (2016), Journal of Fluids and Structures 61, 1-19 (Table 1, Eq. 1, Figs. 4, 7 and 8); Ulveseter, Thorsen, Saevik & Larsen (2019), Applied Ocean Research 90, 101856 (Tables 1 and 3, Sec. 4.1); Andersen, Saevik, Wu, Leira & Langseth (2024b), Applied Ocean Research 153, 104284 (Table 3); Ulveseter, Thorsen, Saevik & Larsen (2018), Marine Structures 60, 241-260 (Table 3); Chaplin, Bearman, Huera Huarte & Pattenden (2005), Journal of Fluids and Structures 21(1), 3-24 (Eq. 4)", + "doi": [ + "10.1016/j.jfluidstructs.2005.07.014", + "10.1115/OMAE2011-49820", + "10.1016/j.jfluidstructs.2015.11.006", + "10.1016/j.apor.2019.101856", + "10.1016/j.apor.2024.104284", + "10.1016/j.marstruc.2018.04.001", + "10.1016/j.jfluidstructs.2005.04.010" + ], + "bibliographic_data": "volumes, issues and pages from Crossref (api.crossref.org), 2026-11-16", + "data_used": "riser: 38.00 m between universal joints, OD 27 mm, EI 598.8 N m^2, EA 8.19e6 N, 0.933 kg/m water-filled, mass ratio 1.62 (Fontaine et al. 2011, Table 1); tension 4-6 kN over the tests (Trim et al. 2005, Sec. 2.1); the maximum r.m.s. cross-flow strain of the 22 uniform-flow tests, fundamental and total, and Thorsen et al.'s simulation (Thorsen et al. 2016, Fig. 8a; the sheared panel is extracted but not compared); Thorsen et al.'s fitted Cv(y0/D) (Fig. 7); the spatial mean sigma/D, CF and IL, at 22 speeds (Trim et al. 2005, Fig. 16, bare riser, uniform flow); the peak frequency of the dominant displacement mode, CF and IL, at 0.3, 1.0, 1.5, 2.0 and 2.4 m/s (Fig. 18)", + "extraction": "Thorsen et al. (2016) Figs. 7 and 8 are vector graphics: extract_thorsen2016.py maps the plotted coordinates through the plot frames (axis ends at the tick labels: 0-2.5 m/s and 0-5e-4 for Fig. 8a; y0/D 0-1 and Cv 0-1.5 for Fig. 7); 22 points per series. Trim et al. (2005) Figs. 16 and 18 are raster images with overlapping markers: read by eye on 4x enlarged crops with a guide at every speed and every 0.01 / 1 Hz, drawn by digitise_trim2005.py after calibrating the axes on the panel frames and grid lines; +-0.01 in sigma/D (about +-0.02 where neighbouring markers overlap), +-0.3 Hz (+-0.5 Hz for CF at 2.0 m/s)", + "assumptions": "fresh water 1000 kg/m^3 (the mass ratio 1.62 implies 1006 kg/m^3); the rig as an axial spring in series with the riser, T0 4 kN in still water, k_ax 3.5 kN/m derived from the reported 4-6 kN range with Morison drag at Cd 1.2 at 2.4 m/s (not tuned to the response); the riser 5 m below the surface in 10 m of water (not given; the current is uniform); Ca 1; VIVrmsWindow 0.5 s", + "coefficients": { + "b1": "the generic set of the Delta Flume case, nothing fitted to the NDP tests: Cl 0.8, cF 0.18, dF 0.08, Cd 1.2; VIV ClX 0.85, alpha 0.15 (Ulveseter et al. 2018, Table 3); VIV AMPLITUDE Cv 0.8 with CdAmp = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2), at A/D 0-1.5 (Chaplin et al. 2005, Eq. 4); VIV DAMPING 0 0 1", + "and24b": "Andersen et al. (2024b), Table 3, cross-flow average of the per-case optima for the 22 sheared-flow NDP tests: Cl 1.28, cF 0.131, dF 0.066, Cd 1.16, Ca 1.0; their in-line set (Cv,x 1.09, f0,x 0.321, df,x 0.161) left out", + "uls19": "Ulveseter et al. (2019), Table 1, fitted by them to these uniform-flow tests (Sec. 4.1): Cd 1.2, CM 2, Cl 0.85, cF 0.144, dF 0.064; VIV ClX 0.75, alpha 0.15, Chh 1.5", + "th16": "Thorsen et al. (2016), fitted by them to the 22 uniform and 22 sheared NDP tests: VIV AMPLITUDE with the Fig. 7 Cv curve (thorsen2016_fig7_cv.csv), VIV DAMPING 0.31 0.89 0 (Eq. 1), band 0.18 +- 0.08 for the 0.10-0.26 range of Fig. 4; Cd 1.2", + "th16c": "th16 with VIV DAMPING 0.31 0.89 1 (Morison's linear cross-flow damping kept): a variant" + }, + "CableDyn_commit": "041337e (dev) with the mid-point VIV phase update (fix/viv-coupled-order)", + "validation_date": "2026-11-16", + "executable_name": "cabledyn.exe", + "executable_sha256": "see summary.json", + "compiler": "GNU Fortran 16.2.0", + "build_type": "Release", + "platform": "Windows 11 x86-64", + "segments": 200, + "dt_s": 0.001, + "tmax_s": 25.0, + "statistics_after_s": 10.0, + "sensitivity": { + "note": "fundamental strain [-], dominant CF frequency [Hz], spatial-mean CF sigma/D and mean tension [N] at the given speeds, against response_comparison.csv; tmax_55: 55 s runs, statistics over 45 s", + "dt_0p0005": { + "b1": { + "1.0": { + "strain_fund": 0.00014618, + "f_cf_hz": 7.133, + "sigma_D_cf": 0.428, + "mean_tension_N": 4840.0 + }, + "2.4": { + "strain_fund": 0.00037938, + "f_cf_hz": 17.4, + "sigma_D_cf": 0.412, + "mean_tension_N": 9920.0 + } + }, + "and24b": { + "1.0": { + "strain_fund": 0.00012914, + "f_cf_hz": 5.333, + "sigma_D_cf": 0.631, + "mean_tension_N": 4333.0 + }, + "2.4": { + "strain_fund": 0.00025558, + "f_cf_hz": 11.4, + "sigma_D_cf": 0.69, + "mean_tension_N": 7534.0 + } + }, + "uls19": { + "1.0": { + "strain_fund": 9.1189e-05, + "f_cf_hz": 5.6, + "sigma_D_cf": 0.428, + "mean_tension_N": 4245.0 + }, + "2.4": { + "strain_fund": 0.0002669, + "f_cf_hz": 12.867, + "sigma_D_cf": 0.459, + "mean_tension_N": 6853.0 + } + }, + "th16": { + "1.0": { + "strain_fund": 0.00016422, + "f_cf_hz": 7.4, + "sigma_D_cf": 0.378, + "mean_tension_N": 4222.0 + }, + "2.4": { + "strain_fund": 0.00037693, + "f_cf_hz": 16.733, + "sigma_D_cf": 0.418, + "mean_tension_N": 6629.0 + } + }, + "th16c": { + "1.0": { + "strain_fund": 8.8411e-05, + "f_cf_hz": 6.0, + "sigma_D_cf": 0.303, + "mean_tension_N": 4191.0 + }, + "2.4": { + "strain_fund": 0.0001807, + "f_cf_hz": 12.067, + "sigma_D_cf": 0.32, + "mean_tension_N": 6405.0 + } + } + }, + "segments_400": { + "b1": { + "1.0": { + "strain_fund": 0.00014702, + "f_cf_hz": 7.133, + "sigma_D_cf": 0.424, + "mean_tension_N": 4845.0 + }, + "2.4": { + "strain_fund": 0.00040835, + "f_cf_hz": 18.333, + "sigma_D_cf": 0.399, + "mean_tension_N": 9869.0 + } + }, + "and24b": { + "1.0": { + "strain_fund": 0.00012939, + "f_cf_hz": 5.333, + "sigma_D_cf": 0.626, + "mean_tension_N": 4334.0 + }, + "2.4": { + "strain_fund": 0.00026037, + "f_cf_hz": 11.4, + "sigma_D_cf": 0.684, + "mean_tension_N": 7541.0 + } + }, + "uls19": { + "1.0": { + "strain_fund": 0.00010609, + "f_cf_hz": 5.6, + "sigma_D_cf": 0.427, + "mean_tension_N": 4238.0 + }, + "2.4": { + "strain_fund": 0.00026787, + "f_cf_hz": 12.4, + "sigma_D_cf": 0.474, + "mean_tension_N": 6935.0 + } + }, + "th16": { + "1.0": { + "strain_fund": 0.0001661, + "f_cf_hz": 7.333, + "sigma_D_cf": 0.381, + "mean_tension_N": 4225.0 + }, + "2.4": { + "strain_fund": 0.00044926, + "f_cf_hz": 17.533, + "sigma_D_cf": 0.4, + "mean_tension_N": 6565.0 + } + }, + "th16c": { + "1.0": { + "strain_fund": 8.8573e-05, + "f_cf_hz": 6.0, + "sigma_D_cf": 0.3, + "mean_tension_N": 4191.0 + }, + "2.4": { + "strain_fund": 0.00017739, + "f_cf_hz": 13.467, + "sigma_D_cf": 0.314, + "mean_tension_N": 6418.0 + } + } + }, + "tmax_55": { + "b1": { + "2.4": { + "strain_fund": 0.0003392, + "f_cf_hz": 15.578, + "sigma_D_cf": 0.423, + "mean_tension_N": 10004.0 + } + }, + "and24b": { + "2.4": { + "strain_fund": 0.00025566, + "f_cf_hz": 12.111, + "sigma_D_cf": 0.691, + "mean_tension_N": 7534.0 + } + }, + "th16c": { + "2.4": { + "strain_fund": 0.00019167, + "f_cf_hz": 12.0, + "sigma_D_cf": 0.321, + "mean_tension_N": 6389.0 + } + } + }, + "tmax_55_dt_0p0005": { + "b1": { + "2.4": { + "strain_fund": 0.00037913, + "f_cf_hz": 15.578, + "sigma_D_cf": 0.413, + "mean_tension_N": 9931.0 + } + }, + "and24b": { + "2.4": { + "strain_fund": 0.00025398, + "f_cf_hz": 11.422, + "sigma_D_cf": 0.69, + "mean_tension_N": 7533.0 + } + }, + "th16c": { + "2.4": { + "strain_fund": 0.00021533, + "f_cf_hz": 12.0, + "sigma_D_cf": 0.322, + "mean_tension_N": 6376.0 + } + } + }, + "tmax_55_segments_400": { + "b1": { + "2.4": { + "strain_fund": 0.00041136, + "f_cf_hz": 18.356, + "sigma_D_cf": 0.395, + "mean_tension_N": 9824.0 + } + }, + "and24b": { + "2.4": { + "strain_fund": 0.00025738, + "f_cf_hz": 11.422, + "sigma_D_cf": 0.685, + "mean_tension_N": 7540.0 + } + }, + "th16c": { + "2.4": { + "strain_fund": 0.00017665, + "f_cf_hz": 13.422, + "sigma_D_cf": 0.314, + "mean_tension_N": 6418.0 + } + } + }, + "full_sweep_dt_0p0005": { + "b1": { + "strain_fund_ratio_median": 1.2537, + "strain_fund_rms_log_error": 0.2802, + "strain_fund_rms_log_error_U_ge_0p5": 0.2809, + "fD_U_cf_mean_at_fig18_speeds": 0.191, + "sigma_D_cf_mean": 0.4307, + "sigma_D_il_mean": 0.0407 + }, + "and24b": { + "strain_fund_ratio_median": 1.0032, + "strain_fund_rms_log_error": 0.1868, + "strain_fund_rms_log_error_U_ge_0p5": 0.1821, + "fD_U_cf_mean_at_fig18_speeds": 0.1341, + "sigma_D_cf_mean": 0.687, + "sigma_D_il_mean": 0.0882 + }, + "uls19": { + "strain_fund_ratio_median": 0.9383, + "strain_fund_rms_log_error": 0.1842, + "strain_fund_rms_log_error_U_ge_0p5": 0.1727, + "fD_U_cf_mean_at_fig18_speeds": 0.1443, + "sigma_D_cf_mean": 0.4543, + "sigma_D_il_mean": 0.147 + }, + "th16": { + "strain_fund_ratio_median": 1.3866, + "strain_fund_rms_log_error": 0.3752, + "strain_fund_rms_log_error_U_ge_0p5": 0.3908, + "fD_U_cf_mean_at_fig18_speeds": 0.1927, + "sigma_D_cf_mean": 0.3888, + "sigma_D_il_mean": 0.0876 + }, + "th16c": { + "strain_fund_ratio_median": 0.743, + "strain_fund_rms_log_error": 0.3762, + "strain_fund_rms_log_error_U_ge_0p5": 0.3878, + "fD_U_cf_mean_at_fig18_speeds": 0.154, + "sigma_D_cf_mean": 0.3044, + "sigma_D_il_mean": 0.0256 + } + }, + "water_1025_U_ge_0p5_rms_log_error": { + "b1": 0.299, + "and24b": 0.181, + "uls19": 0.154, + "th16": 0.434, + "th16c": 0.353 + } + } +} diff --git a/validation/experiments/ndp_riser/response_comparison.csv b/validation/experiments/ndp_riser/response_comparison.csv new file mode 100644 index 00000000..215120d5 --- /dev/null +++ b/validation/experiments/ndp_riser/response_comparison.csv @@ -0,0 +1,111 @@ +set,U_m_per_s,mean_tension_N,strain_fund_measured,strain_fund_cabledyn,strain_fund_ratio,strain_fund_thorsen2016_sim,strain_total_measured,strain_total_cabledyn,f_cf_cabledyn_hz,f_il_cabledyn_hz,fD_U_cf_cabledyn,f_cf_measured_hz,f_il_measured_hz,sigma_D_cf_cabledyn,sigma_D_il_cabledyn,sigma_D_cf_measured,sigma_D_il_measured +b1,0.3,4017.0,1.3090e-05,1.5180e-05,1.16,1.1330e-05,1.6120e-05,1.5697e-05,2.133,4.267,0.192,1.6,3.8,0.438,0.023,0.304,0.097 +b1,0.4,4037.0,1.8130e-05,2.5739e-05,1.42,2.4420e-05,2.4680e-05,2.6388e-05,2.867,5.667,0.1935,,,0.433,0.031,0.401,0.129 +b1,0.5,4082.0,4.0290e-05,4.2118e-05,1.045,3.0210e-05,5.0610e-05,4.2880e-05,3.6,7.133,0.1944,,,0.427,0.027,0.463,0.133 +b1,0.6,4150.0,4.4320e-05,4.6559e-05,1.051,4.7080e-05,5.4380e-05,5.1423e-05,3.733,7.467,0.168,,,0.44,0.031,0.395,0.142 +b1,0.7,4260.0,5.7660e-05,8.3717e-05,1.452,6.5210e-05,7.3770e-05,8.4440e-05,5.133,10.267,0.198,,,0.42,0.027,0.32,0.121 +b1,0.8,4417.0,5.8160e-05,9.1110e-05,1.567,8.7860e-05,7.7040e-05,9.1729e-05,5.333,10.667,0.18,,,0.44,0.029,0.395,0.125 +b1,0.9,4622.0,7.9560e-05,1.2112e-04,1.522,8.5600e-05,1.0348e-04,1.2267e-04,6.2,12.4,0.186,,,0.438,0.027,0.454,0.155 +b1,1.0,4844.0,1.0575e-04,1.4678e-04,1.388,9.9440e-05,1.2312e-04,1.4772e-04,7.133,14.267,0.1926,5.6,11.1,0.428,0.031,0.415,0.136 +b1,1.1,5141.0,1.3722e-04,1.6015e-04,1.167,1.4099e-04,1.5433e-04,1.6121e-04,7.4,14.8,0.1816,,,0.452,0.023,0.45,0.142 +b1,1.2,5421.0,1.2513e-04,1.8382e-04,1.469,1.6113e-04,1.7297e-04,1.8447e-04,8.4,16.8,0.189,,,0.429,0.028,0.418,0.136 +b1,1.3,5596.0,1.2866e-04,1.8571e-04,1.443,1.5307e-04,1.8656e-04,1.8641e-04,9.267,18.6,0.1925,,,0.419,0.071,0.469,0.155 +b1,1.4,6092.0,1.8455e-04,2.2808e-04,1.236,2.0569e-04,2.1551e-04,2.2884e-04,9.8,21.133,0.189,,,0.446,0.024,0.452,0.155 +b1,1.5,6466.0,1.8077e-04,2.2950e-04,1.27,2.2734e-04,2.1123e-04,2.3127e-04,10.867,19.467,0.1956,8.0,16.1,0.453,0.026,0.476,0.157 +b1,1.6,6674.0,2.1274e-04,2.1048e-04,0.989,2.1198e-04,2.4975e-04,2.1170e-04,11.067,22.133,0.1867,,,0.43,0.115,0.469,0.17 +b1,1.7,7042.0,2.0997e-04,2.9202e-04,1.391,2.3061e-04,2.1879e-04,2.9232e-04,12.2,24.4,0.1938,,,0.401,0.032,0.417,0.129 +b1,1.8,7406.0,2.0695e-04,2.9568e-04,1.429,2.5932e-04,2.2785e-04,2.9773e-04,12.533,25.133,0.188,,,0.405,0.051,0.433,0.133 +b1,1.9,7946.0,2.4195e-04,3.0114e-04,1.245,2.8273e-04,2.8676e-04,3.0253e-04,12.267,27.133,0.1743,,,0.436,0.043,0.463,0.155 +b1,2.0,8272.0,2.4421e-04,3.6436e-04,1.492,3.0262e-04,2.7241e-04,3.6452e-04,15.067,30.2,0.2034,9.9,20.4,0.396,0.034,0.427,0.157 +b1,2.1,8760.0,2.8374e-04,3.0179e-04,1.064,3.1017e-04,4.0509e-04,3.0577e-04,13.667,28.133,0.1757,,,0.433,0.064,0.502,0.195 +b1,2.2,9143.0,2.9834e-04,2.9467e-04,0.988,3.1219e-04,3.8293e-04,2.9775e-04,14.0,27.933,0.1718,,,0.425,0.061,0.484,0.183 +b1,2.3,9539.0,2.7744e-04,3.4179e-04,1.232,3.3635e-04,3.3082e-04,3.4459e-04,16.133,32.267,0.1894,,,0.423,0.053,0.49,0.168 +b1,2.4,9981.0,3.0816e-04,3.4019e-04,1.104,3.7890e-04,4.7659e-04,3.4328e-04,15.6,32.067,0.1755,12.5,25.5,0.423,0.039,0.505,0.215 +and24b,0.3,4010.0,1.3090e-05,1.0432e-05,0.797,1.1330e-05,1.6120e-05,1.0603e-05,1.467,3.0,0.132,1.6,3.8,0.671,0.068,0.304,0.097 +and24b,0.4,4017.0,1.8130e-05,2.2822e-05,1.259,2.4420e-05,2.4680e-05,2.3700e-05,2.133,4.333,0.144,,,0.629,0.065,0.401,0.129 +and24b,0.5,4029.0,4.0290e-05,2.6969e-05,0.669,3.0210e-05,5.0610e-05,2.7808e-05,2.333,4.667,0.126,,,0.694,0.077,0.463,0.133 +and24b,0.6,4048.0,4.4320e-05,3.0147e-05,0.68,4.7080e-05,5.4380e-05,3.0634e-05,2.533,5.067,0.114,,,0.73,0.084,0.395,0.142 +and24b,0.7,4094.0,5.7660e-05,6.7629e-05,1.173,6.5210e-05,7.3770e-05,7.4047e-05,3.667,7.333,0.1414,,,0.633,0.078,0.32,0.121 +and24b,0.8,4146.0,5.8160e-05,7.4043e-05,1.273,8.7860e-05,7.7040e-05,7.9819e-05,3.867,7.733,0.1305,,,0.681,0.084,0.395,0.125 +and24b,0.9,4213.0,7.9560e-05,7.8777e-05,0.99,8.5600e-05,1.0348e-04,8.3179e-05,4.067,8.133,0.122,,,0.718,0.089,0.454,0.155 +and24b,1.0,4333.0,1.0575e-04,1.2923e-04,1.222,9.9440e-05,1.2312e-04,1.4341e-04,5.333,10.6,0.144,5.6,11.1,0.631,0.086,0.415,0.136 +and24b,1.1,4452.0,1.3722e-04,1.3572e-04,0.989,1.4099e-04,1.5433e-04,1.5234e-04,5.533,11.067,0.1358,,,0.668,0.089,0.45,0.142 +and24b,1.2,4586.0,1.2513e-04,1.4183e-04,1.133,1.6113e-04,1.7297e-04,1.5743e-04,5.733,11.467,0.129,,,0.699,0.092,0.418,0.136 +and24b,1.3,4737.0,1.2866e-04,1.4788e-04,1.149,1.5307e-04,1.8656e-04,1.6090e-04,6.0,12.0,0.1246,,,0.723,0.093,0.469,0.155 +and24b,1.4,4946.0,1.8455e-04,1.8077e-04,0.98,2.0569e-04,2.1551e-04,2.0274e-04,6.8,13.533,0.1311,,,0.697,0.093,0.452,0.155 +and24b,1.5,5164.0,1.8077e-04,2.1609e-04,1.195,2.2734e-04,2.1123e-04,2.3625e-04,7.6,15.8,0.1368,8.0,16.1,0.672,0.097,0.476,0.157 +and24b,1.6,5379.0,2.1274e-04,2.1984e-04,1.033,2.1198e-04,2.4975e-04,2.4512e-04,7.867,15.733,0.1327,,,0.691,0.101,0.469,0.17 +and24b,1.7,5605.0,2.0997e-04,1.9424e-04,0.925,2.3061e-04,2.1879e-04,2.0628e-04,8.2,16.933,0.1302,,,0.688,0.085,0.417,0.129 +and24b,1.8,5879.0,2.0695e-04,2.6359e-04,1.274,2.5932e-04,2.2785e-04,2.9328e-04,9.0,18.0,0.135,,,0.68,0.098,0.433,0.133 +and24b,1.9,6132.0,2.4195e-04,2.6145e-04,1.081,2.8273e-04,2.8676e-04,2.8067e-04,9.333,18.667,0.1326,,,0.658,0.083,0.463,0.155 +and24b,2.0,6380.0,2.4421e-04,2.2234e-04,0.91,3.0262e-04,2.7241e-04,2.4107e-04,9.6,19.867,0.1296,9.9,20.4,0.687,0.087,0.427,0.157 +and24b,2.1,6640.0,2.8374e-04,2.3506e-04,0.828,3.1017e-04,4.0509e-04,2.5299e-04,9.867,19.133,0.1269,,,0.696,0.088,0.502,0.195 +and24b,2.2,6912.0,2.9834e-04,2.7091e-04,0.908,3.1219e-04,3.8293e-04,3.0354e-04,10.133,20.267,0.1244,,,0.737,0.117,0.484,0.183 +and24b,2.3,7162.0,2.7744e-04,2.8247e-04,1.018,3.3635e-04,3.3082e-04,3.0757e-04,10.333,20.667,0.1213,,,0.746,0.097,0.49,0.168 +and24b,2.4,7535.0,3.0816e-04,2.5869e-04,0.839,3.7890e-04,4.7659e-04,2.8308e-04,11.4,23.533,0.1283,12.5,25.5,0.69,0.088,0.505,0.215 +uls19,0.3,4009.0,1.3090e-05,8.3712e-06,0.64,1.1330e-05,1.6120e-05,1.7166e-05,1.467,2.933,0.132,1.6,3.8,0.478,0.112,0.304,0.097 +uls19,0.4,4015.0,1.8130e-05,1.9791e-05,1.092,2.4420e-05,2.4680e-05,3.4424e-05,2.067,4.2,0.1395,,,0.485,0.125,0.401,0.129 +uls19,0.5,4028.0,4.0290e-05,3.3296e-05,0.826,3.0210e-05,5.0610e-05,5.2598e-05,2.8,5.6,0.1512,,,0.441,0.15,0.463,0.133 +uls19,0.6,4040.0,4.4320e-05,4.8202e-05,1.088,4.7080e-05,5.4380e-05,6.8038e-05,3.267,6.6,0.147,,,0.411,0.135,0.395,0.142 +uls19,0.7,4076.0,5.7660e-05,7.2993e-05,1.266,6.5210e-05,7.3770e-05,8.5309e-05,4.0,8.067,0.1543,,,0.463,0.129,0.32,0.121 +uls19,0.8,4108.0,5.8160e-05,7.7277e-05,1.329,8.7860e-05,7.7040e-05,9.7530e-05,4.267,8.4,0.144,,,0.459,0.138,0.395,0.125 +uls19,0.9,4172.0,7.9560e-05,8.8428e-05,1.111,8.5600e-05,1.0348e-04,1.2294e-04,4.933,9.867,0.148,,,0.416,0.154,0.454,0.155 +uls19,1.0,4245.0,1.0575e-04,8.9501e-05,0.846,9.9440e-05,1.2312e-04,1.2063e-04,5.8,11.6,0.1566,5.6,11.1,0.436,0.146,0.415,0.136 +uls19,1.1,4400.0,1.3722e-04,1.2085e-04,0.881,1.4099e-04,1.5433e-04,1.4924e-04,6.0,12.067,0.1473,,,0.508,0.145,0.45,0.142 +uls19,1.2,4500.0,1.2513e-04,1.3512e-04,1.08,1.6113e-04,1.7297e-04,1.6277e-04,6.667,13.267,0.15,,,0.496,0.143,0.418,0.136 +uls19,1.3,4627.0,1.2866e-04,1.4679e-04,1.141,1.5307e-04,1.8656e-04,1.7849e-04,6.867,13.733,0.1426,,,0.491,0.153,0.469,0.155 +uls19,1.4,4745.0,1.8455e-04,1.5619e-04,0.846,2.0569e-04,2.1551e-04,1.9707e-04,7.667,15.2,0.1479,,,0.428,0.154,0.452,0.155 +uls19,1.5,4913.0,1.8077e-04,1.5773e-04,0.873,2.2734e-04,2.1123e-04,1.9682e-04,8.0,16.0,0.144,8.0,16.1,0.474,0.154,0.476,0.157 +uls19,1.6,5115.0,2.1274e-04,1.8737e-04,0.881,2.1198e-04,2.4975e-04,2.1864e-04,8.733,17.2,0.1474,,,0.485,0.143,0.469,0.17 +uls19,1.7,5201.0,2.0997e-04,2.2019e-04,1.049,2.3061e-04,2.1879e-04,2.5745e-04,9.533,18.267,0.1514,,,0.443,0.151,0.417,0.129 +uls19,1.8,5524.0,2.0695e-04,1.9884e-04,0.961,2.5932e-04,2.2785e-04,2.5341e-04,9.4,18.733,0.141,,,0.478,0.156,0.433,0.133 +uls19,1.9,5627.0,2.4195e-04,2.1028e-04,0.869,2.8273e-04,2.8676e-04,2.4640e-04,10.2,19.933,0.1449,,,0.446,0.155,0.463,0.155 +uls19,2.0,5920.0,2.4421e-04,2.1808e-04,0.893,3.0262e-04,2.7241e-04,2.6849e-04,11.0,22.0,0.1485,9.9,20.4,0.453,0.155,0.427,0.157 +uls19,2.1,6153.0,2.8374e-04,2.5197e-04,0.888,3.1017e-04,4.0509e-04,3.0815e-04,10.867,22.067,0.1397,,,0.461,0.17,0.502,0.195 +uls19,2.2,6461.0,2.9834e-04,2.2824e-04,0.765,3.1219e-04,3.8293e-04,2.7473e-04,11.8,24.133,0.1448,,,0.46,0.149,0.484,0.183 +uls19,2.3,6591.0,2.7744e-04,2.5879e-04,0.933,3.3635e-04,3.3082e-04,2.9310e-04,12.333,24.0,0.1448,,,0.463,0.151,0.49,0.168 +uls19,2.4,6948.0,3.0816e-04,2.5200e-04,0.818,3.7890e-04,4.7659e-04,3.1634e-04,12.933,25.067,0.1455,12.5,25.5,0.461,0.149,0.505,0.215 +th16,0.3,4009.0,1.3090e-05,1.2219e-05,0.933,1.1330e-05,1.6120e-05,1.2590e-05,2.067,1.533,0.186,1.6,3.8,0.353,0.069,0.304,0.097 +th16,0.4,4013.0,1.8130e-05,2.2056e-05,1.217,2.4420e-05,2.4680e-05,2.2236e-05,2.8,2.2,0.189,,,0.365,0.081,0.401,0.129 +th16,0.5,4021.0,4.0290e-05,3.6601e-05,0.908,3.0210e-05,5.0610e-05,3.6911e-05,3.533,2.933,0.1908,,,0.362,0.089,0.463,0.133 +th16,0.6,4037.0,4.4320e-05,5.9852e-05,1.35,4.7080e-05,5.4380e-05,6.0772e-05,4.267,8.467,0.192,,,0.374,0.055,0.395,0.142 +th16,0.7,4062.0,5.7660e-05,8.1696e-05,1.417,6.5210e-05,7.3770e-05,8.2243e-05,5.0,10.6,0.1929,,,0.379,0.055,0.32,0.121 +th16,0.8,4102.0,5.8160e-05,1.0811e-04,1.859,8.7860e-05,7.7040e-05,1.0871e-04,5.733,11.533,0.1935,,,0.379,0.063,0.395,0.125 +th16,0.9,4154.0,7.9560e-05,1.3436e-04,1.689,8.5600e-05,1.0348e-04,1.3505e-04,6.533,13.8,0.196,,,0.395,0.061,0.454,0.155 +th16,1.0,4224.0,1.0575e-04,1.6547e-04,1.565,9.9440e-05,1.2312e-04,1.6613e-04,7.333,6.733,0.198,5.6,11.1,0.389,0.09,0.415,0.136 +th16,1.1,4306.0,1.3722e-04,1.5672e-04,1.142,1.4099e-04,1.5433e-04,1.5737e-04,8.2,8.867,0.2013,,,0.389,0.101,0.45,0.142 +th16,1.2,4411.0,1.2513e-04,2.2072e-04,1.764,1.6113e-04,1.7297e-04,2.2197e-04,9.067,8.4,0.204,,,0.385,0.09,0.418,0.136 +th16,1.3,4523.0,1.2866e-04,2.3862e-04,1.855,1.5307e-04,1.8656e-04,2.3973e-04,10.0,17.733,0.2077,,,0.387,0.068,0.469,0.155 +th16,1.4,4645.0,1.8455e-04,2.4232e-04,1.313,2.0569e-04,2.1551e-04,2.4381e-04,10.933,10.267,0.2109,,,0.393,0.087,0.452,0.155 +th16,1.5,4778.0,1.8077e-04,2.4964e-04,1.381,2.2734e-04,2.1123e-04,2.5145e-04,11.133,10.533,0.2004,8.0,16.1,0.401,0.088,0.476,0.157 +th16,1.6,4937.0,2.1274e-04,2.9708e-04,1.396,2.1198e-04,2.4975e-04,2.9944e-04,11.467,10.8,0.1935,,,0.396,0.078,0.469,0.17 +th16,1.7,5085.0,2.0997e-04,2.3109e-04,1.101,2.3061e-04,2.1879e-04,2.3492e-04,11.533,22.133,0.1832,,,0.407,0.048,0.417,0.129 +th16,1.8,5282.0,2.0695e-04,2.9345e-04,1.418,2.5932e-04,2.2785e-04,2.9727e-04,12.733,22.667,0.191,,,0.406,0.055,0.433,0.133 +th16,1.9,5464.0,2.4195e-04,3.0898e-04,1.277,2.8273e-04,2.8676e-04,3.1913e-04,11.8,23.267,0.1677,,,0.406,0.053,0.463,0.155 +th16,2.0,5662.0,2.4421e-04,3.7359e-04,1.53,3.0262e-04,2.7241e-04,3.7618e-04,14.8,28.067,0.1998,9.9,20.4,0.401,0.047,0.427,0.157 +th16,2.1,5881.0,2.8374e-04,3.9839e-04,1.404,3.1017e-04,4.0509e-04,4.0433e-04,14.267,26.533,0.1834,,,0.404,0.048,0.502,0.195 +th16,2.2,6087.0,2.9834e-04,4.2156e-04,1.413,3.1219e-04,3.8293e-04,4.2378e-04,16.467,23.933,0.2021,,,0.399,0.052,0.484,0.183 +th16,2.3,6310.0,2.7744e-04,3.2597e-04,1.175,3.3635e-04,3.3082e-04,3.3143e-04,15.667,28.067,0.1839,,,0.406,0.044,0.49,0.168 +th16,2.4,6532.0,3.0816e-04,4.3928e-04,1.425,3.7890e-04,4.7659e-04,4.4402e-04,15.933,28.733,0.1793,12.5,25.5,0.404,0.043,0.505,0.215 +th16c,0.3,4008.0,1.3090e-05,1.0334e-05,0.789,1.1330e-05,1.6120e-05,1.0419e-05,2.067,4.2,0.186,1.6,3.8,0.264,0.013,0.304,0.097 +th16c,0.4,4011.0,1.8130e-05,1.4470e-05,0.798,2.4420e-05,2.4680e-05,1.4527e-05,2.267,4.533,0.153,,,0.287,0.017,0.401,0.129 +th16c,0.5,4018.0,4.0290e-05,2.4439e-05,0.607,3.0210e-05,5.0610e-05,2.4754e-05,2.933,5.933,0.1584,,,0.287,0.02,0.463,0.133 +th16c,0.6,4033.0,4.4320e-05,4.5026e-05,1.016,4.7080e-05,5.4380e-05,4.5679e-05,4.2,8.4,0.189,,,0.267,0.021,0.395,0.142 +th16c,0.7,4054.0,5.7660e-05,5.0420e-05,0.874,6.5210e-05,7.3770e-05,5.1733e-05,4.333,8.733,0.1671,,,0.287,0.023,0.32,0.121 +th16c,0.8,4082.0,5.8160e-05,5.4421e-05,0.936,8.7860e-05,7.7040e-05,5.5668e-05,4.533,9.0,0.153,,,0.303,0.024,0.395,0.125 +th16c,0.9,4135.0,7.9560e-05,8.4309e-05,1.06,8.5600e-05,1.0348e-04,8.5278e-05,5.867,11.667,0.176,,,0.287,0.026,0.454,0.155 +th16c,1.0,4191.0,1.0575e-04,8.8393e-05,0.836,9.9440e-05,1.2312e-04,9.0370e-05,6.0,11.933,0.162,5.6,11.1,0.303,0.027,0.415,0.136 +th16c,1.1,4259.0,1.3722e-04,9.3237e-05,0.679,1.4099e-04,1.5433e-04,9.5519e-05,6.2,12.4,0.1522,,,0.315,0.027,0.45,0.142 +th16c,1.2,4374.0,1.2513e-04,1.3112e-04,1.048,1.6113e-04,1.7297e-04,1.3172e-04,7.6,15.2,0.171,,,0.304,0.031,0.418,0.136 +th16c,1.3,4472.0,1.2866e-04,1.2934e-04,1.005,1.5307e-04,1.8656e-04,1.3116e-04,7.6,15.267,0.1578,,,0.319,0.031,0.469,0.155 +th16c,1.4,4579.0,1.8455e-04,1.2877e-04,0.698,2.0569e-04,2.1551e-04,1.3072e-04,7.933,15.533,0.153,,,0.326,0.029,0.452,0.155 +th16c,1.5,4705.0,1.8077e-04,1.3425e-04,0.743,2.2734e-04,2.1123e-04,1.3702e-04,8.0,16.0,0.144,8.0,16.1,0.332,0.027,0.476,0.157 +th16c,1.6,4836.0,2.1274e-04,1.1102e-04,0.522,2.1198e-04,2.4975e-04,1.1214e-04,9.267,18.533,0.1564,,,0.31,0.023,0.469,0.17 +th16c,1.7,5060.0,2.0997e-04,1.7737e-04,0.845,2.3061e-04,2.1879e-04,1.7807e-04,10.067,20.0,0.1599,,,0.323,0.032,0.417,0.129 +th16c,1.8,5177.0,2.0695e-04,1.3123e-04,0.634,2.5932e-04,2.2785e-04,1.3242e-04,9.333,18.667,0.14,,,0.311,0.025,0.433,0.133 +th16c,1.9,5347.0,2.4195e-04,1.7120e-04,0.708,2.8273e-04,2.8676e-04,1.7281e-04,9.933,19.933,0.1412,,,0.318,0.024,0.463,0.155 +th16c,2.0,5552.0,2.4421e-04,1.7717e-04,0.726,3.0262e-04,2.7241e-04,1.7967e-04,10.133,20.267,0.1368,9.9,20.4,0.345,0.037,0.427,0.157 +th16c,2.1,5711.0,2.8374e-04,2.0150e-04,0.71,3.1017e-04,4.0509e-04,2.0464e-04,10.533,21.067,0.1354,,,0.319,0.023,0.502,0.195 +th16c,2.2,5959.0,2.9834e-04,1.5342e-04,0.514,3.1219e-04,3.8293e-04,1.5567e-04,12.2,22.2,0.1497,,,0.317,0.025,0.484,0.183 +th16c,2.3,6168.0,2.7744e-04,1.5234e-04,0.549,3.3635e-04,3.3082e-04,1.5523e-04,11.867,23.267,0.1393,,,0.319,0.025,0.49,0.168 +th16c,2.4,6411.0,3.0816e-04,1.7044e-04,0.553,3.7890e-04,4.7659e-04,1.7355e-04,12.267,25.267,0.138,12.5,25.5,0.317,0.027,0.505,0.215 diff --git a/validation/experiments/ndp_riser/summary.json b/validation/experiments/ndp_riser/summary.json new file mode 100644 index 00000000..1004a9e8 --- /dev/null +++ b/validation/experiments/ndp_riser/summary.json @@ -0,0 +1,262 @@ +{ + "segments": 200, + "dt_s": 0.001, + "tmax_s": 25.0, + "statistics_after_s": 10.0, + "tension0_N": 4000.0, + "rig_spring_N_per_m": 3500.0, + "effective_axial_stiffness_N": 130874.7, + "per_set": { + "b1": { + "label": "generic set (Delta Flume case)", + "fitted_to": "no", + "speeds": [ + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.8, + 0.9, + 1.0, + 1.1, + 1.2, + 1.3, + 1.4, + 1.5, + 1.6, + 1.7, + 1.8, + 1.9, + 2.0, + 2.1, + 2.2, + 2.3, + 2.4 + ], + "strain_fund_ratio_median": 1.2571062159593067, + "strain_fund_ratio_range": [ + 0.9877067373166128, + 1.5665480591009866 + ], + "strain_fund_rms_log_error": 0.2766299415215297, + "strain_fund_rms_log_error_U_ge_0p5": 0.27737960253468885, + "thorsen2016_sim_rms_log_error_same_speeds": 0.18701650558341884, + "thorsen2016_sim_rms_log_error_U_ge_0p5": 0.1816450776805147, + "strain_total_ratio_median": 1.0584269733357312, + "strain_total_rms_log_error": 0.1766799559913615, + "fD_U_cf_mean_at_fig18_speeds": 0.19182000000000002, + "fD_U_cf_measured_mean_at_fig18_speeds": 0.14269500000000002, + "fD_U_cf_mean_all_speeds": 0.18685691678791969, + "sigma_D_cf_mean": 0.4290083586999797, + "sigma_D_cf_measured_mean": 0.4364545454545455, + "sigma_D_il_mean": 0.04052171870161913, + "sigma_D_il_measured_mean": 0.14945454545454542, + "mean_tension_N_range": [ + 4017, + 9981 + ] + }, + "and24b": { + "label": "Andersen et al. (2024b), Table 3, cross-flow average", + "fitted_to": "sheared-flow tests of this riser", + "speeds": [ + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.8, + 0.9, + 1.0, + 1.1, + 1.2, + 1.3, + 1.4, + 1.5, + 1.6, + 1.7, + 1.8, + 1.9, + 2.0, + 2.1, + 2.2, + 2.3, + 2.4 + ], + "strain_fund_ratio_median": 1.0041362120271444, + "strain_fund_ratio_range": [ + 0.669381360004605, + 1.273674211040034 + ], + "strain_fund_rms_log_error": 0.18607649659184072, + "strain_fund_rms_log_error_U_ge_0p5": 0.1812834271827885, + "thorsen2016_sim_rms_log_error_same_speeds": 0.18701650558341884, + "thorsen2016_sim_rms_log_error_U_ge_0p5": 0.1816450776805147, + "strain_total_ratio_median": 0.935238467733235, + "strain_total_rms_log_error": 0.27133630525808555, + "fD_U_cf_mean_at_fig18_speeds": 0.13413, + "fD_U_cf_measured_mean_at_fig18_speeds": 0.14269500000000002, + "fD_U_cf_mean_all_speeds": 0.13055895432349438, + "sigma_D_cf_mean": 0.6872850455513722, + "sigma_D_cf_measured_mean": 0.4364545454545455, + "sigma_D_il_mean": 0.08815225700625753, + "sigma_D_il_measured_mean": 0.14945454545454542, + "mean_tension_N_range": [ + 4010, + 7535 + ] + }, + "uls19": { + "label": "Ulveseter et al. (2019), Table 1, Chh 1.5", + "fitted_to": "these uniform-flow tests", + "speeds": [ + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.8, + 0.9, + 1.0, + 1.1, + 1.2, + 1.3, + 1.4, + 1.5, + 1.6, + 1.7, + 1.8, + 1.9, + 2.0, + 2.1, + 2.2, + 2.3, + 2.4 + ], + "strain_fund_ratio_median": 0.890509603830604, + "strain_fund_ratio_range": [ + 0.6395097067278822, + 1.3286994362951445 + ], + "strain_fund_rms_log_error": 0.17784402916844322, + "strain_fund_rms_log_error_U_ge_0p5": 0.15625104689068844, + "thorsen2016_sim_rms_log_error_same_speeds": 0.18701650558341884, + "thorsen2016_sim_rms_log_error_U_ge_0p5": 0.1816450776805147, + "strain_total_ratio_median": 0.9734055771641398, + "strain_total_rms_log_error": 0.18332706785625352, + "fD_U_cf_mean_at_fig18_speeds": 0.14531999999999998, + "fD_U_cf_measured_mean_at_fig18_speeds": 0.14269500000000002, + "fD_U_cf_mean_all_speeds": 0.14601728083572835, + "sigma_D_cf_mean": 0.4606471786934472, + "sigma_D_cf_measured_mean": 0.4364545454545455, + "sigma_D_il_mean": 0.14625252681604584, + "sigma_D_il_measured_mean": 0.14945454545454542, + "mean_tension_N_range": [ + 4009, + 6948 + ] + }, + "th16": { + "label": "Thorsen et al. (2016), Fig. 7 and Eq. 1", + "fitted_to": "these uniform and sheared-flow tests", + "speeds": [ + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.8, + 0.9, + 1.0, + 1.1, + 1.2, + 1.3, + 1.4, + 1.5, + 1.6, + 1.7, + 1.8, + 1.9, + 2.0, + 2.1, + 2.2, + 2.3, + 2.4 + ], + "strain_fund_ratio_median": 1.4002450719245019, + "strain_fund_ratio_range": [ + 0.9084299248668841, + 1.8588629520718365 + ], + "strain_fund_rms_log_error": 0.362608870706913, + "strain_fund_rms_log_error_U_ge_0p5": 0.3774587442086474, + "thorsen2016_sim_rms_log_error_same_speeds": 0.18701650558341884, + "thorsen2016_sim_rms_log_error_U_ge_0p5": 0.1816450776805147, + "strain_total_ratio_median": 1.1162060812212764, + "strain_total_rms_log_error": 0.20064970064034177, + "fD_U_cf_mean_at_fig18_speeds": 0.19269, + "fD_U_cf_measured_mean_at_fig18_speeds": 0.14269500000000002, + "fD_U_cf_mean_all_speeds": 0.19301011480870967, + "sigma_D_cf_mean": 0.3900255003761697, + "sigma_D_cf_measured_mean": 0.4364545454545455, + "sigma_D_il_mean": 0.06650981202584938, + "sigma_D_il_measured_mean": 0.14945454545454542, + "mean_tension_N_range": [ + 4009, + 6532 + ] + }, + "th16c": { + "label": "th16 with Morison's linear cross-flow damping kept (variant)", + "fitted_to": "variant of th16", + "speeds": [ + 0.3, + 0.4, + 0.5, + 0.6, + 0.7, + 0.8, + 0.9, + 1.0, + 1.1, + 1.2, + 1.3, + 1.4, + 1.5, + 1.6, + 1.7, + 1.8, + 1.9, + 2.0, + 2.1, + 2.2, + 2.3, + 2.4 + ], + "strain_fund_ratio_median": 0.7340841919585173, + "strain_fund_ratio_range": [ + 0.5142482769213371, + 1.0596904536917338 + ], + "strain_fund_rms_log_error": 0.3652774038700901, + "strain_fund_rms_log_error_U_ge_0p5": 0.3760778263719995, + "thorsen2016_sim_rms_log_error_same_speeds": 0.18701650558341884, + "thorsen2016_sim_rms_log_error_U_ge_0p5": 0.1816450776805147, + "strain_total_ratio_median": 0.6326367996919098, + "strain_total_rms_log_error": 0.5444253236443083, + "fD_U_cf_mean_at_fig18_speeds": 0.15336, + "fD_U_cf_measured_mean_at_fig18_speeds": 0.14269500000000002, + "fD_U_cf_mean_all_speeds": 0.15542028494685356, + "sigma_D_cf_mean": 0.30719622989869017, + "sigma_D_cf_measured_mean": 0.4364545454545455, + "sigma_D_il_mean": 0.02540983564316691, + "sigma_D_il_measured_mean": 0.14945454545454542, + "mean_tension_N_range": [ + 4008, + 6411 + ] + } + }, + "executable_sha256": "6dd528518f28d78a7c9d19319939f2ce8d0590ca0103fb67c389d92ab0c20b0c" +} diff --git a/validation/experiments/ndp_riser/thorsen2016_fig7_cv.csv b/validation/experiments/ndp_riser/thorsen2016_fig7_cv.csv new file mode 100644 index 00000000..86527bbb --- /dev/null +++ b/validation/experiments/ndp_riser/thorsen2016_fig7_cv.csv @@ -0,0 +1,22 @@ +y0_over_D,Cv +0.00,0.3522 +0.05,0.4835 +0.10,0.5993 +0.15,0.7012 +0.20,0.7877 +0.25,0.8597 +0.30,0.9174 +0.35,0.9591 +0.40,0.9872 +0.45,1.0008 +0.50,0.9762 +0.55,0.8233 +0.60,0.5315 +0.65,0.1019 +0.70,0.0000 +0.75,0.0000 +0.80,0.0000 +0.85,0.0000 +0.90,0.0000 +0.95,0.0000 +1.00,0.0000 diff --git a/validation/experiments/ndp_riser/thorsen2016_fig8_strain.csv b/validation/experiments/ndp_riser/thorsen2016_fig8_strain.csv new file mode 100644 index 00000000..6defc21a --- /dev/null +++ b/validation/experiments/ndp_riser/thorsen2016_fig8_strain.csv @@ -0,0 +1,133 @@ +panel,series,U,strain_1e-4 +uniform,exp_fundamental,0.299,0.1309 +uniform,exp_fundamental,0.399,0.1813 +uniform,exp_fundamental,0.499,0.4029 +uniform,exp_fundamental,0.599,0.4432 +uniform,exp_fundamental,0.699,0.5766 +uniform,exp_fundamental,0.799,0.5816 +uniform,exp_fundamental,0.899,0.7956 +uniform,exp_fundamental,0.999,1.0575 +uniform,exp_fundamental,1.099,1.3722 +uniform,exp_fundamental,1.199,1.2513 +uniform,exp_fundamental,1.299,1.2866 +uniform,exp_fundamental,1.399,1.8455 +uniform,exp_fundamental,1.499,1.8077 +uniform,exp_fundamental,1.599,2.1274 +uniform,exp_fundamental,1.699,2.0997 +uniform,exp_fundamental,1.799,2.0695 +uniform,exp_fundamental,1.899,2.4195 +uniform,exp_fundamental,1.999,2.4421 +uniform,exp_fundamental,2.099,2.8374 +uniform,exp_fundamental,2.2,2.9834 +uniform,exp_fundamental,2.299,2.7744 +uniform,exp_fundamental,2.399,3.0816 +uniform,sim,0.3,0.1133 +uniform,sim,0.4,0.2442 +uniform,sim,0.5,0.3021 +uniform,sim,0.6,0.4708 +uniform,sim,0.7,0.6521 +uniform,sim,0.8,0.8786 +uniform,sim,0.9,0.856 +uniform,sim,1.0,0.9944 +uniform,sim,1.1,1.4099 +uniform,sim,1.2,1.6113 +uniform,sim,1.3,1.5307 +uniform,sim,1.4,2.0569 +uniform,sim,1.5,2.2734 +uniform,sim,1.6,2.1198 +uniform,sim,1.7,2.3061 +uniform,sim,1.8,2.5932 +uniform,sim,1.9,2.8273 +uniform,sim,2.0,3.0262 +uniform,sim,2.1,3.1017 +uniform,sim,2.2,3.1219 +uniform,sim,2.3,3.3635 +uniform,sim,2.4,3.789 +uniform,exp_total,0.299,0.1612 +uniform,exp_total,0.399,0.2468 +uniform,exp_total,0.499,0.5061 +uniform,exp_total,0.599,0.5438 +uniform,exp_total,0.699,0.7377 +uniform,exp_total,0.799,0.7704 +uniform,exp_total,0.899,1.0348 +uniform,exp_total,0.999,1.2312 +uniform,exp_total,1.099,1.5433 +uniform,exp_total,1.199,1.7297 +uniform,exp_total,1.299,1.8656 +uniform,exp_total,1.399,2.1551 +uniform,exp_total,1.499,2.1123 +uniform,exp_total,1.599,2.4975 +uniform,exp_total,1.699,2.1879 +uniform,exp_total,1.799,2.2785 +uniform,exp_total,1.899,2.8676 +uniform,exp_total,1.999,2.7241 +uniform,exp_total,2.099,4.0509 +uniform,exp_total,2.2,3.8293 +uniform,exp_total,2.299,3.3082 +uniform,exp_total,2.399,4.7659 +sheared,exp_fundamental,0.299,0.1117 +sheared,exp_fundamental,0.399,0.1117 +sheared,exp_fundamental,0.499,0.1522 +sheared,exp_fundamental,0.599,0.228 +sheared,exp_fundamental,0.699,0.3884 +sheared,exp_fundamental,0.799,0.3602 +sheared,exp_fundamental,0.899,0.5329 +sheared,exp_fundamental,0.999,0.5876 +sheared,exp_fundamental,1.099,0.7056 +sheared,exp_fundamental,1.199,0.8237 +sheared,exp_fundamental,1.299,1.0845 +sheared,exp_fundamental,1.399,1.3207 +sheared,exp_fundamental,1.499,1.6309 +sheared,exp_fundamental,1.599,1.5533 +sheared,exp_fundamental,1.699,1.9075 +sheared,exp_fundamental,1.799,1.9516 +sheared,exp_fundamental,1.899,2.0626 +sheared,exp_fundamental,1.999,1.8212 +sheared,exp_fundamental,2.099,2.646 +sheared,exp_fundamental,2.2,2.1702 +sheared,exp_fundamental,2.299,2.5931 +sheared,exp_fundamental,2.399,2.5667 +sheared,sim,0.3,0.05 +sheared,sim,0.4,0.1029 +sheared,sim,0.5,0.1752 +sheared,sim,0.6,0.2069 +sheared,sim,0.7,0.3056 +sheared,sim,0.8,0.4184 +sheared,sim,0.9,0.4712 +sheared,sim,1.0,0.6034 +sheared,sim,1.1,0.7655 +sheared,sim,1.2,0.8272 +sheared,sim,1.3,0.9999 +sheared,sim,1.4,1.1744 +sheared,sim,1.5,1.3594 +sheared,sim,1.6,1.4529 +sheared,sim,1.7,1.6467 +sheared,sim,1.8,1.7507 +sheared,sim,1.9,1.904 +sheared,sim,2.0,2.0415 +sheared,sim,2.1,2.1948 +sheared,sim,2.2,2.3746 +sheared,sim,2.3,2.4944 +sheared,sim,2.4,2.646 +sheared,exp_total,0.299,0.1152 +sheared,exp_total,0.399,0.1135 +sheared,exp_total,0.499,0.1699 +sheared,exp_total,0.599,0.2844 +sheared,exp_total,0.699,0.4342 +sheared,exp_total,0.799,0.4113 +sheared,exp_total,0.899,0.577 +sheared,exp_total,0.999,0.6263 +sheared,exp_total,1.099,0.7514 +sheared,exp_total,1.199,0.8801 +sheared,exp_total,1.299,1.1568 +sheared,exp_total,1.399,1.3753 +sheared,exp_total,1.499,1.6802 +sheared,exp_total,1.599,1.5974 +sheared,exp_total,1.699,2.2723 +sheared,exp_total,1.799,2.0098 +sheared,exp_total,1.899,2.0996 +sheared,exp_total,1.999,1.9868 +sheared,exp_total,2.099,3.1412 +sheared,exp_total,2.2,2.2177 +sheared,exp_total,2.299,2.6495 +sheared,exp_total,2.399,2.6354 From 3d779fb44c24551c9fd8e9bbffe15f8f2d9be6b6 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Tue, 17 Nov 2026 00:32:04 +0900 Subject: [PATCH 30/47] test: long-run VIV checks; one OpenMP thread per batch job; load-power and bending-damping speed-ups (#173) viv_long_run runs the synchronisation model for 400 cycles. Prescribed motion: every node of a finite-EI cable moves across a 0.3 m/s flow as a rigid body, so the shedding phase obeys Adler's equation, d psi/dt = a - b sin(psi), solved in closed form. Outside the band (5.5 rad/s) the error grows linearly in time (T/(T/2) 2.014 and 1.988 at 50 and 100 steps per cycle) and is second order (4.01 from 50 to 100 steps): 0.0167 rad after 400 cycles at 100 steps per cycle. Inside the band the lag holds within 3.0e-5 rad of psi*, the averaging-ripple floor, and the mean rate is the motion's within 5.8e-12. Lock-in, finite-EI and EI = 0 (taut 20 m line, rho_inf = 1, no added mass, 100 and 200 steps per cycle): the load powers close E(t) - E(0) to 2.0e-4 / 1.8e-4 of the VIV work, second order (3.98 / 3.67) and stationary (T against T/2 1.00). On the mid-point phase update of #171 the lift takes the phase predicted from the previous step's mid-point rate, half a step behind, so the bound is 3e-4. The halves agree in RMS A/D within 7.3e-4, VIV power within 1.8e-3 and lock-in frequency within 1.9e-4; the frequency changes by 1.6e-4 / 1.9e-4 from 100 to 200 steps per cycle. Every tolerance and its measured value is in the test header. 57 s Release; label slow, TIMEOUT 1200. run_study with jobs > 1 runs every case with OMP_NUM_THREADS=1 unless the environment sets it, and study.json records omp_num_threads. On a 24-core workstation (gfortran Release) 96 finite-EI VIV cases scale 13.3x at 24 jobs and 15.1x at 48; on the 1024-element lazy-wave example 24 jobs take 16.7 s with one thread each, 17.9 s with four and 19.1 s with the OpenMP default. The Python manual gives the table and the recommended settings. Speed-ups, outputs bit-identical: - a row evaluates a line's node powers once for all its power channels (VIVPow, DragPow, DampPow; 19 % of a VIV run) on the Hermite, EI = 0 and system routes; any failure still goes through the channel-at-a-time path. viv_taut_cable_inline.dat 2.39 s to 2.14 s; - the bending damping force no longer computes the second derivatives of the curvature, which only the position Jacobian uses (32 % of the Delta Flume case 9 run): 73.2 s to 58.6 s. load_power_deck P6 checks that a power channel read alone equals the same channel among its line's other power channels, on all three routes. Checked: 431/431 tests on the default and the Prescott OpenBLAS kernel; the 134 example and test-data decks bit-identical to the reference build; the NDP validation runs of #172 reproduce their committed rows. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 27 ++ CMakeLists.txt | 9 + VALIDATION.md | 1 + doc/cli.rst | 4 +- doc/python.rst | 65 +++++ python/cabledyn/study.py | 35 ++- python/tests/test_study.py | 36 +++ src/CableDyn_DeckDriver.f90 | 94 ++++++- src/CableDyn_HermiteCable.f90 | 70 ++--- tests/test_load_power_deck.f90 | 32 ++- tests/test_viv_long_run.f90 | 471 +++++++++++++++++++++++++++++++++ 11 files changed, 799 insertions(+), 45 deletions(-) create mode 100644 tests/test_viv_long_run.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bf2c0bd..39dbcb62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -152,6 +152,33 @@ All notable changes to CableDyn are recorded in this file. The format follows and checkpoint state; `Tf` 0 or no row leaves runs unchanged to the bit. A VIV FRAME row now needs LINE TYPES `Cl > 0` or a WAKE OSCILLATOR row; the Python deck reader and builder follow. +- A long-run check of the VIV synchronisation model (`viv_long_run`, 400 cycles). With every node + of a finite-EI cable moved across the flow, the shedding phase follows the closed-form solution + of its equation (Adler's) with an error that grows linearly in time and falls fourfold per + halving of the step: 0.017 rad after 400 cycles at 100 steps per cycle; inside the + synchronisation band the phase lag holds to 3e-5 rad. On a taut line locked in, finite-EI and + `EI = 0`, the load powers close the line's energy balance to 2e-4 of the VIV work at second + order, and the response amplitude, VIV power and lock-in frequency of the run's two halves agree + within 0.18 %. + +### Changed + +- `run_study` (and `cabledyn-study`) with `jobs > 1` runs every case with `OMP_NUM_THREADS=1` + unless the environment sets it, and `study.json` records the value (`omp_num_threads`). Many + processes that each start an OpenMP team oversubscribed the cores: 24 lazy-wave runs at 24 jobs + took 19.1 s with the OpenMP default and 16.7 s with one thread each. The Python manual gives the + measured batch scaling (13.3 times faster at 24 jobs on a 24-core workstation, 15.1 at 48). +- The load power channels (`VIVPow`, `DragPow`, `DampPow` and their per-length forms) of a line + evaluate its node powers once per output row instead of once per channel, on finite-EI cables, + `EI = 0` lines and line systems. Outputs are unchanged to the bit; with the three line totals + the VIV examples run about 11 % faster (`viv_taut_cable_inline.dat` 2.39 s to 2.14 s; the same + line with 200 elements at 100 steps per cycle 18.1 s to 16.1 s). +- The bending damping of a finite-EI cable (`EI|Bb`, `EI|-zeta|f`) evaluates the second + derivatives of the curvature only where the position Jacobian needs them, not in every residual + evaluation. Results are unchanged to the bit; the Delta Flume case 9 deck of + `validation/experiments/delta_flume` (64 elements, 80 000 steps) runs in 58.6 s instead of + 73.2 s. + ### Fixed - The statics of a finite-EI line through the free surface could fail at isolated currents: diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d853fd8..f07b54ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1430,6 +1430,15 @@ target_link_libraries(test_hermite_load_power PRIVATE cabledyn_core) add_test(NAME hermite_load_power COMMAND test_hermite_load_power) set_tests_properties(hermite_load_power PROPERTIES LABELS "fortran;dynamic;viv") +# Long VIV runs (400 cycles at 100 and 200 steps per cycle): the shedding phase under prescribed +# motion against Adler's closed form (linear error growth, second order), and a locked-in taut +# line of both kinds (energy closure of the load powers, stationary statistics and frequency). +# About 26 s in Release and 160 s in Debug locally. +add_executable(test_viv_long_run tests/test_viv_long_run.f90) +target_link_libraries(test_viv_long_run PRIVATE cabledyn_core) +add_test(NAME viv_long_run COMMAND test_viv_long_run) +set_tests_properties(viv_long_run PROPERTIES LABELS "fortran;dynamic;viv;slow" TIMEOUT 1200) + add_executable(test_load_power_deck tests/test_load_power_deck.f90) target_link_libraries(test_load_power_deck PRIVATE cabledyn_core) add_test(NAME load_power_deck COMMAND test_load_power_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/VALIDATION.md b/VALIDATION.md index 3b523dae..4f68327c 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -65,6 +65,7 @@ article's methods, are compared in | **L2-VIV** | Cross-flow VIV lock-in of a taut 100 m line, U = 0.06–0.42 m/s | MoorDyn-C v2.7.2 (RK2, `dtM` 5e-4 s) and MoorDyn-F (OpenFAST v5 `moordyn_driver`, `dtM` 5e-4 s) | over 150–300 s, mode-1 lock-in at U 0.09–0.18 m/s: mid-span A/D within 0.2% of MoorDyn-F (0.017 against 0.018 at 0.06 m/s, below lock-in); mode 3 at 0.39–0.42 m/s within 1.4%; at 0.36 m/s MoorDyn-F settles in mode 2 and CableDyn in mode 3; frequency within one spectral bin wherever the modes agree; same response at `dtM` 5e-4 and 1e-2 s. At 0.21–0.33 m/s two branches coexist (a run ramped up from 0.18 m/s stays in mode 1, one ramped down from 0.30 m/s stays in mode 2): from rest CableDyn and MoorDyn-C settle in mode 2 (U 0.24 m/s: A/D 0.575 against 0.574 at x/L 0.24, same frequency); MoorDyn-F, whose phases start at zero (it does not carry its seed into its state), in mode 1, which `zero VIVphaseSeed` reproduces (0.699 against 0.699) | A/D <3%, frequency within one spectral bin; band: 3% (MoorDyn-C), 1% (MoorDyn-F) (`viv_lockin`) | Pass | | **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.661/0.420 against 0.661/0.420, 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 | +| **L2-VIV-long** | Long VIV runs, 400 cycles: (a) every node of a finite-EI cable moved across a 0.3 m/s flow at 5.5 rad/s (outside the synchronisation band) and inside it; (b) a taut 20 m line locked in, finite-EI and `EI = 0`, ρ∞ = 1, at 100 and 200 steps per cycle | (a) Adler's equation in closed form, `tan(ψ/2) = (b + s tan(θ/2))/a`; (b) the load powers against the change of the line's energy; a 2× finer step | (a) phase error 0.017 rad after 400 cycles at 100 steps per cycle, growing linearly (T/(T/2) 1.99) and second order (4.01 from 50 to 100 steps); inside the band the lag stays within 3.0e-5 rad of ψ*; (b) energy mismatch 2.0e-4 / 1.8e-4 of the VIV work, second order (3.98 / 3.67), A/D and VIV power of the run's two halves within 7.3e-4 and 1.8e-3, lock-in frequency within 1.9e-4 | (a) growth ratio 1.8–2.2, order 3.6–4.4, ≤0.05 rad; locked ≤1e-4 rad; (b) ≤3e-4, ratio 3–5; halves 2e-3 / 1e-2 / 2e-3 (`viv_long_run`) | 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 | | **L3-3** | Current-deflected static | OrcaFlex | 0.07–0.67% | <2% | Pass | diff --git a/doc/cli.rst b/doc/cli.rst index 675af904..eb826da5 100644 --- a/doc/cli.rst +++ b/doc/cli.rst @@ -1125,7 +1125,9 @@ remaining cases. * - ``--jobs`` - int - ``1`` - - Number of native processes run concurrently; must be positive. + - Number of native processes run concurrently; must be positive. Above 1, each process + runs with ``OMP_NUM_THREADS=1`` unless the environment sets it (measured batch scaling + and thread settings: :doc:`python`, Batch execution and study records). * - ``--timeout`` - float, s - none diff --git a/doc/python.rst b/doc/python.rst index 8517c5fa..dd740aee 100644 --- a/doc/python.rst +++ b/doc/python.rst @@ -714,6 +714,71 @@ cases may run as separate native processes with ``jobs > 1``. Results are always written in the original manifest order, not completion order. This is process-level concurrency; it does not change CableDyn's numerical settings or make one solver instance multithreaded. +With ``jobs > 1`` and no ``OMP_NUM_THREADS`` in the environment, every case runs with +``OMP_NUM_THREADS=1``, and ``study.json`` records the value the cases ran with +(``omp_num_threads``; ``null`` when the environment was passed on without one). A set +``OMP_NUM_THREADS`` is passed on unchanged. The OpenMP regions of a GNU build (the tangent kernels +of a finite-EI cable of 32 elements or more, up to four threads, and the lines of a multi-line +system) pay off in a single run only, and many processes that each start a team oversubscribe the +cores. Measured on a 24-core, 48-thread workstation (gfortran Release build; the static Windows +release has no OpenMP): + +.. list-table:: Batch wall time, 96 finite-EI VIV cases (100 elements, 2000 steps, 1.8 s each) + :header-rows: 1 + + * - ``jobs`` + - wall, ``OMP_NUM_THREADS=1`` + - speed-up + - mean case time + - wall, OpenMP default + * - 1 + - 177.4 s + - 1.0 + - 1.84 s + - 181.2 s + * - 2 + - 91.2 s + - 1.9 + - 1.89 s + - 91.5 s + * - 4 + - 48.2 s + - 3.7 + - 1.97 s + - 49.4 s + * - 8 + - 27.1 s + - 6.5 + - 2.18 s + - 28.7 s + * - 16 + - 16.7 s + - 10.6 + - 2.62 s + - 16.9 s + * - 24 + - 13.4 s + - 13.3 + - 3.15 s + - 14.1 s + * - 48 + - 11.8 s + - 15.1 + - 5.45 s + - 11.9 s + +A case slows down as more run beside it (1.84 s alone, 3.15 s beside 23 others: shared memory +bandwidth and a lower all-core clock), so the batch gains less than ``jobs``; the second hardware +thread of each core adds 13 %. The VIV cases spend almost no time in OpenMP regions (a single run +takes 1.79 s with one thread and 1.76 s with the default), so the default costs them at most 5 %. +On a deck that uses them, the 1024-element lazy-wave cable of +``examples/lazy_wave_vessel_rao.dat``, a single run takes 11.4 s with one thread, 10.6 s with four +and 12.5 s with the default, and a batch of 24 such runs with ``jobs=24`` takes 16.7 s with one +thread per process, 17.9 s with four and 19.1 s with the default. Set ``jobs`` to the number of +physical cores (24 here), or to the number of hardware threads for the last 10-15 %, and leave +``OMP_NUM_THREADS`` unset for a batch; for a single long run of a large finite-EI cable, +``OMP_NUM_THREADS=4`` is the fastest setting. + One failed case does not cancel the remaining cases. The final status distinguishes: * ``completed`` — native exit zero, which the driver reserves for a converged analysis; diff --git a/python/cabledyn/study.py b/python/cabledyn/study.py index 6c721f2c..0fb54c4d 100644 --- a/python/cabledyn/study.py +++ b/python/cabledyn/study.py @@ -314,6 +314,19 @@ def _case_dict(case: StudyCaseResult) -> dict[str, object]: return result +def _case_environment(job_count: int) -> dict[str, str] | None: + """The environment entries of every case process: one OpenMP thread each when several run at + once and the caller's environment does not choose a count, otherwise none. + + Several CableDyn processes that each start an OpenMP team oversubscribe the cores; on a 24-core + workstation a batch of 24 finite-EI lazy-wave runs took 14 % longer with OpenMP left at its + default than with one thread per process. + """ + if job_count <= 1 or os.environ.get("OMP_NUM_THREADS", "").strip(): + return None + return {"OMP_NUM_THREADS": "1"} + + def run_study( case_manifest: str | os.PathLike[str], *, @@ -354,7 +367,10 @@ def run_study( Per-case time limit, in seconds; ``None`` for no limit. jobs : int Number of independent native processes run at once (not solver - threads within a process). + threads within a process). With ``jobs > 1`` and no + ``OMP_NUM_THREADS`` in the environment, each process runs with + ``OMP_NUM_THREADS=1``: the processes then share the cores without + oversubscribing them. A set ``OMP_NUM_THREADS`` is passed on unchanged. overwrite : bool Allow a non-empty output directory and replace existing case outputs. @@ -446,6 +462,7 @@ def run_study( solver_version = native.version() destination.mkdir(parents=True, exist_ok=True) + case_env = _case_environment(job_count) started = datetime.now(timezone.utc).isoformat() summaries: dict[str, list[dict[str, object]]] = {} summaries_lock = threading.Lock() @@ -464,9 +481,14 @@ def execute(case: _Case) -> StudyCaseResult: main_output: Path | None = None static_output: Path | None = None try: - native_result = native.run( - case.deck, output_root, timeout=timeout_value, overwrite=overwrite - ) + if case_env is None: + native_result = native.run( + case.deck, output_root, timeout=timeout_value, overwrite=overwrite + ) + else: + native_result = native.run( + case.deck, output_root, timeout=timeout_value, overwrite=overwrite, env=case_env + ) stdout, stderr = native_result.stdout, native_result.stderr returncode = native_result.returncode main_output = native_result.main_output @@ -600,6 +622,11 @@ def execute(case: _Case) -> StudyCaseResult: "started_at": started, "finished_at": finished, "jobs": job_count, + "omp_num_threads": ( + case_env["OMP_NUM_THREADS"] + if case_env is not None + else os.environ.get("OMP_NUM_THREADS") + ), "timeout": timeout_value, "period": {"start": start_value, "stop": stop_value}, "channels": list(selected) if selected is not None else None, diff --git a/python/tests/test_study.py b/python/tests/test_study.py index 61cdeb71..1bba8092 100644 --- a/python/tests/test_study.py +++ b/python/tests/test_study.py @@ -315,3 +315,39 @@ def test_study_argument_validation(tmp_path, kwargs, message): output_directory=tmp_path / "results", **kwargs, ) + + +@pytest.mark.parametrize( + ("jobs", "omp", "passed", "recorded"), + [ + (2, None, "1", "1"), # parallel cases default to one OpenMP thread each + (2, "", "1", "1"), # an empty value counts as unset + (2, "3", None, "3"), # the caller's count is passed on unchanged + (1, None, None, None), # one case at a time keeps the environment + ], +) +def test_study_gives_parallel_cases_one_openmp_thread( + tmp_path, monkeypatch, jobs, omp, passed, recorded +): + if omp is None: + monkeypatch.delenv("OMP_NUM_THREADS", raising=False) + else: + monkeypatch.setenv("OMP_NUM_THREADS", omp) + manifest = _case_manifest(tmp_path) + driver = _driver(tmp_path) + original_run = driver.run + seen: list[object] = [] + lock = threading.Lock() + + def recording_run(*args, **kwargs): + with lock: + seen.append(kwargs.get("env")) + return original_run(*args, **kwargs) + + driver.run = recording_run # type: ignore[method-assign] + result = run_study(manifest, driver=driver, output_directory=tmp_path / "results", jobs=jobs) + assert result.passed + expected = None if passed is None else {"OMP_NUM_THREADS": passed} + assert seen == [expected, expected] + payload = json.loads(result.study_manifest.read_text(encoding="utf-8")) + assert payload["omp_num_threads"] == recorded diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index ec8a5e24..f03d875e 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -909,6 +909,19 @@ MODULE CableDyn_DeckDriver ! Range graphs and touchdown channels of the run (sized by range_setup_planned; every ! row samples the lines that need it before the channels are evaluated). TYPE(CD_RangeSet) :: rset + ! The node load powers of each line (VIVPow, DragPow, DampPow and their per-length + ! channels), evaluated once per row by the row's first load power channel of that line + ! (lp_row stamps, lp_off offsets into the node arrays). + INTEGER, ALLOCATABLE :: lp_off(:), lp_row(:) + REAL(wp), ALLOCATABLE :: line_pv(:), line_pd(:), line_pm(:) + END TYPE + + TYPE :: LoadPowerRow + !! The node load powers of one finite-EI cable at the committed state of one output row + !! (CD_HermiteCable_Dyn_Load_Power): the row's first load power channel of the cable + !! evaluates them and its other load power channels reuse them. + LOGICAL :: valid = .FALSE. + REAL(wp), ALLOCATABLE :: pv(:), pd(:), pm(:) END TYPE TYPE :: LineStepWorkspace @@ -34147,6 +34160,8 @@ SUBROUTINE write_hermite_model_row(unit, time, channels, lines, points, cables, REAL(wp) :: val, f(3), fl(3) CHARACTER(NAMELEN) :: lo CHARACTER(1024) :: em + ! the cables' load powers at this row's state, shared by their load power channels + TYPE(LoadPowerRow) :: powers(SIZE(cables)) ErrStat = CD_DECKDRV_OK; ErrMsg = '' IF (PRESENT(ranges)) THEN DO li = 1, SIZE(lines) @@ -34233,7 +34248,7 @@ SUBROUTINE write_hermite_model_row(unit, time, channels, lines, points, cables, CALL parse_line_node_channel(channels(i), line_id, pidx, pp, comp) END IF li = find_line(lines, line_id) - CALL eval_cable_channel(cables(li), channels(i), val, ErrStat, ErrMsg) + CALL eval_cable_channel(cables(li), channels(i), val, ErrStat, ErrMsg, power=powers(li)) IF (ErrStat /= CD_DECKDRV_OK) RETURN END IF IF (.NOT. IEEE_IS_FINITE(val)) THEN @@ -35586,7 +35601,7 @@ SUBROUTINE write_planned_row(unit, time, channels, lines, points, work, label, E INTEGER, PARAMETER :: CH_LEGACY = 0, CH_FAIRTEN = 1, CH_ANCHTEN = 2, CH_ANGLE = 3, CH_NODE_TEN = 4, & CH_NODE_STATE = 5, CH_POINT_MOTION = 6, CH_POINT_FIXED = 7, CH_POINT_LINE = 8, & - CH_SYS_POINT = 9, CH_TDP = 10 + CH_SYS_POINT = 9, CH_TDP = 10, CH_LOAD_POWER = 11 INTEGER :: i, k, n, li, off, nd, ne, nnode, stride, es LOGICAL :: has_motion, ok REAL(wp) :: val, q_point(3), v_point(3), a_point(3) @@ -35664,6 +35679,22 @@ SUBROUTINE write_planned_row(unit, time, channels, lines, points, work, label, E val = points(work%ch_aux(i))%pos(work%ch_comp(i)) CASE (CH_TDP) val = work%rset%lines(li)%tdp(work%ch_comp(i)) + CASE (CH_LOAD_POWER) + CALL fetch_power(li, ok) + IF (.NOT. ok) THEN + CALL legacy_value(i, val) + ELSE + off = work%lp_off(li) + nnode = work%line_ndof(li)/stride + IF (PRESENT(models)) THEN + val = load_power_value(work%ch_aux(i), work%ch_node(i), work%line_pv(off + 1:off + nnode), & + work%line_pd(off + 1:off + nnode), work%line_pm(off + 1:off + nnode), models(li)%l0) + ELSE + val = load_power_value(work%ch_aux(i), work%ch_node(i), work%line_pv(off + 1:off + nnode), & + work%line_pd(off + 1:off + nnode), work%line_pm(off + 1:off + nnode), & + system%lines(li)%l0) + END IF + END IF CASE (CH_SYS_POINT) CALL CD_Get_System_Point_State(system, work%ch_aux(i), q_point, v_point, a_point, es, em) IF (es /= CD_SYSTEM_OK) THEN @@ -35760,6 +35791,28 @@ SUBROUTINE fetch_state(il, fetched) IF (fetched) work%state_row(il) = work%row END SUBROUTINE fetch_state + SUBROUTINE fetch_power(il, fetched) + !! Evaluate line `il`'s node load powers into the row cache once per row. + INTEGER, INTENT(IN) :: il + LOGICAL, INTENT(OUT) :: fetched + INTEGER :: o, m, es + CHARACTER(1024) :: msg + fetched = work%lp_row(il) == work%row + IF (fetched) RETURN + o = work%lp_off(il) + m = work%line_ndof(il)/stride + IF (PRESENT(models)) THEN + CALL CD_Get_Model_Load_Power(models(il), work%line_pv(o + 1:o + m), work%line_pd(o + 1:o + m), & + work%line_pm(o + 1:o + m), es, msg) + fetched = es == CD_MODEL_OK + ELSE + CALL CD_Get_System_Line_Load_Power(system, il, work%line_pv(o + 1:o + m), work%line_pd(o + 1:o + m), & + work%line_pm(o + 1:o + m), es, msg) + fetched = es == CD_SYSTEM_OK + END IF + IF (fetched) work%lp_row(il) = work%row + END SUBROUTINE fetch_power + SUBROUTINE end_tension_override(il, inode, nel, v) !! EI=0 model/system lines: an end node reports the force the line exerts on its end !! point (end element tension + the end node's lumped loads) instead of the element @@ -35843,6 +35896,8 @@ SUBROUTINE build_plan() IF (ALLOCATED(work%line_ndof)) DEALLOCATE (work%line_ndof, work%line_ne, work%state_off, work%ten_off, & work%state_row, work%ten_row) IF (ALLOCATED(work%line_q)) DEALLOCATE (work%line_q, work%line_v, work%line_a, work%line_ten) + IF (ALLOCATED(work%lp_off)) DEALLOCATE (work%lp_off, work%lp_row) + IF (ALLOCATED(work%line_pv)) DEALLOCATE (work%line_pv, work%line_pd, work%line_pm) ALLOCATE (work%ch_kind(n), work%ch_line(n), work%ch_node(n), work%ch_comp(n), work%ch_aux(n), work%ch_val(n)) ALLOCATE (work%line_ndof(nl), work%line_ne(nl), work%state_off(nl + 1), work%ten_off(nl + 1), & work%state_row(nl), work%ten_row(nl)) @@ -35857,6 +35912,8 @@ SUBROUTINE build_plan() work%state_row = 0 work%ten_row = 0 work%row = 0 + ALLOCATE (work%lp_off(nl + 1), work%lp_row(nl)) + work%lp_row = 0 DO j = 1, n lo = to_lower(channels(j)) @@ -35925,13 +35982,18 @@ SUBROUTINE build_plan() ELSE CALL parse_line_node_channel(channels(j), il, node, kind, comp) ! from the line model, channel-at-a-time (CH_LEGACY) - IF (is_load_power_kind(kind) .OR. kind == 21) CYCLE + IF (kind == 21) CYCLE il = find_line(lines, il) IF (il < 1) CYCLE CALL line_sizes(il, sized, tension_sized) IF (.NOT. sized) CYCLE IF (node < 1 .OR. node > work%line_ndof(il)/stride) CYCLE - IF (kind == 3) THEN + IF (is_load_power_kind(kind)) THEN + ! the line's node load powers, evaluated once per row for all its power channels + work%ch_kind(j) = CH_LOAD_POWER + work%ch_node(j) = deck_to_internal_node(node, work%line_ndof(il)/stride - 1) + work%ch_aux(j) = kind + ELSE IF (kind == 3) THEN IF (.NOT. tension_sized) CYCLE work%ch_kind(j) = CH_NODE_TEN work%ch_node(j) = deck_to_internal_node(node, work%line_ne(il)) @@ -35947,12 +36009,16 @@ SUBROUTINE build_plan() work%state_off(1) = 0 work%ten_off(1) = 0 + work%lp_off(1) = 0 DO il = 1, nl work%state_off(il + 1) = work%state_off(il) + work%line_ndof(il) work%ten_off(il + 1) = work%ten_off(il) + MAX(0, work%line_ne(il)) + work%lp_off(il + 1) = work%lp_off(il) + work%line_ndof(il)/stride END DO ALLOCATE (work%line_q(work%state_off(nl + 1)), work%line_v(work%state_off(nl + 1)), & work%line_a(work%state_off(nl + 1)), work%line_ten(work%ten_off(nl + 1))) + ALLOCATE (work%line_pv(work%lp_off(nl + 1)), work%line_pd(work%lp_off(nl + 1)), & + work%line_pm(work%lp_off(nl + 1))) work%plan_ready = .TRUE. work%plan_motion = has_motion END SUBROUTINE build_plan @@ -40176,7 +40242,7 @@ SUBROUTINE sys_solvefail(ch, em, ErrStat, ErrMsg) ErrMsg = 'CableDyn_DeckDriver: OUTPUT "'//TRIM(ch)//'": '//TRIM(em) END SUBROUTINE sys_solvefail - SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node) + SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node, power) !! Evaluate one channel for a finite-EI Hermite power cable (CD_HFMF). Reads the cable's !! committed state directly from the CD_HFMF !! line (stride-6 DOFs: r at 6*(n-1)+1..3, tangent m at +4..6) and recovers the @@ -40187,13 +40253,16 @@ SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node) !! names a deck node (1 + the total NumSegs of the line's sections, End A first), read at its !! node of the final mesh on a refined line (cable%deck_node); mesh_node = .TRUE. reads the !! token's node as a node of the final mesh instead (the static profile and the C API line - !! arrays list every mesh node). + !! arrays list every mesh node). power (optional), the cable's load powers at its present + !! state: a load power channel takes them when they are valid and stores them otherwise, so + !! the load power channels of one output row evaluate them once. TYPE(CD_HFMF_ModuleType), INTENT(INOUT) :: cable CHARACTER(*), INTENT(IN) :: ch REAL(wp), INTENT(OUT) :: val INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg LOGICAL, INTENT(IN), OPTIONAL :: mesh_node + TYPE(LoadPowerRow), INTENT(INOUT), OPTIONAL :: power CHARACTER(NAMELEN) :: lo INTEGER :: line_id, node, kind, comp, nnode, nelem, inode, es @@ -40279,6 +40348,13 @@ SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node) inode = deck_to_internal_node(node, nelem) SELECT CASE (kind) CASE (15:20) ! load power: the line total, or per unit length about the node + IF (PRESENT(power)) THEN + IF (power%valid) THEN + ! the row's earlier load power channel of this cable evaluated them at this state + val = load_power_value(kind, inode, power%pv, power%pd, power%pm, cable%line%l0) + RETURN + END IF + END IF BLOCK REAL(wp) :: pv(nnode), pd(nnode), pm(nnode) CALL CD_HermiteCable_Dyn_Load_Power(cable%line, pv, pd, pm, es, em) @@ -40287,6 +40363,12 @@ SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node) TRIM(em)); RETURN END IF val = load_power_value(kind, inode, pv, pd, pm, cable%line%l0) + IF (PRESENT(power)) THEN + power%pv = pv + power%pd = pd + power%pm = pm + power%valid = .TRUE. + END IF END BLOCK CASE (21) ! the smoothed VIV amplitude estimate of the node (VIV AMPLITUDE) BLOCK diff --git a/src/CableDyn_HermiteCable.f90 b/src/CableDyn_HermiteCable.f90 index f3b32c68..45e36908 100644 --- a/src/CableDyn_HermiteCable.f90 +++ b/src/CableDyn_HermiteCable.f90 @@ -494,49 +494,53 @@ SUBROUTINE CD_HermiteCable_Bending_Damping(qr, vr, L, Bb, fdamp, Kq, Kv, ErrStat DO jj = 1, 6 J(:, jj) = Dcr(:, jj)*g + cr*Dg(jj) END DO - ! second derivatives of kappa = cr g: T(i,j,k) = d2 kappa_i / dx_j dx_k, x = (a, b) - DO k = 1, 6 - DO jj = 1, 6 - DO i = 1, 3 - acc = Dcr(i, jj)*Dg(k) + Dcr(i, k)*Dg(jj) - IF (jj <= 3 .AND. k >= 4) acc = acc + levi(i, jj, k - 3)*g - IF (jj >= 4 .AND. k <= 3) acc = acc + levi(i, k, jj - 3)*g - IF (jj <= 3 .AND. k <= 3) THEN - acc = acc + cr(i)*gaa2*a6(jj)*a6(k) - IF (jj == k) acc = acc + cr(i)*ga - END IF - T(i, jj, k) = acc - END DO - END DO - END DO - ! projector P = I - t t^T and dP(i,m,k) = d P_im / d a_k (zero for b) + ! projector P = I - t t^T DO m = 1, 3 DO i = 1, 3 Pm(i, m) = -tv(i)*tv(m) END DO Pm(m, m) = Pm(m, m) + CD_ONE END DO - DO k = 1, 3 - DO m = 1, 3 - DO i = 1, 3 - dik = CD_ZERO; IF (i == k) dik = CD_ONE - dmk = CD_ZERO; IF (m == k) dmk = CD_ONE - dP(i, m, k) = -(((dik - tv(i)*tv(k))/sp)*tv(m) + tv(i)*((dmk - tv(m)*tv(k))/sp)) - END DO - END DO - END DO Km = MATMUL(Pm, J) kr = MATMUL(Km, xd) - ! dK(i,j,k) = d K_ij / d x_k = sum_m dP(i,m,k) J(m,j) + sum_m P(i,m) T(m,j,k) - DO k = 1, 6 - DO jj = 1, 6 - DO i = 1, 3 - acc = SUM(Pm(i, :)*T(:, jj, k)) - IF (k <= 3) acc = acc + SUM(dP(i, :, k)*J(:, jj)) - dK(i, jj, k) = acc + IF (PRESENT(Kq)) THEN + ! the second derivatives the position Jacobian alone takes (the force does not) + ! second derivatives of kappa = cr g: T(i,j,k) = d2 kappa_i / dx_j dx_k, x = (a, b) + DO k = 1, 6 + DO jj = 1, 6 + DO i = 1, 3 + acc = Dcr(i, jj)*Dg(k) + Dcr(i, k)*Dg(jj) + IF (jj <= 3 .AND. k >= 4) acc = acc + levi(i, jj, k - 3)*g + IF (jj >= 4 .AND. k <= 3) acc = acc + levi(i, k, jj - 3)*g + IF (jj <= 3 .AND. k <= 3) THEN + acc = acc + cr(i)*gaa2*a6(jj)*a6(k) + IF (jj == k) acc = acc + cr(i)*ga + END IF + T(i, jj, k) = acc + END DO END DO END DO - END DO + ! dP(i,m,k) = d P_im / d a_k (zero for b) + DO k = 1, 3 + DO m = 1, 3 + DO i = 1, 3 + dik = CD_ZERO; IF (i == k) dik = CD_ONE + dmk = CD_ZERO; IF (m == k) dmk = CD_ONE + dP(i, m, k) = -(((dik - tv(i)*tv(k))/sp)*tv(m) + tv(i)*((dmk - tv(m)*tv(k))/sp)) + END DO + END DO + END DO + ! dK(i,j,k) = d K_ij / d x_k = sum_m dP(i,m,k) J(m,j) + sum_m P(i,m) T(m,j,k) + DO k = 1, 6 + DO jj = 1, 6 + DO i = 1, 3 + acc = SUM(Pm(i, :)*T(:, jj, k)) + IF (k <= 3) acc = acc + SUM(dP(i, :, k)*J(:, jj)) + dK(i, jj, k) = acc + END DO + END DO + END DO + END IF g6 = Bb*MATMUL(TRANSPOSE(Km), kr) IF (PRESENT(Kv) .OR. (PRESENT(Kq) .AND. has_rate)) V6 = Bb*MATMUL(TRANSPOSE(Km), Km) IF (PRESENT(Kq)) THEN diff --git a/tests/test_load_power_deck.f90 b/tests/test_load_power_deck.f90 index b98930da..bd2ff570 100644 --- a/tests/test_load_power_deck.f90 +++ b/tests/test_load_power_deck.f90 @@ -16,7 +16,11 @@ PROGRAM test_load_power_deck !! the cable's VIV power within 2 %; !! P4 the EI = 0 line split at a free point into two lines (the multi-line system) balances !! within 1 % over both lines; - !! P5 malformed channels, an unknown line, node 0 and a node past the end are refused. + !! P5 malformed channels, an unknown line, node 0 and a node past the end are refused; + !! P6 a row evaluates a line's node powers once for all its load power channels: a channel + !! read alone (DampPow1 of the cable, DragPow1 of the EI = 0 line, DampPow2 of the system) + !! takes the same values, to the printed digits, as among the line's other power channels + !! (P1, P3, P4), and they change from row to row. USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK IMPLICIT NONE @@ -29,6 +33,9 @@ PROGRAM test_load_power_deck CALL check_ei0() CALL check_system() CALL check_refusals() + CALL check_shared('P6 finite-EI cable', 'lpd_cab', '1.0', 'DampPow1', .FALSE., 4, 4) + CALL check_shared('P6 EI = 0 line', 'lpd_ei0', '0.0', 'DragPow1', .FALSE., 3, 3) + CALL check_shared('P6 system', 'lpd_sys', '0.0', 'DampPow2', .TRUE., 6, 7) IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' ERROR STOP 1 @@ -272,6 +279,29 @@ SUBROUTINE check_system() CALL balance('P4 two EI = 0 lines and a free point', tab, n, 2, pv) END SUBROUTINE check_system + SUBROUTINE check_shared(label, root, ei, channel, split, ncol, col) + !! Channel `channel` read alone against column `col` of the earlier run `root` (ncol channels), + !! which evaluated it among the line's other load power channels, over the rows from 50 s. + CHARACTER(*), INTENT(IN) :: label, root, ei, channel + LOGICAL, INTENT(IN) :: split + INTEGER, INTENT(IN) :: ncol, col + REAL(wp), ALLOCATABLE :: tab(:, :), one(:, :) + INTEGER :: n, n1 + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('lpd_one.dat', ei, channel, split, 52.0_wp) + CALL run('lpd_one.dat', 'lpd_one', ok, msg) + CALL require(ok, label//': the one-channel deck runs: '//TRIM(msg)) + IF (.NOT. ok) RETURN + CALL read_out('lpd_one.out', 1, one, n1) + CALL read_out(root//'.out', ncol, tab, n) + CALL require(n1 > 100 .AND. n >= n1, label//': the runs wrote their rows') + IF (.NOT. (n1 > 100 .AND. n >= n1)) RETURN + CALL require(ALL(one(1, 1:n1) == tab(1, 1:n1)) .AND. ALL(one(2, 1:n1) == tab(col, 1:n1)), & + label//': the channel alone equals the channel among the line''s power channels') + CALL require(ANY(one(2, 2:n1) /= one(2, 1)), label//': the channel changes from row to row') + END SUBROUTINE check_shared + SUBROUTINE check_refusals() CALL refused('VIVPow0', 'bad load power channel', 'line 0') CALL refused('DragPow7', 'bad load power channel', 'an unknown line') diff --git a/tests/test_viv_long_run.f90 b/tests/test_viv_long_run.f90 new file mode 100644 index 00000000..232f62a1 --- /dev/null +++ b/tests/test_viv_long_run.f90 @@ -0,0 +1,471 @@ +! File: tests/test_viv_long_run.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_long_run + !! Long runs of the cross-flow VIV synchronisation model (CableDyn_VIV): hundreds of cycles, as a + !! VIV study runs them, at 100 steps per cycle. The shedding phase advances by Heun's rule + !! (viv_step_begin / viv_step_end of both line kinds), so its error must grow linearly in time + !! and fall with dt^2; the load powers must close the energy balance over the whole run; and a + !! locked-in response must be stationary. Every tolerance below comes from a dt sweep (25, 50, + !! 100, 200, 400 steps per cycle, gfortran Release) and is stated with the measured value. + !! + !! P Prescribed motion, the finite-EI cable (10 elements, 20 m, every node's position held and + !! moved): all nodes move across a uniform flow U = 0.3 m/s (along y) as a rigid body, + !! z = z0 - A cos(om t), A = 1e-6 m (the phase does not depend on A; a small A keeps the + !! relative flow and so U and the cross-flow axis fixed to (A om/U)^2 ~ 1e-10). The running + !! mean squares start at those of the motion and average over 1000 s, so the motion phase is + !! phi_y = om t - pi/2 to the averaging ripple (about 1e-4 rad), and psi = phi_y - phi obeys + !! Adler's equation d psi/dt = a - b sin(psi), a = om - Om cF, b = Om dF, Om = 2 pi U/D, + !! whose solution is closed form: tan(psi/2) = (b + s tan(theta/2))/a, theta = theta0 + s t, + !! s = sqrt(a^2 - b^2) outside the band (a > b), and psi -> asin(a/b) inside it. + !! P1 outside the band (om 5.5 rad/s, slip period 2 pi/s = 4.3 s), 400 motion cycles: the + !! largest phase error over the 11 nodes against the closed form grows linearly: error(T)/ + !! error(T/2) in [1.8, 2.2] (linear 2, quadratic 4; measured 2.014 and 1.988 at 50 and 100 + !! steps per cycle); + !! P2 it is second order: error at 50 over error at 100 steps per cycle in [3.6, 4.4] + !! (measured 4.01), and at 100 steps per cycle at most 0.05 rad after 400 cycles (measured + !! 0.0167, i.e. 4e-5 rad per cycle); + !! P3 inside the band (om = Om (cF + dF/2), psi* = pi/6), 50 steps per cycle: the phase lag + !! stays within 1e-4 rad of psi* at T/2 and T (measured 2.9e-5 at 25, 50 and 100 steps per + !! cycle: the averaging-ripple floor, not the step) and does not grow (error(T) <= + !! 1.1 error(T/2), measured 1.0004), and the mean shedding rate over the second half is om + !! within 1e-8 (measured 5.8e-12). + !! + !! C Lock-in, both line kinds: a weightless taut line (20 m, 10 elements, D 0.1 m, 8.1 kg/m, + !! EA 5e7 N, 3.8 kN, the finite-EI cable EI 1e3 N m^2, no added mass so that the structural + !! energy is the whole stored energy), pinned at both ends in the 0.3 m/s cross current, Cl + !! 0.8, cF 0.18, dF 0.08, Cd 1.2, running RMS window 0.25 s (the examples' value), rho_inf = 1 + !! (no numerical damping, so that the load powers are the whole energy change). It locks in at + !! about 0.63 Hz with a mid-span A/D of 0.56-0.57. 400 cycles of the nominal shedding period + !! D/(cF U) = 1.85 s (740 s) at 100 and at 200 steps per cycle. + !! C1 energy: E(t) - E(0) = int (P_viv + P_drag + P_damp) dt (trapezoidal), the mismatch at + !! most 3e-4 of the VIV work at 100 steps per cycle (measured 2.0e-4 finite EI, 1.8e-4 + !! EI = 0: the lift takes the phase predicted from the previous step's mid-point rate, half + !! a step behind the step's own, a second-order lag), second order (the ratio from 100 to + !! 200 steps per cycle in [3, 5], measured 3.98 and 3.67), and it accumulates with the work + !! and not faster: the mismatch fraction at T within 1.25 times that at T/2 (measured 1.00 + !! and 1.00); + !! C2 statistics over the last three quarters of the run, its two halves: the mid-span RMS + !! A/D within 2e-3 and the mean VIV power within 1e-2 of each other (measured 7.3e-4 and + !! 1.8e-3 finite EI, 4.1e-4 and 9.0e-4 EI = 0), the same bounds as the change of the + !! second half's values from 100 to 200 steps per cycle must meet (measured A/D 7.9e-5 and + !! 6.0e-4, power 1.1e-3 and 3.3e-4), so a drift between the halves stays below the + !! discretisation error of the statistic; + !! C3 phase: the mean shedding rate (the lock-in frequency) of the mid-span node over the two + !! halves agrees within 2e-3 (measured 7.4e-5 finite EI, 1.9e-4 EI = 0), so the phase error + !! against a finer step grows linearly (a frequency offset) and not quadratically, and the + !! second half's rate changes by at most 5e-3 from 100 to 200 steps per cycle (measured + !! 1.6e-4 finite EI, 1.9e-4 EI = 0). The coupled lock-in frequency converges at second + !! order (test viv_step_order). + USE CableDyn_Precision, ONLY: wp + USE CableDyn_VIV, ONLY: CD_VIV_TWO_PI + USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & + CD_HermiteCable_Dyn_Set_Drag, CD_HermiteCable_Dyn_Set_VIV, & + CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Recompute_Acceleration, & + CD_HermiteCable_Dyn_Energy, CD_HermiteCable_Dyn_Load_Power, & + CD_HermiteCable_Dyn_End, CD_HCDYN_OK + USE CableDyn_Dynamic, ONLY: GenAlphaConfig + USE CableDyn_Model, ONLY: CD_ModelType, CD_Init_Model, CD_Set_Model_VIV, CD_Step_Model, CD_End_Model, & + CD_Recompute_Model_Acceleration, CD_Get_Model_Load_Power, CD_MODEL_OK + IMPLICIT NONE + + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp + REAL(wp), PARAMETER :: RHOW = 1025.0_wp, D = 0.1_wp, CF = 0.18_wp, DF = 0.08_wp, U = 0.3_wp + REAL(wp), PARAMETER :: OMS = CD_VIV_TWO_PI*U/D + INTEGER, PARAMETER :: NCYC = 400 + + !> The results of one lock-in run (C): the energy mismatch over the VIV work at T/2 and T, the + !> mid-span RMS A/D and mean VIV power over the two halves of the last three quarters, and the + !> mean shedding rate of the mid-span node over the same halves. + TYPE :: lockin_result + LOGICAL :: ok = .FALSE. + REAL(wp) :: closure(2) = 0.0_wp, ad(2) = 0.0_wp, pviv(2) = 0.0_wp, rate(2) = 0.0_wp + END TYPE lockin_result + + INTEGER :: nfail = 0 + + CALL check_prescribed() + CALL check_lockin(.TRUE., 'finite-EI cable') + CALL check_lockin(.FALSE., 'EI = 0 line') + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: long-run VIV phase, energy and statistics' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + PURE REAL(wp) FUNCTION wrap_pi(x) RESULT(y) + !! x mapped to [-pi, pi]. + REAL(wp), INTENT(IN) :: x + y = x - CD_VIV_TWO_PI*ANINT(x/CD_VIV_TWO_PI) + END FUNCTION wrap_pi + + PURE REAL(wp) FUNCTION rel(x, y) RESULT(r) + !! The relative difference of two statistics. + REAL(wp), INTENT(IN) :: x, y + r = ABS(x - y)/MAX(ABS(x), ABS(y), TINY(1.0_wp)) + END FUNCTION rel + + PURE REAL(wp) FUNCTION adler_psi(t, psi0, a, b) RESULT(psi) + !! The continuous solution of d psi/dt = a - b sin(psi), a > b > 0, from psi(0) = psi0 in + !! (-pi, pi): tan(psi/2) = (b + s tan(theta/2))/a, theta = theta0 + s t, s = sqrt(a^2 - b^2), + !! continued over the turns of theta. + REAL(wp), INTENT(IN) :: t, psi0, a, b + REAL(wp) :: s, th, thr, k + s = SQRT(a*a - b*b) + th = 2.0_wp*ATAN((a*TAN(0.5_wp*psi0) - b)/s) + s*t + k = ANINT(th/CD_VIV_TWO_PI) + thr = th - CD_VIV_TWO_PI*k + psi = CD_VIV_TWO_PI*k + 2.0_wp*ATAN((b + s*TAN(0.5_wp*thr))/a) + END FUNCTION adler_psi + + SUBROUTINE check_prescribed() + REAL(wp) :: e50(2), e100(2), el(2), rate_err + LOGICAL :: ok + CALL prescribed(5.5_wp, 50, e50, rate_err, ok) + IF (.NOT. ok) RETURN + CALL prescribed(5.5_wp, 100, e100, rate_err, ok) + IF (.NOT. ok) RETURN + WRITE (*, '(A,2ES11.3,A,2ES11.3)') ' P1/P2 outside the band, phase error at T/2, T: 50 steps ', e50, & + ', 100 steps ', e100 + WRITE (*, '(A,3F8.4)') ' P1/P2 growth T/(T/2) at 50, 100 steps, order 50/100: ', e50(2)/e50(1), e100(2)/e100(1), & + e50(2)/e100(2) + CALL require(e50(2) >= 1.8_wp*e50(1) .AND. e50(2) <= 2.2_wp*e50(1) .AND. & + e100(2) >= 1.8_wp*e100(1) .AND. e100(2) <= 2.2_wp*e100(1), & + 'P1: the phase error grows linearly in time') + CALL require(e50(2) >= 3.6_wp*e100(2) .AND. e50(2) <= 4.4_wp*e100(2), 'P2: the phase error is second order') + CALL require(e100(2) <= 0.05_wp, 'P2: at most 0.05 rad after 400 cycles at 100 steps per cycle') + CALL prescribed(OMS*(CF + 0.5_wp*DF), 50, el, rate_err, ok) + IF (.NOT. ok) RETURN + WRITE (*, '(A,2ES11.3,A,ES11.3)') ' P3 inside the band, phase-lag error at T/2, T: ', el, & + ', mean rate error ', rate_err + CALL require(MAXVAL(el) <= 1.0e-4_wp .AND. el(2) <= 1.1_wp*el(1), 'P3: the locked phase lag holds') + CALL require(rate_err <= 1.0e-8_wp, 'P3: the locked shedding rate is the motion frequency') + END SUBROUTINE check_prescribed + + SUBROUTINE prescribed(om, nper, err, rate_err, ok) + !! Every node of the straight cable moved across the flow as a rigid body at om, nper steps per + !! motion cycle over NCYC cycles: err the largest phase error over the nodes at T/2 and T + !! (outside the band against the closed form, inside it the phase lag against psi*), rate_err + !! the relative error of the mean shedding rate over the second half inside the band. + REAL(wp), INTENT(IN) :: om + INTEGER, INTENT(IN) :: nper + REAL(wp), INTENT(OUT) :: err(2), rate_err + LOGICAL, INTENT(OUT) :: ok + INTEGER, PARAMETER :: NE = 10, NN = NE + 1 + REAL(wp), PARAMETER :: SPAN = 20.0_wp, AMP = 1.0e-6_wp, Z0 = -50.0_wp, TW = 1.0e3_wp + TYPE(CD_HermiteCableDynType) :: m + REAL(wp) :: seed(6*NN), l0(NE), eav(NE), eiv(NE), rhoa(NE), wv(NE), hd(NE), hn(NE), ht(NE) + REAL(wp) :: cl(NE), cfv(NE), dfv(NE), pq(3*NN), pv(3*NN), pa(3*NN), dt, t, a, b, phi0(NN), psi0(NN) + REAL(wp) :: phu(NN), phold(NN), ex, e, ph_half(NN), psi_star + INTEGER :: pdofs(3*NN), i, n, nstep, es + CHARACTER(1024) :: em + LOGICAL :: locked + err = 0.0_wp; rate_err = 0.0_wp + seed = 0.0_wp + DO i = 1, NN + seed(6*(i - 1) + 1) = SPAN*REAL(i - 1, wp)/REAL(NE, wp) + seed(6*(i - 1) + 3) = Z0 - AMP + seed(6*(i - 1) + 4) = 1.0_wp + pdofs(3*i - 2:3*i) = [6*(i - 1) + 1, 6*(i - 1) + 2, 6*(i - 1) + 3] + END DO + ! a stiff, unstretched cable: the slopes (free) barely turn under the tiny lift and the drag + l0 = SPAN/REAL(NE, wp); eav = 5.0e7_wp; eiv = 1.0e6_wp; rhoa = 8.1_wp; wv = 0.0_wp + CALL CD_HermiteCable_Dyn_Init(m, l0, eav, eiv, rhoa, wv, seed, pdofs, -1.0e4_wp, 0.0_wp, 1.0_wp, es, em) + ok = es == CD_HCDYN_OK + CALL require(ok, 'P: init: '//TRIM(em)) + IF (.NOT. ok) RETURN + hd = D; hn = 1.2_wp; ht = 0.0_wp + CALL CD_HermiteCable_Dyn_Set_Drag(m, RHOW, hd, hn, ht, 0.0_wp, [0.0_wp, U, 0.0_wp], es, em) + ok = es == CD_HCDYN_OK + CALL require(ok, 'P: drag: '//TRIM(em)) + IF (.NOT. ok) RETURN + cl = 1.0e-3_wp; cfv = CF; dfv = DF + CALL CD_HermiteCable_Dyn_Set_VIV(m, cl, cfv, dfv, TW, es, em) + ok = es == CD_HCDYN_OK + CALL require(ok, 'P: VIV: '//TRIM(em)) + IF (.NOT. ok) RETURN + CALL kin(0.0_wp, om, seed, AMP, Z0, NN, pq, pv, pa) + CALL CD_HermiteCable_Dyn_Recompute_Acceleration(m, es, em, pres_dofs=pdofs, pres_a=pa) + ok = es == CD_HCDYN_OK + CALL require(ok, 'P: start acceleration: '//TRIM(em)) + IF (.NOT. ok) RETURN + ! the running mean squares start at those of the motion, y' = A om sin(om t) + m%viv_ms(1, :) = 0.5_wp*(AMP*om)**2 + m%viv_ms(2, :) = 0.5_wp*(AMP*om*om)**2 + a = om - OMS*CF + b = OMS*DF + locked = ABS(a) < b + psi_star = ASIN(MAX(-1.0_wp, MIN(1.0_wp, a/b))) + phi0 = m%viv_phi + phu = phi0 + phold = phi0 + DO i = 1, NN + psi0(i) = wrap_pi(-0.5_wp*PI - phi0(i)) + END DO + dt = CD_VIV_TWO_PI/om/REAL(nper, wp) + nstep = nper*NCYC + DO n = 1, nstep + t = REAL(n, wp)*dt + CALL kin(t, om, seed, AMP, Z0, NN, pq, pv, pa) + CALL CD_HermiteCable_Dyn_Step(m, dt, 50, 1.0e-10_wp, es, em, pres_dofs=pdofs, pres_q=pq, pres_v=pv, pres_a=pa) + ok = es == CD_HCDYN_OK + CALL require(ok, 'P: step: '//TRIM(em)) + IF (.NOT. ok) EXIT + DO i = 1, NN + phu(i) = phu(i) + wrap_pi(m%viv_phi(i) - phold(i)) + phold(i) = m%viv_phi(i) + END DO + IF (n /= nstep/2 .AND. n /= nstep) CYCLE + e = 0.0_wp + DO i = 1, NN + IF (locked) THEN + ex = wrap_pi(phu(i) - (om*t - 0.5_wp*PI - psi_star)) + ELSE + ex = phu(i) - (phi0(i) + om*t - (adler_psi(t, psi0(i), a, b) - psi0(i))) + END IF + e = MAX(e, ABS(ex)) + END DO + IF (n == nstep/2) THEN + err(1) = e + ph_half = phu + ELSE + err(2) = e + END IF + END DO + IF (ok .AND. locked) rate_err = ABS(SUM(phu - ph_half)/REAL(NN, wp)/(0.5_wp*REAL(nstep, wp)*dt) - om)/om + CALL CD_HermiteCable_Dyn_End(m) + END SUBROUTINE prescribed + + SUBROUTINE kin(tt, om, seed, amp, z0, nn, pq, pv, pa) + !! The prescribed rigid-body motion of every node at time tt. + REAL(wp), INTENT(IN) :: tt, om, seed(:), amp, z0 + INTEGER, INTENT(IN) :: nn + REAL(wp), INTENT(OUT) :: pq(:), pv(:), pa(:) + INTEGER :: j + DO j = 1, nn + pq(3*j - 2:3*j) = [seed(6*(j - 1) + 1), 0.0_wp, z0 - amp*COS(om*tt)] + pv(3*j - 2:3*j) = [0.0_wp, 0.0_wp, amp*om*SIN(om*tt)] + pa(3*j - 2:3*j) = [0.0_wp, 0.0_wp, amp*om*om*COS(om*tt)] + END DO + END SUBROUTINE kin + + SUBROUTINE check_lockin(finite_ei, label) + LOGICAL, INTENT(IN) :: finite_ei + CHARACTER(*), INTENT(IN) :: label + TYPE(lockin_result) :: r1, r2 + CALL lockin(finite_ei, 100, r1) + IF (.NOT. r1%ok) RETURN + CALL lockin(finite_ei, 200, r2) + IF (.NOT. r2%ok) RETURN + WRITE (*, '(3A,2ES11.3,A,2ES11.3)') ' C1 ', label, ': energy mismatch / VIV work at T/2, T, 100 steps ', & + r1%closure, ', 200 steps ', r2%closure + WRITE (*, '(3A,4F11.6)') ' C2 ', label, ': RMS A/D and VIV power [W] over the halves ', r1%ad/D, r1%pviv + WRITE (*, '(3A,2F12.8,A,F12.8)') ' C3 ', label, ': mean shedding rate [rad/s] over the halves ', r1%rate, & + ', at 200 steps ', r2%rate(2) + WRITE (*, '(3A,5ES10.2)') ' ', label, ': halves A/D, power, rate; 100 to 200 steps A/D, power ', & + rel(r1%ad(1), r1%ad(2)), rel(r1%pviv(1), r1%pviv(2)), rel(r1%rate(1), r1%rate(2)), & + rel(r1%ad(2), r2%ad(2)), rel(r1%pviv(2), r2%pviv(2)) + CALL require(ABS(r1%closure(2)) <= 3.0e-4_wp, 'C1 '//label//': the load powers close the energy balance') + CALL require(ABS(r1%closure(2)) >= 3.0_wp*ABS(r2%closure(2)) .AND. & + ABS(r1%closure(2)) <= 5.0_wp*ABS(r2%closure(2)), 'C1 '//label//': the mismatch is second order') + CALL require(ABS(r1%closure(2)) <= 1.25_wp*ABS(r1%closure(1)), & + 'C1 '//label//': the mismatch grows no faster than the work') + CALL require(rel(r1%ad(1), r1%ad(2)) <= 2.0e-3_wp .AND. rel(r1%pviv(1), r1%pviv(2)) <= 1.0e-2_wp, & + 'C2 '//label//': the response is stationary') + CALL require(rel(r1%ad(2), r2%ad(2)) <= 2.0e-3_wp .AND. rel(r1%pviv(2), r2%pviv(2)) <= 1.0e-2_wp, & + 'C2 '//label//': the statistics are converged in the step') + CALL require(rel(r1%rate(1), r1%rate(2)) <= 2.0e-3_wp, 'C3 '//label//': the lock-in frequency does not drift') + CALL require(rel(r1%rate(2), r2%rate(2)) <= 5.0e-3_wp, 'C3 '//label//': the lock-in frequency is converged') + END SUBROUTINE check_lockin + + SUBROUTINE lockin(finite_ei, nper, res) + !! The taut line locked in over NCYC nominal cycles at nper steps per cycle. + LOGICAL, INTENT(IN) :: finite_ei + INTEGER, INTENT(IN) :: nper + TYPE(lockin_result), INTENT(OUT) :: res + INTEGER, PARAMETER :: NE = 10, NN = NE + 1, MIDN = NE/2 + 1 + REAL(wp), PARAMETER :: SPAN = 20.0_wp, Z0 = -50.0_wp, EA = 5.0e7_wp, MLIN = 8.1_wp, TENS = 3.8e3_wp + REAL(wp), PARAMETER :: TW = 0.25_wp + TYPE(CD_HermiteCableDynType) :: hm + TYPE(CD_ModelType) :: em0 + TYPE(GenAlphaConfig) :: cfg + REAL(wp) :: seed(6*NN), l0(NE), eav(NE), eiv(NE), rhoa(NE), wv(NE), hd(NE), hn(NE), ht(NE) + REAL(wp) :: cl(NE), cfv(NE), dfv(NE), dt, tv, e0, e_now, p_prev(3), p_now(3), work(3) + REAL(wp) :: q0(3*NN), v0(3*NN), fext(3*NN), fluid(3, NN), wl(NN), z, ph, phold, phu, s2(2), sp(2), cnt(2) + REAL(wp) :: ph_mark(3) + INTEGER :: conn(2, NE), i, n, nstep, es, n_iter, n0, n1, h + CHARACTER(1024) :: em + LOGICAL :: conv, stalled, ok + tv = D/(CF*U) + dt = tv/REAL(nper, wp) + nstep = nper*NCYC + ! the statistics window: the last three quarters, in two halves (n0, n1] and (n1, nstep] + n0 = nper*(NCYC/4) + n1 = nper*(NCYC/4 + (NCYC - NCYC/4)/2) + cl = 0.8_wp; cfv = CF; dfv = DF + l0 = SPAN/REAL(NE, wp)/(1.0_wp + TENS/EA) + eav = EA; rhoa = MLIN + IF (finite_ei) THEN + seed = 0.0_wp + DO i = 1, NN + seed(6*(i - 1) + 1) = SPAN*REAL(i - 1, wp)/REAL(NE, wp) + seed(6*(i - 1) + 3) = Z0 + seed(6*(i - 1) + 4) = 1.0_wp + END DO + eiv = 1.0e3_wp; wv = 0.0_wp + CALL CD_HermiteCable_Dyn_Init(hm, l0, eav, eiv, rhoa, wv, seed, [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3], & + -1.0e4_wp, 0.0_wp, 1.0_wp, es, em) + ok = es == CD_HCDYN_OK + IF (ok) THEN + hd = D; hn = 1.2_wp; ht = 0.0_wp + CALL CD_HermiteCable_Dyn_Set_Drag(hm, RHOW, hd, hn, ht, 0.0_wp, [0.0_wp, U, 0.0_wp], es, em) + ok = es == CD_HCDYN_OK + END IF + IF (ok) THEN + CALL CD_HermiteCable_Dyn_Set_VIV(hm, cl, cfv, dfv, TW, es, em) + ok = es == CD_HCDYN_OK + END IF + CALL require(ok, 'C: the finite-EI cable sets up: '//TRIM(em)) + IF (.NOT. ok) RETURN + phold = hm%viv_phi(MIDN) + ELSE + DO i = 1, NE + conn(:, i) = [i, i + 1] + END DO + q0 = 0.0_wp + DO i = 1, NN + q0(3*i - 2) = SPAN*REAL(i - 1, wp)/REAL(NE, wp) + q0(3*i) = Z0 + END DO + v0 = 0.0_wp; fext = 0.0_wp + fluid = 0.0_wp; fluid(2, :) = U; wl = 0.0_wp + cfg%rho_inf = 1.0_wp + CALL CD_Init_Model(em0, q0, v0, conn, l0, eav, rhoa, .TRUE., fext, [1, 2, 3, 3*NN - 2, 3*NN - 1, 3*NN], cfg, & + es, em, fluid_velocity=fluid, drag_waterline_z=wl, drag_rho=RHOW, drag_diameter=D, & + drag_cdn=1.2_wp, drag_cdt=0.0_wp) + ok = es == CD_MODEL_OK + IF (ok) THEN + hd = D + CALL CD_Set_Model_VIV(em0, RHOW, cl, hd, cfv, dfv, TW, es, em) + ok = es == CD_MODEL_OK + END IF + IF (ok) THEN + CALL CD_Recompute_Model_Acceleration(em0, es, em) + ok = es == CD_MODEL_OK + END IF + CALL require(ok, 'C: the EI = 0 line sets up: '//TRIM(em)) + IF (.NOT. ok) RETURN + phold = em0%viv_phi(MIDN) + END IF + phu = phold + CALL energy(finite_ei, hm, em0, l0, EA, MLIN, e0) + CALL powers(finite_ei, hm, em0, NN, p_prev) + work = 0.0_wp + s2 = 0.0_wp; sp = 0.0_wp; cnt = 0.0_wp + ph_mark = 0.0_wp + DO n = 1, nstep + IF (finite_ei) THEN + CALL CD_HermiteCable_Dyn_Step(hm, dt, 50, 1.0e-8_wp, es, em) + ok = es == CD_HCDYN_OK + ph = hm%viv_phi(MIDN) + z = hm%q(6*(MIDN - 1) + 3) - Z0 + ELSE + CALL CD_Step_Model(em0, dt, conv, stalled, n_iter, es, em) + ok = es == CD_MODEL_OK .AND. conv + ph = em0%viv_phi(MIDN) + z = em0%q(3*MIDN) - Z0 + END IF + CALL require(ok, 'C: step: '//TRIM(em)) + IF (.NOT. ok) EXIT + phu = phu + wrap_pi(ph - phold) + phold = ph + CALL powers(finite_ei, hm, em0, NN, p_now) + work = work + 0.5_wp*dt*(p_prev + p_now) + p_prev = p_now + IF (n == n0) ph_mark(1) = phu + IF (n == n1) ph_mark(2) = phu + IF (n > n0) THEN + h = MERGE(1, 2, n <= n1) + s2(h) = s2(h) + z*z + sp(h) = sp(h) + p_now(1) + cnt(h) = cnt(h) + 1.0_wp + END IF + IF (n == nstep/2 .OR. n == nstep) THEN + CALL energy(finite_ei, hm, em0, l0, EA, MLIN, e_now) + res%closure(MERGE(1, 2, n == nstep/2)) = (e_now - e0 - SUM(work))/work(1) + END IF + END DO + ph_mark(3) = phu + IF (ok) THEN + res%ok = .TRUE. + res%ad = SQRT(2.0_wp*s2/cnt) + res%pviv = sp/cnt + res%rate(1) = (ph_mark(2) - ph_mark(1))/(REAL(n1 - n0, wp)*dt) + res%rate(2) = (ph_mark(3) - ph_mark(2))/(REAL(nstep - n1, wp)*dt) + END IF + IF (finite_ei) THEN + CALL CD_HermiteCable_Dyn_End(hm) + ELSE + CALL CD_End_Model(em0, es, em) + END IF + END SUBROUTINE lockin + + SUBROUTINE energy(finite_ei, hm, em0, l0, ea, mlin, e) + !! The line's kinetic plus elastic energy: the finite-EI cable's own (consistent mass), or for + !! the EI = 0 line the consistent translational mass (rho_a l0/6 [[2, 1], [1, 2]]) and the + !! tension-only axial strain energy EA (l - l0)^2/(2 l0). + LOGICAL, INTENT(IN) :: finite_ei + TYPE(CD_HermiteCableDynType), INTENT(IN) :: hm + TYPE(CD_ModelType), INTENT(IN) :: em0 + REAL(wp), INTENT(IN) :: l0(:), ea, mlin + REAL(wp), INTENT(OUT) :: e + INTEGER :: k, ia, ib, ess + REAL(wp) :: l, kin_, str_ + CHARACTER(256) :: emm + IF (finite_ei) THEN + CALL CD_HermiteCable_Dyn_Energy(hm, kin_, str_, ess, emm) + CALL require(ess == CD_HCDYN_OK, 'C: energy: '//TRIM(emm)) + e = kin_ + str_ + ELSE + e = 0.0_wp + DO k = 1, SIZE(l0) + ia = 3*k - 2; ib = 3*k + 1 + e = e + mlin*l0(k)/6.0_wp*(DOT_PRODUCT(em0%v(ia:ia + 2), em0%v(ia:ia + 2)) + & + DOT_PRODUCT(em0%v(ia:ia + 2), em0%v(ib:ib + 2)) + & + DOT_PRODUCT(em0%v(ib:ib + 2), em0%v(ib:ib + 2))) + l = NORM2(em0%q(ib:ib + 2) - em0%q(ia:ia + 2)) + IF (l > l0(k)) e = e + 0.5_wp*ea*(l - l0(k))**2/l0(k) + END DO + END IF + END SUBROUTINE energy + + SUBROUTINE powers(finite_ei, hm, em0, nn, p) + !! The line totals of the VIV, drag and damping powers. + LOGICAL, INTENT(IN) :: finite_ei + TYPE(CD_HermiteCableDynType), INTENT(IN) :: hm + TYPE(CD_ModelType), INTENT(IN) :: em0 + INTEGER, INTENT(IN) :: nn + REAL(wp), INTENT(OUT) :: p(3) + REAL(wp) :: pv(nn), pd(nn), pm(nn) + INTEGER :: ess + CHARACTER(256) :: emm + IF (finite_ei) THEN + CALL CD_HermiteCable_Dyn_Load_Power(hm, pv, pd, pm, ess, emm) + ELSE + CALL CD_Get_Model_Load_Power(em0, pv, pd, pm, ess, emm) + END IF + CALL require(ess == 0, 'C: load power: '//TRIM(emm)) + p = [SUM(pv), SUM(pd), SUM(pm)] + END SUBROUTINE powers + +END PROGRAM test_viv_long_run From 41df15d6739de0767e11d2cf954882970415c2ac Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Tue, 17 Nov 2026 08:53:46 +0900 Subject: [PATCH 31/47] docs: in-line drag amplification includes the in-line damping; VIV FRAME scale separation (#174) The theory page said that VIV DAMPING 0 0 1 with a CdAmp drag factor amplifies the mean in-line drag alone. The force is 1/2 rho D Cdn A_d |w| w_x on the whole in-line component, so the in-line damping rises with the factor too (by 2.3-2.8 at A/D 0.6-0.8 with Chaplin et al. 2005, Eq. 4). The code is unchanged; the theory page and the input reference now say so. The VIV FRAME pages said to take Tf several VIV periods long and short against the motion. They now give the bound: keeping about 95 % of the VIV velocity (omega Tf >= 3) while leaving at most 10 % of the motion's velocity in the relative velocity (omega_m Tf <= 0.1) needs a motion period at least 30 VIV periods long. For a motion only a few VIV periods long no Tf separates the two, and the response depends on Tf. Signed-off-by: Jae Hoon Seo --- doc/driver_format.md | 8 +++++++- doc/theory.rst | 14 +++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/doc/driver_format.md b/doc/driver_format.md index 8b2cb0fe..b22b1fbf 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -1413,6 +1413,11 @@ Behaviour: same row (within 0.25 % without the row), with or without a VIV AMPLITUDE table and VIV DAMPING. On a held cable in a current `Tf` changes A/D by 0.03 % (wake oscillator) and at most 0.24 % (synchronisation model). +- The two conditions hold together only for a motion much slower than the VIV. Keeping about + 95 % of the VIV velocity (`omega Tf >= 3`) while leaving at most 10 % of the motion's velocity + in the relative velocity (`omega_m Tf <= 0.1`) needs a motion period at least 30 VIV periods + long. For a motion only a few VIV periods long (a floater heave close to the VIV frequency) no + `Tf` separates the two, and the response depends on `Tf`: report its sensitivity to `Tf`. - The filtered velocity is part of the step-recovery, snapshot and checkpoint state. A row with `Tf = 0` leaves the run exactly as without it. It acts on `EI = 0` lines and finite-EI cables, standalone and coupled. A row fails if it is not `TypeName Tf`, names an undefined or already @@ -1450,7 +1455,8 @@ Behaviour: row the axes and the blend take the ambient flow relative to the cable's filtered motion. - **`0 0 1` amplifies the in-line drag alone.** With an amplitude table's `CdAmp` (for example Chaplin et al. 2005, Eq. 4), the mean in-line drag of a vibrating cable rises while its - cross-flow drag stays Morison's. A `CdAmp` without this row multiplies the whole normal drag, + cross-flow drag stays Morison's. The factor multiplies the whole in-line drag term, so the + in-line damping rises with it. A `CdAmp` without this row multiplies the whole normal drag, the cross-flow damping included. - **`0.31 0.89` is the published cross-flow-only model** of Thorsen et al. (2016), fitted to still-water decay tests for `y0/D` up to about 0.6. It removes the linear part of Morison's diff --git a/doc/theory.rst b/doc/theory.rst index e0a540ca..0f8b3914 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1576,8 +1576,10 @@ relative to the cable's filtered motion (:ref:`theory-viv-frame`). The row serves two uses: - With :math:`(0, 0, 1)` and the drag factor of :ref:`Chaplin et al. (2005) `, - the amplification acts on the mean in-line drag alone, as measured, while the cross-flow drag - stays Morison's (validation case L3-D, the Delta Flume riser in a stepped current). + the amplification acts on the in-line drag alone, while the cross-flow drag stays Morison's + (validation case L3-D, the Delta Flume riser in a stepped current). The factor is measured on + the mean drag, but it multiplies the whole in-line term, so the in-line damping + :math:`-\tfrac12\rho D C_{dn}A_d|\mathbf w|\,\dot x` rises with it. - :math:`(0.31, 0.89, 0)` is Thorsen's cross-flow model. It drops the linear part :math:`\tfrac12\rho D C_{dn}U\dot y` of Morison's cross-flow damping, so it is consistent with cross-flow VIV alone. An in-line force that turns with the relative flow can then drive an @@ -1631,7 +1633,13 @@ The velocity relative to :math:`\bar{\mathbf v}` loses the part of the VIV veloc at :math:`\omega` it is scaled by :math:`\omega T_f/\sqrt{1 + \omega^2 T_f^2}` and led by :math:`\arctan(1/\omega T_f)` (0.9985 and 3.1° at 0.29 Hz with :math:`T_f` 10 s). For a motion at :math:`\omega_m` the filter lags by :math:`\arctan\omega_m T_f`. :math:`T_f` is therefore taken -several VIV periods long and short against the motion. +several VIV periods long and short against the motion. The two conditions hold together only for +a motion much slower than the VIV: keeping about 95 % of the VIV velocity +(:math:`\omega T_f \ge 3`) while leaving at most 10 % of the motion's velocity in the relative +velocity (:math:`|1 - H(\omega_m)| = \omega_m T_f/\sqrt{1 + \omega_m^2 T_f^2} \le 0.1` with the +filter's :math:`H(\omega) = 1/(1 + i\omega T_f)`, so :math:`\omega_m T_f \le 0.1`) needs :math:`\omega/\omega_m \ge 30`, a motion period at least 30 +VIV periods long. For a motion only a few VIV periods long no :math:`T_f` separates the two, and +the response depends on :math:`T_f`. A pipe of the displaced mass (20 m, :math:`D` 0.1 m, ``Cl`` 0.8) moved in still water with velocity amplitude 0.6 m/s and period 40 s, against the same pipe held in the water moving the From dca9e2902e32caf9413b64441678d6d86e6c3350 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Tue, 17 Nov 2026 11:36:10 +0900 Subject: [PATCH 32/47] validation: FLOTANT power-cable specimen VIV in tow tests (L3-F) (#175) The OD 48 mm research cable of the FLOTANT tests at MARIN (de Wilde, Heijnsdijk & de Ridder 2021, Deliverable D5.5, MARIN report 30995-53-DWB): 6.4 m hanging from the carriage with a 200 kg clump, towed at the 40 speeds of 0.025-1.0 m/s. It tests cross-flow and in-line VIV of a real cable section against three published coefficient sets, none fitted to these tests, on a structure identified only from the specimen's forced-oscillation RAOs. validation/experiments/flotant/flotant_viv.py writes a deck per case, runs them in parallel (reused when deck and executable are unchanged) and compares: - tow: A/D_rms = sigma/OD at 1/2L, 3/4L and L, cross-flow and in line, at the same test speed, the model's displacement processed as the report's accelerometer motions (the g theta/omega^2 tilt term, the 3.5 rad/s high-pass); Ur with f1 1.77 Hz as Appendix 3; 60 s runs, statistics after 20 s, dt 2 ms; - rao: the in-air (5 and 10 mm) and in-water (5 mm) RAOs of Appendices 1 and 2, the structural check. The line follows the report's FEM tables node by node, in fresh water (Table 2-2 implies 1000 kg/m^3), with the clump or counterweight as a 20 kN/m axial spring in series. What the tests leave open is identified from the RAOs: cable EI 1650 N m^2 and bending damping 130 N m^2 s from the in-air resonance (the tables' EI 3000 needs MARIN's empirical factor 1.10), and in water a link chain bending with EI 100 N m^2 and the clump held laterally by 32.5 kN/m and 20 N s/m, which give the measured split of the first in-water mode (r.m.s. log error 0.46 in surge against 1.19 for MARIN's fixed clump and 1.17 for a free one). Sets, checked against the articles: - uls19, Ulveseter et al. (2019), Table 1 (Cl 0.85, cF 0.144, dF 0.064, ClX 0.75, alpha 0.15, Chh 1.5), fitted to the NDP riser: blind here; - b1, the generic set of the Delta Flume case (Cl 0.8, cF 0.18, dF 0.08, ClX 0.85, alpha 0.15, Chaplin's drag amplification, VIV DAMPING 0 0 1): blind; - wake, Facchinetti et al. (2004) (CL0 0.3, St 0.2, eps 0.3, A 12): blind. Result on the second-order VIV phase update (#171) (cross-flow r.m.s. log error over the three stations, Ur >= 3): - uls19 0.731: the first peak at 1/2L is 0.755 at Ur 5.30 against 0.776 at 5.58, but the rise starts at a lower speed (0.42 against 0.18 at Ur 3.53), the lock-in releases at Ur 7.06 against 5.88 (1.2 Ur late) and the upper branch stays at 0.64-0.71 above Ur 9 where the test falls to 0.18-0.44; - b1 0.594: 38 % low at the peak (0.483), releases at the measured Ur; - wake 1.208: 62 % low (0.296). With MARIN's fixed clump or a free clump (End B Free) uls19 scores 0.721 and 0.692 but releases at Ur 8.83 and 9.12 and misses the RAOs. extract_d55.py reads the data from the report's PDF (FEM tables from the text, the RAO charts from the vector graphics, Appendix 3 from the raster images calibrated on the grid lines; every point maps to a tested speed within 0.0085 m/s). The caveats of the data are stated: the Ur basis (1.77 Hz against the 1.3 Hz first in-water mode of Sec. 5.3), the bottom tension (1436 N in Table 6-1 against about 1700 N in the FEM table) and the towing direction alternating with speed. Half the time step, two elements per table element and 120 s runs change no A/D_rms by more than 0.006 at five speeds; the RAO scores move by at most 0.001. The default command run into a new work directory reproduces the committed record byte for byte. Added to VALIDATION.md as L3-F, to the experiments index, the changelog and the references (de Wilde et al. 2021, from the report's PDF; no DOI); the top-level README now names the seven published experiments. flotant_viv.py and ndp_riser_viv.py now remove a folder's result, executable stamp and output before writing new inputs, so a rerun that fails or is interrupted cannot leave the previous model's result to be reused; a tow selection entirely below Ur 3 prints n/a for its scores instead of failing before the comparison files are written. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 9 + README.md | 4 +- VALIDATION.md | 32 +- doc/references.rst | 8 + validation/README.md | 2 +- validation/experiments/README.md | 5 +- validation/experiments/flotant/README.md | 341 +++++++ validation/experiments/flotant/extract_d55.py | 336 +++++++ validation/experiments/flotant/fem_air.csv | 102 ++ validation/experiments/flotant/fem_water.csv | 102 ++ validation/experiments/flotant/flotant_viv.py | 882 ++++++++++++++++++ .../experiments/flotant/measured_rao.csv | 670 +++++++++++++ .../experiments/flotant/measured_tow_ad.csv | 240 +++++ .../experiments/flotant/provenance.json | 434 +++++++++ .../experiments/flotant/rao_comparison.csv | 298 ++++++ .../flotant/response_comparison.csv | 121 +++ validation/experiments/flotant/summary.json | 505 ++++++++++ .../experiments/ndp_riser/ndp_riser_viv.py | 5 + 18 files changed, 4089 insertions(+), 7 deletions(-) create mode 100644 validation/experiments/flotant/README.md create mode 100644 validation/experiments/flotant/extract_d55.py create mode 100644 validation/experiments/flotant/fem_air.csv create mode 100644 validation/experiments/flotant/fem_water.csv create mode 100644 validation/experiments/flotant/flotant_viv.py create mode 100644 validation/experiments/flotant/measured_rao.csv create mode 100644 validation/experiments/flotant/measured_tow_ad.csv create mode 100644 validation/experiments/flotant/provenance.json create mode 100644 validation/experiments/flotant/rao_comparison.csv create mode 100644 validation/experiments/flotant/response_comparison.csv create mode 100644 validation/experiments/flotant/summary.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 39dbcb62..29c376c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -123,6 +123,15 @@ All notable changes to CableDyn are recorded in this file. The format follows dominant frequency and σ/D: the set Ulveseter et al. (2019) fitted to these tests matches strain (r.m.s. log error 0.178), frequency and amplitude together; Andersen et al.'s (2024b) sheared-flow average 0.186; the generic set, blind, 0.277. +- Validation case L3-F (`validation/experiments/flotant`): VIV of the FLOTANT OD 48 mm + power-cable specimen of de Wilde et al. (2021) with its 200 kg clump weight at the 40 tow + speeds, cross-flow and in-line A/D_rms at three stations, with three published coefficient + sets none of which is fitted to these tests, on a structure identified from the specimen's + in-air and in-water RAOs. The set of Ulveseter et al. (2019) gives the first cross-flow peak + (0.755 against 0.776 at mid-length) but responds from a lower speed and releases 1.2 Ur late + (cross-flow r.m.s. log error 0.731); the generic set is 38 % low at the peak and releases at + the measured speed (0.594); the wake oscillator of Facchinetti et al. (2004) is 62 % low + (1.208). - Theory manual, Published coefficient sets: the VIV coefficient sets of Thorsen et al. (2016, 2017), Ulveseter et al. (2018), Andersen et al. (2024a, b) and Facchinetti et al. (2004), each with its source, its test data and the line-type columns it maps to, and Thorsen et al.'s diff --git a/README.md b/README.md index 5d9a19ec..1f6aa909 100644 --- a/README.md +++ b/README.md @@ -171,9 +171,9 @@ layout is described in the architecture notes in the repository. ## Validation CableDyn is verified against analytical solutions and compared with MoorDyn, -OrcaFlex, six published physical experiments (Holcombe lazy-wave, Bergdahl dynamic +OrcaFlex, seven published physical experiments (Holcombe lazy-wave, Bergdahl dynamic chain, Chaplin riser natural frequencies and stepped-current VIV, Wang catenary-riser VIV, -NDP high-mode riser VIV), the IEA 15 MW VolturnUS-S reference systems, and coupled OpenFAST runs. Results, +NDP high-mode riser VIV, FLOTANT power-cable VIV), the IEA 15 MW VolturnUS-S reference systems, and coupled OpenFAST runs. Results, acceptance criteria, and reproduction commands are in the [validation record](https://cabledyn.readthedocs.io/en/latest/validation.html); data and scripts are in [`validation/`](https://cabledyn.readthedocs.io/en/latest/validation.html). diff --git a/VALIDATION.md b/VALIDATION.md index 4f68327c..c2e73f44 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -86,6 +86,7 @@ article's methods, are compared in | **L3-D** | Chaplin Delta Flume riser in a stepped current, blind-trial cases 1–9, cross-flow and in-line VIV | measured dominant mode, peak cross-flow amplitude, mean in-line displacement, curvature standard deviations | mode right in 5/9, within one in 9/9; mean in-line within ±17% in 7/9 (−25% to +34%); cross-flow amplitude −45% to +4%; cross-flow curvature −39% to +26% | generic coefficient set, no fitted parameter | Pass measured | | **L3-W** | SJTU steel catenary riser in 0.2 m/s current, cross-flow VIV | measured r.m.s. strain (25 stations) and dominant frequency | frequency 0.992 vs 1.00 Hz; max r.m.s. strain +7.3%, station mean +3.6% | published coefficient set, no fitted parameter | Pass | | **L3-N** | NDP 38 m high-mode riser in uniform flow, 0.3–2.4 m/s (22 tests), cross-flow VIV | measured maximum r.m.s. cross-flow strain, dominant frequency, spatial-mean σ/D | strain r.m.s. log error: Ulveseter et al. (2019) set 0.178, Andersen et al. (2024b) 0.186, generic set 0.277, Thorsen et al. (2016) 0.363 (their own simulation 0.187); f D/U 0.145 / 0.134 / 0.192 / 0.193 vs 0.143 measured | generic set blind; the other sets fitted by their authors to NDP tests (implementation check) | Pass measured | +| **L3-F** | FLOTANT OD 48 mm power-cable specimen with a 200 kg clump, tow tests at 0.025–1.0 m/s (40 tests), cross-flow and in-line VIV | measured A/D_rms (σ/OD) at 1/2L, 3/4L and L (de Wilde et al. 2021, App. 3) | CF r.m.s. log error (Ur ≥ 3): Ulveseter et al. (2019) set 0.731, generic set 0.594, wake oscillator 1.208; first peak at 1/2L 0.755 / 0.483 / 0.296 vs 0.776 measured; release Ur 7.06 / 5.89 / 5.30 vs 5.88 | published VIV sets, none fitted to these tests; structure identified from the specimen's in-air and in-water RAOs | Pass measured | | **L-fig** | Along-arc curvature overlay (CableDyn / OrcaFlex / MoorDyn-F ±4×) | 3-code committed record | CableDyn peak 0.11% from OrcaFlex | <0.5% | Pass | | **L4-1** | Coupled platform + mooring | synthetic reference | bit-for-bit | — | Pass | | **L4-1b** | VolturnUS-S coupled platform + power cable | OpenFAST v5.0.0 (CompMooring 5 vs 3) | platform DOFs <0.6% (3-seed DLC-1.1); fairlead and anchor <0.001% static | <3% platform | Pass | @@ -305,8 +306,9 @@ initialisation. ### Physical experiments -No line or load parameter is fitted to any of the experiments. Inputs, reduction -scripts, results, and source provenance are in +No line or load parameter is fitted to the measurements a case is compared with (L3-F +identifies its structure from forced-oscillation tests of the same specimen, separate from +the tow tests it predicts). Inputs, reduction scripts, results, and source provenance are in [`validation/experiments`](https://github.com/SMI-Lab-Inha/CableDyn/tree/main/validation/experiments). - **L3-H Holcombe static lazy-wave test** @@ -401,6 +403,32 @@ scripts, results, and source provenance are in 0.184 and 0.375 for the generic, Andersen, Ulveseter and Thorsen sets, f D/U within 0.001 and σ/D within 1.4%. +- **L3-F FLOTANT power-cable specimen, cross-flow and in-line VIV in tow tests** + ([de Wilde et al., 2021](https://cabledyn.readthedocs.io/en/latest/references.html#ref-dewilde2021)): + the 6.4 m OD 48 mm cable hanging from the carriage with its 200 kg clump weight, towed at the 40 + speeds of 0.025–1.0 m/s, compared with the measured A/D_rms (σ/OD) at 1/2L, 3/4L and L, the + model's displacements processed as the report's accelerometer motions (tilt term, 3.5 rad/s + high-pass). The line follows the report's FEM tables node by node. The structure the tests + leave open is identified from the specimen's forced-oscillation RAOs, not from the tow data: + the cable's EI (1650 N m², where the tables' 3000 N m² needs an empirical factor to match the + resonance) and bending damping from the in-air RAOs (resonance at the measured 1.7 Hz, peaks + 7.4 and 7.2 against 8.7 and 5.9 at 5 and 10 mm), and in water a bending link chain and a + laterally restrained clump that reproduce the measured split of the first mode (peaks 1.2 and + 1.9 Hz against 1.3 and 1.8 Hz; r.m.s. log error 0.46 against 1.19 with MARIN's fixed clump). + Three published VIV sets, none fitted to these tests (r.m.s. log error of the cross-flow + A/D_rms over the three stations, Ur ≥ 3): + - the set Ulveseter et al. (2019) fitted to the NDP riser gives the first peak at mid-length, + 0.755 at Ur 5.30 against 0.776 at Ur 5.58, but responds from a lower speed (0.42 against + 0.18 at Ur 3.53), releases at Ur 7.06 against 5.88 and holds 0.64–0.71 above Ur 9 where the + test falls to 0.18–0.44: 0.731; + - the generic set is 38% low at the peak (0.483) and releases at the measured Ur: 0.594; + - the wake oscillator of Facchinetti et al. (2004) is 62% low (0.296): 1.208. + + No set predicts the speed range of the lock-in. With MARIN's fixed clump or a free clump the + same set scores 0.721 and 0.692 but releases at Ur 8.83 and 9.12 and misses the in-water RAOs. + Half the time step, two elements per table element and 120 s runs change no A/D_rms by more + than 0.006 at five speeds; the default run reproduces the committed record byte for byte. + ## L4 coupled OpenFAST - **L4-1 synthetic** (`l4_platform_mooring`): 6-DOF platform moored by three taut diff --git a/doc/references.rst b/doc/references.rst index 74e5fa93..1003799c 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -308,6 +308,14 @@ Verification and validation references Offshore and Arctic Engineering (OMAE2011)*, Volume 7: CFD and VIV; Offshore Geotechnics, 511–522. https://doi.org/10.1115/OMAE2011-49820 +.. _ref-dewilde2021: + +- **de Wilde, J., Heijnsdijk, R. & de Ridder, E.-J. (2021).** *D5.5 – Report on VIV + (hydrodynamic) behaviour.* FLOTANT project deliverable 210430-FLT-WP5_D-5-5_V0 (MARIN report + 30995-53-DWB), Maritime Research Institute Netherlands, 30 April 2021. EU Horizon 2020 grant + agreement 815289 (https://doi.org/10.3030/815289); public deliverable, no DOI. + https://flotantproject.eu/wp-content/uploads/2021/11/210430_FLT-D5.5_VIV_test_v0.pdf + Comparison codes ---------------- diff --git a/validation/README.md b/validation/README.md index 1e0d17db..ccda0555 100644 --- a/validation/README.md +++ b/validation/README.md @@ -16,7 +16,7 @@ redistributed. | [`RELEASE_0_1_1.md`](RELEASE_0_1_1.md) | The same for v0.1.1 | | [`RELEASE_0_1_0.md`](RELEASE_0_1_0.md) | The same for v0.1.0 | | [`bodies/`](bodies/README.md) | Rigid-body, rod and shared-anchor cases with MoorDyn-C twins, stored references and pass limits | -| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, Wang et al. (2014) catenary-riser VIV and Trim et al. (2005) NDP high-mode riser VIV comparisons | +| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, Wang et al. (2014) catenary-riser VIV, Trim et al. (2005) NDP high-mode riser VIV and de Wilde et al. (2021) FLOTANT power-cable VIV comparisons | | [`PERFORMANCE_0_1_0.md`](PERFORMANCE_0_1_0.md) | Wall time of CableDyn 0.1.0, MoorDyn-C and MoorDyn-F at equal accuracy on five mooring, cable, buoy and coupled cases | | [`performance/`](performance/README.md) | Same-host wall-clock records of the L5 cases: the resolved lazy-wave spans, the one-hour VolturnUS-S mooring and the tension-only chain | | [`PAPER_REPRODUCTION.md`](PAPER_REPRODUCTION.md) | Every CableDyn result in the journal article, re-run with the release defaults and in paper mode | diff --git a/validation/experiments/README.md b/validation/experiments/README.md index 71f4091a..c9b32e25 100644 --- a/validation/experiments/README.md +++ b/validation/experiments/README.md @@ -2,7 +2,7 @@ # Experimental comparisons -This directory lets reviewers reproduce CableDyn's comparisons with six published physical +This directory lets reviewers reproduce CableDyn's comparisons with seven published physical experiments. Each subdirectory gives the data source, the translation of the published parameters into a CableDyn model, the assessed quantity, the reproduction commands and the committed results. @@ -15,5 +15,6 @@ committed results. | [`delta_flume/`](delta_flume/README.md) | Chaplin et al. (2005), 13.12 m vertical tension riser, stepped current, blind-trial cases 1–9 | Finite-EI riser, synchronisation VIV, cross-flow and in-line | | [`wang_scr/`](wang_scr/README.md) | Wang et al. (2014), truncated steel catenary riser in uniform current, cross-flow VIV | Finite-EI riser, synchronisation VIV | | [`ndp_riser/`](ndp_riser/README.md) | Trim et al. (2005), NDP 38 m high-mode riser in uniform flow, cross-flow VIV with a generic and three published coefficient sets | Finite-EI riser, synchronisation VIV | +| [`flotant/`](flotant/README.md) | de Wilde et al. (2021), FLOTANT OD 48 mm power-cable specimen with a clump weight, tow tests and forced-oscillation RAOs, cross-flow and in-line VIV with three published coefficient sets | Finite-EI cable, synchronisation and wake-oscillator VIV | -The results are summarised as cases L3-H, L3-B, L3-C, L3-D, L3-W and L3-N in [`VALIDATION.md`](../../VALIDATION.md). +The results are summarised as cases L3-H, L3-B, L3-C, L3-D, L3-W, L3-N and L3-F in [`VALIDATION.md`](../../VALIDATION.md). diff --git a/validation/experiments/flotant/README.md b/validation/experiments/flotant/README.md new file mode 100644 index 00000000..439e8d59 --- /dev/null +++ b/validation/experiments/flotant/README.md @@ -0,0 +1,341 @@ + + +# FLOTANT OD 48 mm research cable: VIV in tow tests + +This directory compares CableDyn with the tests of a power-cable specimen at MARIN for the EU +project FLOTANT: de Wilde, Heijnsdijk & de Ridder (2021), Deliverable D5.5, MARIN report +30995-53-DWB, a public deliverable without a DOI, +. A 6.4 m +cable of 48 mm outer diameter, a simplified 1:3 model of a 66 kV inter-array cable, hung +vertically from the towing carriage with a 200 kg clump weight below it and was towed at 40 +speeds from 0.025 to 1.0 m/s. The report gives the cross-flow and in-line A/D_rms at three +stations against the reduced velocity. The same specimen was forced by a hexapod in air and in +water, and those RAOs are used here to set up and check the structural model. + +The tow tests are predicted with three published VIV coefficient sets, none of them fitted to +these tests. The structure is identified from the forced-oscillation tests of the same specimen +only, never from the tow data. + +In short: on the identified structure the set of Ulveseter et al. (2019), fitted by them to +another riser, gives the height of the first cross-flow peak at mid-length (0.755 against +0.776), but it responds from a lower speed, holds the lock-in 1.2 Ur longer than the test and +stays high over the upper branch. The generic set is 38 % low at the peak and releases at the +measured speed; the wake oscillator is 62 % low. The r.m.s. log errors over the three stations +are 0.73, 0.59 and 1.21, large for all three sets. + +## The test (D5.5) + +- **Specimen (Table 2-1):** OD 48 mm, 6.4 m, 2.8 kg/m; 9.7 N/m in water (Table 2-2). +- **Set-up in water (Secs. 2.4, 2.5):** from the top, the carriage (or the hexapod), a + six-component force frame, a Cardan joint, the cable, a Cardan joint, a swivel, a load cell + and the clump weight. Tension 1970 N at the top and 1436 N at the bottom (Table 6-1). +- **Instrumentation (Sec. 3):** accelerometers at 1/2L, 3/4L and L from the top of the cable + (L is its lower end). The motions are the accelerations integrated twice, high-passed at + 3.5 rad/s for the tow tests (Table 3-4). +- **A/D (Sec. 3.4.4):** Appendix 3 plots the standard-deviation A/D, A/D_rms = σ/OD (p. 53: + "The presented results are for standard deviation A/Drms"); the nominal A/D is √2 σ/OD. The + first peak is A/D_rms 0.78 (nominal 1.10) at Ur 5.7. +- **Ur (Secs. 3.4.3, 6.3):** Ur = V/(OD f1) with f1 = 1.77 Hz. +- **Tow tests (Table 6-2):** one test per speed, 0.025 m/s apart, the towing direction + alternating from 0.15 m/s on (forwards at odd multiples of 0.025 m/s from there, backwards at + even ones). Each test is analysed over its steady part, 37.5 s at 1.0 m/s up to 580 s at + 0.025 m/s. + +### Caveats of the data + +- **The Ur basis.** Ur uses f1 = 1.77 Hz, while Sec. 5.3 calls the 1.3 Hz peak of the in-water + RAOs the first mode. The origin of 1.77 Hz is not given. On a 1.3 Hz basis every Ur would be + 1.36 times larger. The comparison here is made at the tested speeds, so the basis only + labels the axis; all Ur values here are on the report's 1.77 Hz basis. +- **The bottom tension.** Table 6-1 gives 1436 N at the bottom, while the in-water FEM table of + Sec. 5.4 gives 1687–1702 N along the chain above the clump, whose submerged weight it gives as + 1710.5 N. The cable's own wet weight (about 62 N) cannot explain a 534 N difference + between top and bottom. The model takes the FEM table; its static top tension is in the + results. +- **Towing direction.** Speed and direction are confounded (one test per speed). Between Ur 5.8 + and 9.2 the backward tests are mostly lower than the forward tests at the neighbouring speeds + (at 1/2L, 0.30–0.46 against 0.42–0.56). The report attributes small differences to the coil + curvature the specimen kept. The model is symmetric; the statistics are given over all tests + and per direction. +- **Displacements from accelerometers.** The accelerometers tilt with the cable, so the + derived displacement holds a gravity term g θ/ω² (θ the slope of the cable), which the + report does not remove. The model output is processed the same way (below); without the term + the cross-flow A/D_rms of the three sets changes by up to 5 % at 1/2L, 8 % at 3/4L and + 25 % at L for Ur ≥ 3, and the r.m.s. log errors by at most 0.07. +- **Not reported:** response frequencies (only the acceleration orbits of one test, Fig. 6-1), + repeat tests and uncertainties. + +## Model + +### Structure + +The line follows the report's node-by-node FEM input tables (Sec. 4.5 in air, Sec. 5.4 in +water; `fem_air.csv`, `fem_water.csv`): 101 nodes 0.0765 m apart, with the lumped masses, the +weights and the static tensions. Each table element is one CableDyn element (`--refine N` +splits it into N), grouped into runs by the label of its lower node: steel links (EI 1e6 N m², +rigid next to the cable), Cardan joints and the wire (EI 1 N m², hinges) and the cable. + +- **Water:** fresh, 1000 kg/m³. The report does not state it; the 2.8 kg/m and 9.7 N/m of + Table 2-2 at OD 48 mm imply 1000 kg/m³. The cable's diameter is the OD; the other parts take + the diameter of the displaced volume of their weight in the table. +- **Axial compliance:** the counterweight (air) or clump (water) keeps the tension nearly + constant. The model uses an axial spring k_ax = 20 kN/m in series with the table's EA, as + EA_eff = L/(1/k_ax + L/EA), with the unstretched lengths set so that the static tensions are + the table's. + +What the tests do not give, and how it was identified: + +- **Cable bending stiffness and damping, from the in-air RAOs (Appendix 1, 200 kg).** EI is not + measured: the tables' EI = 3.0 kN m² reproduces the in-air resonance (10.7 rad/s) only with + an empirical factor λ = 1.10 that MARIN introduced in the tensioned-beam formula to match it + (Sec. 4.5). The 2.8 % damping ratio of Sec. 4.4 is a single-degree-of-freedom fit, with an + assumed participation factor of 0.5, to one peak. Here a linear section was identified on a grid + of EI and the bending damping Bb (the `EI|Bb` form of the LINE TYPES EI column) against the + surge RAOs at 5 and 10 mm: EI near 1500 N m² puts the resonance at the measured frequency + (3000 puts it 5–6 % high), and the 10 mm peak needs a larger Bb than the 5 mm one (about 160 + against 110 N m² s): the peak falls with amplitude faster than a linear section can follow, + as the report notes. The model takes EI 1650 N m² and Bb 130 N m² s, between the two. The ends of the in-air rig are Cardan + joints, a swivel and a pulley, whose friction is in the measured loss: Bb is an upper bound + for the cable's own damping. +- **The lower end in water, from the in-water RAOs (Appendix 2, 200 kg, 5 mm, 1.0–3.0 Hz).** + The measured RAO has two peaks at 1/2L, at 1.3 and 1.8 Hz, with a notch at 1.5–1.6 Hz; + at 1.8 Hz station L moves little (surge 0.55 against 4.40 at 1/2L). MARIN's FEM table fixes the clump node and makes + the chain rigid (`--end table`); that model, and the same with the clump as a free point mass + (`--end free`, a `Free` End B), have one peak near 1.2–1.3 Hz. The model used here + (`--end identified`) has two elements below the cable that the tests point to, identified on + grids against the surge and sway RAOs over 1.0–3.0 Hz (run with sea-water density; the check + below, at 1000 kg/m³, gives the scores of this model): + - the link chain and its load cell bend with EI 100 N m² (best on surge; 250 N m² on + sway), neither a hinge (EI 1, which gives a spurious mode with large motion at L at + 2.6–2.7 Hz) nor rigid; + - the clump (200 kg, its displaced volume, C_d A 0.05 m² assumed, C_a 1) is a point load on + a short rigid segment held laterally by a spring K = 32.5 kN/m and a damper 20 N s/m (the + best K on sway, the cross-flow direction of the tow tests; 30 kN/m on surge), modelled as a + clamped cantilever post, K = 3 EI_p/l³ (l = 0.3 m), from a still anchor. + + This end is phenomenological: an impedance that reproduces the measured split of the first + mode, not a measured property of the rig. The damper hardly matters (1–80 N s/m changed the + RAO score by 0.004 in the identification grid). The clump's geometry and the chain are not described in the report. + +The RAO check (below) runs the model as identified. The line is axisymmetric, so one +forcing direction stands for surge and sway. + +### Hydrodynamics + +Uniform current along x over the whole line (the carriage speed), cross-flow (CF) along y. +C_D 1.2 and C_a 1 on the cable and the hardware. Three published VIV coefficient sets on the +cable, `--sets`: + +| Set | Source | Values | Fitted to | +| --- | --- | --- | --- | +| `uls19` | Ulveseter et al. (2019), Table 1 and Sec. 4.1 | C_v,y 0.85, f̂0 0.144 ± 0.064, in-line C_v,x 0.75, α 0.15, C_hh 1.5, C_D 1.2, C_M 2 | the NDP 38 m riser in uniform flow: blind here | +| `b1` | The generic set of the Delta Flume riser case | C_l 0.8, f̂0 0.18 ± 0.08; in-line C_x 0.85, α 0.15 (Ulveseter et al. 2018, Table 3); `VIV AMPLITUDE` C_v 0.8 with the drag amplification of Chaplin et al. (2005, Eq. 4); `VIV DAMPING` `0 0 1` | nothing from these tests: blind | +| `wake` | Facchinetti et al. (2004) | `WAKE OSCILLATOR` C_L0 0.3, St 0.2, ε 0.3, A 12; Morison drag | rigid-cylinder lift and lock-in data: blind | + +The values were checked against the source articles. + +### Run and processing + +- dt 2 ms, 60 s, statistics over t > 20 s (frequency resolution 0.025 Hz). The tests' steady + windows are longer (37.5–580 s, Table 6-2). +- **As the report processes the measurement:** each station's displacement plus the gravity + term of its tilted accelerometer, g θ/ω² (θ from the two neighbouring nodes), high-passed at + 3.5 rad/s, then A/D_rms = σ/OD. `response_comparison.csv` also holds the plain displacement + (`..._displacement`). +- Ur = V/(OD f1) with f1 = 1.77 Hz. +- The dominant CF frequency at 1/2L is the spectral peak of the high-passed displacement. +- **Statistics:** the r.m.s. log error, √(mean (ln ratio)²), over the tests from the onset the + report states, Ur ≥ 3 (30 speeds, 0.275–1.0 m/s); CF and in line, per station and over all + three. The peak is the largest CF A/D_rms at 1/2L; the release is the first tested Ur above + the peak where it falls below 70 % of the peak. +- **RAOs:** a harmonic at the forcing frequency fitted over the last 10 s of each forced run + (5 periods of cosine ramp, then 25 s), of the displacement plus the tilt term, over the + hexapod amplitude; scored as the r.m.s. log error over the stations, in air over the resonance + band 1.4–2.0 Hz (1/8L, 1/4L, 1/2L, 3/4L from the bottom), in water over 1.0–3.0 Hz (1/2L, + 3/4L, L from the top). + +### Measurements + +`extract_d55.py` reads the report's PDF (not distributed; PyMuPDF, NumPy, SciPy and Pillow): + +- `fem_air.csv`, `fem_water.csv`: the FEM input tables of Secs. 4.5 and 5.4, from the text. +- `measured_rao.csv`: the 5 and 10 mm RAOs of Appendices 1 and 2 (200 kg, surge and sway). + The charts are vector graphics: each series is read as plotted coordinates through the tick + labels (axis residual at most 1.2e-3); the frequencies fall on the 0.1 Hz test grid. The + axis is labelled "[rad]" and is in rad/s. +- `measured_tow_ad.csv`: Appendix 3, A/D_rms against Ur at the three stations, in line (X) and + cross-flow (Y), 40 points per chart (39 for Y at L, where an edge marker is clipped). The + charts are raster images (1386 × 867): the axes are calibrated on the grey grid lines (Ur + residual 0.004) and the markers found by colour. Every point maps to a tested speed, + V = Ur OD f1, within 0.0085 m/s of the 0.025 m/s grid; the CF peak at 1/2L reads 0.776 at Ur + 5.58 (the report: 0.78 at 5.7). + +The data are digitised from the report; its figures are not reproduced. + +## Reproduce + +From the repository root, with `path/to/cabledyn.exe` the release executable or a local build: + +```powershell +python validation/experiments/flotant/flotant_viv.py ` + path/to/cabledyn.exe validation/experiments/flotant/work --jobs 24 ` + --summary validation/experiments/flotant +``` + +The default is the committed record: the three sets at the 40 tested speeds (120 runs) and the +90 forced-oscillation runs, about 15 minutes with 24 parallel runs on a 24-core workstation; +each run reproduces its row of the record. `--parts tow` or `--parts rao`, `--sets` and +`--speeds` (comma lists; quote them in PowerShell, `--speeds "0.45,0.475"`) select parts; +`--end` changes the lower end of the tow model; `--dt`, `--refine` and `--tmax` the time step, +the mesh and the run length. A run whose folder holds the same input files and executable is not repeated; `--keep` +keeps the output tables (about 14 MB a tow run). + +## Results + +`response_comparison.csv` holds every tow run (all stations, both components, the measured +value at the same speed, the response frequency and the mean top tension), +`rao_comparison.csv` every forced run, `summary.json` the statistics and the SHA-256 of the +executable, and `provenance.json` the sources, assumptions and sensitivity runs. + +### Structure: the forced-oscillation RAOs + +r.m.s. log error of the RAOs over the stations and the band; peaks of the RAO at 1/2L (Hz: +RAO). + +| Case | Band | Surge | Sway | CableDyn peaks | Measured, surge | Measured, sway | +| --- | --- | --- | --- | --- | --- | --- | +| Air, 5 mm | 1.4–2.0 Hz | 0.227 | 0.278 | 1.7: 7.39 | 1.7: 8.68 | 1.7: 9.14 | +| Air, 10 mm | 1.4–2.0 Hz | 0.209 | 0.230 | 1.7: 7.23 | 1.7: 5.88 | 1.7: 6.40 | +| Water, 5 mm, MARIN's table end (`table`) | 1.0–3.0 Hz | 1.186 | 1.216 | 1.3: 3.94; 2.5: 1.36 | 1.3: 4.25; 1.8: 4.40 | 1.3: 4.31; 1.9: 2.99 | +| Water, 5 mm, free clump (`free`) | 1.0–3.0 Hz | 1.174 | 1.208 | 1.4: 3.68; 2.6: 1.31 | as above | as above | +| Water, 5 mm, identified end (`identified`) | 1.0–3.0 Hz | **0.459** | **0.743** | 1.2: 3.76; 1.9: 2.45 | as above | as above | + +- **In air** the resonance is at the measured 1.7 Hz. With one linear damping the peak is 15 % + below the 5 mm test and 23 % above the 10 mm test, which brackets the amplitude dependence the + test shows. +- **In water** only the identified end gives the two peaks and the notch between them. The upper + peak is low (2.45 against 4.40 in surge; the test frequencies are 0.1 Hz apart about a sharp + peak), the lower one is 0.1 Hz low, and station L moves too much at the upper peak (1.18 + against 0.55 at 1.8 Hz in surge). The sway fit is worse (0.743), since K and the chain EI are + the best values of different directions (above). The fixed and the free clump give one peak + near 1.3–1.4 Hz and a next mode at 2.5–2.6 Hz that the test does not have. + +### Tow tests + +Cross-flow (CF) and in-line (IL) A/D_rms over the 30 tests with Ur ≥ 3 at the three stations; +the ratio is CableDyn over measured at the same speed. + +| Set | Fitted to these tests | CF r.m.s. log error (1/2L, 3/4L, L) | CF ratio, median | IL r.m.s. log error | CF peak at 1/2L (Ur, f) | Release Ur | Top tension (N) | +| --- | --- | --- | --- | --- | --- | --- | --- | +| Measured | | 0 | 1 | 0 | 0.776 (5.58) | 5.88 | 1970 | +| `uls19` | no | 0.731 (0.690, 0.605, 0.876) | 1.60 | 0.742 | 0.755 (5.30, 1.25 Hz) | 7.06 | 1962–2076 | +| `b1` | no | **0.594** (0.497, 0.479, 0.769) | 0.95 | 1.017 | 0.483 (3.83, 1.25 Hz) | 5.89 | 1962–2185 | +| `wake` | no | 1.208 (1.190, 1.291, 1.137) | 0.41 | (no in-line VIV) | 0.296 (4.41, 1.30 Hz) | 5.30 | 1962–2031 | + +The measured top tension is Table 6-1's; the model's runs from the still-water value to the +mean at 1.0 m/s. + +Cross-flow A/D_rms at 1/2L at every test from Ur 2.9, with the dominant cross-flow frequency of +`uls19`: + +| V (m/s) | Ur | Direction | Measured | `uls19` | `b1` | `wake` | f (Hz), `uls19` | +| --- | --- | --- | --- | --- | --- | --- | --- | +| 0.250 | 2.94 | backwards | 0.03 | 0.10 | 0.36 | 0.17 | 0.97 | +| 0.275 | 3.24 | forwards | 0.11 | 0.25 | 0.42 | 0.22 | 1.07 | +| 0.300 | 3.53 | backwards | 0.18 | 0.42 | 0.46 | 0.26 | 1.15 | +| 0.325 | 3.83 | forwards | 0.31 | 0.54 | 0.48 | 0.28 | 1.18 | +| 0.350 | 4.12 | backwards | 0.43 | 0.62 | 0.47 | 0.29 | 1.20 | +| 0.375 | 4.41 | forwards | 0.50 | 0.67 | 0.47 | 0.30 | 1.20 | +| 0.400 | 4.71 | backwards | 0.67 | 0.72 | 0.46 | 0.28 | 1.23 | +| 0.425 | 5.00 | forwards | 0.70 | 0.74 | 0.46 | 0.25 | 1.25 | +| 0.450 | 5.30 | backwards | 0.66 | 0.75 | 0.44 | 0.17 | 1.25 | +| 0.475 | 5.59 | forwards | 0.78 | 0.74 | 0.43 | 0.19 | 1.30 | +| 0.500 | 5.88 | backwards | 0.30 | 0.74 | 0.32 | 0.21 | 1.32 | +| 0.525 | 6.18 | forwards | 0.52 | 0.70 | 0.34 | 0.22 | 1.35 | +| 0.550 | 6.47 | backwards | 0.33 | 0.65 | 0.36 | 0.22 | 1.38 | +| 0.575 | 6.77 | forwards | 0.42 | 0.57 | 0.38 | 0.22 | 1.43 | +| 0.600 | 7.06 | backwards | 0.46 | 0.48 | 0.39 | 0.21 | 1.82 | +| 0.625 | 7.36 | forwards | 0.52 | 0.52 | 0.40 | 0.20 | 1.82 | +| 0.650 | 7.65 | backwards | 0.43 | 0.56 | 0.41 | 0.18 | 1.85 | +| 0.675 | 7.95 | forwards | 0.56 | 0.59 | 0.42 | 0.15 | 1.88 | +| 0.700 | 8.24 | backwards | 0.38 | 0.62 | 0.44 | 0.04 | 1.90 | +| 0.725 | 8.53 | forwards | 0.56 | 0.65 | 0.44 | 0.05 | 1.90 | +| 0.750 | 8.83 | backwards | 0.36 | 0.68 | 0.45 | 0.06 | 1.93 | +| 0.775 | 9.12 | forwards | 0.44 | 0.70 | 0.45 | 0.06 | 1.95 | +| 0.800 | 9.42 | backwards | 0.37 | 0.71 | 0.45 | 0.07 | 2.00 | +| 0.825 | 9.71 | forwards | 0.35 | 0.71 | 0.45 | 0.07 | 2.02 | +| 0.850 | 10.01 | backwards | 0.30 | 0.71 | 0.45 | 0.08 | 2.08 | +| 0.875 | 10.30 | forwards | 0.21 | 0.70 | 0.45 | 0.08 | 2.12 | +| 0.900 | 10.59 | backwards | 0.28 | 0.70 | 0.45 | 0.09 | 2.17 | +| 0.925 | 10.89 | forwards | 0.20 | 0.69 | 0.45 | 0.09 | 2.23 | +| 0.950 | 11.18 | backwards | 0.18 | 0.67 | 0.45 | 0.09 | 2.27 | +| 0.975 | 11.48 | forwards | 0.21 | 0.66 | 0.45 | 0.09 | 2.33 | +| 1.000 | 11.77 | backwards | 0.20 | 0.64 | 0.19 | 0.09 | 2.38 | + +- **`uls19`** (Ulveseter et al. 2019, fitted to another riser): + - the first peak is 0.755 at Ur 5.30 against 0.776 at Ur 5.58, and from Ur 4.7 to 5.6 the + model is within 0.10 of every test (0.72–0.75 against 0.66–0.78); + - the rise starts at a lower speed: 0.25–0.67 against 0.11–0.50 at Ur 3.24–4.41; + - the lock-in holds to Ur 6.77 (0.57) and releases at Ur 7.06, 1.2 Ur after the measured + release at 5.88; the response stays on the lower in-water mode (1.2–1.4 Hz) up to there and + moves to the upper one (1.8–2.0 Hz) at the release; + - on the upper branch, Ur 7.0–8.0, it is within 0.03 of the forward tests (0.52–0.59 against + 0.52–0.56); above Ur 9 it holds 0.64–0.71 where the test falls to 0.18–0.44; + - in line at 1/2L it is about half the measured value during the lock-in (0.08–0.13 against + 0.14–0.23 at Ur 4.1–5.6) and mostly above it after the release; + - below the compared range it responds at Ur 1.47 (0.11 at 1.3 Hz, f D/U 0.49), where the + test shows none (0.002). +- **`b1`** (generic): a plateau of 0.42–0.48 from Ur 3.24 to 5.59, 38 % below the measured + peak, from an early onset (0.36 at Ur 2.94 against 0.03); the release falls at the measured + Ur (5.89); the upper branch is 0.32–0.45. The in-line response during the lock-in is well + below the measured one (0.01–0.06 against 0.03–0.23). +- **`wake`** (Facchinetti et al. 2004): 0.22–0.30 up to Ur 5 on the lower mode, 62 % below the + measured peak; on the upper mode from Ur 5.30 (0.15–0.22) and on a higher one (2.975–3.45 Hz, + 0.04–0.09) from Ur 8.24. The model has no in-line VIV force, so its in-line response is the + drag's alone. +- **By direction** (1/2L, cross-flow r.m.s. log error, forward / backward tests): `uls19` + 0.647 / 0.729, `b1` 0.564 / 0.419, `wake` 1.214 / 1.164. The forward tests are the larger + ones on the upper branch, which suits `uls19` and not `b1`. +- **No set predicts these tests.** The height of the first peak is reproduced by `uls19`, its + speed range by none: `uls19` locks in too early and too long, `b1` releases at the right speed + at 62 % of the amplitude, and the wake oscillator is too weak. + +### Lower end and the tow prediction + +`uls19` at all 40 speeds with the other two lower ends (`--end`; `provenance.json`): + +| End | CF r.m.s. log error (1/2L) | CF peak at 1/2L (Ur) | Release Ur | RAO r.m.s. log error, surge | +| --- | --- | --- | --- | --- | +| `identified` | 0.731 (0.690) | 0.755 (5.30) | 7.06 | 0.459 | +| `table` (MARIN's fixed clump) | 0.721 (0.433) | 0.805 (5.59) | 8.83 | 1.186 | +| `free` (a `Free` End B) | 0.692 (0.429) | 0.811 (5.59) | 9.12 | 1.174 | + +With the fixed or free clump the response at 1/2L drops to 0.19–0.36 from Ur 9.4, which lowers +the error there, while station L moves 0.53–0.67 against the measured 0.14–0.32 and the lock-in +releases 2.9–3.2 Ur late. The tow score over the three stations does not separate the ends; +the identified end is used because it reproduces the RAOs. Every end releases late. + +### Convergence + +At 0.30, 0.45, 0.50, 0.60 and 0.80 m/s for the three sets (`provenance.json`): + +- half the time step (1 ms) changes no A/D_rms by more than 0.006 (cross-flow at most 2.1 %) + and the dominant frequency by at most one bin; +- two elements per table element change no A/D_rms by more than 0.004 (cross-flow at most + 1.4 %), and the frequency not at all; +- 120 s runs (100 s of statistics) change no A/D_rms by more than 0.005 (cross-flow at most + 1.0 %). + +For the RAOs, two elements per table element and half the time step change every r.m.s. log +error by at most 0.001. + +## Limitations + +- The structure below the cable is an identified impedance, not a measured one, and the + in-water upper peak and station L are not matched closely; the cable's EI and damping come + from the in-air tests, whose losses include the end fixtures. +- The tow tests are single runs per speed with the direction alternating, without repeats or + uncertainties; the forward and backward tests differ on the upper branch. +- The measured response frequencies are not published, so the mode a set locks in to cannot be + checked against the test except through the amplitudes of the three stations. +- The data are digitised from figures (Appendix 3 from raster images, ±0.004 in Ur). diff --git a/validation/experiments/flotant/extract_d55.py b/validation/experiments/flotant/extract_d55.py new file mode 100644 index 00000000..3492f619 --- /dev/null +++ b/validation/experiments/flotant/extract_d55.py @@ -0,0 +1,336 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Extract the data of the FLOTANT D5.5 report used by flotant_viv.py from the report's PDF. + + python extract_d55.py path/to/210430_FLT-D5.5_VIV_test_v0.pdf [OUTDIR] + +Writes, by default next to this script: + fem_air.csv, fem_water.csv the node-by-node FEM input tables (Sec. 4.5, in air, and Sec. 5.4, + in water): element label, position, accelerometer station, X Y Z, + constraint flags, lumped mass [kg], weight [N] (submerged in water), + static tension [N], EA [N], EI [N m^2] + measured_rao.csv the RAOs of Appendix 1 (in air, 200 kg, surge and sway) and Appendix + 2 (in water, 200 kg, surge and sway) at 5 and 10 mm + measured_tow_ad.csv A/D_rms against Ur of the 200 kg tow tests, Appendix 3 + +The RAO charts are vector graphics: a series is a polyline with filled markers of one colour, +named by the legend entry beside the same marker; data coordinates follow from the tick-label +words by a linear map per chart (the frequency axis is labelled "[rad]" and is in rad/s). The +Appendix 3 charts are embedded raster images (1386 x 867 px) with the tick labels inside the +raster: their axes are calibrated on the light-grey gridlines (Ur -10, -5, 0, 5, 10; A/D from 0 +in the steps of PLOTS) and the markers are the tab:blue discs. Each digitised Ur is checked +against the test speeds of Table 6-2 (multiples of 0.025 m/s, V = |Ur| OD f1, OD 0.048 m, +f1 1.77 Hz). + +Needs PyMuPDF, NumPy, SciPy and Pillow; the report is not distributed with CableDyn. +""" + +from __future__ import annotations + +import csv +import io +import re +import sys +from collections import defaultdict +from pathlib import Path + +import numpy as np +import pymupdf +from PIL import Image +from scipy import ndimage +from scipy.cluster.vq import kmeans2 + +HERE = Path(__file__).resolve().parent +OD, F1 = 0.048, 1.77 + +# ---------------------------------------------------------------- FEM input tables +FEM_PAGES = {"air": (58, 59), "water": (49, 50)} +ROW = re.compile( + r"(?P\d+)\s+(?P[A-Za-z]+)\s+(?P-?\d+\.\d+)\s+(?:(?P\d\.\d+L?|L|Hex|Top)\s+)?" + r"(?P-?\d+\.\d+)\s+(?P-?\d+\.\d+)\s+(?P-?\d+\.\d+)\s+(?P[01])(?=\s)\s+(?P[01])(?=\s)\s+" + r"(?P[01])(?=\s)\s+(?P[01])(?=\s)" + r"(?:\s+(?P-?[\d.]+)\s+(?P-?[\d.]+)\s+(?P-?[\d.]+)\s+(?P[\d.E+-]+)\s+(?P[\d.E+-]+))?" +) + + +def fem_tables(doc, out: Path) -> None: + for medium, pages in FEM_PAGES.items(): + text = re.sub(r"\s+", " ", " ".join(doc[p - 1].get_text() for p in pages)) + rows = [] + for m in ROW.finditer(text): + d = m.groupdict() + if rows and int(d["node"]) != rows[-1]["node"] + 1: + continue + if not rows and int(d["node"]) != 0: + continue + rows.append( + { + "node": int(d["node"]), + "element": d["el"], + "pos": float(d["pos"]), + "acc": d["acc"] or "", + "x": float(d["x"]), + "y": float(d["y"]), + "z": float(d["z"]), + "fixed": "".join(d[k] for k in ("c1", "c2", "c3", "c4")), + "mass": float(d["m"]) if d["m"] else None, + "weight": float(d["w"]) if d["w"] else None, + "tension": float(d["t"]) if d["t"] else None, + "EA": float(d["ea"]) if d["ea"] and d["ea"] not in "-" else None, + "EI": float(d["ei"]) if d["ei"] and d["ei"] not in "-" else None, + } + ) + with open(out / f"fem_{medium}.csv", "w", newline="", encoding="utf-8") as fh: + w = csv.DictWriter(fh, fieldnames=list(rows[0]), lineterminator="\n") + w.writeheader() + w.writerows(rows) + cab = [r for r in rows if r["element"] == "Cable"] + print( + f"fem_{medium}.csv: {len(rows)} nodes, {len(cab)} cable nodes, total lumped mass " + f"{sum(r['mass'] or 0 for r in rows):.2f} kg" + ) + + +# ---------------------------------------------------------------- RAOs (Appendices 1 and 2) +RAO_PAGES = {63: ("air", "X"), 64: ("air", "Y"), 67: ("water", "X"), 68: ("water", "Y")} +NUM = re.compile(r"^-?\d+,\d+$") + + +def num(s: str) -> float: + return float(s.replace(",", ".")) + + +def linear_fit(pairs): + n = len(pairs) + mx = sum(p for p, _ in pairs) / n + mv = sum(v for _, v in pairs) / n + a = sum((p - mx) * (v - mv) for p, v in pairs) / sum( + (p - mx) ** 2 for p, _ in pairs + ) + res = max(abs(mv + a * (p - mx) - v) for p, v in pairs) + return (lambda q: mv + a * (q - mx)), res + + +def axis_map(words, box): + """Linear maps (x -> data, y -> data) from the tick labels around the chart box.""" + x0, y0, _, y1 = box + yt = [ + ((w[1] + w[3]) / 2, num(w[4])) + for w in words # y labels carry two decimals, x labels one + if re.match(r"^-?\d+,\d\d$", w[4]) + and w[2] < x0 + 30 + and y0 - 8 < (w[1] + w[3]) / 2 < y1 + 8 + ] + # x ticks: the row of numbers on one baseline with the most entries in the chart's band + rows = defaultdict(list) + for w in words: + if NUM.match(w[4]) and w[0] > x0 - 10 and y0 - 8 < (w[1] + w[3]) / 2 < y1 + 20: + rows[round(w[1])].append(w) + xt = [((w[0] + w[2]) / 2, num(w[4])) for w in max(rows.values(), key=len)] + fx, rx = linear_fit(xt) + fy, ry = linear_fit(yt) + return fx, fy, rx, ry + + +def raos(doc, out: Path) -> None: + rows_all = [] + for pg, (medium, motion) in RAO_PAGES.items(): + page = doc[pg - 1] + words = page.get_text("words") + ticks = sorted( + (w for w in words if NUM.match(w[4]) and w[0] < 110), key=lambda w: w[1] + ) + mid = page.rect.height / 2 # the RAO chart is the upper one of the page + upper = [w for w in ticks if w[1] < mid] + ys = [(w[1] + w[3]) / 2 for w in upper] + xs = [w for w in words if NUM.match(w[4]) and w[1] < mid and w[0] > 110] + box = (min(w[2] for w in upper) + 2, min(ys), max(w[2] for w in xs), max(ys)) + fx, fy, rx, ry = axis_map(words, box) + markers: dict[tuple, list] = defaultdict(list) + for g in page.get_drawings(): + if g.get("type") != "fs" or g.get("fill") is None: + continue + r = g["rect"] + if r.width > 8 or r.height > 8: + continue + markers[tuple(round(c, 3) for c in g["fill"])].append( + ((r.x0 + r.x1) / 2, (r.y0 + r.y1) / 2) + ) + legend: dict[tuple, str] = {} + for col, pts in markers.items(): + for cx, cy in pts: + if box[3] + 25 < cy < box[3] + 140 and col not in legend: + row = sorted( + ( + w + for w in words + if abs((w[1] + w[3]) / 2 - cy) < 3 and cx < w[0] < cx + 120 + ), + key=lambda w: w[0], + ) + legend[col] = " ".join(w[4] for w in row[:5]) + n = 0 + for col, pts in markers.items(): + m = re.match( + r"([XY])_(\w+?)\s*\[m\]\s*-\s*amp\s*(\d+)mm", legend.get(col, "") + ) + if not m or int(m.group(3)) not in (5, 10): + continue + for cx, cy in pts: + if box[0] - 3 <= cx <= box[2] + 3 and box[1] - 3 <= cy <= box[3] + 3: + omega = fx(cx) + rows_all.append( + ( + medium, + motion, + m.group(2), + int(m.group(3)), + round(omega / (2 * np.pi), 1), + round(omega, 4), + round(fy(cy), 4), + pg, + ) + ) + n += 1 + print( + f"p{pg} ({medium}, {motion}): {n} points, axis residual {rx:.2g} rad/s, {ry:.2g}" + ) + rows_all.sort() + with open(out / "measured_rao.csv", "w", newline="", encoding="utf-8") as fh: + w = csv.writer(fh, lineterminator="\n") + w.writerow( + [ + "medium", + "motion", + "station", + "amp_mm", + "f_hz", + "omega_rad_s", + "rao", + "page", + ] + ) + w.writerows(rows_all) + + +# ---------------------------------------------------------------- tow tests (Appendix 3) +PLOTS = { # (page, image index): component, station, A/D gridline step + (70, 2): ("X", "1_2L", 0.05), + (70, 3): ("Y", "1_2L", 0.1), + (71, 2): ("X", "3_4L", 0.05), + (71, 3): ("Y", "3_4L", 0.1), + (72, 2): ("X", "L", 0.02), + (72, 3): ("Y", "L", 0.1), +} +UR_GRID = [-10.0, -5.0, 0.0, 5.0, 10.0] + + +def gridlines(mask: np.ndarray, axis: int, min_frac: float) -> list[float]: + """Centres of the runs of rows (axis=1) or columns (axis=0) that are mostly gridline grey.""" + frac = mask.mean(axis=axis) + idx = np.flatnonzero(frac > min_frac * frac.max()) + runs, cur = [], [idx[0]] + for i in idx[1:]: + if i == cur[-1] + 1: + cur.append(i) + else: + runs.append(cur) + cur = [i] + runs.append(cur) + return [float(np.mean(r)) for r in runs] + + +def digitise(image: Image.Image, step: float): + a = np.asarray(image.convert("RGB")).astype(int) + grey = np.all(np.abs(a - 230) <= 3, axis=2) + blue = ( + (np.abs(a[..., 0] - 31) < 25) + & (np.abs(a[..., 1] - 119) < 25) + & (np.abs(a[..., 2] - 180) < 25) + ) + cols = gridlines(grey, axis=0, min_frac=0.6) + rows = sorted( + gridlines(grey, axis=1, min_frac=0.6), reverse=True + ) # bottom (A/D 0) first + if len(cols) != len(UR_GRID): + raise SystemExit(f"found {len(cols)} vertical gridlines {cols}") + yvals = [step * k for k in range(len(rows))] + ax, bx = np.polyfit(cols, UR_GRID, 1) + ay, by = np.polyfit(rows, yvals, 1) + resx = max(abs(ax * c + bx - u) for c, u in zip(cols, UR_GRID)) + lab, n = ndimage.label(blue) + sizes = ndimage.sum(blue, lab, range(1, n + 1)) + med = float(np.median([s for s in sizes if s > 60])) + pts = [] + for i in [i + 1 for i, s in enumerate(sizes) if s > 0.4 * med]: + yy, xx = np.nonzero(lab == i) + cx, cy = xx.mean(), yy.mean() + if cy < 0.08 * a.shape[0] and cx > 0.85 * a.shape[1]: + continue # the legend marker + k = round(len(xx) / med) + if ( + k >= 2 + ): # overlapping markers (the slowest speeds): split the blob into k discs + xy = np.column_stack([xx, yy]).astype(float) + init = np.column_stack( + [np.linspace(xx.min() + 7, xx.max() - 7, k), np.full(k, cy)] + ) + cent, _ = kmeans2(xy, init, minit="matrix", seed=1) + pts += [(ax * cent[j, 0] + bx, ay * cent[j, 1] + by) for j in range(k)] + continue + pts.append((ax * cx + bx, ay * cy + by)) + return sorted(pts), resx + + +def tow(doc, out: Path) -> None: + rows = [] + for (pg, idx), (comp, st, step) in PLOTS.items(): + xref = doc[pg - 1].get_images(full=True)[idx][0] + image = Image.open(io.BytesIO(pymupdf.Pixmap(doc, xref).tobytes("png"))) + pts, resx = digitise(image, step) + print( + f"p{pg} image {idx} ({comp}, {st}): {len(pts)} points, Ur axis residual {resx:.3f}" + ) + for ur, ad in pts: + v = abs(ur) * OD * F1 + rows.append( + ( + st, + comp, + "forwards" if ur > 0 else "backwards", + round(abs(ur), 3), + round(v, 4), + f"{round(v / 0.025) * 0.025:.3f}", + round(ad, 4), + ) + ) + dv = max(abs(r[4] - float(r[5])) for r in rows) + print(f"speed check: |V - nearest multiple of 0.025 m/s| at most {dv:.4f} m/s") + with open(out / "measured_tow_ad.csv", "w", newline="", encoding="utf-8") as fh: + w = csv.writer(fh, lineterminator="\n") + w.writerow( + [ + "station", + "component", + "direction", + "Ur", + "V_digitised", + "V_test", + "AD_rms", + ] + ) + w.writerows(sorted(rows, key=lambda r: (r[0], r[1], float(r[5])))) + + +def main() -> None: + doc = pymupdf.open(sys.argv[1]) + out = Path(sys.argv[2]) if len(sys.argv) > 2 else HERE + out.mkdir(parents=True, exist_ok=True) + fem_tables(doc, out) + raos(doc, out) + tow(doc, out) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/flotant/fem_air.csv b/validation/experiments/flotant/fem_air.csv new file mode 100644 index 00000000..c8245cc4 --- /dev/null +++ b/validation/experiments/flotant/fem_air.csv @@ -0,0 +1,102 @@ +node,element,pos,acc,x,y,z,fixed,mass,weight,tension,EA,EI +0,Top,7.344,Top,0.0,0.0,0.0,1110,,,,, +1,Wire,7.267,,0.0,0.0,-0.076,0000,0.1,0.98,1996.0,100000000.0,1.0 +2,Wire,7.191,,0.0,0.0,-0.153,0000,0.1,0.98,1995.0,100000000.0,1.0 +3,Wire,7.114,,0.0,0.0,-0.229,0000,0.1,0.98,1994.0,100000000.0,1.0 +4,Wire,7.038,,0.0,0.0,-0.306,0000,0.1,0.98,1993.0,100000000.0,1.0 +5,Wire,6.961,,0.0,0.0,-0.382,0000,0.1,0.98,1992.0,100000000.0,1.0 +6,Steel,6.885,,0.0,0.0,-0.459,0000,1.12,10.99,1991.0,100000000.0,10000000000.0 +7,Joint,6.808,,0.0,0.0,-0.535,0000,0.1,0.98,1980.0,100000000.0,1.0 +8,Steel,6.732,,0.0,0.0,-0.612,0000,3.5,34.34,1979.0,100000000.0,10000000000.0 +9,Steel,6.655,,0.0,0.0,-0.688,0000,3.5,34.34,1945.0,100000000.0,10000000000.0 +10,Joint,6.579,,0.0,0.0,-0.765,0000,0.1,0.98,1910.0,100000000.0,1.0 +11,Steel,6.502,,0.0,0.0,-0.841,0000,2.89,28.35,1909.0,100000000.0,10000000000.0 +12,Cable,6.426,,0.0,0.0,-0.918,0000,0.214,2.1,1881.0,100000000.0,3000.0 +13,Cable,6.349,,0.0,0.0,-0.994,0000,0.214,2.1,1879.0,100000000.0,3000.0 +14,Cable,6.273,,0.0,0.0,-1.071,0000,0.214,2.1,1877.0,100000000.0,3000.0 +15,Cable,6.196,,0.0,0.0,-1.147,0000,0.214,2.1,1875.0,100000000.0,3000.0 +16,Cable,6.12,,0.0,0.0,-1.224,0000,0.214,2.1,1873.0,100000000.0,3000.0 +17,Cable,6.043,,0.0,0.0,-1.3,0000,0.214,2.1,1870.0,100000000.0,3000.0 +18,Cable,5.967,,0.0,0.0,-1.377,0000,0.214,2.1,1868.0,100000000.0,3000.0 +19,Cable,5.89,,0.0,0.0,-1.453,0000,0.214,2.1,1866.0,100000000.0,3000.0 +20,Cable,5.814,,0.0,0.0,-1.53,0000,0.214,2.1,1864.0,100000000.0,3000.0 +21,Cable,5.737,,0.0,0.0,-1.606,0000,0.214,2.1,1862.0,100000000.0,3000.0 +22,Cable,5.661,,0.0,0.0,-1.683,0000,0.214,2.1,1860.0,100000000.0,3000.0 +23,Cable,5.584,,0.0,0.0,-1.759,0000,0.214,2.1,1858.0,100000000.0,3000.0 +24,Cable,5.508,,0.0,0.0,-1.836,0000,0.214,2.1,1856.0,100000000.0,3000.0 +25,Cable,5.431,,0.0,0.0,-1.912,0000,0.214,2.1,1854.0,100000000.0,3000.0 +26,Cable,5.355,,0.0,0.0,-1.989,0000,0.214,2.1,1852.0,100000000.0,3000.0 +27,Cable,5.278,,0.0,0.0,-2.065,0000,0.214,2.1,1849.0,100000000.0,3000.0 +28,Cable,5.202,,0.0,0.0,-2.142,0000,0.214,2.1,1847.0,100000000.0,3000.0 +29,Cable,5.125,,0.0,0.0,-2.218,0000,0.214,2.1,1845.0,100000000.0,3000.0 +30,Cable,5.049,,0.0,0.0,-2.295,0000,0.214,2.1,1843.0,100000000.0,3000.0 +31,Cable,4.972,,0.0,0.0,-2.371,0000,0.214,2.1,1841.0,100000000.0,3000.0 +32,Cable,4.896,,0.0,0.0,-2.448,0000,0.214,2.1,1839.0,100000000.0,3000.0 +33,Cable,4.819,0.750,0.0,0.0,-2.524,0000,0.214,2.1,1837.0,100000000.0,3000.0 +34,Cable,4.743,,0.0,0.0,-2.601,0000,0.214,2.1,1835.0,100000000.0,3000.0 +35,Cable,4.666,,0.0,0.0,-2.677,0000,0.214,2.1,1833.0,100000000.0,3000.0 +36,Cable,4.59,,0.0,0.0,-2.754,0000,0.214,2.1,1831.0,100000000.0,3000.0 +37,Cable,4.513,,0.0,0.0,-2.83,0000,0.214,2.1,1828.0,100000000.0,3000.0 +38,Cable,4.437,,0.0,0.0,-2.907,0000,0.214,2.1,1826.0,100000000.0,3000.0 +39,Cable,4.36,,0.0,0.0,-2.983,0000,0.214,2.1,1824.0,100000000.0,3000.0 +40,Cable,4.284,,0.0,0.0,-3.06,0000,0.214,2.1,1822.0,100000000.0,3000.0 +41,Cable,4.207,,0.0,0.0,-3.136,0000,0.214,2.1,1820.0,100000000.0,3000.0 +42,Cable,4.131,,0.0,0.0,-3.213,0000,0.214,2.1,1818.0,100000000.0,3000.0 +43,Cable,4.054,,0.0,0.0,-3.289,0000,0.214,2.1,1816.0,100000000.0,3000.0 +44,Cable,3.978,,0.0,0.0,-3.366,0000,0.214,2.1,1814.0,100000000.0,3000.0 +45,Cable,3.901,,0.0,0.0,-3.442,0000,0.214,2.1,1812.0,100000000.0,3000.0 +46,Cable,3.825,,0.0,0.0,-3.519,0000,0.214,2.1,1810.0,100000000.0,3000.0 +47,Cable,3.748,,0.0,0.0,-3.595,0000,0.214,2.1,1807.0,100000000.0,3000.0 +48,Cable,3.672,,0.0,0.0,-3.672,0000,0.214,2.1,1805.0,100000000.0,3000.0 +49,Cable,3.595,,0.0,0.0,-3.748,0000,0.214,2.1,1803.0,100000000.0,3000.0 +50,Cable,3.519,,0.0,0.0,-3.825,0000,0.214,2.1,1801.0,100000000.0,3000.0 +51,Cable,3.442,,0.0,0.0,-3.901,0000,0.214,2.1,1799.0,100000000.0,3000.0 +52,Cable,3.366,,0.0,0.0,-3.978,0000,0.214,2.1,1797.0,100000000.0,3000.0 +53,Cable,3.289,,0.0,0.0,-4.054,0000,0.214,2.1,1795.0,100000000.0,3000.0 +54,Cable,3.213,0.500,0.0,0.0,-4.131,0000,0.214,2.1,1793.0,100000000.0,3000.0 +55,Cable,3.136,,0.0,0.0,-4.207,0000,0.214,2.1,1791.0,100000000.0,3000.0 +56,Cable,3.06,,0.0,0.0,-4.284,0000,0.214,2.1,1789.0,100000000.0,3000.0 +57,Cable,2.983,,0.0,0.0,-4.36,0000,0.214,2.1,1786.0,100000000.0,3000.0 +58,Cable,2.907,,0.0,0.0,-4.437,0000,0.214,2.1,1784.0,100000000.0,3000.0 +59,Cable,2.83,,0.0,0.0,-4.513,0000,0.214,2.1,1782.0,100000000.0,3000.0 +60,Cable,2.754,,0.0,0.0,-4.59,0000,0.214,2.1,1780.0,100000000.0,3000.0 +61,Cable,2.677,,0.0,0.0,-4.666,0000,0.214,2.1,1778.0,100000000.0,3000.0 +62,Cable,2.601,,0.0,0.0,-4.743,0000,0.214,2.1,1776.0,100000000.0,3000.0 +63,Cable,2.524,,0.0,0.0,-4.819,0000,0.214,2.1,1774.0,100000000.0,3000.0 +64,Cable,2.448,,0.0,0.0,-4.896,0000,0.214,2.1,1772.0,100000000.0,3000.0 +65,Cable,2.371,,0.0,0.0,-4.972,0000,0.214,2.1,1770.0,100000000.0,3000.0 +66,Cable,2.295,,0.0,0.0,-5.049,0000,0.214,2.1,1768.0,100000000.0,3000.0 +67,Cable,2.218,,0.0,0.0,-5.125,0000,0.214,2.1,1765.0,100000000.0,3000.0 +68,Cable,2.142,,0.0,0.0,-5.202,0000,0.214,2.1,1763.0,100000000.0,3000.0 +69,Cable,2.065,,0.0,0.0,-5.278,0000,0.214,2.1,1761.0,100000000.0,3000.0 +70,Cable,1.989,,0.0,0.0,-5.355,0000,0.214,2.1,1759.0,100000000.0,3000.0 +71,Cable,1.912,,0.0,0.0,-5.431,0000,0.214,2.1,1757.0,100000000.0,3000.0 +72,Cable,1.836,,0.0,0.0,-5.508,0000,0.214,2.1,1755.0,100000000.0,3000.0 +73,Cable,1.759,,0.0,0.0,-5.584,0000,0.214,2.1,1753.0,100000000.0,3000.0 +74,Cable,1.683,,0.0,0.0,-5.661,0000,0.214,2.1,1751.0,100000000.0,3000.0 +75,Cable,1.606,0.250,0.0,0.0,-5.737,0000,0.214,2.1,1749.0,100000000.0,3000.0 +76,Cable,1.53,,0.0,0.0,-5.814,0000,0.214,2.1,1747.0,100000000.0,3000.0 +77,Cable,1.453,,0.0,0.0,-5.89,0000,0.214,2.1,1744.0,100000000.0,3000.0 +78,Cable,1.377,,0.0,0.0,-5.967,0000,0.214,2.1,1742.0,100000000.0,3000.0 +79,Cable,1.3,,0.0,0.0,-6.043,0000,0.214,2.1,1740.0,100000000.0,3000.0 +80,Cable,1.224,,0.0,0.0,-6.12,0000,0.214,2.1,1738.0,100000000.0,3000.0 +81,Cable,1.147,,0.0,0.0,-6.196,0000,0.214,2.1,1736.0,100000000.0,3000.0 +82,Cable,1.071,,0.0,0.0,-6.273,0000,0.214,2.1,1734.0,100000000.0,3000.0 +83,Cable,0.994,,0.0,0.0,-6.349,0000,0.214,2.1,1732.0,100000000.0,3000.0 +84,Cable,0.918,,0.0,0.0,-6.426,0000,0.214,2.1,1730.0,100000000.0,3000.0 +85,Cable,0.841,0.125,0.0,0.0,-6.502,0000,0.214,2.1,1728.0,100000000.0,3000.0 +86,Cable,0.765,,0.0,0.0,-6.579,0000,0.214,2.1,1726.0,100000000.0,3000.0 +87,Cable,0.688,,0.0,0.0,-6.655,0000,0.214,2.1,1723.0,100000000.0,3000.0 +88,Cable,0.612,,0.0,0.0,-6.732,0000,0.214,2.1,1721.0,100000000.0,3000.0 +89,Cable,0.535,,0.0,0.0,-6.808,0000,0.214,2.1,1719.0,100000000.0,3000.0 +90,Cable,0.459,,0.0,0.0,-6.885,0000,0.214,2.1,1717.0,100000000.0,3000.0 +91,Cable,0.382,,0.0,0.0,-6.961,0000,0.214,2.1,1715.0,100000000.0,3000.0 +92,Cable,0.306,,0.0,0.0,-7.038,0000,0.214,2.1,1713.0,100000000.0,3000.0 +93,Cable,0.229,,0.0,0.0,-7.114,0000,0.214,2.1,1711.0,100000000.0,3000.0 +94,Cable,0.153,,0.0,0.0,-7.191,0000,0.214,2.1,1709.0,100000000.0,3000.0 +95,Cable,0.076,,0.0,0.0,-7.267,0000,0.214,2.1,1707.0,100000000.0,3000.0 +96,Cable,0.0,,0.0,0.0,-7.344,0000,0.214,2.1,1705.0,100000000.0,3000.0 +97,Steel,-0.076,,0.0,0.0,-7.42,0000,2.89,28.35,1702.0,100000000.0,10000000000.0 +98,Joint,-0.153,,0.0,0.0,-7.497,0000,0.1,0.98,1674.0,100000000.0,1.0 +99,Steel,-0.229,,0.0,0.0,-7.573,0000,5.21,51.11,1673.0,100000000.0,10000000000.0 +100,Joint,-0.306,Hex,0.0,0.0,-7.65,1110,,,,, diff --git a/validation/experiments/flotant/fem_water.csv b/validation/experiments/flotant/fem_water.csv new file mode 100644 index 00000000..7f1d70a5 --- /dev/null +++ b/validation/experiments/flotant/fem_water.csv @@ -0,0 +1,102 @@ +node,element,pos,acc,x,y,z,fixed,mass,weight,tension,EA,EI +0,Joint,-0.307,Hex,0.0,0.0,0.0,1110,,,,, +1,Steel,-0.23,,0.0,0.0,-0.077,0000,5.21,44.6,1921.0,100000000.0,10000000000.0 +2,Joint,-0.153,,0.0,0.0,-0.153,0000,0.1,0.9,1877.0,100000000.0,1.0 +3,Steel,-0.077,,0.0,0.0,-0.23,0000,2.89,24.7,1876.0,100000000.0,10000000000.0 +4,Cable,0.0,,0.0,0.0,-0.307,0000,0.214,0.7,1851.0,100000000.0,3000.0 +5,Cable,0.077,,0.0,0.0,-0.384,0000,0.214,0.7,1850.0,100000000.0,3000.0 +6,Cable,0.153,,0.0,0.0,-0.46,0000,0.214,0.7,1850.0,100000000.0,3000.0 +7,Cable,0.23,,0.0,0.0,-0.537,0000,0.214,0.7,1849.0,100000000.0,3000.0 +8,Cable,0.307,,0.0,0.0,-0.614,0000,0.214,0.7,1848.0,100000000.0,3000.0 +9,Cable,0.384,,0.0,0.0,-0.691,0000,0.214,0.7,1847.0,100000000.0,3000.0 +10,Cable,0.46,,0.0,0.0,-0.767,0000,0.214,0.7,1847.0,100000000.0,3000.0 +11,Cable,0.537,,0.0,0.0,-0.844,0000,0.214,0.7,1846.0,100000000.0,3000.0 +12,Cable,0.614,,0.0,0.0,-0.921,0000,0.214,0.7,1845.0,100000000.0,3000.0 +13,Cable,0.691,,0.0,0.0,-0.997,0000,0.214,0.7,1844.0,100000000.0,3000.0 +14,Cable,0.767,,0.0,0.0,-1.074,0000,0.214,0.7,1844.0,100000000.0,3000.0 +15,Cable,0.844,,0.0,0.0,-1.151,0000,0.214,0.7,1843.0,100000000.0,3000.0 +16,Cable,0.921,,0.0,0.0,-1.228,0000,0.214,0.7,1842.0,100000000.0,3000.0 +17,Cable,0.997,,0.0,0.0,-1.304,0000,0.214,0.7,1841.0,100000000.0,3000.0 +18,Cable,1.074,,0.0,0.0,-1.381,0000,0.214,0.7,1841.0,100000000.0,3000.0 +19,Cable,1.151,,0.0,0.0,-1.458,0000,0.214,0.7,1840.0,100000000.0,3000.0 +20,Cable,1.228,,0.0,0.0,-1.535,0000,0.214,0.7,1839.0,100000000.0,3000.0 +21,Cable,1.304,,0.0,0.0,-1.611,0000,0.214,0.7,1838.0,100000000.0,3000.0 +22,Cable,1.381,,0.0,0.0,-1.688,0000,0.214,0.7,1838.0,100000000.0,3000.0 +23,Cable,1.458,,0.0,0.0,-1.765,0000,0.214,0.7,1837.0,100000000.0,3000.0 +24,Cable,1.535,,0.0,0.0,-1.841,0000,0.214,0.7,1836.0,100000000.0,3000.0 +25,Cable,1.611,,0.0,0.0,-1.918,0000,0.214,0.7,1835.0,100000000.0,3000.0 +26,Cable,1.688,,0.0,0.0,-1.995,0000,0.214,0.7,1835.0,100000000.0,3000.0 +27,Cable,1.765,,0.0,0.0,-2.072,0000,0.214,0.7,1834.0,100000000.0,3000.0 +28,Cable,1.841,,0.0,0.0,-2.148,0000,0.214,0.7,1833.0,100000000.0,3000.0 +29,Cable,1.918,,0.0,0.0,-2.225,0000,0.214,0.7,1832.0,100000000.0,3000.0 +30,Cable,1.995,,0.0,0.0,-2.302,0000,0.214,0.7,1832.0,100000000.0,3000.0 +31,Cable,2.072,,0.0,0.0,-2.378,0000,0.214,0.7,1831.0,100000000.0,3000.0 +32,Cable,2.148,,0.0,0.0,-2.455,0000,0.214,0.7,1830.0,100000000.0,3000.0 +33,Cable,2.225,,0.0,0.0,-2.532,0000,0.214,0.7,1829.0,100000000.0,3000.0 +34,Cable,2.302,,0.0,0.0,-2.609,0000,0.214,0.7,1829.0,100000000.0,3000.0 +35,Cable,2.378,,0.0,0.0,-2.685,0000,0.214,0.7,1828.0,100000000.0,3000.0 +36,Cable,2.455,,0.0,0.0,-2.762,0000,0.214,0.7,1827.0,100000000.0,3000.0 +37,Cable,2.532,,0.0,0.0,-2.839,0000,0.214,0.7,1826.0,100000000.0,3000.0 +38,Cable,2.609,,0.0,0.0,-2.916,0000,0.214,0.7,1826.0,100000000.0,3000.0 +39,Cable,2.685,,0.0,0.0,-2.992,0000,0.214,0.7,1825.0,100000000.0,3000.0 +40,Cable,2.762,,0.0,0.0,-3.069,0000,0.214,0.7,1824.0,100000000.0,3000.0 +41,Cable,2.839,,0.0,0.0,-3.146,0000,0.214,0.7,1824.0,100000000.0,3000.0 +42,Cable,2.916,,0.0,0.0,-3.222,0000,0.214,0.7,1823.0,100000000.0,3000.0 +43,Cable,2.992,,0.0,0.0,-3.299,0000,0.214,0.7,1822.0,100000000.0,3000.0 +44,Cable,3.069,,0.0,0.0,-3.376,0000,0.214,0.7,1821.0,100000000.0,3000.0 +45,Cable,3.146,,0.0,0.0,-3.453,0000,0.214,0.7,1821.0,100000000.0,3000.0 +46,Cable,3.222,0.50L,0.0,0.0,-3.529,0000,0.214,0.7,1820.0,100000000.0,3000.0 +47,Cable,3.299,,0.0,0.0,-3.606,0000,0.214,0.7,1819.0,100000000.0,3000.0 +48,Cable,3.376,,0.0,0.0,-3.683,0000,0.214,0.7,1818.0,100000000.0,3000.0 +49,Cable,3.453,,0.0,0.0,-3.76,0000,0.214,0.7,1818.0,100000000.0,3000.0 +50,Cable,3.529,,0.0,0.0,-3.836,0000,0.214,0.7,1817.0,100000000.0,3000.0 +51,Cable,3.606,,0.0,0.0,-3.913,0000,0.214,0.7,1816.0,100000000.0,3000.0 +52,Cable,3.683,,0.0,0.0,-3.99,0000,0.214,0.7,1815.0,100000000.0,3000.0 +53,Cable,3.76,,0.0,0.0,-4.066,0000,0.214,0.7,1815.0,100000000.0,3000.0 +54,Cable,3.836,,0.0,0.0,-4.143,0000,0.214,0.7,1814.0,100000000.0,3000.0 +55,Cable,3.913,,0.0,0.0,-4.22,0000,0.214,0.7,1813.0,100000000.0,3000.0 +56,Cable,3.99,,0.0,0.0,-4.297,0000,0.214,0.7,1812.0,100000000.0,3000.0 +57,Cable,4.066,,0.0,0.0,-4.373,0000,0.214,0.7,1812.0,100000000.0,3000.0 +58,Cable,4.143,,0.0,0.0,-4.45,0000,0.214,0.7,1811.0,100000000.0,3000.0 +59,Cable,4.22,,0.0,0.0,-4.527,0000,0.214,0.7,1810.0,100000000.0,3000.0 +60,Cable,4.297,,0.0,0.0,-4.604,0000,0.214,0.7,1809.0,100000000.0,3000.0 +61,Cable,4.373,,0.0,0.0,-4.68,0000,0.214,0.7,1809.0,100000000.0,3000.0 +62,Cable,4.45,,0.0,0.0,-4.757,0000,0.214,0.7,1808.0,100000000.0,3000.0 +63,Cable,4.527,,0.0,0.0,-4.834,0000,0.214,0.7,1807.0,100000000.0,3000.0 +64,Cable,4.604,,0.0,0.0,-4.91,0000,0.214,0.7,1806.0,100000000.0,3000.0 +65,Cable,4.68,,0.0,0.0,-4.987,0000,0.214,0.7,1806.0,100000000.0,3000.0 +66,Cable,4.757,,0.0,0.0,-5.064,0000,0.214,0.7,1805.0,100000000.0,3000.0 +67,Cable,4.834,0.75L,0.0,0.0,-5.141,0000,0.214,0.7,1804.0,100000000.0,3000.0 +68,Cable,4.91,,0.0,0.0,-5.217,0000,0.214,0.7,1803.0,100000000.0,3000.0 +69,Cable,4.987,,0.0,0.0,-5.294,0000,0.214,0.7,1803.0,100000000.0,3000.0 +70,Cable,5.064,,0.0,0.0,-5.371,0000,0.214,0.7,1802.0,100000000.0,3000.0 +71,Cable,5.141,,0.0,0.0,-5.447,0000,0.214,0.7,1801.0,100000000.0,3000.0 +72,Cable,5.217,,0.0,0.0,-5.524,0000,0.214,0.7,1801.0,100000000.0,3000.0 +73,Cable,5.294,,0.0,0.0,-5.601,0000,0.214,0.7,1800.0,100000000.0,3000.0 +74,Cable,5.371,,0.0,0.0,-5.678,0000,0.214,0.7,1799.0,100000000.0,3000.0 +75,Cable,5.447,,0.0,0.0,-5.754,0000,0.214,0.7,1798.0,100000000.0,3000.0 +76,Cable,5.524,,0.0,0.0,-5.831,0000,0.214,0.7,1798.0,100000000.0,3000.0 +77,Cable,5.601,,0.0,0.0,-5.908,0000,0.214,0.7,1797.0,100000000.0,3000.0 +78,Cable,5.678,,0.0,0.0,-5.985,0000,0.214,0.7,1796.0,100000000.0,3000.0 +79,Cable,5.754,,0.0,0.0,-6.061,0000,0.214,0.7,1795.0,100000000.0,3000.0 +80,Cable,5.831,,0.0,0.0,-6.138,0000,0.214,0.7,1795.0,100000000.0,3000.0 +81,Cable,5.908,,0.0,0.0,-6.215,0000,0.214,0.7,1794.0,100000000.0,3000.0 +82,Cable,5.985,,0.0,0.0,-6.291,0000,0.214,0.7,1793.0,100000000.0,3000.0 +83,Cable,6.061,,0.0,0.0,-6.368,0000,0.214,0.7,1792.0,100000000.0,3000.0 +84,Cable,6.138,,0.0,0.0,-6.445,0000,0.214,0.7,1792.0,100000000.0,3000.0 +85,Cable,6.215,,0.0,0.0,-6.522,0000,0.214,0.7,1791.0,100000000.0,3000.0 +86,Cable,6.291,,0.0,0.0,-6.598,0000,0.214,0.7,1790.0,100000000.0,3000.0 +87,Cable,6.368,,0.0,0.0,-6.675,0000,0.214,0.7,1789.0,100000000.0,3000.0 +88,Cable,6.445,L,0.0,0.0,-6.752,0000,0.214,0.7,1789.0,100000000.0,3000.0 +89,Steel,6.522,,0.0,0.0,-6.829,0000,2.89,24.7,1788.0,100000000.0,10000000000.0 +90,Joint,6.598,,0.0,0.0,-6.905,0000,0.1,0.9,1763.0,100000000.0,1.0 +91,Steel,6.675,,0.0,0.0,-6.982,0000,3.5,29.9,1762.0,100000000.0,10000000000.0 +92,Steel,6.752,,0.0,0.0,-7.059,0000,3.5,29.9,1732.0,100000000.0,10000000000.0 +93,Joint,6.829,,0.0,0.0,-7.135,0000,0.1,0.9,1702.0,100000000.0,1.0 +94,Steel,6.905,,0.0,0.0,-7.212,0000,0.335,2.9,1702.0,100000000.0,10000000000.0 +95,Chain,6.982,,0.0,0.0,-7.289,0000,0.335,2.9,1699.0,100000000.0,10000000000.0 +96,Chain,7.059,,0.0,0.0,-7.366,0000,0.335,2.9,1696.0,100000000.0,10000000000.0 +97,Sensor,7.135,,0.0,0.0,-7.442,0000,0.335,2.9,1693.0,100000000.0,10000000000.0 +98,Chain,7.212,,0.0,0.0,-7.519,0000,0.335,2.9,1690.0,100000000.0,10000000000.0 +99,Chain,7.289,,0.0,0.0,-7.596,0000,0.335,2.9,1687.0,100000000.0,10000000000.0 +100,Clump,7.366,,0.0,0.0,-7.673,1110,200.0,1710.5,-23.0,, diff --git a/validation/experiments/flotant/flotant_viv.py b/validation/experiments/flotant/flotant_viv.py new file mode 100644 index 00000000..21290ae8 --- /dev/null +++ b/validation/experiments/flotant/flotant_viv.py @@ -0,0 +1,882 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""VIV of the FLOTANT OD 48 mm research cable towed at 200 kg, and its forced-oscillation RAOs. + +The tests of de Wilde, Heijnsdijk & de Ridder (2021, FLOTANT Deliverable D5.5, MARIN): a 6.4 m +OD 48 mm cable hanging from the towing carriage with a 200 kg clump weight, towed at 0.025-1.0 +m/s, and the same cable forced by a hexapod in air and in water. Writes a deck per case, runs +them in parallel and compares: + tow cross-flow and in-line A/D_rms (sigma/OD) at 1/2L, 3/4L and L against the measured + values of Appendix 3, for three published VIV coefficient sets; + rao the RAOs of the stations in air (Appendix 1) and in water (Appendix 2), the structural + check of the model: in air the cable section, in water three models of the lower end. + + python flotant_viv.py path/to/cabledyn.exe WORKDIR [--parts tow,rao] [--sets uls19,b1,wake] + [--speeds all | 0.3,0.475,...] [--end identified|table|free] [--dt 0.002] [--refine 1] + [--tmax 60] [--t0 20] [--jobs N] [--keep] [--summary DIR] + +Sources: + J. de Wilde, R. Heijnsdijk, E.-J. de Ridder (2021), D5.5 - Report on VIV (hydrodynamic) + behaviour, FLOTANT deliverable 210430-FLT-WP5_D-5-5_V0 (MARIN report 30995-53-DWB), + https://flotantproject.eu/wp-content/uploads/2021/11/210430_FLT-D5.5_VIV_test_v0.pdf + (the set-up, Sec. 2; processing, Sec. 3.4; FEM input, Secs. 4.5 and 5.4; Tables 6-1 and 6-2; + Appendices 1-3) + J.V. Ulveseter, M.J. Thorsen, S. Saevik, C.M. Larsen (2019), Simulating fundamental and higher + harmonic VIV of slender structures, Applied Ocean Research 90, 101856, + https://doi.org/10.1016/j.apor.2019.101856 (Table 1, Sec. 4.1) + J.V. Ulveseter, M.J. Thorsen, S. Saevik, C.M. Larsen (2018), Time domain simulation of riser + VIV in current and irregular waves, Marine Structures 60, 241-260, + https://doi.org/10.1016/j.marstruc.2018.04.001 (Table 3) + J.R. Chaplin, P.W. Bearman, F.J. Huera Huarte, R.J. Pattenden (2005), Laboratory measurements + of vortex-induced vibrations of a vertical tension riser in a stepped current, Journal of + Fluids and Structures 21(1), 3-24, https://doi.org/10.1016/j.jfluidstructs.2005.04.010 (Eq. 4) + M.L. Facchinetti, E. de Langre, F. Biolley (2004), Coupling of structure and wake oscillators + in vortex-induced vibrations, Journal of Fluids and Structures 19(2), 123-140, + https://doi.org/10.1016/j.jfluidstructs.2003.12.004 +""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import json +import math +import os +import shutil +import subprocess +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path + +import numpy as np + +HERE = Path(__file__).resolve().parent +GRAVITY = 9.80665 # m/s^2 +# Fresh water: the report does not state the density; Table 2-2's 2.8 kg/m and 9.7 N/m in +# water at OD 48 mm imply 1000 kg/m^3. +RHO = {"air": 1.225, "water": 1000.0} +OD = 0.048 # m (Table 2-1) +F1_UR = 1.77 # Hz, the frequency of Ur in Appendix 3 (Sec. 6.3) +W_HIGHPASS = ( + 3.5 # rad/s, the tow-test filter of the double-integrated accelerations (Table 3-4) +) + +# The structure. The line follows the report's FEM input tables (fem_air.csv, fem_water.csv) +# node for node; the cable section and the lower end in water are identified from the RAOs +# (see the README). +EA_TABLE = 1.0e8 # N, the tables' EA +EI_STEEL = 1.0e6 # N m^2, steel links (rigid next to the cable) +EI_HINGE = 1.0 # N m^2, the Cardan joints and the steel wire +CABLE_EI = 1650.0 # N m^2, identified from the in-air RAOs (the tables give 3000) +CABLE_BB = 130.0 # N m^2 s, bending damping, identified from the in-air RAOs +K_AX = ( + 2.0e4 # N/m, the counterweight (air) or clump (water) as an axial spring in series +) +# The identified lower end in water: the link chain and load cell resist bending (CHAIN_EI) and +# the clump, a point mass on a short rigid segment, is held laterally by a spring END_K and +# damper END_C, modelled as a clamped cantilever post of length POST_LEN (K = 3 EI_p / l^3). +CHAIN_EI = 100.0 # N m^2 +END_K = 32500.0 # N/m +END_C = 20.0 # N s/m +POST_LEN = 0.30 # m +CLUMP_SEG = 0.10 # m +POST_TENSION = ( + 1000.0 # N, the static tension the post and segment lengths are stretched for +) +CLUMP_MASS = 200.0 # kg +CLUMP_WEIGHT = 1710.5 # N in water (Sec. 5.4 table, the clump node) +CLUMP_CDA = 0.05 # m^2, assumed (not given) +CD, CA = 1.2, 1.0 # the cable and the hardware +ENDS = ("identified", "table", "free") +SPEEDS = [round(0.025 * k, 3) for k in range(1, 41)] # Table 6-2 [m/s] +STATIONS = { # table node of each accelerometer -> station + "water": {46: "1_2L", 67: "3_4L", 88: "L"}, + "air": {85: "1_8L", 75: "1_4L", 54: "1_2L", 33: "3_4L"}, +} +# The forced-oscillation cases compared: the measured frequencies of Appendices 1 and 2 at +# 5 and 10 mm in a band about the first modes. The line is axisymmetric, so one direction (X) +# of forcing stands for both; it is compared with the surge and the sway tests. +RAO_CASES = { + ("air", 5): [round(1.0 + 0.1 * k, 1) for k in range(16)], + ("air", 10): [round(1.0 + 0.1 * k, 1) for k in range(11)], + ("water", 5): [round(1.0 + 0.1 * k, 1) for k in range(21)], +} +RAO_SCORE_BAND = {"air": (1.4, 2.0), "water": (1.0, 3.0)} # Hz +RAO_WINDOW = 10.0 # s, the harmonic fit at the end of each forced run +UR_MIN = 3.0 # the compared tow tests: from the onset the report states (Sec. 6.3) +RELEASE_FRACTION = 0.7 # release: the first test above the peak below 70 % of the peak +ANALYSIS = "1" # part of the reuse key: bump when an analysis changes + + +def chaplin_amplification(ad: float) -> float: + """Chaplin et al. (2005, Eq. 4): Cd/Cd0 = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2).""" + s = ad / math.sqrt(2.0) + return 1.0 + 2.3 * s + 1.7 * s * s + + +# Coefficient sets on the cable: LINE TYPES Cl dF cF; VIV row (ClX, alpha, Chh); VIV AMPLITUDE +# with Chaplin's drag amplification; VIV DAMPING (a, b, c); WAKE OSCILLATOR (CL0, St, eps, A). +SETS: dict[str, dict] = { + "uls19": { + "label": "Ulveseter et al. (2019), Table 1, Chh 1.5", + "fitted": "the NDP riser in uniform flow; blind here", + "cl": (0.85, 0.064, 0.144), + "viv": (0.75, 0.15, 1.5), + "amp": False, + "damping": None, + "wake": None, + }, + "b1": { + "label": "generic set (Delta Flume case)", + "fitted": "no; blind", + "cl": (0.8, 0.08, 0.18), + "viv": (0.85, 0.15, None), + "amp": True, + "damping": (0, 0, 1), + "wake": None, + }, + "wake": { + "label": "Facchinetti et al. (2004) wake oscillator", + "fitted": "rigid-cylinder data; blind", + "cl": (0, 0.08, 0.18), + "viv": None, + "amp": False, + "damping": None, + "wake": (0.3, 0.2, 0.3, 12), + }, +} + + +def load_table(medium: str) -> list[dict]: + with open(HERE / f"fem_{medium}.csv", encoding="utf-8") as fh: + rows = list(csv.DictReader(fh)) + for r in rows: + for k in ("pos", "x", "y", "z", "mass", "weight", "tension", "EA", "EI"): + r[k] = float(r[k]) if r[k] not in ("", "None") else None + return rows + + +def clump_volume() -> float: + return (CLUMP_MASS * GRAVITY - CLUMP_WEIGHT) / (RHO["water"] * GRAVITY) + + +def line_runs(medium: str, end: str) -> tuple[list[dict], list, float]: + """The line as runs of equal table elements, End A (top) first. + + Each table element (0.0765 m) is one element of the run labelled by its lower table node + (Wire, Steel, Joint, Cable, Chain, Sensor), with the node's lumped mass over the element + and, in water, the diameter of the displaced volume of the table's weight (the cable: OD). + The unstretched lengths give the table's static tensions with the effective axial stiffness + EA_eff = L / (1/k_ax + L/EA). Returns (rows, runs, EA_eff); a run is + [(label, mass per m, diameter, EI), length, elements]. + """ + rows = load_table(medium) + ltot = abs(rows[-1]["z"] - rows[0]["z"]) + ea_eff = ltot / (1.0 / K_AX + ltot / EA_TABLE) + elems = [] + for k in range(1, len(rows)): + src, lab = rows[k], rows[k]["element"] + if k == len(rows) - 1: + # the element into the end point (the hexapod joint in air, the clump in water): + # the end node's lumped mass is not line mass + prev = rows[k - 1] + if lab in ("Clump", "Hex", "Top"): + lab = prev["element"] + src = dict(prev) + if lab == "Joint": + src["mass"] = 0.1 + src["weight"] = 0.1 * GRAVITY * (1.0 if medium == "air" else 0.87) + dz = abs(rows[k]["z"] - rows[k - 1]["z"]) + l0 = dz / (1.0 + src["tension"] / ea_eff) + m = src["mass"] / dz + if lab == "Cable": + diam = OD + elif medium == "water": + vol = max( + (m * GRAVITY - src["weight"] / dz) / (RHO["water"] * GRAVITY), 0.0 + ) + diam = math.sqrt(4.0 * vol / math.pi) if vol else 0.05 + else: + diam = 0.05 + ei = ( + CABLE_EI + if lab == "Cable" + else (EI_HINGE if lab in ("Joint", "Wire") else EI_STEEL) + ) + if end == "identified" and medium == "water" and lab in ("Chain", "Sensor"): + ei = CHAIN_EI + elems.append((lab, l0, m, diam, ei)) + if end == "identified" and medium == "water": + # the clump as a point load on a light rigid segment, then the post to a still anchor + stretch = 1.0 + POST_TENSION / ea_eff + elems += [("Clumpseg", CLUMP_SEG / 2.0 / stretch, 1.0, 0.05, EI_STEEL)] * 2 + elems += [ + ("Post", POST_LEN / 4.0 / stretch, 1.0, 0.02, END_K * POST_LEN**3 / 3.0) + ] * 4 + # consecutive elements of one label form a run; mass and diameter are length-weighted means + # (the table's 0.076/0.077 m spacing would otherwise split every run) + groups: list[list] = [] + for e in elems: + if groups and groups[-1][0][0] == e[0]: + groups[-1].append(e) + else: + groups.append([e]) + runs = [] + for g in groups: + lg = sum(e[1] for e in g) + m = sum(e[2] * e[1] for e in g) / lg + dsq = sum(e[3] ** 2 * e[1] for e in g) / lg # keeps the displaced volume + runs.append([(g[0][0], m, math.sqrt(dsq), g[0][4]), lg, len(g)]) + return rows, runs, ea_eff + + +def station_nodes(medium: str, refine: int) -> dict[str, int]: + """CableDyn node of each station: table node k is node k * refine + 1.""" + return {st: k * refine + 1 for k, st in STATIONS[medium].items()} + + +def deck( + medium: str, + end: str, + hset: str | None, + current: float, + motion: tuple[float, float] | None, + dt: float, + tmax: float, + refine: int, +) -> dict[str, str]: + """The deck and its input files: {file name: text}.""" + rows, runs, ea_eff = line_runs(medium, end) + s = SETS[hset] if hset else None + types, secs, cable = [], [], [] + for i, ((lab, m, diam, ei), l0, n) in enumerate(runs): + tname = f"{lab.lower()}{i}" + cl = "0 0.08 0.18" + cd, ca = CD, CA + if lab == "Post": + bb = END_C * POST_LEN**3 / 3.0 + eicol = f"{ei:.9g}|{bb:.9g}" + cd, ca = 0.0, 0.0 + elif lab == "Cable": + eicol = f"{CABLE_EI:g}|{CABLE_BB:g}" + if s: + cl = " ".join(f"{v:g}" for v in s["cl"]) + cable.append(tname) + else: + eicol = f"{ei:g}" + types.append( + f"{tname} {diam:.6f} {m:.6f} {ea_eff:.6e} 0.0 {eicol} {cd} 0.0 {ca} 0.0 {cl}" + ) + secs.append(f"1 {tname} {l0:.9f} {n * refine}") + z_top, z_bot = rows[0]["z"], rows[-1]["z"] + extra = "" + if end == "identified" and medium == "water": + arc = 0.0 + for (lab, *_), l0, _n in runs: + if lab == "Clumpseg": + arc += 0.5 * l0 + break + arc += l0 + extra += ( + "--------------------- ATTACHMENTS ----------------------------------\n" + "LineID ArcLength Mass Volume CdA Ca\n(-) (m) (kg) (m^3) (m^2) (-)\n" + f"1 {arc:.9f} {CLUMP_MASS} {clump_volume():.6f} {CLUMP_CDA} 1.0\n" + "--------------------- END CONNECTIONS -------------------------------\n" + "LineID End Stiffness EzX EzY EzZ\n(-) (-) (N-m/rad) (-) (-) (-)\n" + "1 B Rigid 0 0 -1\n" + ) + z_bot -= CLUMP_SEG + POST_LEN + if s and s["viv"]: + clx, alpha, chh = s["viv"] + cols, vals = "ClX alpha", f"{clx} {alpha}" + if chh is not None: + cols, vals = cols + " Chh", vals + f" {chh}" + extra += ( + "--------------------- VIV ----------------------------------------------\n" + f"TypeName {cols}\n(-){' (-)' * len(cols.split())}\n" + + "".join(f"{c} {vals}\n" for c in cable) + ) + if s and s["amp"]: + extra += ( + "--------------------- VIV AMPLITUDE ------------------------------------\n" + "TypeName AD Cv CdAmp\n(-) (-) (-) (-)\n" + + "".join( + f"{c} {0.1 * k:.2f} {s['cl'][0]} {chaplin_amplification(0.1 * k):.5f}\n" + for c in cable + for k in range(16) + ) + ) + if s and s["damping"]: + a, b, c3 = s["damping"] + extra += ( + "--------------------- VIV DAMPING ------------------------------------\n" + "TypeName a b c\n(-) (-) (-) (-)\n" + + "".join(f"{c} {a} {b} {c3}\n" for c in cable) + ) + if s and s["wake"]: + extra += ( + "--------------------- WAKE OSCILLATOR ----------------------------------\n" + "TypeName CL0 St eps A\n(-) (-) (-) (-) (-)\n" + + "".join(f"{c} {' '.join(f'{v:g}' for v in s['wake'])}\n" for c in cable) + ) + bottom = f"2 Coupled 0.0 0.0 {z_bot:.6f} 0 0 0 0" + if end == "free" and medium == "water": + bottom = f"2 Free 0.0 0.0 {z_bot:.6f} {CLUMP_MASS} {clump_volume():.6f} {CLUMP_CDA} 1.0" + nodes = station_nodes(medium, refine) + outs = ["FairTen1"] + [ + f"L1N{j + d}p{c}" for j in nodes.values() for d in (-1, 0, 1) for c in "xyz" + ] + files: dict[str, str] = {} + if current: + files["current_profile.txt"] = ( + f"z ux uy uz\n(m) (m/s) (m/s) (m/s)\n{z_bot - 2.0:.3f} {current} 0 0\n0.0 {current} 0 0\n" + ) + title = f"FLOTANT D5.5 OD 48 mm cable, {medium}, end {end}" + ( + f", tow {current} m/s, set {hset}" if current else f", forced {motion}" + ) + files[ + "flotant.dat" + ] = f"""--------------------- CableDyn Input File --------------------------------- +{title} +----------------------- LINE TYPES ------------------------------------------ +TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t Cl dF cF +(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) (-) (-) (-) +{chr(10).join(types)} +----------------------- POINTS ---------------------------------------------- +ID Attachment X Y Z M V CdA CA +(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) +1 Coupled 0.0 0.0 {z_top:.6f} 0 0 0 0 +{bottom} +----------------------- LINES ----------------------------------------------- +ID NodeA NodeB Outputs +(-) (-) (-) (-) +1 1 2 - +----------------------- SECTIONS -------------------------------------------- +LineID LineType Length NumSegs +(-) (-) (m) (-) +{chr(10).join(secs)} +{extra}---------------------- OPTIONS ---------------------------------------------- +{RHO[medium]} rhoW +{GRAVITY} g +{abs(z_bot) + 2.0:.3f} WtrDpth +{dt:.6f} dtM +{tmax:.6f} TMax +{"1 Currents" + chr(10) if current else ""}{"motion.txt" if motion else "0"} motionFile +---------------------- OUTPUTS ----------------------------------------------- +{chr(10).join(outs)} +END +------------------------- need this line -------------------------------------- +""" + if motion: + files["motion.txt"] = motion_text(medium, end, z_top, z_bot, motion, dt, tmax) + return files + + +def motion_text(medium, end, z_top, z_bot, motion, dt, tmax) -> str: + """The hexapod (the bottom point in air, the top point in water) moves in x as A sin(w t), + reached over a 5-period cosine ramp; the other Coupled point is still.""" + amp, f = motion + hexapod = 2 if medium == "air" else 1 + points = ( + ((1, z_top),) + if (end == "free" and medium == "water") + else ((1, z_top), (2, z_bot)) + ) + w, tr = 2.0 * math.pi * f, 5.0 / f + lines = ["# time point x y z vx vy vz ax ay az"] + for k in range(round(tmax / dt) + 1): + t = k * dt + if t < tr: + r = 0.5 * (1.0 - math.cos(math.pi * t / tr)) + dr = 0.5 * math.pi / tr * math.sin(math.pi * t / tr) + ddr = 0.5 * (math.pi / tr) ** 2 * math.cos(math.pi * t / tr) + else: + r, dr, ddr = 1.0, 0.0, 0.0 + sn, cs = math.sin(w * t), math.cos(w * t) + for pid, z0 in points: + x = vx = ax = 0.0 + if pid == hexapod: + x = amp * r * sn + vx = amp * (dr * sn + r * w * cs) + ax = amp * (ddr * sn + 2.0 * dr * w * cs - r * w * w * sn) + lines.append( + f"{t:.6f} {pid} {x:.9e} {0.0:.9e} {z0:.9e} {vx:.9e} {0.0:.9e} " + f"{0.0:.9e} {ax:.9e} {0.0:.9e} {0.0:.9e}" + ) + return "\n".join(lines) + "\n" + + +def read_output(out: Path) -> tuple[list[str], np.ndarray]: + with open(out, encoding="utf-8") as fh: + fh.readline() + head = fh.readline().split() + fh.readline() + a = np.loadtxt(fh) + return head, a + + +def highpass(x: np.ndarray, theta: np.ndarray | None, dt: float) -> np.ndarray: + """The displacement as the report derives it from an accelerometer that tilts with the + cable: x + g theta / omega^2 (the gravity component on the tilted sensor axis, with theta + the slope dx/dz; theta None leaves it out), high-passed at W_HIGHPASS rad/s.""" + f = np.fft.rfftfreq(len(x), dt) + w = 2.0 * np.pi * f + sp = np.fft.rfft(x - x.mean()) + keep = w >= W_HIGHPASS + if theta is not None: + sp[keep] += GRAVITY * np.fft.rfft(theta - theta.mean())[keep] / w[keep] ** 2 + sp[~keep] = 0.0 + return np.fft.irfft(sp, len(x)) + + +def slope(a: np.ndarray, head: list[str], j: int, c: str) -> np.ndarray: + """dx/dz at node j from its neighbours (central difference).""" + xm, xp = a[:, head.index(f"L1N{j - 1}p{c}")], a[:, head.index(f"L1N{j + 1}p{c}")] + zm, zp = a[:, head.index(f"L1N{j - 1}pz")], a[:, head.index(f"L1N{j + 1}pz")] + return (xm - xp) / (zm - zp) + + +def analyse_tow(out: Path, u: float, t0: float, refine: int) -> dict: + """A/D_rms = sigma / OD of each station and direction over t > t0, as measured (with the + tilt term) and of the displacement itself; the dominant cross-flow frequency at 1/2L.""" + head, a = read_output(out) + k = a[:, 0] > t0 + a = a[k] + dt = float(a[1, 0] - a[0, 0]) + res: dict = {"mean_top_tension_N": float(a[:, head.index("FairTen1")].mean())} + for st, j in station_nodes("water", refine).items(): + for comp, c in (("IL", "x"), ("CF", "y")): + x = a[:, head.index(f"L1N{j}p{c}")] + res[f"AD_{comp}_{st}"] = float( + highpass(x, slope(a, head, j, c), dt).std() / OD + ) + res[f"AD_{comp}_{st}_displacement"] = float( + highpass(x, None, dt).std() / OD + ) + j = station_nodes("water", refine)["1_2L"] + y = highpass(a[:, head.index(f"L1N{j}py")], None, dt) + f = np.fft.rfftfreq(len(y), dt) + fp = float(f[int(np.argmax(np.abs(np.fft.rfft(y))))]) + res["f_cf_1_2L_hz"] = fp + res["fD_over_U_cf_1_2L"] = fp * OD / u + res["frequency_resolution_hz"] = float(1.0 / (len(y) * dt)) + return res + + +def harmonic(t: np.ndarray, x: np.ndarray, w: float) -> complex: + m = np.column_stack([np.sin(w * t), np.cos(w * t), np.ones_like(t)]) + c, *_ = np.linalg.lstsq(m, x, rcond=None) + return complex(c[0], c[1]) + + +def analyse_rao(out: Path, medium: str, amp: float, f: float, refine: int) -> dict: + """RAO of each station along the forcing over the last RAO_WINDOW s: the harmonic of + x + g theta / omega^2 (as the accelerometers measure it) over the hexapod amplitude.""" + head, a = read_output(out) + t = a[:, 0] + k = t > t[-1] - RAO_WINDOW + w = 2.0 * math.pi * f + res = {} + for st, j in station_nodes(medium, refine).items(): + x = a[k, head.index(f"L1N{j}px")] + th = slope(a[k], head, j, "x") + res[f"RAO_{st}"] = abs(harmonic(t[k], x + GRAVITY * th / w**2, w)) / amp + res[f"RAO_{st}_displacement"] = abs(harmonic(t[k], x, w)) / amp + return res + + +def run_case( + exe: Path, folder: Path, files: dict, analyse, key: str, keep: bool, sha: str +) -> dict: + """Write the deck, run it and analyse it. A folder that holds the same input files run by + the same executable is not run again: its result is reused when the analysis key is also + the same, and its output is analysed again if it was kept.""" + folder.mkdir(parents=True, exist_ok=True) + result, out, ran = ( + folder / "result.json", + folder / "flotant.out", + folder / "executable_sha256.txt", + ) + same = all( + (folder / n).is_file() and (folder / n).read_text(encoding="utf-8") == v + for n, v in files.items() + ) + if same and result.is_file(): + old = json.loads(result.read_text(encoding="utf-8")) + if old.pop("reuse_key", None) == f"{sha}:{key}": + return old + if not ( + same and out.is_file() and ran.is_file() and ran.read_text().strip() == sha + ): + # A run that fails or is interrupted must not leave the previous model's result next + # to the new inputs, where the next attempt would reuse it. + result.unlink(missing_ok=True) + ran.unlink(missing_ok=True) + out.unlink(missing_ok=True) + for n, v in files.items(): + (folder / n).write_text(v, encoding="utf-8", newline="\n") + proc = subprocess.run( + [str(exe), "flotant.dat", "flotant"], + cwd=folder, + capture_output=True, + text=True, + encoding="utf-8", + errors="replace", + env=dict(os.environ, OMP_NUM_THREADS="1"), + check=False, + ) + (folder / "console.txt").write_text(proc.stdout + proc.stderr, encoding="utf-8") + if proc.returncode != 0: + raise SystemExit(f"{folder}: CableDyn exited with {proc.returncode}") + ran.write_text(sha + "\n", encoding="utf-8") + res = analyse(out) + result.write_text( + json.dumps({**res, "reuse_key": f"{sha}:{key}"}, indent=1) + "\n", + encoding="utf-8", + ) + if not keep: + out.unlink() + return res + + +def read_csv(name: str) -> list[dict]: + with open(HERE / name, encoding="utf-8") as fh: + return list(csv.DictReader(fh)) + + +def rms_log(ratios: list[float]) -> float | None: + return float(np.sqrt(np.mean(np.log(ratios) ** 2))) if ratios else None + + +def fmt(value: float | None, spec: str = ".3f") -> str: + """A score for the console; n/a when no test of the selection enters it (Ur < UR_MIN).""" + return "n/a" if value is None else format(value, spec) + + +def peak_and_release(points: list[tuple[float, float]]) -> dict: + """The largest A/D, its Ur, and the release: the first Ur above the peak at which A/D + falls below RELEASE_FRACTION of the peak (None when it never does).""" + points = sorted(points) + i = max(range(len(points)), key=lambda k: points[k][1]) + ur_p, ad_p = points[i] + rel = next((ur for ur, ad in points[i + 1 :] if ad < RELEASE_FRACTION * ad_p), None) + return {"peak_AD": ad_p, "peak_Ur": ur_p, "release_Ur": rel} + + +def parse_speeds(text: str) -> list[float]: + if text == "all": + return SPEEDS + out = sorted({round(float(v), 3) for v in text.split(",")}) + if not out or any(v not in SPEEDS for v in out): + raise SystemExit( + f"--speeds: the tests are 0.025, 0.050, ..., 1.000 m/s, got {text!r}" + ) + return out + + +def compare_tow(results: list[dict], sets: list[str]) -> tuple[list[dict], dict]: + meas: dict = {} + for r in read_csv("measured_tow_ad.csv"): + comp = "CF" if r["component"] == "Y" else "IL" + meas[(r["station"], comp, float(r["V_test"]))] = ( + float(r["AD_rms"]), + float(r["Ur"]), + r["direction"], + ) + rows, per_set = [], {} + stations = list(STATIONS["water"].values()) + for s in sets: + rs = sorted((r for r in results if r["set"] == s), key=lambda r: r["U_m_per_s"]) + ratios: dict = {} + for r in rs: + u = r["U_m_per_s"] + ur = u / (OD * F1_UR) + row = {"set": s, "U_m_per_s": u, "Ur": round(ur, 3)} + for comp in ("CF", "IL"): + for st in stations: + mv = meas.get((st, comp, u)) + model = r[f"AD_{comp}_{st}"] + row[f"AD_{comp}_{st}_measured"] = mv[0] if mv else "" + row[f"AD_{comp}_{st}_cabledyn"] = round(model, 4) + row[f"AD_{comp}_{st}_cabledyn_displacement"] = round( + r[f"AD_{comp}_{st}_displacement"], 4 + ) + if mv: + row["direction"] = mv[2] + if mv and ur >= UR_MIN: + ratios.setdefault((comp, st), []).append(model / mv[0]) + ratios.setdefault((comp, st, mv[2]), []).append(model / mv[0]) + row["f_cf_1_2L_hz"] = round(r["f_cf_1_2L_hz"], 3) + row["fD_U_cf_1_2L"] = round(r["fD_over_U_cf_1_2L"], 4) + row["mean_top_tension_N"] = round(r["mean_top_tension_N"], 1) + rows.append(row) + model_pts = [(r["U_m_per_s"] / (OD * F1_UR), r["AD_CF_1_2L"]) for r in rs] + meas_pts = [ + (mv[1], mv[0]) + for (st, comp, u), mv in meas.items() + if st == "1_2L" and comp == "CF" and u in [r["U_m_per_s"] for r in rs] + ] + pk = peak_and_release(model_pts) + f_at_peak = next( + r["f_cf_1_2L_hz"] + for r in rs + if abs(r["U_m_per_s"] / (OD * F1_UR) - pk["peak_Ur"]) < 1e-9 + ) + cf_all = [q for st in stations for q in ratios.get(("CF", st), [])] + il_all = [q for st in stations for q in ratios.get(("IL", st), [])] + per_set[s] = { + "label": SETS[s]["label"], + "fitted_to": SETS[s]["fitted"], + "speeds": [r["U_m_per_s"] for r in rs], + "compared_tests": f"Ur >= {UR_MIN:g}", + "cf_rms_log_error_all_stations": rms_log(cf_all), + "cf_ratio_median_all_stations": float(np.median(cf_all)) + if cf_all + else None, + "il_rms_log_error_all_stations": rms_log(il_all), + "il_ratio_median_all_stations": float(np.median(il_all)) + if il_all + else None, + "cf_rms_log_error": { + st: rms_log(ratios.get(("CF", st), [])) for st in stations + }, + "il_rms_log_error": { + st: rms_log(ratios.get(("IL", st), [])) for st in stations + }, + "cf_rms_log_error_1_2L_by_direction": { + d: rms_log(ratios.get(("CF", "1_2L", d), [])) + for d in ("forwards", "backwards") + }, + "cf_1_2L_peak": {**pk, "f_hz_at_peak": f_at_peak}, + "cf_1_2L_peak_measured": peak_and_release(meas_pts) if meas_pts else None, + "mean_top_tension_N_range": [ + round(min(r["mean_top_tension_N"] for r in rs)), + round(max(r["mean_top_tension_N"] for r in rs)), + ], + } + p, q = per_set[s]["cf_1_2L_peak"], per_set[s]["cf_1_2L_peak_measured"] + print( + f"{s}: CF r.m.s. log error {fmt(per_set[s]['cf_rms_log_error_all_stations'])} " + f"(1/2L {fmt(per_set[s]['cf_rms_log_error']['1_2L'])}), IL " + f"{fmt(per_set[s]['il_rms_log_error_all_stations'])}; 1/2L peak {p['peak_AD']:.3f} at Ur " + f"{p['peak_Ur']:.2f} ({p['f_hz_at_peak']:.2f} Hz), release Ur {p['release_Ur']}" + + ( + f" | measured {q['peak_AD']:.3f} at {q['peak_Ur']:.2f}, release {q['release_Ur']}" + if q + else "" + ) + ) + return rows, per_set + + +def compare_rao(results: list[dict]) -> tuple[list[dict], dict]: + meas: dict = {} + for r in read_csv("measured_rao.csv"): + meas[ + (r["medium"], r["motion"], r["station"], int(r["amp_mm"]), float(r["f_hz"])) + ] = float(r["rao"]) + rows, summary = [], {} + for r in sorted( + results, key=lambda r: (r["medium"], r["end"], r["amp_mm"], r["f_hz"]) + ): + for st in STATIONS[r["medium"]].values(): + row = {k: r[k] for k in ("medium", "end", "amp_mm", "f_hz")} + row["station"] = st + row["rao_cabledyn"] = round(r[f"RAO_{st}"], 4) + row["rao_cabledyn_displacement"] = round(r[f"RAO_{st}_displacement"], 4) + for motion, name in (("X", "surge"), ("Y", "sway")): + row[f"rao_measured_{name}"] = meas.get( + (r["medium"], motion, st, r["amp_mm"], r["f_hz"]), "" + ) + rows.append(row) + groups = sorted({(r["medium"], r["end"], r["amp_mm"]) for r in rows}) + for medium, end, amp in groups: + lo, hi = RAO_SCORE_BAND[medium] + g = [ + r + for r in rows + if (r["medium"], r["end"], r["amp_mm"]) == (medium, end, amp) + ] + entry = {} + for name in ("surge", "sway"): + err = [ + math.log(r["rao_cabledyn"] / r[f"rao_measured_{name}"]) + for r in g + if r[f"rao_measured_{name}"] != "" + and lo - 1e-9 <= r["f_hz"] <= hi + 1e-9 + ] + half = sorted( + (r for r in g if r["station"] == "1_2L"), key=lambda r: r["f_hz"] + ) + mh = [ + (r["f_hz"], r[f"rao_measured_{name}"]) + for r in half + if r[f"rao_measured_{name}"] != "" + ] + entry[name] = { + "rms_log_error": float(np.sqrt(np.mean(np.square(err)))) + if err + else None, + "band_hz": [lo, hi], + "peaks_1_2L_cabledyn": local_peaks( + [(r["f_hz"], r["rao_cabledyn"]) for r in half] + ), + "peaks_1_2L_measured": local_peaks(mh), + } + summary[f"{medium}_{end}_{amp}mm"] = entry + print( + f"rao {medium:5s} {end:10s} {amp:2d} mm: r.m.s. log error surge {entry['surge']['rms_log_error']:.3f}, " + f"sway {entry['sway']['rms_log_error']:.3f}; 1/2L peaks {entry['surge']['peaks_1_2L_cabledyn']} " + f"(surge test {entry['surge']['peaks_1_2L_measured']}, sway {entry['sway']['peaks_1_2L_measured']})" + ) + return rows, summary + + +def local_peaks(pts: list[tuple[float, float]], n: int = 2) -> list[list[float]]: + """The n highest local maxima [f, RAO] of a sampled curve, in frequency order.""" + pts = sorted(pts) + i = [ + k + for k in range(1, len(pts) - 1) + if pts[k][1] >= pts[k - 1][1] and pts[k][1] >= pts[k + 1][1] + ] + top = sorted(i, key=lambda k: -pts[k][1])[:n] + return [[pts[k][0], round(pts[k][1], 3)] for k in sorted(top)] + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + ap.add_argument("exe") + ap.add_argument("workdir") + ap.add_argument("--parts", default="tow,rao", help="comma list of tow, rao") + ap.add_argument( + "--sets", default=",".join(SETS), help="comma list of " + ", ".join(SETS) + ) + ap.add_argument( + "--speeds", default="all", help="comma list of tow speeds [m/s], or all" + ) + ap.add_argument( + "--end", + default="identified", + choices=ENDS, + help="the lower end of the tow model", + ) + ap.add_argument("--dt", type=float, default=0.002) + ap.add_argument("--refine", type=int, default=1, help="elements per table element") + ap.add_argument("--tmax", type=float, default=60.0, help="tow run length [s]") + ap.add_argument( + "--t0", type=float, default=20.0, help="start of the tow statistics [s]" + ) + ap.add_argument("--jobs", type=int, default=os.cpu_count() or 1) + ap.add_argument("--keep", action="store_true", help="keep the output tables") + ap.add_argument( + "--summary", + default=None, + help="directory for the comparison CSVs and summary JSON", + ) + a = ap.parse_args() + found = a.exe if Path(a.exe).is_file() else shutil.which(a.exe) + if found is None: + raise SystemExit(f"CableDyn executable not found: {a.exe}") + exe = Path(found).resolve() + sha = hashlib.sha256(exe.read_bytes()).hexdigest() + parts = [p.strip() for p in a.parts.split(",") if p.strip()] + if not parts or any(p not in ("tow", "rao") for p in parts): + raise SystemExit(f"--parts: choose from tow, rao, got {a.parts!r}") + sets = [s.strip() for s in a.sets.split(",") if s.strip()] + if not sets or any(s not in SETS for s in sets): + raise SystemExit(f"--sets: choose from {', '.join(SETS)}, got {a.sets!r}") + speeds = parse_speeds(a.speeds) + tag = f"dt{a.dt:g}_r{a.refine}" + work = Path(a.workdir).resolve() + jobs = [] + if "tow" in parts: + tmax = round(a.tmax / a.dt) * a.dt + for s in sets: + for u in speeds: + files = deck("water", a.end, s, u, None, a.dt, tmax, a.refine) + folder = work / f"tow_{s}_{a.end}_v{u:.3f}_{tag}_t{a.tmax:g}" + key = f"tow:{a.t0:g}:{ANALYSIS}" + + def an(out, u=u): + return analyse_tow(out, u, a.t0, a.refine) + + jobs.append( + ({"part": "tow", "set": s, "U_m_per_s": u}, folder, files, an, key) + ) + if "rao" in parts: + for (medium, amp), freqs in RAO_CASES.items(): + for end in ENDS if medium == "water" else ("table",): + for f in freqs: + tmax = round((5.0 / f + 25.0) / a.dt) * a.dt + files = deck( + medium, end, None, 0.0, (amp / 1000.0, f), a.dt, tmax, a.refine + ) + folder = work / f"rao_{medium}_{end}_a{amp}mm_f{f:.2f}_{tag}" + + def an(out, medium=medium, amp=amp, f=f): + return analyse_rao(out, medium, amp / 1000.0, f, a.refine) + + info = { + "part": "rao", + "medium": medium, + "end": end, + "amp_mm": amp, + "f_hz": f, + } + jobs.append( + (info, folder, files, an, f"rao:{RAO_WINDOW:g}:{ANALYSIS}") + ) + + def one(job): + info, folder, files, an, key = job + return {**info, **run_case(exe, folder, files, an, key, a.keep, sha)} + + with ThreadPoolExecutor(max_workers=max(1, min(a.jobs, len(jobs)))) as pool: + results = list(pool.map(one, jobs)) + summary: dict = { + "dt_s": a.dt, + "elements_per_table_element": a.refine, + "tow": None, + "rao": None, + "executable_sha256": sha, + } + tow_rows = rao_rows = None + if "tow" in parts: + tow_rows, per_set = compare_tow( + [r for r in results if r["part"] == "tow"], sets + ) + summary["tow"] = { + "end": a.end, + "tmax_s": a.tmax, + "statistics_after_s": a.t0, + "highpass_rad_s": W_HIGHPASS, + "Ur_frequency_hz": F1_UR, + "release_fraction_of_peak": RELEASE_FRACTION, + "per_set": per_set, + } + if "rao" in parts: + rao_rows, summary["rao"] = compare_rao( + [r for r in results if r["part"] == "rao"] + ) + if a.summary: + out = Path(a.summary) + out.mkdir(parents=True, exist_ok=True) + for name, rows in ( + ("response_comparison.csv", tow_rows), + ("rao_comparison.csv", rao_rows), + ): + if rows: + with open(out / name, "w", newline="", encoding="utf-8") as fh: + fields = list(dict.fromkeys(k for r in rows for k in r)) + w = csv.DictWriter(fh, fieldnames=fields, lineterminator="\n") + w.writeheader() + w.writerows(rows) + (out / "summary.json").write_text( + json.dumps(summary, indent=2) + "\n", encoding="utf-8", newline="\n" + ) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/flotant/measured_rao.csv b/validation/experiments/flotant/measured_rao.csv new file mode 100644 index 00000000..533cd743 --- /dev/null +++ b/validation/experiments/flotant/measured_rao.csv @@ -0,0 +1,670 @@ +medium,motion,station,amp_mm,f_hz,omega_rad_s,rao,page +air,X,1_2L,5,0.5,3.1414,0.4766,63 +air,X,1_2L,5,0.6,3.7652,0.5462,63 +air,X,1_2L,5,0.7,4.3951,0.5984,63 +air,X,1_2L,5,0.8,5.025,0.6332,63 +air,X,1_2L,5,0.9,5.6489,0.6941,63 +air,X,1_2L,5,1.0,6.2787,0.755,63 +air,X,1_2L,5,1.1,6.9086,0.8334,63 +air,X,1_2L,5,1.2,7.5325,0.9378,63 +air,X,1_2L,5,1.3,8.1623,1.0857,63 +air,X,1_2L,5,1.4,8.7922,1.3468,63 +air,X,1_2L,5,1.5,9.4221,1.7993,63 +air,X,1_2L,5,1.6,10.046,2.9393,63 +air,X,1_2L,5,1.7,10.6758,8.6826,63 +air,X,1_2L,5,1.8,11.3057,4.845,63 +air,X,1_2L,5,1.9,11.9296,2.5825,63 +air,X,1_2L,5,2.0,12.5594,1.7036,63 +air,X,1_2L,5,2.1,13.1893,1.1466,63 +air,X,1_2L,5,2.2,13.8192,0.8247,63 +air,X,1_2L,5,2.3,14.4431,0.5897,63 +air,X,1_2L,5,2.4,15.0729,0.3983,63 +air,X,1_2L,5,2.5,15.7028,0.2155,63 +air,X,1_2L,5,2.6,16.3267,0.0589,63 +air,X,1_2L,5,2.7,16.9566,0.2155,63 +air,X,1_2L,5,2.8,17.5864,0.4853,63 +air,X,1_2L,5,2.9,18.2163,1.0422,63 +air,X,1_2L,5,3.0,18.8402,2.9567,63 +air,X,1_2L,10,0.5,3.1354,0.4766,63 +air,X,1_2L,10,0.6,3.7652,0.5375,63 +air,X,1_2L,10,0.7,4.3951,0.5984,63 +air,X,1_2L,10,0.8,5.025,0.6506,63 +air,X,1_2L,10,0.9,5.6489,0.7028,63 +air,X,1_2L,10,1.0,6.2787,0.7724,63 +air,X,1_2L,10,1.1,6.9086,0.8682,63 +air,X,1_2L,10,1.2,7.5325,0.99,63 +air,X,1_2L,10,1.3,8.1623,1.164,63 +air,X,1_2L,10,1.4,8.7922,1.4686,63 +air,X,1_2L,10,1.5,9.4221,2.1213,63 +air,X,1_2L,10,1.6,10.046,4.3316,63 +air,X,1_2L,10,1.7,10.6758,5.8806,63 +air,X,1_2L,10,1.8,11.3297,3.4614,63 +air,X,1_2L,10,1.9,11.9356,2.1387,63 +air,X,1_2L,10,2.0,12.5594,1.7819,63 +air,X,1_4L,5,0.5,3.1414,0.7028,63 +air,X,1_4L,5,0.6,3.7652,0.755,63 +air,X,1_4L,5,0.7,4.3951,0.7985,63 +air,X,1_4L,5,0.8,5.025,0.8334,63 +air,X,1_4L,5,0.9,5.6489,0.8769,63 +air,X,1_4L,5,1.0,6.2787,0.9291,63 +air,X,1_4L,5,1.1,6.9086,0.9813,63 +air,X,1_4L,5,1.2,7.5325,1.0596,63 +air,X,1_4L,5,1.3,8.1623,1.1727,63 +air,X,1_4L,5,1.4,8.7922,1.3642,63 +air,X,1_4L,5,1.5,9.4221,1.6862,63 +air,X,1_4L,5,1.6,10.046,2.4955,63 +air,X,1_4L,5,1.7,10.6758,6.2547,63 +air,X,1_4L,5,1.8,11.3057,3.0785,63 +air,X,1_4L,5,1.9,11.9296,1.3555,63 +air,X,1_4L,5,2.0,12.5594,0.6854,63 +air,X,1_4L,5,2.1,13.1893,0.2764,63 +air,X,1_4L,5,2.2,13.8192,0.085,63 +air,X,1_4L,5,2.3,14.4431,0.2329,63 +air,X,1_4L,5,2.4,15.0729,0.3983,63 +air,X,1_4L,5,2.5,15.7028,0.5636,63 +air,X,1_4L,5,2.6,16.3267,0.7289,63 +air,X,1_4L,5,2.7,16.9566,0.9204,63 +air,X,1_4L,5,2.8,17.5864,1.2162,63 +air,X,1_4L,5,2.9,18.2163,1.9124,63 +air,X,1_4L,5,3.0,18.8402,3.5919,63 +air,X,1_4L,10,0.5,3.1354,0.6941,63 +air,X,1_4L,10,0.6,3.7652,0.755,63 +air,X,1_4L,10,0.7,4.3951,0.7985,63 +air,X,1_4L,10,0.8,5.025,0.8508,63 +air,X,1_4L,10,0.9,5.6489,0.8943,63 +air,X,1_4L,10,1.0,6.2787,0.9465,63 +air,X,1_4L,10,1.1,6.9086,1.0248,63 +air,X,1_4L,10,1.2,7.5325,1.1118,63 +air,X,1_4L,10,1.3,8.1623,1.2424,63 +air,X,1_4L,10,1.4,8.7922,1.4599,63 +air,X,1_4L,10,1.5,9.4221,1.9472,63 +air,X,1_4L,10,1.6,10.046,3.5484,63 +air,X,1_4L,10,1.7,10.6758,4.114,63 +air,X,1_4L,10,1.8,11.3297,2.1039,63 +air,X,1_4L,10,1.9,11.9356,1.1031,63 +air,X,1_4L,10,2.0,12.5594,0.7985,63 +air,X,1_8L,5,0.5,3.1414,0.7898,63 +air,X,1_8L,5,0.6,3.7652,0.8421,63 +air,X,1_8L,5,0.7,4.3951,0.8769,63 +air,X,1_8L,5,0.8,5.025,0.903,63 +air,X,1_8L,5,0.9,5.6489,0.9378,63 +air,X,1_8L,5,1.0,6.2787,0.9639,63 +air,X,1_8L,5,1.1,6.9086,1.0074,63 +air,X,1_8L,5,1.2,7.5325,1.0509,63 +air,X,1_8L,5,1.3,8.1623,1.1205,63 +air,X,1_8L,5,1.4,8.7922,1.2424,63 +air,X,1_8L,5,1.5,9.4221,1.4512,63 +air,X,1_8L,5,1.6,10.046,1.9472,63 +air,X,1_8L,5,1.7,10.6758,4.0009,63 +air,X,1_8L,5,1.8,11.3057,1.6426,63 +air,X,1_8L,5,1.9,11.9296,0.4766,63 +air,X,1_8L,5,2.0,12.5594,0.1459,63 +air,X,1_8L,5,2.1,13.1893,0.3286,63 +air,X,1_8L,5,2.2,13.8192,0.4853,63 +air,X,1_8L,5,2.3,14.4431,0.6071,63 +air,X,1_8L,5,2.4,15.0729,0.7202,63 +air,X,1_8L,5,2.5,15.7028,0.8334,63 +air,X,1_8L,5,2.6,16.3267,0.9378,63 +air,X,1_8L,5,2.7,16.9566,1.0596,63 +air,X,1_8L,5,2.8,17.5864,1.2598,63 +air,X,1_8L,5,2.9,18.2163,1.7645,63 +air,X,1_8L,5,3.0,18.8402,2.6347,63 +air,X,1_8L,10,0.5,3.1354,0.7811,63 +air,X,1_8L,10,0.6,3.7652,0.8334,63 +air,X,1_8L,10,0.7,4.3951,0.8769,63 +air,X,1_8L,10,0.8,5.025,0.9117,63 +air,X,1_8L,10,0.9,5.6489,0.9465,63 +air,X,1_8L,10,1.0,6.2787,0.99,63 +air,X,1_8L,10,1.1,6.9086,1.0335,63 +air,X,1_8L,10,1.2,7.5325,1.0944,63 +air,X,1_8L,10,1.3,8.1623,1.1727,63 +air,X,1_8L,10,1.4,8.7922,1.312,63 +air,X,1_8L,10,1.5,9.4221,1.6252,63 +air,X,1_8L,10,1.6,10.046,2.6521,63 +air,X,1_8L,10,1.7,10.6758,2.539,63 +air,X,1_8L,10,1.8,11.3297,1.0596,63 +air,X,1_8L,10,1.9,11.9356,0.4157,63 +air,X,1_8L,10,2.0,12.5594,0.2242,63 +air,X,3_4L,5,0.5,3.1414,0.2503,63 +air,X,3_4L,5,0.6,3.7652,0.3112,63 +air,X,3_4L,5,0.7,4.3951,0.3547,63 +air,X,3_4L,5,0.8,5.025,0.3895,63 +air,X,3_4L,5,0.9,5.6489,0.4331,63 +air,X,3_4L,5,1.0,6.2787,0.4853,63 +air,X,3_4L,5,1.1,6.9086,0.5549,63 +air,X,3_4L,5,1.2,7.5325,0.6419,63 +air,X,3_4L,5,1.3,8.1623,0.7724,63 +air,X,3_4L,5,1.4,8.7922,1.0074,63 +air,X,3_4L,5,1.5,9.4221,1.4077,63 +air,X,3_4L,5,1.6,10.046,2.4345,63 +air,X,3_4L,5,1.7,10.6758,7.8472,63 +air,X,3_4L,5,1.8,11.3057,4.6275,63 +air,X,3_4L,5,1.9,11.9296,2.6608,63 +air,X,3_4L,5,2.0,12.5594,1.9124,63 +air,X,3_4L,5,2.1,13.1893,1.4338,63 +air,X,3_4L,5,2.2,13.8192,1.1727,63 +air,X,3_4L,5,2.3,14.4431,1.0074,63 +air,X,3_4L,5,2.4,15.0729,0.8943,63 +air,X,3_4L,5,2.5,15.7028,0.7985,63 +air,X,3_4L,5,2.6,16.3267,0.7289,63 +air,X,3_4L,5,2.7,16.9566,0.6767,63 +air,X,3_4L,5,2.8,17.5864,0.6593,63 +air,X,3_4L,5,2.9,18.2163,0.7289,63 +air,X,3_4L,5,3.0,18.8402,0.6332,63 +air,X,3_4L,10,0.5,3.1354,0.2503,63 +air,X,3_4L,10,0.6,3.7652,0.3025,63 +air,X,3_4L,10,0.7,4.3951,0.3547,63 +air,X,3_4L,10,0.8,5.025,0.3983,63 +air,X,3_4L,10,0.9,5.6489,0.4418,63 +air,X,3_4L,10,1.0,6.2787,0.5027,63 +air,X,3_4L,10,1.1,6.9086,0.581,63 +air,X,3_4L,10,1.2,7.5325,0.6941,63 +air,X,3_4L,10,1.3,8.1623,0.8334,63 +air,X,3_4L,10,1.4,8.7922,1.1031,63 +air,X,3_4L,10,1.5,9.4221,1.6775,63 +air,X,3_4L,10,1.6,10.046,3.6615,63 +air,X,3_4L,10,1.7,10.6758,5.4019,63 +air,X,3_4L,10,1.8,11.3297,3.3744,63 +air,X,3_4L,10,1.9,11.9356,2.2257,63 +air,X,3_4L,10,2.0,12.5594,1.9385,63 +air,X,L,5,0.5,3.1414,0.0415,63 +air,X,L,5,0.6,3.7652,0.0589,63 +air,X,L,5,0.7,4.3951,0.0937,63 +air,X,L,5,0.8,5.025,0.1198,63 +air,X,L,5,0.9,5.6489,0.1546,63 +air,X,L,5,1.0,6.2787,0.1807,63 +air,X,L,5,1.1,6.9086,0.2155,63 +air,X,L,5,1.2,7.5325,0.2677,63 +air,X,L,5,1.3,8.1623,0.3286,63 +air,X,L,5,1.4,8.7922,0.4505,63 +air,X,L,5,1.5,9.4221,0.6506,63 +air,X,L,5,1.6,10.046,1.2162,63 +air,X,L,5,1.7,10.6758,4.2359,63 +air,X,L,5,1.8,11.3057,2.6869,63 +air,X,L,5,1.9,11.9296,1.6775,63 +air,X,L,5,2.0,12.5594,1.312,63 +air,X,L,5,2.1,13.1893,1.077,63 +air,X,L,5,2.2,13.8192,0.9639,63 +air,X,L,5,2.3,14.4431,0.9204,63 +air,X,L,5,2.4,15.0729,0.9204,63 +air,X,L,5,2.5,15.7028,0.9378,63 +air,X,L,5,2.6,16.3267,0.99,63 +air,X,L,5,2.7,16.9566,1.077,63 +air,X,L,5,2.8,17.5864,1.312,63 +air,X,L,5,2.9,18.2163,1.9733,63 +air,X,L,5,3.0,18.8402,3.7398,63 +air,X,L,10,0.5,3.1354,0.0415,63 +air,X,L,10,0.6,3.7652,0.0589,63 +air,X,L,10,0.7,4.3951,0.0937,63 +air,X,L,10,0.8,5.025,0.1285,63 +air,X,L,10,0.9,5.6489,0.1546,63 +air,X,L,10,1.0,6.2787,0.1894,63 +air,X,L,10,1.1,6.9086,0.2242,63 +air,X,L,10,1.2,7.5325,0.2764,63 +air,X,L,10,1.3,8.1623,0.346,63 +air,X,L,10,1.4,8.7922,0.4766,63 +air,X,L,10,1.5,9.4221,0.7811,63 +air,X,L,10,1.6,10.046,1.8428,63 +air,X,L,10,1.7,10.6758,2.9741,63 +air,X,L,10,1.8,11.3297,1.982,63 +air,X,L,10,1.9,11.9356,1.399,63 +air,X,L,10,2.0,12.5594,1.2685,63 +air,Y,1_2L,5,0.5,3.1369,0.5149,64 +air,Y,1_2L,5,0.6,3.7661,0.579,64 +air,Y,1_2L,5,0.7,4.3952,0.6323,64 +air,Y,1_2L,5,0.8,5.0244,0.6857,64 +air,Y,1_2L,5,0.9,5.6471,0.7391,64 +air,Y,1_2L,5,1.0,6.2763,0.8032,64 +air,Y,1_2L,5,1.1,6.9054,0.8886,64 +air,Y,1_2L,5,1.2,7.5346,0.9953,64 +air,Y,1_2L,5,1.3,8.1637,1.1341,64 +air,Y,1_2L,5,1.4,8.7929,1.3263,64 +air,Y,1_2L,5,1.5,9.4221,1.7107,64 +air,Y,1_2L,5,1.6,10.0448,3.0666,64 +air,Y,1_2L,5,1.7,10.674,9.1417,64 +air,Y,1_2L,5,1.8,11.3031,5.597,64 +air,Y,1_2L,5,1.9,11.9323,3.2268,64 +air,Y,1_2L,5,2.0,12.5614,1.9883,64 +air,Y,1_2L,5,2.1,13.1906,1.5292,64 +air,Y,1_2L,5,2.2,13.8133,1.2729,64 +air,Y,1_2L,5,2.3,14.4425,1.006,64 +air,Y,1_2L,5,2.4,15.0717,0.7818,64 +air,Y,1_2L,5,2.5,15.7008,0.611,64 +air,Y,1_2L,5,2.6,16.33,0.4615,64 +air,Y,1_2L,5,2.7,16.9591,0.3227,64 +air,Y,1_2L,5,2.8,17.5883,0.2053,64 +air,Y,1_2L,5,2.9,18.211,0.0878,64 +air,Y,1_2L,5,3.0,18.8402,0.1412,64 +air,Y,1_2L,10,0.5,3.1369,0.5149,64 +air,Y,1_2L,10,0.6,3.7661,0.5683,64 +air,Y,1_2L,10,0.7,4.3952,0.6323,64 +air,Y,1_2L,10,0.8,5.0244,0.6857,64 +air,Y,1_2L,10,0.9,5.6471,0.7391,64 +air,Y,1_2L,10,1.0,6.2763,0.8138,64 +air,Y,1_2L,10,1.1,6.9054,0.8886,64 +air,Y,1_2L,10,1.2,7.5346,0.9953,64 +air,Y,1_2L,10,1.3,8.1637,1.1448,64 +air,Y,1_2L,10,1.4,8.7929,1.3584,64 +air,Y,1_2L,10,1.5,9.4221,1.9563,64 +air,Y,1_2L,10,1.6,10.0448,3.3549,64 +air,Y,1_2L,10,1.7,10.674,6.3978,64 +air,Y,1_2L,10,1.8,11.3031,3.6325,64 +air,Y,1_2L,10,1.9,11.9323,3.0132,64 +air,Y,1_2L,10,2.0,12.5614,1.8495,64 +air,Y,1_4L,5,0.5,3.1369,0.7391,64 +air,Y,1_4L,5,0.6,3.7661,0.7925,64 +air,Y,1_4L,5,0.7,4.3952,0.8352,64 +air,Y,1_4L,5,0.8,5.0244,0.8779,64 +air,Y,1_4L,5,0.9,5.6471,0.9206,64 +air,Y,1_4L,5,1.0,6.2763,0.974,64 +air,Y,1_4L,5,1.1,6.9054,1.0274,64 +air,Y,1_4L,5,1.2,7.5346,1.1021,64 +air,Y,1_4L,5,1.3,8.1637,1.1875,64 +air,Y,1_4L,5,1.4,8.7929,1.3263,64 +air,Y,1_4L,5,1.5,9.4221,1.5932,64 +air,Y,1_4L,5,1.6,10.0448,2.5862,64 +air,Y,1_4L,5,1.7,10.674,6.7714,64 +air,Y,1_4L,5,1.8,11.3031,3.7072,64 +air,Y,1_4L,5,1.9,11.9323,1.8495,64 +air,Y,1_4L,5,2.0,12.5614,0.942,64 +air,Y,1_4L,5,2.1,13.1906,0.5683,64 +air,Y,1_4L,5,2.2,13.8133,0.312,64 +air,Y,1_4L,5,2.3,14.4425,0.1092,64 +air,Y,1_4L,5,2.4,15.0717,0.1626,64 +air,Y,1_4L,5,2.5,15.7008,0.3014,64 +air,Y,1_4L,5,2.6,16.33,0.4188,64 +air,Y,1_4L,5,2.7,16.9591,0.5363,64 +air,Y,1_4L,5,2.8,17.5883,0.643,64 +air,Y,1_4L,5,2.9,18.211,0.7711,64 +air,Y,1_4L,5,3.0,18.8402,0.9099,64 +air,Y,1_4L,10,0.5,3.1369,0.7391,64 +air,Y,1_4L,10,0.6,3.7661,0.7925,64 +air,Y,1_4L,10,0.7,4.3952,0.8352,64 +air,Y,1_4L,10,0.8,5.0244,0.8779,64 +air,Y,1_4L,10,0.9,5.6471,0.9206,64 +air,Y,1_4L,10,1.0,6.2763,0.974,64 +air,Y,1_4L,10,1.1,6.9054,1.0274,64 +air,Y,1_4L,10,1.2,7.5346,1.1021,64 +air,Y,1_4L,10,1.3,8.1637,1.2089,64 +air,Y,1_4L,10,1.4,8.7929,1.3584,64 +air,Y,1_4L,10,1.5,9.4221,1.7961,64 +air,Y,1_4L,10,1.6,10.0448,2.8317,64 +air,Y,1_4L,10,1.7,10.674,4.508,64 +air,Y,1_4L,10,1.8,11.3031,2.2766,64 +air,Y,1_4L,10,1.9,11.9323,1.7854,64 +air,Y,1_4L,10,2.0,12.5614,0.8672,64 +air,Y,1_8L,5,0.5,3.1369,0.8352,64 +air,Y,1_8L,5,0.6,3.7661,0.8886,64 +air,Y,1_8L,5,0.7,4.3952,0.9206,64 +air,Y,1_8L,5,0.8,5.0244,0.942,64 +air,Y,1_8L,5,0.9,5.6471,0.974,64 +air,Y,1_8L,5,1.0,6.2763,1.006,64 +air,Y,1_8L,5,1.1,6.9054,1.0381,64 +air,Y,1_8L,5,1.2,7.5346,1.0808,64 +air,Y,1_8L,5,1.3,8.1637,1.1341,64 +air,Y,1_8L,5,1.4,8.7929,1.2089,64 +air,Y,1_8L,5,1.5,9.4221,1.3797,64 +air,Y,1_8L,5,1.6,10.0448,2.0203,64 +air,Y,1_8L,5,1.7,10.674,4.4653,64 +air,Y,1_8L,5,1.8,11.3031,2.1164,64 +air,Y,1_8L,5,1.9,11.9323,0.8245,64 +air,Y,1_8L,5,2.0,12.5614,0.2587,64 +air,Y,1_8L,5,2.1,13.1906,0.1946,64 +air,Y,1_8L,5,2.2,13.8133,0.3334,64 +air,Y,1_8L,5,2.3,14.4425,0.4829,64 +air,Y,1_8L,5,2.4,15.0717,0.5896,64 +air,Y,1_8L,5,2.5,15.7008,0.675,64 +air,Y,1_8L,5,2.6,16.33,0.7498,64 +air,Y,1_8L,5,2.7,16.9591,0.8245,64 +air,Y,1_8L,5,2.8,17.5883,0.8886,64 +air,Y,1_8L,5,2.9,18.211,0.9633,64 +air,Y,1_8L,5,3.0,18.8402,1.0487,64 +air,Y,1_8L,10,0.5,3.1369,0.8352,64 +air,Y,1_8L,10,0.6,3.7661,0.8779,64 +air,Y,1_8L,10,0.7,4.3952,0.9099,64 +air,Y,1_8L,10,0.8,5.0244,0.942,64 +air,Y,1_8L,10,0.9,5.6471,0.974,64 +air,Y,1_8L,10,1.0,6.2763,1.006,64 +air,Y,1_8L,10,1.1,6.9054,1.0381,64 +air,Y,1_8L,10,1.2,7.5346,1.0808,64 +air,Y,1_8L,10,1.3,8.1637,1.1448,64 +air,Y,1_8L,10,1.4,8.7929,1.2409,64 +air,Y,1_8L,10,1.5,9.4221,1.5185,64 +air,Y,1_8L,10,1.6,10.0448,2.1911,64 +air,Y,1_8L,10,1.7,10.674,2.8317,64 +air,Y,1_8L,10,1.8,11.3031,1.1982,64 +air,Y,1_8L,10,1.9,11.9323,0.8566,64 +air,Y,1_8L,10,2.0,12.5614,0.2159,64 +air,Y,3_4L,5,0.5,3.1369,0.2693,64 +air,Y,3_4L,5,0.6,3.7661,0.3334,64 +air,Y,3_4L,5,0.7,4.3952,0.3868,64 +air,Y,3_4L,5,0.8,5.0244,0.4295,64 +air,Y,3_4L,5,0.9,5.6471,0.4829,64 +air,Y,3_4L,5,1.0,6.2763,0.5363,64 +air,Y,3_4L,5,1.1,6.9054,0.611,64 +air,Y,3_4L,5,1.2,7.5346,0.7071,64 +air,Y,3_4L,5,1.3,8.1637,0.8352,64 +air,Y,3_4L,5,1.4,8.7929,1.0167,64 +air,Y,3_4L,5,1.5,9.4221,1.3584,64 +air,Y,3_4L,5,1.6,10.0448,2.5328,64 +air,Y,3_4L,5,1.7,10.674,8.074,64 +air,Y,3_4L,5,1.8,11.3031,5.1806,64 +air,Y,3_4L,5,1.9,11.9323,3.152,64 +air,Y,3_4L,5,2.0,12.5614,2.0844,64 +air,Y,3_4L,5,2.1,13.1906,1.7107,64 +air,Y,3_4L,5,2.2,13.8133,1.5399,64 +air,Y,3_4L,5,2.3,14.4425,1.337,64 +air,Y,3_4L,5,2.4,15.0717,1.1662,64 +air,Y,3_4L,5,2.5,15.7008,1.0487,64 +air,Y,3_4L,5,2.6,16.33,0.9526,64 +air,Y,3_4L,5,2.7,16.9591,0.8779,64 +air,Y,3_4L,5,2.8,17.5883,0.8245,64 +air,Y,3_4L,5,2.9,18.211,0.7818,64 +air,Y,3_4L,5,3.0,18.8402,0.7605,64 +air,Y,3_4L,10,0.5,3.1369,0.2693,64 +air,Y,3_4L,10,0.6,3.7661,0.3334,64 +air,Y,3_4L,10,0.7,4.3952,0.3761,64 +air,Y,3_4L,10,0.8,5.0244,0.4295,64 +air,Y,3_4L,10,0.9,5.6471,0.4829,64 +air,Y,3_4L,10,1.0,6.2763,0.5363,64 +air,Y,3_4L,10,1.1,6.9054,0.611,64 +air,Y,3_4L,10,1.2,7.5346,0.7071,64 +air,Y,3_4L,10,1.3,8.1637,0.8459,64 +air,Y,3_4L,10,1.4,8.7929,1.0381,64 +air,Y,3_4L,10,1.5,9.4221,1.5505,64 +air,Y,3_4L,10,1.6,10.0448,2.7677,64 +air,Y,3_4L,10,1.7,10.674,5.7892,64 +air,Y,3_4L,10,1.8,11.3031,3.451,64 +air,Y,3_4L,10,1.9,11.9323,2.9172,64 +air,Y,3_4L,10,2.0,12.5614,1.9135,64 +air,Y,L,5,0.5,3.1369,0.0451,64 +air,Y,L,5,0.6,3.7661,0.0665,64 +air,Y,L,5,0.7,4.3952,0.1092,64 +air,Y,L,5,0.8,5.0244,0.1412,64 +air,Y,L,5,0.9,5.6471,0.1626,64 +air,Y,L,5,1.0,6.2763,0.1946,64 +air,Y,L,5,1.1,6.9054,0.2373,64 +air,Y,L,5,1.2,7.5346,0.28,64 +air,Y,L,5,1.3,8.1637,0.3441,64 +air,Y,L,5,1.4,8.7929,0.4295,64 +air,Y,L,5,1.5,9.4221,0.5896,64 +air,Y,L,5,1.6,10.0448,1.1448,64 +air,Y,L,5,1.7,10.674,4.0062,64 +air,Y,L,5,1.8,11.3031,2.6075,64 +air,Y,L,5,1.9,11.9323,1.6573,64 +air,Y,L,5,2.0,12.5614,1.1555,64 +air,Y,L,5,2.1,13.1906,0.9953,64 +air,Y,L,5,2.2,13.8133,0.942,64 +air,Y,L,5,2.3,14.4425,0.8779,64 +air,Y,L,5,2.4,15.0717,0.8138,64 +air,Y,L,5,2.5,15.7008,0.7818,64 +air,Y,L,5,2.6,16.33,0.7605,64 +air,Y,L,5,2.7,16.9591,0.7605,64 +air,Y,L,5,2.8,17.5883,0.7818,64 +air,Y,L,5,2.9,18.211,0.8245,64 +air,Y,L,5,3.0,18.8402,0.8886,64 +air,Y,L,10,0.5,3.1369,0.0451,64 +air,Y,L,10,0.6,3.7661,0.0665,64 +air,Y,L,10,0.7,4.3952,0.1092,64 +air,Y,L,10,0.8,5.0244,0.1412,64 +air,Y,L,10,0.9,5.6471,0.1626,64 +air,Y,L,10,1.0,6.2763,0.1946,64 +air,Y,L,10,1.1,6.9054,0.2373,64 +air,Y,L,10,1.2,7.5346,0.28,64 +air,Y,L,10,1.3,8.1637,0.3441,64 +air,Y,L,10,1.4,8.7929,0.4402,64 +air,Y,L,10,1.5,9.4221,0.6857,64 +air,Y,L,10,1.6,10.0448,1.2623,64 +air,Y,L,10,1.7,10.674,2.9812,64 +air,Y,L,10,1.8,11.3031,1.8175,64 +air,Y,L,10,1.9,11.9323,1.5399,64 +air,Y,L,10,2.0,12.5614,1.0594,64 +water,X,1_2L,5,0.5,3.1386,0.7306,67 +water,X,1_2L,5,0.7,4.3938,0.7912,67 +water,X,1_2L,5,0.8,5.0245,0.8661,67 +water,X,1_2L,5,0.9,5.6491,0.9945,67 +water,X,1_2L,5,1.0,6.2798,1.212,67 +water,X,1_2L,5,1.1,6.9043,1.6113,67 +water,X,1_2L,5,1.2,7.535,2.6596,67 +water,X,1_2L,5,1.3,8.1657,4.2464,67 +water,X,1_2L,5,1.4,8.7902,1.5151,67 +water,X,1_2L,5,1.5,9.4209,0.424,67 +water,X,1_2L,5,1.6,10.0454,0.2814,67 +water,X,1_2L,5,1.7,10.6762,1.3154,67 +water,X,1_2L,5,1.8,11.3069,4.4032,67 +water,X,1_2L,5,1.9,11.9314,2.6062,67 +water,X,1_2L,5,2.0,12.5621,1.8182,67 +water,X,1_2L,5,2.1,13.1866,1.3618,67 +water,X,1_2L,5,2.2,13.8173,1.0694,67 +water,X,1_2L,5,2.3,14.4418,0.8483,67 +water,X,1_2L,5,2.4,15.0725,0.7057,67 +water,X,1_2L,5,2.5,15.7032,0.5951,67 +water,X,1_2L,5,2.6,16.334,0.5167,67 +water,X,1_2L,5,2.7,16.9585,0.4311,67 +water,X,1_2L,5,2.8,17.583,0.3598,67 +water,X,1_2L,5,2.9,18.2137,0.2671,67 +water,X,1_2L,5,3.0,18.8444,0.1387,67 +water,X,1_2L,10,0.5,3.1386,0.7306,67 +water,X,1_2L,10,0.6,3.7631,0.7485,67 +water,X,1_2L,10,0.7,4.3938,0.7948,67 +water,X,1_2L,10,0.8,5.0245,0.8697,67 +water,X,1_2L,10,0.9,5.6491,0.9981,67 +water,X,1_2L,10,1.0,6.2798,1.2013,67 +water,X,1_2L,10,1.1,6.9043,1.5971,67 +water,X,1_2L,10,1.2,7.535,2.6311,67 +water,X,1_2L,10,1.3,8.1657,3.1909,67 +water,X,1_2L,10,1.4,8.7902,1.4438,67 +water,X,1_2L,10,1.5,9.4209,0.3598,67 +water,X,1_2L,10,1.6,10.0454,0.4703,67 +water,X,1_2L,10,1.7,10.6762,2.1498,67 +water,X,1_2L,10,1.8,11.3069,2.9627,67 +water,X,1_2L,10,1.9,11.9314,1.9857,67 +water,X,1_2L,10,2.0,12.5621,1.3831,67 +water,X,3_4L,5,0.5,3.1386,0.4846,67 +water,X,3_4L,5,0.7,4.3938,0.5452,67 +water,X,3_4L,5,0.8,5.0245,0.6165,67 +water,X,3_4L,5,0.9,5.6491,0.7342,67 +water,X,3_4L,5,1.0,6.2798,0.941,67 +water,X,3_4L,5,1.1,6.9043,1.3332,67 +water,X,3_4L,5,1.2,7.535,2.3994,67 +water,X,3_4L,5,1.3,8.1657,4.4603,67 +water,X,3_4L,5,1.4,8.7902,1.9643,67 +water,X,3_4L,5,1.5,9.4209,0.9267,67 +water,X,3_4L,5,1.6,10.0454,0.399,67 +water,X,3_4L,5,1.7,10.6762,0.4062,67 +water,X,3_4L,5,1.8,11.3069,2.8985,67 +water,X,3_4L,5,1.9,11.9314,1.9037,67 +water,X,3_4L,5,2.0,12.5621,1.4438,67 +water,X,3_4L,5,2.1,13.1866,1.1728,67 +water,X,3_4L,5,2.2,13.8173,1.0088,67 +water,X,3_4L,5,2.3,14.4418,0.8947,67 +water,X,3_4L,5,2.4,15.0725,0.834,67 +water,X,3_4L,5,2.5,15.7032,0.8126,67 +water,X,3_4L,5,2.6,16.334,0.8019,67 +water,X,3_4L,5,2.7,16.9585,0.8198,67 +water,X,3_4L,5,2.8,17.583,0.8554,67 +water,X,3_4L,5,2.9,18.2137,0.916,67 +water,X,3_4L,5,3.0,18.8444,1.1086,67 +water,X,3_4L,10,0.5,3.1386,0.4882,67 +water,X,3_4L,10,0.6,3.7631,0.506,67 +water,X,3_4L,10,0.7,4.3938,0.5488,67 +water,X,3_4L,10,0.8,5.0245,0.6201,67 +water,X,3_4L,10,0.9,5.6491,0.7378,67 +water,X,3_4L,10,1.0,6.2798,0.9339,67 +water,X,3_4L,10,1.1,6.9043,1.3225,67 +water,X,3_4L,10,1.2,7.535,2.3708,67 +water,X,3_4L,10,1.3,8.1657,3.3015,67 +water,X,3_4L,10,1.4,8.7902,1.8003,67 +water,X,3_4L,10,1.5,9.4209,0.8554,67 +water,X,3_4L,10,1.6,10.0454,0.2885,67 +water,X,3_4L,10,1.7,10.6762,1.0266,67 +water,X,3_4L,10,1.8,11.3069,1.943,67 +water,X,3_4L,10,1.9,11.9314,1.4937,67 +water,X,3_4L,10,2.0,12.5621,1.1835,67 +water,X,L,5,0.5,3.1386,0.2172,67 +water,X,L,5,0.7,4.3938,0.2457,67 +water,X,L,5,0.8,5.0245,0.2849,67 +water,X,L,5,0.9,5.6491,0.3527,67 +water,X,L,5,1.0,6.2798,0.4775,67 +water,X,L,5,1.1,6.9043,0.7306,67 +water,X,L,5,1.2,7.535,1.4616,67 +water,X,L,5,1.3,8.1657,3.1981,67 +water,X,L,5,1.4,8.7902,1.7433,67 +water,X,L,5,1.5,9.4209,1.1086,67 +water,X,L,5,1.6,10.0454,0.9018,67 +water,X,L,5,1.7,10.6762,0.8733,67 +water,X,L,5,1.8,11.3069,0.5524,67 +water,X,L,5,1.9,11.9314,0.2065,67 +water,X,L,5,2.0,12.5621,0.0853,67 +water,X,L,5,2.1,13.1866,0.0924,67 +water,X,L,5,2.2,13.8173,0.1387,67 +water,X,L,5,2.3,14.4418,0.1815,67 +water,X,L,5,2.4,15.0725,0.2207,67 +water,X,L,5,2.5,15.7032,0.2742,67 +water,X,L,5,2.6,16.334,0.3063,67 +water,X,L,5,2.7,16.9585,0.3776,67 +water,X,L,5,2.8,17.583,0.4525,67 +water,X,L,5,2.9,18.2137,0.5773,67 +water,X,L,5,3.0,18.8444,0.9374,67 +water,X,L,10,0.5,3.1386,0.2207,67 +water,X,L,10,0.6,3.7631,0.2243,67 +water,X,L,10,0.7,4.3938,0.2457,67 +water,X,L,10,0.8,5.0245,0.2885,67 +water,X,L,10,0.9,5.6491,0.3562,67 +water,X,L,10,1.0,6.2798,0.4775,67 +water,X,L,10,1.1,6.9043,0.7271,67 +water,X,L,10,1.2,7.535,1.4509,67 +water,X,L,10,1.3,8.1657,2.3744,67 +water,X,L,10,1.4,8.7902,1.5186,67 +water,X,L,10,1.5,9.4209,1.0765,67 +water,X,L,10,1.6,10.0454,0.8626,67 +water,X,L,10,1.7,10.6762,0.8269,67 +water,X,L,10,1.8,11.3069,0.4097,67 +water,X,L,10,1.9,11.9314,0.1815,67 +water,X,L,10,2.0,12.5621,0.2457,67 +water,Y,1_2L,5,0.5,3.1386,0.7283,68 +water,Y,1_2L,5,0.6,3.7631,0.7461,68 +water,Y,1_2L,5,0.7,4.3938,0.7887,68 +water,Y,1_2L,5,0.8,5.0245,0.8739,68 +water,Y,1_2L,5,0.9,5.6491,1.0052,68 +water,Y,1_2L,5,1.0,6.2798,1.2146,68 +water,Y,1_2L,5,1.1,6.9043,1.5519,68 +water,Y,1_2L,5,1.2,7.535,2.4003,68 +water,Y,1_2L,5,1.3,8.1657,4.3136,68 +water,Y,1_2L,5,1.4,8.7902,2.6274,68 +water,Y,1_2L,5,1.5,9.4209,1.1082,68 +water,Y,1_2L,5,1.6,10.0454,0.4266,68 +water,Y,1_2L,5,1.7,10.6762,0.1284,68 +water,Y,1_2L,5,1.8,11.3007,2.6949,68 +water,Y,1_2L,5,1.9,11.9314,2.9931,68 +water,Y,1_2L,5,2.0,12.5621,2.3612,68 +water,Y,1_2L,5,2.1,13.1866,1.6761,68 +water,Y,1_2L,5,2.2,13.8173,1.3247,68 +water,Y,1_2L,5,2.3,14.4418,1.0585,68 +water,Y,1_2L,5,2.4,15.0725,0.8419,68 +water,Y,1_2L,5,2.5,15.7032,0.6822,68 +water,Y,1_2L,5,2.6,16.3278,0.6005,68 +water,Y,1_2L,5,2.7,16.9585,0.5899,68 +water,Y,1_2L,5,2.8,17.583,0.5224,68 +water,Y,1_2L,5,2.9,18.2137,0.4621,68 +water,Y,1_2L,5,3.0,18.8444,0.3982,68 +water,Y,1_2L,10,0.5,3.1386,0.7319,68 +water,Y,1_2L,10,0.6,3.7631,0.7425,68 +water,Y,1_2L,10,0.7,4.3938,0.7887,68 +water,Y,1_2L,10,0.8,5.0245,0.8703,68 +water,Y,1_2L,10,0.9,5.6491,0.9981,68 +water,Y,1_2L,10,1.0,6.2798,1.204,68 +water,Y,1_2L,10,1.1,6.9043,1.5874,68 +water,Y,1_2L,10,1.2,7.535,2.4429,68 +water,Y,1_2L,10,1.3,8.1657,3.3303,68 +water,Y,1_2L,10,1.4,8.7902,1.4738,68 +water,Y,1_2L,10,1.5,9.4209,0.778,68 +water,Y,1_2L,10,1.6,10.0454,0.2314,68 +water,Y,1_2L,10,1.7,10.6762,1.4454,68 +water,Y,1_2L,10,1.8,11.3069,2.3754,68 +water,Y,1_2L,10,1.9,11.9314,1.4631,68 +water,Y,1_2L,10,2.0,12.5621,1.7897,68 +water,Y,3_4L,5,0.5,3.1386,0.4834,68 +water,Y,3_4L,5,0.6,3.7631,0.5082,68 +water,Y,3_4L,5,0.7,4.3938,0.5437,68 +water,Y,3_4L,5,0.8,5.0245,0.6218,68 +water,Y,3_4L,5,0.9,5.6491,0.7425,68 +water,Y,3_4L,5,1.0,6.2798,0.9449,68 +water,Y,3_4L,5,1.1,6.9043,1.275,68 +water,Y,3_4L,5,1.2,7.535,2.1305,68 +water,Y,3_4L,5,1.3,8.1657,4.2816,68 +water,Y,3_4L,5,1.4,8.7902,2.9576,68 +water,Y,3_4L,5,1.5,9.4209,1.5554,68 +water,Y,3_4L,5,1.6,10.0454,0.9129,68 +water,Y,3_4L,5,1.7,10.6762,0.5686,68 +water,Y,3_4L,5,1.8,11.3007,1.5057,68 +water,Y,3_4L,5,1.9,11.9314,2.0595,68 +water,Y,3_4L,5,2.0,12.5621,1.6761,68 +water,Y,3_4L,5,2.1,13.1866,1.2572,68 +water,Y,3_4L,5,2.2,13.8173,1.0372,68 +water,Y,3_4L,5,2.3,14.4418,0.8952,68 +water,Y,3_4L,5,2.4,15.0725,0.81,68 +water,Y,3_4L,5,2.5,15.7032,0.7638,68 +water,Y,3_4L,5,2.6,16.3278,0.7461,68 +water,Y,3_4L,5,2.7,16.9585,0.7248,68 +water,Y,3_4L,5,2.8,17.583,0.7319,68 +water,Y,3_4L,5,2.9,18.2137,0.7603,68 +water,Y,3_4L,5,3.0,18.8444,0.8135,68 +water,Y,3_4L,10,0.5,3.1386,0.4869,68 +water,Y,3_4L,10,0.6,3.7631,0.5011,68 +water,Y,3_4L,10,0.7,4.3938,0.5437,68 +water,Y,3_4L,10,0.8,5.0245,0.6183,68 +water,Y,3_4L,10,0.9,5.6491,0.739,68 +water,Y,3_4L,10,1.0,6.2798,0.9378,68 +water,Y,3_4L,10,1.1,6.9043,1.3105,68 +water,Y,3_4L,10,1.2,7.535,2.1802,68 +water,Y,3_4L,10,1.3,8.1657,3.2948,68 +water,Y,3_4L,10,1.4,8.7902,1.5164,68 +water,Y,3_4L,10,1.5,9.4209,1.243,68 +water,Y,3_4L,10,1.6,10.0454,0.7496,68 +water,Y,3_4L,10,1.7,10.6762,0.4976,68 +water,Y,3_4L,10,1.8,11.3069,1.5874,68 +water,Y,3_4L,10,1.9,11.9314,0.8384,68 +water,Y,3_4L,10,2.0,12.5621,1.2146,68 +water,Y,L,5,0.5,3.1386,0.2172,68 +water,Y,L,5,0.6,3.7631,0.2278,68 +water,Y,L,5,0.7,4.3938,0.242,68 +water,Y,L,5,0.8,5.0245,0.2846,68 +water,Y,L,5,0.9,5.6491,0.3556,68 +water,Y,L,5,1.0,6.2798,0.4763,68 +water,Y,L,5,1.1,6.9043,0.6893,68 +water,Y,L,5,1.2,7.535,1.2501,68 +water,Y,L,5,1.3,8.1657,2.7978,68 +water,Y,L,5,1.4,8.7902,2.2192,68 +water,Y,L,5,1.5,9.4209,1.3886,68 +water,Y,L,5,1.6,10.0454,1.023,68 +water,Y,L,5,1.7,10.6762,0.9307,68 +water,Y,L,5,1.8,11.3007,0.8845,68 +water,Y,L,5,1.9,11.9314,0.4408,68 +water,Y,L,5,2.0,12.5621,0.3166,68 +water,Y,L,5,2.1,13.1866,0.1923,68 +water,Y,L,5,2.2,13.8173,0.1604,68 +water,Y,L,5,2.3,14.4418,0.0965,68 +water,Y,L,5,2.4,15.0725,0.061,68 +water,Y,L,5,2.5,15.7032,0.1391,68 +water,Y,L,5,2.6,16.3278,0.2172,68 +water,Y,L,5,2.7,16.9585,0.1178,68 +water,Y,L,5,2.8,17.583,0.1604,68 +water,Y,L,5,2.9,18.2137,0.203,68 +water,Y,L,5,3.0,18.8444,0.274,68 +water,Y,L,10,0.5,3.1386,0.2207,68 +water,Y,L,10,0.6,3.7631,0.2207,68 +water,Y,L,10,0.7,4.3938,0.242,68 +water,Y,L,10,0.8,5.0245,0.2846,68 +water,Y,L,10,0.9,5.6491,0.3556,68 +water,Y,L,10,1.0,6.2798,0.4763,68 +water,Y,L,10,1.1,6.9043,0.7141,68 +water,Y,L,10,1.2,7.535,1.2927,68 +water,Y,L,10,1.3,8.1657,2.1908,68 +water,Y,L,10,1.4,8.7902,1.204,68 +water,Y,L,10,1.5,9.4209,1.2288,68 +water,Y,L,10,1.6,10.0454,0.9804,68 +water,Y,L,10,1.7,10.6762,0.849,68 +water,Y,L,10,1.8,11.3069,0.5615,68 +water,Y,L,10,1.9,11.9314,0.4302,68 +water,Y,L,10,2.0,12.5621,0.2243,68 diff --git a/validation/experiments/flotant/measured_tow_ad.csv b/validation/experiments/flotant/measured_tow_ad.csv new file mode 100644 index 00000000..534feb0f --- /dev/null +++ b/validation/experiments/flotant/measured_tow_ad.csv @@ -0,0 +1,240 @@ +station,component,direction,Ur,V_digitised,V_test,AD_rms +1_2L,X,forwards,0.283,0.0241,0.025,0.0026 +1_2L,X,forwards,0.59,0.0502,0.050,0.0037 +1_2L,X,forwards,0.875,0.0743,0.075,0.0036 +1_2L,X,forwards,1.178,0.1001,0.100,0.0045 +1_2L,X,forwards,1.481,0.1258,0.125,0.0032 +1_2L,X,backwards,1.755,0.1491,0.150,0.0025 +1_2L,X,forwards,2.06,0.175,0.175,0.0039 +1_2L,X,backwards,2.341,0.1989,0.200,0.0028 +1_2L,X,forwards,2.625,0.223,0.225,0.0042 +1_2L,X,backwards,2.942,0.25,0.250,0.0056 +1_2L,X,forwards,3.225,0.274,0.275,0.0293 +1_2L,X,backwards,3.527,0.2997,0.300,0.0335 +1_2L,X,forwards,3.817,0.3243,0.325,0.0994 +1_2L,X,backwards,4.117,0.3498,0.350,0.1409 +1_2L,X,forwards,4.413,0.3749,0.375,0.1776 +1_2L,X,backwards,4.706,0.3998,0.400,0.1959 +1_2L,X,forwards,5.005,0.4252,0.425,0.2096 +1_2L,X,backwards,5.281,0.4487,0.450,0.1911 +1_2L,X,forwards,5.571,0.4733,0.475,0.2343 +1_2L,X,backwards,5.898,0.5011,0.500,0.0605 +1_2L,X,forwards,6.17,0.5242,0.525,0.1176 +1_2L,X,backwards,6.471,0.5498,0.550,0.0608 +1_2L,X,forwards,6.769,0.5751,0.575,0.0865 +1_2L,X,backwards,7.058,0.5996,0.600,0.0729 +1_2L,X,forwards,7.355,0.6249,0.625,0.1019 +1_2L,X,backwards,7.642,0.6492,0.650,0.0604 +1_2L,X,forwards,7.936,0.6742,0.675,0.1134 +1_2L,X,backwards,8.227,0.699,0.700,0.059 +1_2L,X,forwards,8.521,0.7239,0.725,0.1059 +1_2L,X,backwards,8.823,0.7496,0.750,0.064 +1_2L,X,forwards,9.101,0.7732,0.775,0.0902 +1_2L,X,backwards,9.413,0.7997,0.800,0.0835 +1_2L,X,forwards,9.713,0.8252,0.825,0.0706 +1_2L,X,backwards,10.005,0.85,0.850,0.0841 +1_2L,X,forwards,10.298,0.8749,0.875,0.0496 +1_2L,X,backwards,10.592,0.8999,0.900,0.0858 +1_2L,X,forwards,10.878,0.9242,0.925,0.0554 +1_2L,X,backwards,11.186,0.9504,0.950,0.0467 +1_2L,X,forwards,11.408,0.9692,0.975,0.0601 +1_2L,X,backwards,11.69,0.9932,1.000,0.0622 +1_2L,Y,forwards,0.292,0.0248,0.025,0.0007 +1_2L,Y,forwards,0.59,0.0501,0.050,0.0007 +1_2L,Y,forwards,0.89,0.0756,0.075,0.0007 +1_2L,Y,forwards,1.191,0.1012,0.100,0.0011 +1_2L,Y,forwards,1.515,0.1287,0.125,0.0015 +1_2L,Y,backwards,1.738,0.1476,0.150,0.0018 +1_2L,Y,forwards,2.064,0.1754,0.175,0.0056 +1_2L,Y,backwards,2.355,0.2001,0.200,0.0034 +1_2L,Y,forwards,2.646,0.2248,0.225,0.0151 +1_2L,Y,backwards,2.938,0.2496,0.250,0.0313 +1_2L,Y,forwards,3.227,0.2742,0.275,0.112 +1_2L,Y,backwards,3.527,0.2997,0.300,0.1788 +1_2L,Y,forwards,3.811,0.3238,0.325,0.3134 +1_2L,Y,backwards,4.116,0.3497,0.350,0.4322 +1_2L,Y,forwards,4.403,0.3741,0.375,0.5 +1_2L,Y,backwards,4.697,0.399,0.400,0.673 +1_2L,Y,forwards,4.999,0.4247,0.425,0.7005 +1_2L,Y,backwards,5.275,0.4482,0.450,0.6561 +1_2L,Y,forwards,5.583,0.4744,0.475,0.7755 +1_2L,Y,backwards,5.884,0.4999,0.500,0.3032 +1_2L,Y,forwards,6.168,0.524,0.525,0.5204 +1_2L,Y,backwards,6.47,0.5497,0.550,0.3282 +1_2L,Y,forwards,6.767,0.5749,0.575,0.4236 +1_2L,Y,backwards,7.058,0.5997,0.600,0.4623 +1_2L,Y,forwards,7.346,0.6241,0.625,0.5162 +1_2L,Y,backwards,7.632,0.6485,0.650,0.4317 +1_2L,Y,forwards,7.931,0.6738,0.675,0.5637 +1_2L,Y,backwards,8.239,0.7,0.700,0.3839 +1_2L,Y,forwards,8.504,0.7225,0.725,0.5636 +1_2L,Y,backwards,8.815,0.7489,0.750,0.3642 +1_2L,Y,forwards,9.104,0.7735,0.775,0.4436 +1_2L,Y,backwards,9.417,0.8001,0.800,0.3672 +1_2L,Y,forwards,9.7,0.8241,0.825,0.3473 +1_2L,Y,backwards,9.997,0.8493,0.850,0.2972 +1_2L,Y,forwards,10.302,0.8752,0.875,0.2073 +1_2L,Y,backwards,10.598,0.9004,0.900,0.2812 +1_2L,Y,forwards,10.877,0.9241,0.925,0.1989 +1_2L,Y,backwards,11.184,0.9502,0.950,0.1751 +1_2L,Y,forwards,11.378,0.9667,0.975,0.2142 +1_2L,Y,backwards,11.675,0.9919,1.000,0.1993 +3_4L,X,forwards,0.287,0.0244,0.025,0.0023 +3_4L,X,forwards,0.59,0.0501,0.050,0.0033 +3_4L,X,forwards,0.874,0.0743,0.075,0.0032 +3_4L,X,forwards,1.182,0.1004,0.100,0.0045 +3_4L,X,forwards,1.503,0.1277,0.125,0.0034 +3_4L,X,backwards,1.761,0.1496,0.150,0.0023 +3_4L,X,forwards,2.069,0.1758,0.175,0.0039 +3_4L,X,backwards,2.355,0.2001,0.200,0.0028 +3_4L,X,forwards,2.639,0.2242,0.225,0.0047 +3_4L,X,backwards,2.929,0.2489,0.250,0.007 +3_4L,X,forwards,3.224,0.2739,0.275,0.0314 +3_4L,X,backwards,3.528,0.2998,0.300,0.0424 +3_4L,X,forwards,3.815,0.3241,0.325,0.0952 +3_4L,X,backwards,4.118,0.3498,0.350,0.1293 +3_4L,X,forwards,4.414,0.375,0.375,0.1656 +3_4L,X,backwards,4.719,0.4009,0.400,0.2093 +3_4L,X,forwards,5.002,0.425,0.425,0.1988 +3_4L,X,backwards,5.293,0.4497,0.450,0.1963 +3_4L,X,forwards,5.58,0.474,0.475,0.225 +3_4L,X,backwards,5.881,0.4997,0.500,0.0687 +3_4L,X,forwards,6.173,0.5245,0.525,0.1249 +3_4L,X,backwards,6.471,0.5498,0.550,0.0743 +3_4L,X,forwards,6.77,0.5752,0.575,0.0909 +3_4L,X,backwards,7.048,0.5988,0.600,0.0704 +3_4L,X,forwards,7.351,0.6245,0.625,0.1075 +3_4L,X,backwards,7.646,0.6496,0.650,0.062 +3_4L,X,forwards,7.935,0.6742,0.675,0.1142 +3_4L,X,backwards,8.25,0.7009,0.700,0.0636 +3_4L,X,forwards,8.524,0.7242,0.725,0.0999 +3_4L,X,backwards,8.828,0.7501,0.750,0.0608 +3_4L,X,forwards,9.104,0.7734,0.775,0.0854 +3_4L,X,backwards,9.413,0.7997,0.800,0.074 +3_4L,X,forwards,9.7,0.8241,0.825,0.0755 +3_4L,X,backwards,10.014,0.8508,0.850,0.069 +3_4L,X,forwards,10.305,0.8755,0.875,0.0708 +3_4L,X,backwards,10.588,0.8996,0.900,0.0735 +3_4L,X,forwards,10.881,0.9244,0.925,0.0751 +3_4L,X,backwards,11.179,0.9498,0.950,0.0394 +3_4L,X,forwards,11.405,0.969,0.975,0.0824 +3_4L,X,backwards,11.693,0.9934,1.000,0.0615 +3_4L,Y,forwards,0.269,0.0229,0.025,0.0002 +3_4L,Y,forwards,0.582,0.0494,0.050,0.0008 +3_4L,Y,forwards,0.876,0.0744,0.075,0.0008 +3_4L,Y,forwards,1.17,0.0994,0.100,0.0012 +3_4L,Y,forwards,1.469,0.1248,0.125,0.0013 +3_4L,Y,backwards,1.76,0.1495,0.150,0.0013 +3_4L,Y,forwards,2.042,0.1735,0.175,0.0054 +3_4L,Y,backwards,2.337,0.1986,0.200,0.0033 +3_4L,Y,forwards,2.623,0.2228,0.225,0.0154 +3_4L,Y,backwards,2.935,0.2493,0.250,0.0299 +3_4L,Y,forwards,3.23,0.2744,0.275,0.1091 +3_4L,Y,backwards,3.528,0.2997,0.300,0.1731 +3_4L,Y,forwards,3.817,0.3243,0.325,0.3053 +3_4L,Y,backwards,4.112,0.3494,0.350,0.4169 +3_4L,Y,forwards,4.407,0.3744,0.375,0.4949 +3_4L,Y,backwards,4.705,0.3997,0.400,0.6509 +3_4L,Y,forwards,4.99,0.424,0.425,0.6955 +3_4L,Y,backwards,5.29,0.4494,0.450,0.6469 +3_4L,Y,forwards,5.58,0.474,0.475,0.7627 +3_4L,Y,backwards,5.908,0.502,0.500,0.2772 +3_4L,Y,forwards,6.167,0.5239,0.525,0.5191 +3_4L,Y,backwards,6.467,0.5494,0.550,0.2639 +3_4L,Y,forwards,6.769,0.5751,0.575,0.3605 +3_4L,Y,backwards,7.071,0.6007,0.600,0.3369 +3_4L,Y,forwards,7.35,0.6245,0.625,0.4009 +3_4L,Y,backwards,7.645,0.6495,0.650,0.3155 +3_4L,Y,forwards,7.948,0.6753,0.675,0.4325 +3_4L,Y,backwards,8.236,0.6997,0.700,0.3016 +3_4L,Y,forwards,8.52,0.7239,0.725,0.4169 +3_4L,Y,backwards,8.83,0.7502,0.750,0.2686 +3_4L,Y,forwards,9.106,0.7736,0.775,0.3378 +3_4L,Y,backwards,9.414,0.7998,0.800,0.2916 +3_4L,Y,forwards,9.695,0.8237,0.825,0.2935 +3_4L,Y,backwards,9.997,0.8494,0.850,0.229 +3_4L,Y,forwards,10.279,0.8733,0.875,0.282 +3_4L,Y,backwards,10.595,0.9001,0.900,0.2494 +3_4L,Y,forwards,10.875,0.9239,0.925,0.2994 +3_4L,Y,backwards,11.178,0.9497,0.950,0.1391 +3_4L,Y,forwards,11.375,0.9665,0.975,0.2965 +3_4L,Y,backwards,11.68,0.9923,1.000,0.1855 +L,X,forwards,0.277,0.0235,0.025,0.0013 +L,X,forwards,0.589,0.0501,0.050,0.0021 +L,X,forwards,0.875,0.0744,0.075,0.0021 +L,X,forwards,1.176,0.0999,0.100,0.003 +L,X,forwards,1.47,0.1249,0.125,0.0023 +L,X,backwards,1.76,0.1495,0.150,0.0015 +L,X,forwards,2.048,0.174,0.175,0.0026 +L,X,backwards,2.368,0.2012,0.200,0.002 +L,X,forwards,2.609,0.2217,0.225,0.0027 +L,X,backwards,2.943,0.25,0.250,0.0035 +L,X,forwards,3.228,0.2743,0.275,0.0147 +L,X,backwards,3.527,0.2997,0.300,0.0203 +L,X,forwards,3.815,0.3241,0.325,0.0363 +L,X,backwards,4.116,0.3497,0.350,0.0485 +L,X,forwards,4.415,0.3751,0.375,0.0612 +L,X,backwards,4.707,0.3999,0.400,0.1027 +L,X,forwards,5.002,0.425,0.425,0.0708 +L,X,backwards,5.289,0.4494,0.450,0.0901 +L,X,forwards,5.576,0.4737,0.475,0.08 +L,X,backwards,5.881,0.4997,0.500,0.0492 +L,X,forwards,6.169,0.5241,0.525,0.06 +L,X,backwards,6.471,0.5498,0.550,0.056 +L,X,forwards,6.765,0.5748,0.575,0.0479 +L,X,backwards,7.056,0.5995,0.600,0.0363 +L,X,forwards,7.357,0.6251,0.625,0.0661 +L,X,backwards,7.659,0.6507,0.650,0.0221 +L,X,forwards,7.941,0.6747,0.675,0.0791 +L,X,backwards,8.237,0.6998,0.700,0.0231 +L,X,forwards,8.52,0.7239,0.725,0.0417 +L,X,backwards,8.811,0.7486,0.750,0.0212 +L,X,forwards,9.107,0.7737,0.775,0.0296 +L,X,backwards,9.419,0.8002,0.800,0.0307 +L,X,forwards,9.707,0.8247,0.825,0.037 +L,X,backwards,9.992,0.8489,0.850,0.0331 +L,X,forwards,10.33,0.8777,0.875,0.0427 +L,X,backwards,10.595,0.9001,0.900,0.0539 +L,X,forwards,10.893,0.9255,0.925,0.0428 +L,X,backwards,11.175,0.9494,0.950,0.0402 +L,X,forwards,11.405,0.969,0.975,0.0483 +L,X,backwards,11.695,0.9936,1.000,0.0607 +L,Y,forwards,0.284,0.0241,0.025,0.0006 +L,Y,forwards,0.582,0.0494,0.050,0.0006 +L,Y,forwards,0.876,0.0744,0.075,0.0009 +L,Y,forwards,1.168,0.0992,0.100,0.0012 +L,Y,forwards,1.476,0.1254,0.125,0.0013 +L,Y,backwards,1.749,0.1486,0.150,0.0016 +L,Y,forwards,2.052,0.1744,0.175,0.0036 +L,Y,backwards,2.345,0.1993,0.200,0.0029 +L,Y,forwards,2.639,0.2242,0.225,0.0101 +L,Y,backwards,2.933,0.2492,0.250,0.0183 +L,Y,forwards,3.226,0.2741,0.275,0.0642 +L,Y,backwards,3.531,0.3,0.300,0.1034 +L,Y,forwards,3.813,0.3239,0.325,0.1798 +L,Y,backwards,4.114,0.3496,0.350,0.249 +L,Y,forwards,4.403,0.3741,0.375,0.3048 +L,Y,backwards,4.705,0.3998,0.400,0.4077 +L,Y,forwards,4.992,0.4241,0.425,0.4464 +L,Y,backwards,5.288,0.4493,0.450,0.4428 +L,Y,forwards,5.582,0.4742,0.475,0.5057 +L,Y,backwards,5.883,0.4999,0.500,0.2339 +L,Y,forwards,6.164,0.5237,0.525,0.4014 +L,Y,backwards,6.468,0.5495,0.550,0.1171 +L,Y,forwards,6.76,0.5743,0.575,0.2417 +L,Y,backwards,7.048,0.5988,0.600,0.0954 +L,Y,forwards,7.363,0.6255,0.625,0.2001 +L,Y,backwards,7.64,0.6491,0.650,0.064 +L,Y,forwards,7.942,0.6748,0.675,0.1969 +L,Y,backwards,8.252,0.7011,0.700,0.0864 +L,Y,forwards,8.518,0.7237,0.725,0.1152 +L,Y,backwards,8.82,0.7493,0.750,0.0774 +L,Y,forwards,9.109,0.7739,0.775,0.1076 +L,Y,backwards,9.414,0.7999,0.800,0.1358 +L,Y,forwards,9.7,0.8241,0.825,0.1506 +L,Y,backwards,10.0,0.8496,0.850,0.1536 +L,Y,forwards,10.292,0.8744,0.875,0.2415 +L,Y,backwards,10.606,0.9011,0.900,0.265 +L,Y,forwards,10.878,0.9242,0.925,0.2954 +L,Y,backwards,11.176,0.9496,0.950,0.2593 +L,Y,forwards,11.405,0.9689,0.975,0.3181 diff --git a/validation/experiments/flotant/provenance.json b/validation/experiments/flotant/provenance.json new file mode 100644 index 00000000..77c39db3 --- /dev/null +++ b/validation/experiments/flotant/provenance.json @@ -0,0 +1,434 @@ +{ + "source": "de Wilde, Heijnsdijk & de Ridder (2021), D5.5 - Report on VIV (hydrodynamic) behaviour, FLOTANT deliverable 210430-FLT-WP5_D-5-5_V0, MARIN report 30995-53-DWB, 30 April 2021 (Tables 2-1, 2-2, 3-4, 6-1, 6-2; Secs. 2.3-2.5, 3.4, 4.4, 4.5, 5.3, 5.4, 6.3; Appendices 1-3); Ulveseter, Thorsen, Saevik & Larsen (2019), Applied Ocean Research 90, 101856 (Table 1, Sec. 4.1); Ulveseter, Thorsen, Saevik & Larsen (2018), Marine Structures 60, 241-260 (Table 3); Chaplin, Bearman, Huera Huarte & Pattenden (2005), Journal of Fluids and Structures 21(1), 3-24 (Eq. 4); Facchinetti, de Langre & Biolley (2004), Journal of Fluids and Structures 19(2), 123-140 (Secs. 2-3)", + "report_url": "https://flotantproject.eu/wp-content/uploads/2021/11/210430_FLT-D5.5_VIV_test_v0.pdf", + "report_sha256": "0b1f1b06f84c3d44fe0ecc2c114feb5bc82911a84d29411d3197ca935810511b", + "report_doi": "none (a public project deliverable, dissemination level PU); the project's CORDIS record lists it under Results; grant agreement 815289, https://doi.org/10.3030/815289", + "doi": [ + "10.1016/j.apor.2019.101856", + "10.1016/j.marstruc.2018.04.001", + "10.1016/j.jfluidstructs.2005.04.010", + "10.1016/j.jfluidstructs.2003.12.004" + ], + "bibliographic_data": "the report's title page, document number and authors from the PDF; volumes, issues and pages of the articles from Crossref (api.crossref.org), 2026-11-16", + "data_used": "FEM input tables in air (Sec. 4.5) and in water (Sec. 5.4): 101 nodes, element labels, positions, lumped masses, weights, static tensions, EA, EI, accelerometer stations; RAOs at 5 and 10 mm, 200 kg, surge and sway, in air (Appendix 1, pp. 63-64) and in water (Appendix 2, pp. 67-68); A/D_rms = sigma/OD against Ur of the 40 tow tests at 200 kg, cross-flow (Y) and in line (X), at 1/2L, 3/4L and L (Appendix 3, pp. 70-72); test speeds and directions (Table 6-2); top and bottom tensions (Table 6-1); OD, length, mass (Table 2-1) and wet weight (Table 2-2); the tow-test high-pass of 3.5 rad/s (Table 3-4); f1 = 1.77 Hz for Ur (Sec. 6.3)", + "extraction": "extract_d55.py: the FEM tables from the PDF text; the RAO charts, vector graphics, as plotted coordinates mapped through the tick labels (axis residual at most 1.2e-3 rad/s and 1e-3), series named by the legend marker colour; the Appendix 3 charts, embedded 1386 x 867 raster images, calibrated on the grey grid lines (Ur residual 0.004), markers found by colour (40 points per chart, 39 for Y at L where an edge marker is clipped), each mapped to a tested speed within 0.0085 m/s", + "identified_structure": "from the forced-oscillation RAOs of the same specimen, not from the tow data: cable EI 1650 N m^2 and bending damping Bb 130 N m^2 s from the in-air surge RAOs at 5 and 10 mm (the tables' EI 3000 N m^2 matches the in-air resonance only with MARIN's empirical factor lambda 1.10, Sec. 4.5); in water the link chain and load cell with EI 100 N m^2 and the clump held laterally by K 32.5 kN/m and C 20 N s/m (a cantilever post of 0.3 m from a still anchor), from the surge and sway RAOs over 1.0-3.0 Hz (MARIN's table fixes the clump node and makes the chain rigid)", + "assumptions": "fresh water 1000 kg/m^3 (not stated; Table 2-2's 2.8 kg/m and 9.7 N/m at OD 48 mm imply it); the cable's diameter the OD, the other parts the diameter of the displaced volume of their table weight; the counterweight or clump as an axial spring k_ax 20 kN/m in series with the tables' EA, the unstretched lengths set for the tables' static tensions; uniform current over the whole line; Cd 1.2 and Ca 1 on the cable and the hardware; the clump's drag area 0.05 m^2 (not given); the accelerometers' axes normal to the cable, so the model's displacement takes the gravity term g theta/omega^2 the measurement holds", + "coefficients": { + "uls19": "Ulveseter et al. (2019), Table 1, fitted by them to the NDP riser in uniform flow (Sec. 4.1, Chh 1.5): Cd 1.2, CM 2, Cl 0.85, cF 0.144, dF 0.064; VIV ClX 0.75, alpha 0.15, Chh 1.5; blind here", + "b1": "the generic set of the Delta Flume riser case, nothing fitted to these tests: Cl 0.8, cF 0.18, dF 0.08, Cd 1.2; VIV ClX 0.85, alpha 0.15 (Ulveseter et al. 2018, Table 3); VIV AMPLITUDE Cv 0.8 with CdAmp = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2), at A/D 0-1.5 (Chaplin et al. 2005, Eq. 4); VIV DAMPING 0 0 1", + "wake": "Facchinetti et al. (2004): WAKE OSCILLATOR CL0 0.3, St 0.2, eps 0.3, A 12 (their values from rigid-cylinder lift and lock-in data in the literature), LINE TYPES Cl 0, Cd 1.2; cross-flow only" + }, + "processing": "statistics over t > 20 s of 60 s runs; each station's displacement plus g theta/omega^2, high-passed at 3.5 rad/s, A/D_rms = sigma/OD; Ur = V/(OD f1), f1 1.77 Hz; r.m.s. log errors over the tests with Ur >= 3; release: the first tested Ur above the 1/2L cross-flow peak at which A/D_rms falls below 70 % of the peak; RAOs: harmonic fit over the last 10 s of 5/f + 25 s runs, scored over 1.4-2.0 Hz in air and 1.0-3.0 Hz in water", + "CableDyn_commit": "3d779fb (dev)", + "validation_date": "2026-11-17", + "executable_name": "cabledyn.exe", + "executable_sha256": "see summary.json", + "compiler": "GNU Fortran 16.2.0", + "build_type": "Release", + "platform": "Windows 11 x86-64", + "dt_s": 0.002, + "tmax_s": 60.0, + "statistics_after_s": 20.0, + "reproduction": "the default command, run into a new work directory with the executable of summary.json, reproduces response_comparison.csv, rao_comparison.csv and summary.json byte for byte", + "sensitivity": { + "note": "tow: A/D_rms at the given speeds [m/s] against response_comparison.csv; rao: r.m.s. log errors against summary.json; end_*: the full uls19 sweep with another lower end", + "dt_0p001": { + "uls19": { + "0.3": { + "AD_CF_1_2L": 0.4193, + "AD_CF_3_4L": 0.4192, + "AD_CF_L": 0.2864, + "AD_IL_1_2L": 0.0804, + "f_cf_1_2L_hz": 1.15 + }, + "0.45": { + "AD_CF_1_2L": 0.7556, + "AD_CF_3_4L": 0.7757, + "AD_CF_L": 0.5686, + "AD_IL_1_2L": 0.1154, + "f_cf_1_2L_hz": 1.275 + }, + "0.5": { + "AD_CF_1_2L": 0.7326, + "AD_CF_3_4L": 0.7724, + "AD_CF_L": 0.5994, + "AD_IL_1_2L": 0.1311, + "f_cf_1_2L_hz": 1.325 + }, + "0.6": { + "AD_CF_1_2L": 0.4879, + "AD_CF_3_4L": 0.2829, + "AD_CF_L": 0.3289, + "AD_IL_1_2L": 0.0903, + "f_cf_1_2L_hz": 1.825 + }, + "0.8": { + "AD_CF_1_2L": 0.7087, + "AD_CF_3_4L": 0.463, + "AD_CF_L": 0.1695, + "AD_IL_1_2L": 0.1238, + "f_cf_1_2L_hz": 2.0 + } + }, + "b1": { + "0.3": { + "AD_CF_1_2L": 0.4632, + "AD_CF_3_4L": 0.4779, + "AD_CF_L": 0.3493, + "AD_IL_1_2L": 0.0098, + "f_cf_1_2L_hz": 1.25 + }, + "0.45": { + "AD_CF_1_2L": 0.4392, + "AD_CF_3_4L": 0.4753, + "AD_CF_L": 0.383, + "AD_IL_1_2L": 0.0563, + "f_cf_1_2L_hz": 1.35 + }, + "0.5": { + "AD_CF_1_2L": 0.3244, + "AD_CF_3_4L": 0.185, + "AD_CF_L": 0.1455, + "AD_IL_1_2L": 0.0438, + "f_cf_1_2L_hz": 1.875 + }, + "0.6": { + "AD_CF_1_2L": 0.3886, + "AD_CF_3_4L": 0.2445, + "AD_CF_L": 0.1218, + "AD_IL_1_2L": 0.0525, + "f_cf_1_2L_hz": 1.95 + }, + "0.8": { + "AD_CF_1_2L": 0.4496, + "AD_CF_3_4L": 0.3261, + "AD_CF_L": 0.0623, + "AD_IL_1_2L": 0.0685, + "f_cf_1_2L_hz": 2.175 + } + }, + "wake": { + "0.3": { + "AD_CF_1_2L": 0.2552, + "AD_CF_3_4L": 0.2628, + "AD_CF_L": 0.19, + "AD_IL_1_2L": 0.0092, + "f_cf_1_2L_hz": 1.225 + }, + "0.45": { + "AD_CF_1_2L": 0.1707, + "AD_CF_3_4L": 0.0825, + "AD_CF_L": 0.0787, + "AD_IL_1_2L": 0.0037, + "f_cf_1_2L_hz": 1.825 + }, + "0.5": { + "AD_CF_1_2L": 0.2079, + "AD_CF_3_4L": 0.1136, + "AD_CF_L": 0.0665, + "AD_IL_1_2L": 0.0049, + "f_cf_1_2L_hz": 1.875 + }, + "0.6": { + "AD_CF_1_2L": 0.2139, + "AD_CF_3_4L": 0.1387, + "AD_CF_L": 0.0176, + "AD_IL_1_2L": 0.0047, + "f_cf_1_2L_hz": 2.0 + }, + "0.8": { + "AD_CF_1_2L": 0.0682, + "AD_CF_3_4L": 0.0797, + "AD_CF_L": 0.1708, + "AD_IL_1_2L": 0.0015, + "f_cf_1_2L_hz": 3.1 + } + } + }, + "refine_2": { + "uls19": { + "0.3": { + "AD_CF_1_2L": 0.4177, + "AD_CF_3_4L": 0.4174, + "AD_CF_L": 0.285, + "AD_IL_1_2L": 0.0804, + "f_cf_1_2L_hz": 1.15 + }, + "0.45": { + "AD_CF_1_2L": 0.7558, + "AD_CF_3_4L": 0.7763, + "AD_CF_L": 0.5696, + "AD_IL_1_2L": 0.1166, + "f_cf_1_2L_hz": 1.25 + }, + "0.5": { + "AD_CF_1_2L": 0.7366, + "AD_CF_3_4L": 0.7766, + "AD_CF_L": 0.6023, + "AD_IL_1_2L": 0.1313, + "f_cf_1_2L_hz": 1.325 + }, + "0.6": { + "AD_CF_1_2L": 0.485, + "AD_CF_3_4L": 0.2813, + "AD_CF_L": 0.3343, + "AD_IL_1_2L": 0.0906, + "f_cf_1_2L_hz": 1.825 + }, + "0.8": { + "AD_CF_1_2L": 0.7096, + "AD_CF_3_4L": 0.4626, + "AD_CF_L": 0.1757, + "AD_IL_1_2L": 0.1243, + "f_cf_1_2L_hz": 2.0 + } + }, + "b1": { + "0.3": { + "AD_CF_1_2L": 0.4635, + "AD_CF_3_4L": 0.4779, + "AD_CF_L": 0.3488, + "AD_IL_1_2L": 0.0101, + "f_cf_1_2L_hz": 1.25 + }, + "0.45": { + "AD_CF_1_2L": 0.4452, + "AD_CF_3_4L": 0.4814, + "AD_CF_L": 0.3871, + "AD_IL_1_2L": 0.0542, + "f_cf_1_2L_hz": 1.35 + }, + "0.5": { + "AD_CF_1_2L": 0.3233, + "AD_CF_3_4L": 0.1835, + "AD_CF_L": 0.1465, + "AD_IL_1_2L": 0.0443, + "f_cf_1_2L_hz": 1.85 + }, + "0.6": { + "AD_CF_1_2L": 0.3893, + "AD_CF_3_4L": 0.2447, + "AD_CF_L": 0.1238, + "AD_IL_1_2L": 0.0524, + "f_cf_1_2L_hz": 1.95 + }, + "0.8": { + "AD_CF_1_2L": 0.452, + "AD_CF_3_4L": 0.3276, + "AD_CF_L": 0.0633, + "AD_IL_1_2L": 0.0679, + "f_cf_1_2L_hz": 2.175 + } + }, + "wake": { + "0.3": { + "AD_CF_1_2L": 0.2553, + "AD_CF_3_4L": 0.2628, + "AD_CF_L": 0.1901, + "AD_IL_1_2L": 0.0092, + "f_cf_1_2L_hz": 1.225 + }, + "0.45": { + "AD_CF_1_2L": 0.1707, + "AD_CF_3_4L": 0.0825, + "AD_CF_L": 0.0787, + "AD_IL_1_2L": 0.0037, + "f_cf_1_2L_hz": 1.825 + }, + "0.5": { + "AD_CF_1_2L": 0.208, + "AD_CF_3_4L": 0.1137, + "AD_CF_L": 0.0666, + "AD_IL_1_2L": 0.0049, + "f_cf_1_2L_hz": 1.875 + }, + "0.6": { + "AD_CF_1_2L": 0.2139, + "AD_CF_3_4L": 0.1387, + "AD_CF_L": 0.0175, + "AD_IL_1_2L": 0.0047, + "f_cf_1_2L_hz": 2.0 + }, + "0.8": { + "AD_CF_1_2L": 0.0683, + "AD_CF_3_4L": 0.0798, + "AD_CF_L": 0.1714, + "AD_IL_1_2L": 0.0015, + "f_cf_1_2L_hz": 3.1 + } + } + }, + "tmax_120": { + "uls19": { + "0.3": { + "AD_CF_1_2L": 0.4195, + "AD_CF_3_4L": 0.4194, + "AD_CF_L": 0.2864, + "AD_IL_1_2L": 0.0799, + "f_cf_1_2L_hz": 1.14 + }, + "0.45": { + "AD_CF_1_2L": 0.7577, + "AD_CF_3_4L": 0.7789, + "AD_CF_L": 0.5727, + "AD_IL_1_2L": 0.1154, + "f_cf_1_2L_hz": 1.26 + }, + "0.5": { + "AD_CF_1_2L": 0.7316, + "AD_CF_3_4L": 0.771, + "AD_CF_L": 0.5972, + "AD_IL_1_2L": 0.1339, + "f_cf_1_2L_hz": 1.32 + }, + "0.6": { + "AD_CF_1_2L": 0.4857, + "AD_CF_3_4L": 0.2802, + "AD_CF_L": 0.3346, + "AD_IL_1_2L": 0.0906, + "f_cf_1_2L_hz": 1.82 + }, + "0.8": { + "AD_CF_1_2L": 0.7094, + "AD_CF_3_4L": 0.4634, + "AD_CF_L": 0.174, + "AD_IL_1_2L": 0.1247, + "f_cf_1_2L_hz": 1.99 + } + }, + "b1": { + "0.3": { + "AD_CF_1_2L": 0.4638, + "AD_CF_3_4L": 0.4782, + "AD_CF_L": 0.349, + "AD_IL_1_2L": 0.0101, + "f_cf_1_2L_hz": 1.25 + }, + "0.45": { + "AD_CF_1_2L": 0.4438, + "AD_CF_3_4L": 0.48, + "AD_CF_L": 0.3862, + "AD_IL_1_2L": 0.0539, + "f_cf_1_2L_hz": 1.35 + }, + "0.5": { + "AD_CF_1_2L": 0.3231, + "AD_CF_3_4L": 0.184, + "AD_CF_L": 0.147, + "AD_IL_1_2L": 0.0444, + "f_cf_1_2L_hz": 1.86 + }, + "0.6": { + "AD_CF_1_2L": 0.3903, + "AD_CF_3_4L": 0.2442, + "AD_CF_L": 0.1229, + "AD_IL_1_2L": 0.0525, + "f_cf_1_2L_hz": 1.94 + }, + "0.8": { + "AD_CF_1_2L": 0.4516, + "AD_CF_3_4L": 0.3274, + "AD_CF_L": 0.0632, + "AD_IL_1_2L": 0.0693, + "f_cf_1_2L_hz": 2.18 + } + }, + "wake": { + "0.3": { + "AD_CF_1_2L": 0.2552, + "AD_CF_3_4L": 0.2626, + "AD_CF_L": 0.1898, + "AD_IL_1_2L": 0.0092, + "f_cf_1_2L_hz": 1.23 + }, + "0.45": { + "AD_CF_1_2L": 0.1707, + "AD_CF_3_4L": 0.0824, + "AD_CF_L": 0.0787, + "AD_IL_1_2L": 0.0037, + "f_cf_1_2L_hz": 1.83 + }, + "0.5": { + "AD_CF_1_2L": 0.208, + "AD_CF_3_4L": 0.1137, + "AD_CF_L": 0.0665, + "AD_IL_1_2L": 0.0049, + "f_cf_1_2L_hz": 1.88 + }, + "0.6": { + "AD_CF_1_2L": 0.2138, + "AD_CF_3_4L": 0.1387, + "AD_CF_L": 0.0175, + "AD_IL_1_2L": 0.0047, + "f_cf_1_2L_hz": 2.0 + }, + "0.8": { + "AD_CF_1_2L": 0.0682, + "AD_CF_3_4L": 0.0797, + "AD_CF_L": 0.1708, + "AD_IL_1_2L": 0.0015, + "f_cf_1_2L_hz": 3.11 + } + } + }, + "rao_refine_2": { + "air_table_5mm": { + "surge": 0.2272, + "sway": 0.2779 + }, + "air_table_10mm": { + "surge": 0.2086, + "sway": 0.23 + }, + "water_free_5mm": { + "surge": 1.1745, + "sway": 1.2077 + }, + "water_identified_5mm": { + "surge": 0.4592, + "sway": 0.744 + }, + "water_table_5mm": { + "surge": 1.1864, + "sway": 1.2157 + } + }, + "rao_dt_0p001": { + "air_table_5mm": { + "surge": 0.227, + "sway": 0.2771 + }, + "air_table_10mm": { + "surge": 0.2088, + "sway": 0.2295 + }, + "water_free_5mm": { + "surge": 1.1743, + "sway": 1.2076 + }, + "water_identified_5mm": { + "surge": 0.4587, + "sway": 0.743 + }, + "water_table_5mm": { + "surge": 1.1863, + "sway": 1.2157 + } + }, + "end_table_uls19": { + "cf_rms_log_error_all_stations": 0.7208, + "il_rms_log_error_all_stations": 0.9264, + "cf_1_2L_peak_AD": 0.8047, + "cf_1_2L_peak_Ur": 5.591, + "cf_1_2L_release_Ur": 8.828 + }, + "end_free_uls19": { + "cf_rms_log_error_all_stations": 0.6921, + "il_rms_log_error_all_stations": 0.942, + "cf_1_2L_peak_AD": 0.8106, + "cf_1_2L_peak_Ur": 5.591, + "cf_1_2L_release_Ur": 9.122 + } + } +} diff --git a/validation/experiments/flotant/rao_comparison.csv b/validation/experiments/flotant/rao_comparison.csv new file mode 100644 index 00000000..3c242251 --- /dev/null +++ b/validation/experiments/flotant/rao_comparison.csv @@ -0,0 +1,298 @@ +medium,end,amp_mm,f_hz,station,rao_cabledyn,rao_cabledyn_displacement,rao_measured_surge,rao_measured_sway +air,table,5,1.0,1_8L,1.0256,1.0314,0.9639,1.006 +air,table,5,1.0,1_4L,0.987,1.0011,0.9291,0.974 +air,table,5,1.0,1_2L,0.8127,0.8462,0.755,0.8032 +air,table,5,1.0,3_4L,0.5281,0.5768,0.4853,0.5363 +air,table,5,1.1,1_8L,1.0961,1.0927,1.0074,1.0381 +air,table,5,1.1,1_4L,1.0834,1.0891,0.9813,1.0274 +air,table,5,1.1,1_2L,0.932,0.9594,0.8334,0.8886 +air,table,5,1.1,3_4L,0.6274,0.6723,0.5549,0.611 +air,table,5,1.2,1_8L,1.1887,1.1762,1.0509,1.0808 +air,table,5,1.2,1_4L,1.2129,1.2104,1.0596,1.1021 +air,table,5,1.2,1_2L,1.0962,1.1185,0.9378,0.9953 +air,table,5,1.2,3_4L,0.7654,0.8084,0.6419,0.7071 +air,table,5,1.3,1_8L,1.3193,1.2964,1.1205,1.1341 +air,table,5,1.3,1_4L,1.3991,1.3876,1.1727,1.1875 +air,table,5,1.3,1_2L,1.3374,1.3551,1.0857,1.1341 +air,table,5,1.3,3_4L,0.9708,1.0139,0.7724,0.8352 +air,table,5,1.4,1_8L,1.5214,1.4844,1.2424,1.2089 +air,table,5,1.4,1_4L,1.6925,1.6691,1.3642,1.3263 +air,table,5,1.4,1_2L,1.7256,1.7388,1.3468,1.3263 +air,table,5,1.4,3_4L,1.3061,1.3522,1.0074,1.0167 +air,table,5,1.5,1_8L,1.8807,1.8205,1.4512,1.3797 +air,table,5,1.5,1_4L,2.224,2.1812,1.6862,1.5932 +air,table,5,1.5,1_2L,2.4449,2.4519,1.7993,1.7107 +air,table,5,1.5,3_4L,1.9368,1.9909,1.4077,1.3584 +air,table,5,1.6,1_8L,2.6614,2.5509,1.9472,2.0203 +air,table,5,1.6,1_4L,3.4129,3.3281,2.4955,2.5862 +air,table,5,1.6,1_2L,4.1013,4.0964,2.9393,3.0666 +air,table,5,1.6,3_4L,3.4156,3.4905,2.4345,2.5328 +air,table,5,1.7,1_8L,3.8529,3.6436,4.0009,4.4653 +air,table,5,1.7,1_4L,5.526,5.3548,6.2547,6.7714 +air,table,5,1.7,1_2L,7.3857,7.3508,8.6826,9.1417 +air,table,5,1.7,3_4L,6.4965,6.6065,7.8472,8.074 +air,table,5,1.8,1_8L,1.653,1.5286,1.6426,2.1164 +air,table,5,1.8,1_4L,2.8318,2.721,3.0785,3.7072 +air,table,5,1.8,1_2L,4.3487,4.3132,4.845,5.597 +air,table,5,1.8,3_4L,4.0782,4.1293,4.6275,5.1806 +air,table,5,1.9,1_8L,0.5598,0.5033,0.4766,0.8245 +air,table,5,1.9,1_4L,1.2803,1.2159,1.3555,1.8495 +air,table,5,1.9,1_2L,2.3609,2.3337,2.5825,3.2268 +air,table,5,1.9,3_4L,2.3818,2.4025,2.6608,3.152 +air,table,5,2.0,1_8L,0.2467,0.2565,0.1459,0.2587 +air,table,5,2.0,1_4L,0.6454,0.6017,0.6854,0.942 +air,table,5,2.0,1_2L,1.5416,1.5185,1.7036,1.9883 +air,table,5,2.0,3_4L,1.6932,1.7021,1.9124,2.0844 +air,table,5,2.1,1_8L,0.3284,0.3614,0.3286,0.1946 +air,table,5,2.1,1_4L,0.3095,0.281,0.2764,0.5683 +air,table,5,2.1,1_2L,1.1016,1.0808,1.1466,1.5292 +air,table,5,2.1,3_4L,1.3402,1.3429,1.4338,1.7107 +air,table,5,2.2,1_8L,0.4689,0.498,0.4853,0.3334 +air,table,5,2.2,1_4L,0.1527,0.1538,0.085,0.312 +air,table,5,2.2,1_2L,0.8186,0.7992,0.8247,1.2729 +air,table,5,2.2,3_4L,1.1316,1.1305,1.1727,1.5399 +air,table,5,2.3,1_8L,0.5988,0.6227,0.6071,0.4829 +air,table,5,2.3,1_4L,0.2219,0.2425,0.2329,0.1092 +air,table,5,2.3,1_2L,0.61,0.5915,0.5897,1.006 +air,table,5,2.3,3_4L,0.9982,0.9941,1.0074,1.337 +air,table,5,2.4,1_8L,0.7242,0.7435,0.7202,0.5896 +air,table,5,2.4,1_4L,0.369,0.3892,0.3983,0.1626 +air,table,5,2.4,1_2L,0.4361,0.4181,0.3983,0.7818 +air,table,5,2.4,3_4L,0.9091,0.9023,0.8943,1.1662 +air,table,5,2.5,1_8L,0.8572,0.8724,0.8334,0.675 +air,table,5,2.5,1_4L,0.5363,0.554,0.5636,0.3014 +air,table,5,2.5,1_2L,0.2732,0.2559,0.2155,0.611 +air,table,5,2.5,3_4L,0.8488,0.8394,0.7985,1.0487 +air,table,10,1.0,1_8L,1.0256,1.0314,0.99,1.006 +air,table,10,1.0,1_4L,0.9869,1.0011,0.9465,0.974 +air,table,10,1.0,1_2L,0.8127,0.8462,0.7724,0.8138 +air,table,10,1.0,3_4L,0.5281,0.5768,0.5027,0.5363 +air,table,10,1.1,1_8L,1.0961,1.0927,1.0335,1.0381 +air,table,10,1.1,1_4L,1.0833,1.089,1.0248,1.0274 +air,table,10,1.1,1_2L,0.932,0.9593,0.8682,0.8886 +air,table,10,1.1,3_4L,0.6274,0.6722,0.581,0.611 +air,table,10,1.2,1_8L,1.1887,1.1762,1.0944,1.0808 +air,table,10,1.2,1_4L,1.2128,1.2103,1.1118,1.1021 +air,table,10,1.2,1_2L,1.0961,1.1183,0.99,0.9953 +air,table,10,1.2,3_4L,0.7653,0.8083,0.6941,0.7071 +air,table,10,1.3,1_8L,1.3191,1.2962,1.1727,1.1448 +air,table,10,1.3,1_4L,1.3989,1.3873,1.2424,1.2089 +air,table,10,1.3,1_2L,1.337,1.3548,1.164,1.1448 +air,table,10,1.3,3_4L,0.9705,1.0136,0.8334,0.8459 +air,table,10,1.4,1_8L,1.5208,1.4838,1.312,1.2409 +air,table,10,1.4,1_4L,1.6916,1.6682,1.4599,1.3584 +air,table,10,1.4,1_2L,1.7244,1.7376,1.4686,1.3584 +air,table,10,1.4,3_4L,1.3051,1.3512,1.1031,1.0381 +air,table,10,1.5,1_8L,1.8776,1.8176,1.6252,1.5185 +air,table,10,1.5,1_4L,2.2195,2.1769,1.9472,1.7961 +air,table,10,1.5,1_2L,2.4388,2.4458,2.1213,1.9563 +air,table,10,1.5,3_4L,1.9314,1.9855,1.6775,1.5505 +air,table,10,1.6,1_8L,2.6362,2.5276,2.6521,2.1911 +air,table,10,1.6,1_4L,3.3743,3.2911,3.5484,2.8317 +air,table,10,1.6,1_2L,4.0472,4.0427,4.3316,3.3549 +air,table,10,1.6,3_4L,3.367,3.441,3.6615,2.7677 +air,table,10,1.7,1_8L,3.8509,3.6485,2.539,2.8317 +air,table,10,1.7,1_4L,5.4639,5.2992,4.114,4.508 +air,table,10,1.7,1_2L,7.2337,7.2018,5.8806,6.3978 +air,table,10,1.7,3_4L,6.3329,6.4416,5.4019,5.7892 +air,table,10,1.8,1_8L,1.7371,1.609,1.0596,1.1982 +air,table,10,1.8,1_4L,2.9472,2.8337,2.1039,2.2766 +air,table,10,1.8,1_2L,4.4954,4.4595,3.4614,3.6325 +air,table,10,1.8,3_4L,4.2032,4.2564,3.3744,3.451 +air,table,10,1.9,1_8L,0.5701,0.5128,0.4157,0.8566 +air,table,10,1.9,1_4L,1.2961,1.2312,1.1031,1.7854 +air,table,10,1.9,1_2L,2.3813,2.3541,2.1387,3.0132 +air,table,10,1.9,3_4L,2.3991,2.4201,2.2257,2.9172 +air,table,10,2.0,1_8L,0.2474,0.2566,0.2242,0.2159 +air,table,10,2.0,1_4L,0.65,0.6062,0.7985,0.8672 +air,table,10,2.0,1_2L,1.5475,1.5244,1.7819,1.8495 +air,table,10,2.0,3_4L,1.6981,1.7071,1.9385,1.9135 +water,free,5,1.0,1_2L,1.2052,1.1736,1.212,1.2146 +water,free,5,1.0,3_4L,0.9124,0.8445,0.941,0.9449 +water,free,5,1.0,L,0.4184,0.333,0.4775,0.4763 +water,free,5,1.1,1_2L,1.5667,1.5445,1.6113,1.5519 +water,free,5,1.1,3_4L,1.2422,1.1718,1.3332,1.275 +water,free,5,1.1,L,0.5965,0.5022,0.7306,0.6893 +water,free,5,1.2,1_2L,2.2717,2.2613,2.6596,2.4003 +water,free,5,1.2,3_4L,1.8996,1.8181,2.3994,2.1305 +water,free,5,1.2,L,0.9625,0.8446,1.4616,1.2501 +water,free,5,1.3,1_2L,3.525,3.5365,4.2464,4.3136 +water,free,5,1.3,3_4L,3.1322,3.0321,4.4603,4.2816 +water,free,5,1.3,L,1.6883,1.5286,3.1981,2.7978 +water,free,5,1.4,1_2L,3.6781,3.7158,1.5151,2.6274 +water,free,5,1.4,3_4L,3.5081,3.4274,1.9643,2.9576 +water,free,5,1.4,L,2.0266,1.8798,1.7433,2.2192 +water,free,5,1.5,1_2L,2.3104,2.3501,0.424,1.1082 +water,free,5,1.5,3_4L,2.4016,2.3644,0.9267,1.5554 +water,free,5,1.5,L,1.4984,1.4163,1.1086,1.3886 +water,free,5,1.6,1_2L,1.394,1.4279,0.2814,0.4266 +water,free,5,1.6,3_4L,1.6075,1.5932,0.399,0.9129 +water,free,5,1.6,L,1.0938,1.0496,0.9018,1.023 +water,free,5,1.7,1_2L,0.9237,0.9536,1.3154,0.1284 +water,free,5,1.7,3_4L,1.2112,1.2075,0.4062,0.5686 +water,free,5,1.7,L,0.9086,0.8827,0.8733,0.9307 +water,free,5,1.8,1_2L,0.6414,0.6687,4.4032,2.6949 +water,free,5,1.8,3_4L,0.9936,0.9961,2.8985,1.5057 +water,free,5,1.8,L,0.8323,0.8168,0.5524,0.8845 +water,free,5,1.9,1_2L,0.4419,0.4675,2.6062,2.9931 +water,free,5,1.9,3_4L,0.8635,0.8704,1.9037,2.0595 +water,free,5,1.9,L,0.8201,0.8115,0.2065,0.4408 +water,free,5,2.0,1_2L,0.2792,0.3032,1.8182,2.3612 +water,free,5,2.0,3_4L,0.7829,0.7937,1.4438,1.6761 +water,free,5,2.0,L,0.8592,0.856,0.0853,0.3166 +water,free,5,2.1,1_2L,0.1389,0.1569,1.3618,1.6761 +water,free,5,2.1,3_4L,0.734,0.7489,1.1728,1.2572 +water,free,5,2.1,L,0.9539,0.9559,0.0924,0.1923 +water,free,5,2.2,1_2L,0.1559,0.1375,1.0694,1.3247 +water,free,5,2.2,3_4L,0.7068,0.7268,1.0088,1.0372 +water,free,5,2.2,L,1.1248,1.1325,0.1387,0.1604 +water,free,5,2.3,1_2L,0.4053,0.3766,0.8483,1.0585 +water,free,5,2.3,3_4L,0.689,0.7163,0.8947,0.8952 +water,free,5,2.3,L,1.4091,1.4245,0.1815,0.0965 +water,free,5,2.4,1_2L,0.8033,0.7712,0.7057,0.8419 +water,free,5,2.4,3_4L,0.6398,0.6764,0.834,0.81 +water,free,5,2.4,L,1.8127,1.8386,0.2207,0.061 +water,free,5,2.5,1_2L,1.2191,1.1888,0.5951,0.6822 +water,free,5,2.5,3_4L,0.4631,0.5042,0.8126,0.7638 +water,free,5,2.5,L,2.072,2.1075,0.2742,0.1391 +water,free,5,2.6,1_2L,1.3111,1.2902,0.5167,0.6005 +water,free,5,2.6,3_4L,0.208,0.2339,0.8019,0.7461 +water,free,5,2.6,L,1.8176,1.8531,0.3063,0.2172 +water,free,5,2.7,1_2L,1.1497,1.1381,0.4311,0.5899 +water,free,5,2.7,3_4L,0.161,0.146,0.8198,0.7248 +water,free,5,2.7,L,1.3635,1.393,0.3776,0.1178 +water,free,5,2.8,1_2L,0.9785,0.9727,0.3598,0.5224 +water,free,5,2.8,3_4L,0.2341,0.2145,0.8554,0.7319 +water,free,5,2.8,L,1.0249,1.0488,0.4525,0.1604 +water,free,5,2.9,1_2L,0.8528,0.8504,0.2671,0.4621 +water,free,5,2.9,3_4L,0.2871,0.2706,0.916,0.7603 +water,free,5,2.9,L,0.807,0.8269,0.5773,0.203 +water,free,5,3.0,1_2L,0.7634,0.7631,0.1387,0.3982 +water,free,5,3.0,3_4L,0.3222,0.3086,1.1086,0.8135 +water,free,5,3.0,L,0.6637,0.6809,0.9374,0.274 +water,identified,5,1.0,1_2L,1.4509,1.4308,1.212,1.2146 +water,identified,5,1.0,3_4L,1.2124,1.1468,0.941,0.9449 +water,identified,5,1.0,L,0.7153,0.6259,0.4775,0.4763 +water,identified,5,1.1,1_2L,2.1455,2.1432,1.6113,1.5519 +water,identified,5,1.1,3_4L,1.9164,1.8449,1.3332,1.275 +water,identified,5,1.1,L,1.2109,1.1017,0.7306,0.6893 +water,identified,5,1.2,1_2L,3.7576,3.7983,2.6596,2.4003 +water,identified,5,1.2,3_4L,3.6714,3.588,2.3994,2.1305 +water,identified,5,1.2,L,2.5514,2.3959,1.4616,1.2501 +water,identified,5,1.3,1_2L,3.0491,3.1249,4.2464,4.3136 +water,identified,5,1.3,3_4L,3.4053,3.3749,4.4603,4.2816 +water,identified,5,1.3,L,2.6934,2.5962,3.1981,2.7978 +water,identified,5,1.4,1_2L,1.1129,1.1669,1.5151,2.6274 +water,identified,5,1.4,3_4L,1.5755,1.5858,1.9643,2.9576 +water,identified,5,1.4,L,1.4982,1.4772,1.7433,2.2192 +water,identified,5,1.5,1_2L,0.328,0.3706,0.424,1.1082 +water,identified,5,1.5,3_4L,0.8563,0.8812,0.9267,1.5554 +water,identified,5,1.5,L,1.0856,1.0929,1.1086,1.3886 +water,identified,5,1.6,1_2L,0.2296,0.1913,0.2814,0.4266 +water,identified,5,1.6,3_4L,0.4373,0.4739,0.399,0.9129 +water,identified,5,1.6,L,0.9671,0.994,0.9018,1.023 +water,identified,5,1.7,1_2L,0.924,0.885,1.3154,0.1284 +water,identified,5,1.7,3_4L,0.0673,0.0787,0.4062,0.5686 +water,identified,5,1.7,L,1.0247,1.078,0.8733,0.9307 +water,identified,5,1.8,1_2L,2.2012,2.1632,4.4032,2.6949 +water,identified,5,1.8,3_4L,0.8649,0.7775,2.8985,1.5057 +water,identified,5,1.8,L,1.1767,1.2761,0.5524,0.8845 +water,identified,5,1.9,1_2L,2.4513,2.4377,2.6062,2.9931 +water,identified,5,1.9,3_4L,1.4229,1.3482,1.9037,2.0595 +water,identified,5,1.9,L,0.6664,0.7619,0.2065,0.4408 +water,identified,5,2.0,1_2L,1.6159,1.6191,1.8182,2.3612 +water,identified,5,2.0,3_4L,1.16,1.1204,1.4438,1.6761 +water,identified,5,2.0,L,0.1671,0.2227,0.0853,0.3166 +water,identified,5,2.1,1_2L,1.138,1.1466,1.3618,1.6761 +water,identified,5,2.1,3_4L,0.9559,0.9332,1.1728,1.2572 +water,identified,5,2.1,L,0.0473,0.019,0.0924,0.1923 +water,identified,5,2.2,1_2L,0.8746,0.8852,1.0694,1.3247 +water,identified,5,2.2,3_4L,0.8432,0.8291,1.0088,1.0372 +water,identified,5,2.2,L,0.1475,0.12,0.1387,0.1604 +water,identified,5,2.3,1_2L,0.7065,0.7181,0.8483,1.0585 +water,identified,5,2.3,3_4L,0.7795,0.7705,0.8947,0.8952 +water,identified,5,2.3,L,0.2214,0.2004,0.1815,0.0965 +water,identified,5,2.4,1_2L,0.5854,0.5975,0.7057,0.8419 +water,identified,5,2.4,3_4L,0.745,0.7396,0.834,0.81 +water,identified,5,2.4,L,0.2889,0.2723,0.2207,0.061 +water,identified,5,2.5,1_2L,0.4886,0.5009,0.5951,0.6822 +water,identified,5,2.5,3_4L,0.731,0.7284,0.8126,0.7638 +water,identified,5,2.5,L,0.3625,0.3492,0.2742,0.1391 +water,identified,5,2.6,1_2L,0.4036,0.4158,0.5167,0.6005 +water,identified,5,2.6,3_4L,0.7339,0.7338,0.8019,0.7461 +water,identified,5,2.6,L,0.4531,0.4426,0.3063,0.2172 +water,identified,5,2.7,1_2L,0.3234,0.3347,0.4311,0.5899 +water,identified,5,2.7,3_4L,0.7525,0.7551,0.8198,0.7248 +water,identified,5,2.7,L,0.5744,0.5664,0.3776,0.1178 +water,identified,5,2.8,1_2L,0.2533,0.2607,0.3598,0.5224 +water,identified,5,2.8,3_4L,0.7864,0.7921,0.8554,0.7319 +water,identified,5,2.8,L,0.7467,0.7415,0.4525,0.1604 +water,identified,5,2.9,1_2L,0.2522,0.2472,0.2671,0.4621 +water,identified,5,2.9,3_4L,0.8282,0.8377,0.916,0.7603 +water,identified,5,2.9,L,0.9967,0.9951,0.5773,0.203 +water,identified,5,3.0,1_2L,0.4171,0.4012,0.1387,0.3982 +water,identified,5,3.0,3_4L,0.836,0.8506,1.1086,0.8135 +water,identified,5,3.0,L,1.3195,1.323,0.9374,0.274 +water,table,5,1.0,1_2L,1.3485,1.3229,1.212,1.2146 +water,table,5,1.0,3_4L,1.0808,1.0129,0.941,0.9449 +water,table,5,1.0,L,0.5758,0.4867,0.4775,0.4763 +water,table,5,1.1,1_2L,1.82,1.8054,1.6113,1.5519 +water,table,5,1.1,3_4L,1.5265,1.4539,1.3332,1.275 +water,table,5,1.1,L,0.8402,0.7375,0.7306,0.6893 +water,table,5,1.2,1_2L,2.7882,2.7909,2.6596,2.4003 +water,table,5,1.2,3_4L,2.4683,2.3808,2.3994,2.1305 +water,table,5,1.2,L,1.4195,1.2837,1.4616,1.2501 +water,table,5,1.3,1_2L,3.9431,3.9768,4.2464,4.3136 +water,table,5,1.3,3_4L,3.7187,3.6234,4.4603,4.2816 +water,table,5,1.3,L,2.2581,2.0908,3.1981,2.7978 +water,table,5,1.4,1_2L,3.1182,3.1675,1.5151,2.6274 +water,table,5,1.4,3_4L,3.1775,3.1222,1.9643,2.9576 +water,table,5,1.4,L,2.0569,1.9406,1.7433,2.2192 +water,table,5,1.5,1_2L,1.7925,1.8344,0.424,1.1082 +water,table,5,1.5,3_4L,2.0102,1.9895,0.9267,1.5554 +water,table,5,1.5,L,1.4019,1.3428,1.1086,1.3886 +water,table,5,1.6,1_2L,1.1125,1.1475,0.2814,0.4266 +water,table,5,1.6,3_4L,1.4041,1.3985,0.399,0.9129 +water,table,5,1.6,L,1.0674,1.0352,0.9018,1.023 +water,table,5,1.7,1_2L,0.7455,0.7764,1.3154,0.1284 +water,table,5,1.7,3_4L,1.0951,1.0971,0.4062,0.5686 +water,table,5,1.7,L,0.9192,0.9008,0.8733,0.9307 +water,table,5,1.8,1_2L,0.5081,0.5364,4.4032,2.6949 +water,table,5,1.8,3_4L,0.9182,0.9251,2.8985,1.5057 +water,table,5,1.8,L,0.864,0.854,0.5524,0.8845 +water,table,5,1.9,1_2L,0.3279,0.3544,2.6062,2.9931 +water,table,5,1.9,3_4L,0.8095,0.8203,1.9037,2.0595 +water,table,5,1.9,L,0.8695,0.8655,0.2065,0.4408 +water,table,5,2.0,1_2L,0.1741,0.1972,1.8182,2.3612 +water,table,5,2.0,3_4L,0.7411,0.7558,1.4438,1.6761 +water,table,5,2.0,L,0.9294,0.9307,0.0853,0.3166 +water,table,5,2.1,1_2L,0.107,0.0999,1.3618,1.6761 +water,table,5,2.1,3_4L,0.6988,0.7181,1.1728,1.2572 +water,table,5,2.1,L,1.0544,1.0611,0.0924,0.1923 +water,table,5,2.2,1_2L,0.294,0.2662,1.0694,1.3247 +water,table,5,2.2,3_4L,0.6721,0.6977,1.0088,1.0372 +water,table,5,2.2,L,1.2725,1.286,0.1387,0.1604 +water,table,5,2.3,1_2L,0.627,0.5949,0.8483,1.0585 +water,table,5,2.3,3_4L,0.6397,0.6739,0.8947,0.8952 +water,table,5,2.3,L,1.6176,1.6406,0.1815,0.0965 +water,table,5,2.4,1_2L,1.0731,1.0397,0.7057,0.8419 +water,table,5,2.4,3_4L,0.5348,0.5774,0.834,0.81 +water,table,5,2.4,L,2.0013,2.0357,0.2207,0.061 +water,table,5,2.5,1_2L,1.3585,1.3312,0.5951,0.6822 +water,table,5,2.5,3_4L,0.302,0.3399,0.8126,0.7638 +water,table,5,2.5,L,2.017,2.0567,0.2742,0.1391 +water,table,5,2.6,1_2L,1.2812,1.2646,0.5167,0.6005 +water,table,5,2.6,3_4L,0.1518,0.1509,0.8019,0.7461 +water,table,5,2.6,L,1.6016,1.6366,0.3063,0.2172 +water,table,5,2.7,1_2L,1.088,1.0794,0.4311,0.5899 +water,table,5,2.7,3_4L,0.2125,0.1907,0.8198,0.7248 +water,table,5,2.7,L,1.1878,1.2159,0.3776,0.1178 +water,table,5,2.8,1_2L,0.9311,0.927,0.3598,0.5224 +water,table,5,2.8,3_4L,0.2745,0.2554,0.8554,0.7319 +water,table,5,2.8,L,0.9109,0.9338,0.4525,0.1604 +water,table,5,2.9,1_2L,0.8196,0.8183,0.2671,0.4621 +water,table,5,2.9,3_4L,0.3143,0.2986,0.916,0.7603 +water,table,5,2.9,L,0.7322,0.7515,0.5773,0.203 +water,table,5,3.0,1_2L,0.7397,0.74,0.1387,0.3982 +water,table,5,3.0,3_4L,0.3414,0.3284,1.1086,0.8135 +water,table,5,3.0,L,0.612,0.6288,0.9374,0.274 diff --git a/validation/experiments/flotant/response_comparison.csv b/validation/experiments/flotant/response_comparison.csv new file mode 100644 index 00000000..35e617e6 --- /dev/null +++ b/validation/experiments/flotant/response_comparison.csv @@ -0,0 +1,121 @@ +set,U_m_per_s,Ur,AD_CF_1_2L_measured,AD_CF_1_2L_cabledyn,AD_CF_1_2L_cabledyn_displacement,direction,AD_CF_3_4L_measured,AD_CF_3_4L_cabledyn,AD_CF_3_4L_cabledyn_displacement,AD_CF_L_measured,AD_CF_L_cabledyn,AD_CF_L_cabledyn_displacement,AD_IL_1_2L_measured,AD_IL_1_2L_cabledyn,AD_IL_1_2L_cabledyn_displacement,AD_IL_3_4L_measured,AD_IL_3_4L_cabledyn,AD_IL_3_4L_cabledyn_displacement,AD_IL_L_measured,AD_IL_L_cabledyn,AD_IL_L_cabledyn_displacement,f_cf_1_2L_hz,fD_U_cf_1_2L,mean_top_tension_N +uls19,0.025,0.294,0.0007,0.0001,0.0001,forwards,0.0002,0.0001,0.0001,0.0006,0.0001,0.0,0.0026,0.0,0.0,0.0023,0.0,0.0,0.0013,0.0,0.0,1.2,2.304,1962.2 +uls19,0.05,0.589,0.0007,0.0009,0.001,forwards,0.0008,0.001,0.001,0.0006,0.0007,0.0007,0.0037,0.0003,0.0003,0.0033,0.0003,0.0003,0.0021,0.0002,0.0002,1.2,1.152,1962.2 +uls19,0.075,0.883,0.0007,0.011,0.0112,forwards,0.0008,0.0109,0.0103,0.0009,0.0073,0.0064,0.0036,0.0025,0.0026,0.0032,0.0025,0.0024,0.0021,0.0017,0.0015,0.825,0.528,1962.2 +uls19,0.1,1.177,0.0011,0.017,0.0171,forwards,0.0012,0.0154,0.0146,0.0012,0.01,0.0091,0.0045,0.0089,0.0091,0.0045,0.0091,0.0083,0.003,0.006,0.0047,1.0,0.48,1962.2 +uls19,0.125,1.471,0.0015,0.1084,0.1101,forwards,0.0013,0.1125,0.111,0.0013,0.0849,0.0812,0.0032,0.0249,0.0254,0.0034,0.0247,0.0232,0.0023,0.0165,0.0143,1.275,0.4896,1962.5 +uls19,0.15,1.766,0.0018,0.0251,0.0254,backwards,0.0013,0.0264,0.0262,0.0016,0.0277,0.0277,0.0025,0.0454,0.0462,0.0023,0.0452,0.0438,0.0015,0.0302,0.0275,1.2,0.384,1962.3 +uls19,0.175,2.06,0.0056,0.0361,0.0369,forwards,0.0054,0.0317,0.0301,0.0036,0.0307,0.0297,0.0039,0.0818,0.0831,0.0039,0.0822,0.0804,0.0026,0.0577,0.0541,1.775,0.4869,1962.4 +uls19,0.2,2.354,0.0034,0.0435,0.0433,backwards,0.0033,0.0294,0.0278,0.0029,0.02,0.019,0.0028,0.1,0.1016,0.0028,0.1029,0.1011,0.002,0.075,0.0713,1.875,0.45,1962.5 +uls19,0.225,2.648,0.0151,0.0473,0.0478,forwards,0.0154,0.0398,0.0379,0.0101,0.0269,0.0245,0.0042,0.0804,0.0818,0.0047,0.0856,0.0848,0.0027,0.0682,0.0661,0.8,0.1707,1962.6 +uls19,0.25,2.943,0.0313,0.1016,0.1036,backwards,0.0299,0.1018,0.0976,0.0183,0.067,0.0596,0.0056,0.0672,0.0666,0.007,0.0365,0.0344,0.0035,0.0294,0.0319,0.975,0.1872,1962.9 +uls19,0.275,3.237,0.112,0.2541,0.2588,forwards,0.1091,0.2542,0.2467,0.0642,0.1716,0.1569,0.0293,0.0773,0.077,0.0314,0.0499,0.0482,0.0147,0.0085,0.01,1.075,0.1876,1964.0 +uls19,0.3,3.531,0.1788,0.4177,0.4245,backwards,0.1731,0.4174,0.4068,0.1034,0.2849,0.2642,0.0335,0.0805,0.0803,0.0424,0.0558,0.0543,0.0203,0.0083,0.0077,1.15,0.184,1966.2 +uls19,0.325,3.825,0.3134,0.543,0.5519,forwards,0.3053,0.5455,0.5329,0.1798,0.3777,0.3527,0.0994,0.0765,0.0764,0.0952,0.0546,0.0534,0.0363,0.0106,0.0093,1.175,0.1735,1968.9 +uls19,0.35,4.12,0.4322,0.6204,0.6304,backwards,0.4169,0.6257,0.6123,0.249,0.4381,0.4112,0.1409,0.0806,0.0805,0.1293,0.0592,0.0581,0.0485,0.0133,0.012,1.2,0.1646,1971.3 +uls19,0.375,4.414,0.5,0.6689,0.6797,forwards,0.4949,0.6761,0.662,0.3048,0.4766,0.448,0.1776,0.0902,0.0901,0.1656,0.0665,0.0653,0.0612,0.016,0.0145,1.2,0.1536,1973.2 +uls19,0.4,4.708,0.673,0.7168,0.7282,backwards,0.6509,0.7278,0.7139,0.4077,0.5195,0.4907,0.1959,0.0962,0.0961,0.2093,0.0722,0.071,0.1027,0.0188,0.0173,1.225,0.147,1975.6 +uls19,0.425,5.002,0.7005,0.7443,0.7562,forwards,0.6955,0.76,0.7465,0.4464,0.5499,0.5215,0.2096,0.1052,0.1052,0.1988,0.0804,0.0791,0.0708,0.0223,0.0207,1.25,0.1412,1977.6 +uls19,0.45,5.297,0.6561,0.7547,0.7669,backwards,0.6469,0.7753,0.7627,0.4428,0.569,0.5415,0.1911,0.1168,0.1167,0.1963,0.0893,0.088,0.0901,0.0252,0.0235,1.25,0.1333,1979.3 +uls19,0.475,5.591,0.7755,0.7431,0.7553,forwards,0.7627,0.7724,0.7617,0.5057,0.5817,0.557,0.2343,0.1291,0.129,0.225,0.0988,0.0974,0.08,0.0287,0.0268,1.3,0.1314,1980.8 +uls19,0.5,5.885,0.3032,0.7364,0.7488,backwards,0.2772,0.7762,0.7673,0.2339,0.6018,0.5796,0.0605,0.1313,0.1312,0.0687,0.101,0.0996,0.0492,0.03,0.0282,1.325,0.1272,1982.5 +uls19,0.525,6.179,0.5204,0.7009,0.713,forwards,0.5191,0.7526,0.746,0.4014,0.6036,0.5849,0.1176,0.1396,0.1395,0.1249,0.1075,0.1061,0.06,0.0339,0.0321,1.35,0.1234,1983.4 +uls19,0.55,6.474,0.3282,0.6452,0.6574,backwards,0.2639,0.7156,0.7121,0.1171,0.6064,0.5921,0.0608,0.1426,0.1424,0.0743,0.1081,0.1067,0.056,0.0373,0.0357,1.375,0.12,1984.4 +uls19,0.575,6.768,0.4236,0.5743,0.5867,forwards,0.3605,0.6709,0.6708,0.2417,0.6091,0.5996,0.0865,0.14,0.1397,0.0909,0.1039,0.1026,0.0479,0.0409,0.0397,1.425,0.119,1985.3 +uls19,0.6,7.062,0.4623,0.482,0.4774,backwards,0.3369,0.2775,0.2666,0.0954,0.3346,0.3516,0.0729,0.0908,0.0903,0.0704,0.0449,0.0447,0.0363,0.0991,0.0999,1.825,0.146,1989.0 +uls19,0.625,7.356,0.5162,0.5234,0.5193,forwards,0.4009,0.3179,0.3062,0.2001,0.3441,0.3605,0.1019,0.1002,0.0998,0.1075,0.0522,0.0517,0.0661,0.0977,0.0986,1.825,0.1402,1993.2 +uls19,0.65,7.651,0.4317,0.5575,0.5536,backwards,0.3155,0.3462,0.3342,0.064,0.3526,0.3696,0.0604,0.1062,0.1057,0.062,0.056,0.0555,0.0221,0.1007,0.1017,1.85,0.1366,1997.9 +uls19,0.675,7.945,0.5637,0.5891,0.5854,forwards,0.4325,0.3694,0.3565,0.1969,0.3453,0.3624,0.1134,0.1121,0.1117,0.1142,0.0618,0.0611,0.0791,0.1032,0.1041,1.875,0.1333,2002.4 +uls19,0.7,8.239,0.3839,0.616,0.6117,backwards,0.3016,0.3734,0.3588,0.0864,0.3274,0.3464,0.059,0.112,0.1116,0.0636,0.0574,0.0567,0.0231,0.107,0.1081,1.9,0.1303,2006.8 +uls19,0.725,8.533,0.5636,0.6531,0.6489,forwards,0.4169,0.3945,0.3777,0.1152,0.2916,0.3116,0.1059,0.1158,0.1153,0.0999,0.0533,0.0525,0.0417,0.1034,0.1047,1.9,0.1258,2011.5 +uls19,0.75,8.828,0.3642,0.6816,0.6777,backwards,0.2686,0.4191,0.4015,0.0774,0.2516,0.2716,0.064,0.1192,0.1186,0.0608,0.0514,0.0502,0.0212,0.0997,0.101,1.925,0.1232,2016.2 +uls19,0.775,9.122,0.4436,0.6993,0.6959,forwards,0.3378,0.4395,0.422,0.1076,0.2085,0.2284,0.0902,0.1213,0.1208,0.0854,0.0512,0.0499,0.0296,0.1008,0.1022,1.95,0.1208,2020.6 +uls19,0.8,9.416,0.3672,0.7105,0.7078,backwards,0.2916,0.4631,0.4463,0.1358,0.1732,0.1909,0.0835,0.1243,0.1239,0.074,0.0565,0.0552,0.0307,0.1001,0.1014,2.0,0.12,2025.3 +uls19,0.825,9.71,0.3473,0.7117,0.7099,forwards,0.2935,0.4849,0.4693,0.1506,0.1337,0.1475,0.0706,0.1272,0.1267,0.0755,0.0604,0.0593,0.037,0.0996,0.101,2.025,0.1178,2029.9 +uls19,0.85,10.005,0.2972,0.7091,0.7079,backwards,0.229,0.5031,0.489,0.1536,0.1048,0.1121,0.0841,0.1295,0.1292,0.069,0.0672,0.0661,0.0331,0.098,0.0992,2.075,0.1172,2035.0 +uls19,0.875,10.299,0.2073,0.7042,0.7036,forwards,0.282,0.5162,0.5032,0.2415,0.0873,0.0876,0.0496,0.1292,0.1288,0.0708,0.0697,0.0688,0.0427,0.0921,0.0934,2.125,0.1166,2040.6 +uls19,0.9,10.593,0.2812,0.6979,0.6979,backwards,0.2494,0.5291,0.5174,0.265,0.0898,0.0827,0.0858,0.1322,0.1318,0.0735,0.0744,0.0727,0.0539,0.0878,0.0886,2.175,0.116,2046.7 +uls19,0.925,10.887,0.1989,0.6872,0.6877,forwards,0.2994,0.5387,0.5282,0.2954,0.1009,0.0895,0.0554,0.1326,0.1323,0.0751,0.0767,0.075,0.0428,0.0826,0.0833,2.225,0.1155,2053.1 +uls19,0.95,11.182,0.1751,0.6711,0.6722,backwards,0.1391,0.545,0.5358,0.2593,0.1203,0.1073,0.0467,0.1324,0.1323,0.0394,0.0797,0.0783,0.0402,0.0786,0.079,2.275,0.1149,2059.9 +uls19,0.975,11.476,0.2142,0.659,0.6605,forwards,0.2965,0.5539,0.5456,0.3181,0.1427,0.1296,0.0601,0.1293,0.1292,0.0824,0.0795,0.0786,0.0483,0.0701,0.0707,2.325,0.1145,2067.9 +uls19,1.0,11.77,0.1993,0.6388,0.6409,backwards,0.1855,0.5595,0.5522,,0.1646,0.1519,0.0622,0.1248,0.1246,0.0615,0.0792,0.0786,0.0607,0.0643,0.0648,2.375,0.114,2075.6 +b1,0.025,0.294,0.0007,0.0,0.0,forwards,0.0002,0.0,0.0,0.0006,0.0,0.0,0.0026,0.0,0.0,0.0023,0.0,0.0,0.0013,0.0,0.0,0.875,1.68,1962.2 +b1,0.05,0.589,0.0007,0.0001,0.0001,forwards,0.0008,0.0001,0.0001,0.0006,0.0001,0.0001,0.0037,0.0014,0.0014,0.0033,0.0015,0.0013,0.0021,0.001,0.0007,1.025,0.984,1962.2 +b1,0.075,0.883,0.0007,0.0011,0.0011,forwards,0.0008,0.0011,0.0011,0.0009,0.0007,0.0007,0.0036,0.0057,0.0058,0.0032,0.0057,0.0053,0.0021,0.0037,0.003,1.075,0.688,1962.2 +b1,0.1,1.177,0.0011,0.0055,0.0057,forwards,0.0012,0.0058,0.0051,0.0012,0.004,0.0027,0.0045,0.0217,0.022,0.0045,0.0217,0.0211,0.003,0.0147,0.0136,0.575,0.276,1962.2 +b1,0.125,1.471,0.0015,0.0099,0.0105,forwards,0.0013,0.0106,0.0096,0.0013,0.0079,0.0059,0.0032,0.0511,0.0519,0.0034,0.0512,0.0501,0.0023,0.0357,0.0334,0.6,0.2304,1962.3 +b1,0.15,1.766,0.0018,0.0323,0.0329,backwards,0.0013,0.0307,0.0268,0.0016,0.0191,0.0135,0.0025,0.084,0.0854,0.0023,0.0863,0.0847,0.0015,0.0624,0.0592,0.625,0.2,1962.4 +b1,0.175,2.06,0.0056,0.0583,0.0595,forwards,0.0054,0.0575,0.0548,0.0036,0.0368,0.0318,0.0039,0.047,0.0465,0.0039,0.0232,0.0215,0.0026,0.021,0.0231,0.925,0.2537,1962.4 +b1,0.2,2.354,0.0034,0.1116,0.1136,backwards,0.0033,0.1111,0.1075,0.0029,0.0737,0.0668,0.0028,0.0473,0.047,0.0028,0.0297,0.0285,0.002,0.0078,0.0092,1.05,0.252,1962.6 +b1,0.225,2.648,0.0151,0.2085,0.2121,forwards,0.0154,0.2099,0.2047,0.0101,0.1441,0.1338,0.0042,0.0366,0.0365,0.0047,0.025,0.0243,0.0027,0.0032,0.003,1.15,0.2453,1963.4 +b1,0.25,2.943,0.0313,0.3618,0.3681,backwards,0.0299,0.369,0.3617,0.0183,0.2623,0.2468,0.0056,0.0133,0.0133,0.007,0.0104,0.0102,0.0035,0.0026,0.0024,1.2,0.2304,1965.8 +b1,0.275,3.237,0.112,0.423,0.4302,forwards,0.1091,0.4341,0.4262,0.0642,0.3132,0.2963,0.0293,0.0105,0.0105,0.0314,0.0092,0.0091,0.0147,0.0028,0.0026,1.225,0.2138,1967.8 +b1,0.3,3.531,0.1788,0.4635,0.4713,backwards,0.1731,0.4778,0.4699,0.1034,0.3487,0.3312,0.0335,0.0101,0.0102,0.0424,0.0102,0.0101,0.0203,0.0035,0.0033,1.25,0.2,1969.9 +b1,0.325,3.825,0.3134,0.483,0.4913,forwards,0.3053,0.4996,0.4916,0.1798,0.3675,0.3496,0.0994,0.0165,0.0166,0.0952,0.0157,0.0155,0.0363,0.0053,0.005,1.25,0.1846,1972.0 +b1,0.35,4.12,0.4322,0.4659,0.4738,backwards,0.4169,0.4839,0.4768,0.249,0.3596,0.3433,0.1409,0.0303,0.0303,0.1293,0.0243,0.024,0.0485,0.01,0.0096,1.275,0.1749,1973.0 +b1,0.375,4.414,0.5,0.466,0.474,forwards,0.4949,0.4877,0.4811,0.3048,0.3678,0.3524,0.1776,0.0389,0.0388,0.1656,0.0288,0.0284,0.0612,0.0109,0.0104,1.3,0.1664,1975.1 +b1,0.4,4.708,0.673,0.463,0.4711,backwards,0.6509,0.489,0.4832,0.4077,0.3759,0.3615,0.1959,0.0437,0.0436,0.2093,0.0319,0.0314,0.1027,0.012,0.0115,1.3,0.156,1977.4 +b1,0.425,5.002,0.7005,0.4579,0.4661,forwards,0.6955,0.4886,0.4835,0.4464,0.3831,0.3698,0.2096,0.05,0.0499,0.1988,0.0362,0.0356,0.0708,0.0137,0.013,1.325,0.1496,1980.0 +b1,0.45,5.297,0.6561,0.4446,0.4528,backwards,0.6469,0.4808,0.4767,0.4428,0.3866,0.3748,0.1911,0.0542,0.0541,0.1963,0.0392,0.0386,0.0901,0.0152,0.0147,1.35,0.144,1982.5 +b1,0.475,5.591,0.7755,0.429,0.4371,forwards,0.7627,0.4716,0.4686,0.5057,0.3909,0.3807,0.2343,0.0583,0.0581,0.225,0.0419,0.0413,0.08,0.0171,0.0166,1.375,0.1389,1985.0 +b1,0.5,5.885,0.3032,0.3232,0.3207,backwards,0.2772,0.1835,0.174,0.2339,0.1466,0.1578,0.0605,0.0442,0.0441,0.0687,0.0256,0.0247,0.0492,0.0457,0.0457,1.85,0.1776,1979.5 +b1,0.525,6.179,0.5204,0.3449,0.3426,forwards,0.5191,0.2023,0.1925,0.4014,0.1401,0.1511,0.1176,0.0459,0.0458,0.1249,0.026,0.0252,0.06,0.0492,0.0494,1.875,0.1714,1983.5 +b1,0.55,6.474,0.3282,0.3591,0.3569,backwards,0.2639,0.2156,0.206,0.1171,0.1397,0.1506,0.0608,0.0494,0.0493,0.0743,0.0309,0.0302,0.056,0.0508,0.051,1.9,0.1658,1987.9 +b1,0.575,6.768,0.4236,0.3752,0.3731,forwards,0.3605,0.2303,0.2207,0.2417,0.1334,0.144,0.0865,0.05,0.0499,0.0909,0.03,0.0299,0.0479,0.0561,0.0566,1.925,0.1607,1993.2 +b1,0.6,7.062,0.4623,0.389,0.3871,backwards,0.3369,0.2443,0.2345,0.0954,0.1234,0.1335,0.0729,0.0524,0.0523,0.0704,0.0304,0.0301,0.0363,0.0608,0.0613,1.95,0.156,1999.3 +b1,0.625,7.356,0.5162,0.4024,0.4007,forwards,0.4009,0.2581,0.2483,0.2001,0.1119,0.1213,0.1019,0.0549,0.0548,0.1075,0.0315,0.031,0.0661,0.0638,0.0643,1.95,0.1498,2006.1 +b1,0.65,7.651,0.4317,0.4132,0.4116,backwards,0.3155,0.2701,0.2605,0.064,0.1033,0.1121,0.0604,0.0565,0.0564,0.062,0.0313,0.0308,0.0221,0.0642,0.0647,1.975,0.1458,2013.7 +b1,0.675,7.945,0.5637,0.4243,0.4229,forwards,0.4325,0.2823,0.2728,0.1969,0.0933,0.1011,0.1134,0.0575,0.0574,0.1142,0.0305,0.03,0.0791,0.0628,0.0634,2.0,0.1422,2022.4 +b1,0.7,8.239,0.3839,0.4351,0.4338,backwards,0.3016,0.2941,0.2849,0.0864,0.0842,0.091,0.059,0.0602,0.06,0.0636,0.0337,0.0328,0.0231,0.0597,0.0601,2.05,0.1406,2032.1 +b1,0.725,8.533,0.5636,0.4414,0.4403,forwards,0.4169,0.3044,0.2955,0.1152,0.0759,0.081,0.1059,0.0606,0.0606,0.0999,0.0357,0.035,0.0417,0.0518,0.0521,2.075,0.1374,2042.5 +b1,0.75,8.828,0.3642,0.4461,0.4452,backwards,0.2686,0.3129,0.3043,0.0774,0.0672,0.0701,0.064,0.0617,0.0616,0.0608,0.0311,0.0303,0.0212,0.0482,0.0485,2.1,0.1344,2053.3 +b1,0.775,9.122,0.4436,0.4494,0.4487,forwards,0.3378,0.3206,0.3124,0.1076,0.0627,0.0629,0.0902,0.0693,0.0699,0.0854,0.0449,0.0419,0.0296,0.0576,0.0558,2.15,0.1332,2065.3 +b1,0.8,9.416,0.3672,0.452,0.4515,backwards,0.2916,0.3276,0.3199,0.1358,0.0631,0.061,0.0835,0.0678,0.0686,0.074,0.0439,0.0414,0.0307,0.0588,0.0572,2.175,0.1305,2077.5 +b1,0.825,9.71,0.3473,0.4533,0.4529,forwards,0.2935,0.3331,0.3257,0.1506,0.0643,0.0601,0.0706,0.073,0.0737,0.0755,0.0505,0.0473,0.037,0.0581,0.056,2.225,0.1295,2090.5 +b1,0.85,10.005,0.2972,0.4538,0.4535,backwards,0.229,0.3374,0.3303,0.1536,0.0672,0.0618,0.0841,0.0742,0.0749,0.069,0.0521,0.0492,0.0331,0.0567,0.0545,2.25,0.1271,2105.1 +b1,0.875,10.299,0.2073,0.4535,0.4533,forwards,0.282,0.3415,0.3349,0.2415,0.0725,0.0663,0.0496,0.0739,0.0745,0.0708,0.0516,0.0488,0.0427,0.0561,0.0542,2.3,0.1262,2119.8 +b1,0.9,10.593,0.2812,0.4516,0.4516,backwards,0.2494,0.3449,0.3387,0.265,0.0787,0.0721,0.0858,0.0747,0.0751,0.0735,0.0519,0.0494,0.0539,0.0542,0.0527,2.35,0.1253,2134.3 +b1,0.925,10.887,0.1989,0.4503,0.4505,forwards,0.2994,0.3483,0.3423,0.2954,0.0852,0.0783,0.0554,0.0798,0.08,0.0751,0.0569,0.0541,0.0428,0.0533,0.0517,2.375,0.1232,2150.0 +b1,0.95,11.182,0.1751,0.4485,0.4487,backwards,0.1391,0.3505,0.3449,0.2593,0.0909,0.0841,0.0467,0.0761,0.0762,0.0394,0.053,0.0509,0.0402,0.0506,0.0499,2.425,0.1225,2167.6 +b1,0.975,11.476,0.2142,0.4462,0.4465,forwards,0.2965,0.353,0.3478,0.3181,0.0979,0.0913,0.0601,0.0768,0.077,0.0824,0.0548,0.0526,0.0483,0.0496,0.0487,2.475,0.1218,2185.0 +b1,1.0,11.77,0.1993,0.1897,0.1868,backwards,0.1855,0.1874,0.1908,,0.3854,0.3875,0.0622,0.0335,0.0308,0.0615,0.044,0.0452,0.0607,0.0279,0.0261,3.25,0.156,2135.3 +wake,0.025,0.294,0.0007,0.0,0.0,forwards,0.0002,0.0,0.0,0.0006,0.0,0.0,0.0026,0.0,0.0,0.0023,0.0,0.0,0.0013,0.0,0.0,0.575,1.104,1962.2 +wake,0.05,0.589,0.0007,0.0001,0.0001,forwards,0.0008,0.0001,0.0001,0.0006,0.0,0.0,0.0037,0.0,0.0,0.0033,0.0,0.0,0.0021,0.0,0.0,0.625,0.6,1962.2 +wake,0.075,0.883,0.0007,0.0001,0.0001,forwards,0.0008,0.0001,0.0001,0.0009,0.0001,0.0001,0.0036,0.0,0.0,0.0032,0.0,0.0,0.0021,0.0,0.0,0.925,0.592,1962.2 +wake,0.1,1.177,0.0011,0.0009,0.0009,forwards,0.0012,0.0009,0.0009,0.0012,0.0007,0.0006,0.0045,0.0,0.0,0.0045,0.0,0.0,0.003,0.0,0.0,1.25,0.6,1962.2 +wake,0.125,1.471,0.0015,0.001,0.001,forwards,0.0013,0.0011,0.0009,0.0013,0.0007,0.0005,0.0032,0.0001,0.0001,0.0034,0.0001,0.0001,0.0023,0.0,0.0,0.575,0.2208,1962.2 +wake,0.15,1.766,0.0018,0.0093,0.0097,backwards,0.0013,0.0098,0.0088,0.0016,0.0065,0.0047,0.0025,0.0002,0.0002,0.0023,0.0002,0.0002,0.0015,0.0002,0.0002,0.65,0.208,1962.2 +wake,0.175,2.06,0.0056,0.0131,0.0135,forwards,0.0054,0.0134,0.0124,0.0036,0.0085,0.0067,0.0039,0.0001,0.0001,0.0039,0.0001,0.0001,0.0026,0.0001,0.0001,0.775,0.2126,1962.3 +wake,0.2,2.354,0.0034,0.0258,0.0264,backwards,0.0033,0.0258,0.0246,0.0029,0.0165,0.0141,0.0028,0.0004,0.0004,0.0028,0.0002,0.0002,0.002,0.0002,0.0002,0.9,0.216,1962.3 +wake,0.225,2.648,0.0151,0.0906,0.0922,forwards,0.0154,0.0911,0.0888,0.0101,0.062,0.0573,0.0042,0.002,0.002,0.0047,0.0014,0.0014,0.0027,0.0002,0.0002,1.125,0.24,1962.5 +wake,0.25,2.943,0.0313,0.1683,0.1713,backwards,0.0299,0.1711,0.1674,0.0183,0.1201,0.1125,0.0056,0.0049,0.0049,0.007,0.0037,0.0036,0.0035,0.0009,0.0008,1.175,0.2256,1963.0 +wake,0.275,3.237,0.112,0.2185,0.2223,forwards,0.1091,0.2235,0.2191,0.0642,0.1594,0.1502,0.0293,0.0074,0.0073,0.0314,0.0056,0.0056,0.0147,0.0015,0.0014,1.2,0.2095,1963.5 +wake,0.3,3.531,0.1788,0.2552,0.2597,backwards,0.1731,0.2628,0.2581,0.1034,0.19,0.1798,0.0335,0.0092,0.0092,0.0424,0.0072,0.0071,0.0203,0.0021,0.002,1.225,0.196,1964.1 +wake,0.325,3.825,0.3134,0.2806,0.2856,forwards,0.3053,0.2909,0.2862,0.1798,0.2132,0.2027,0.0994,0.0104,0.0104,0.0952,0.0084,0.0082,0.0363,0.0027,0.0025,1.25,0.1846,1964.6 +wake,0.35,4.12,0.4322,0.2947,0.3,backwards,0.4169,0.308,0.3035,0.249,0.2293,0.219,0.1409,0.0109,0.0109,0.1293,0.009,0.0089,0.0485,0.0031,0.0029,1.275,0.1749,1965.1 +wake,0.375,4.414,0.5,0.2964,0.3018,forwards,0.4949,0.3129,0.3089,0.3048,0.2375,0.2277,0.1776,0.0107,0.0107,0.1656,0.009,0.0089,0.0612,0.0034,0.0033,1.3,0.1664,1965.6 +wake,0.4,4.708,0.673,0.2833,0.2886,backwards,0.6509,0.3032,0.3,0.4077,0.2359,0.2274,0.1959,0.0097,0.0097,0.2093,0.0085,0.0084,0.1027,0.0035,0.0034,1.325,0.159,1965.9 +wake,0.425,5.002,0.7005,0.2476,0.2525,forwards,0.6955,0.2708,0.2688,0.4464,0.2192,0.2128,0.2096,0.0076,0.0076,0.1988,0.007,0.007,0.0708,0.0034,0.0033,1.35,0.1525,1966.1 +wake,0.45,5.297,0.6561,0.1707,0.1688,backwards,0.6469,0.0825,0.0762,0.4428,0.0787,0.0864,0.1911,0.0037,0.0037,0.1963,0.0017,0.0017,0.0901,0.0016,0.0017,1.825,0.1947,1966.5 +wake,0.475,5.591,0.7755,0.192,0.1903,forwards,0.7627,0.0993,0.0927,0.5057,0.0752,0.0833,0.2343,0.0044,0.0044,0.225,0.0021,0.002,0.08,0.0019,0.0019,1.85,0.1869,1967.5 +wake,0.5,5.885,0.3032,0.2079,0.2063,backwards,0.2772,0.1136,0.107,0.2339,0.0665,0.0746,0.0605,0.0049,0.0049,0.0687,0.0023,0.0023,0.0492,0.002,0.0021,1.875,0.18,1968.5 +wake,0.525,6.179,0.5204,0.218,0.2166,forwards,0.5191,0.125,0.1186,0.4014,0.0559,0.0637,0.1176,0.0051,0.0051,0.1249,0.0025,0.0024,0.06,0.002,0.0021,1.9,0.1737,1969.5 +wake,0.55,6.474,0.3282,0.2232,0.222,backwards,0.2639,0.1336,0.1275,0.1171,0.0436,0.051,0.0608,0.0052,0.0052,0.0743,0.0026,0.0025,0.056,0.0019,0.0019,1.925,0.168,1970.6 +wake,0.575,6.768,0.4236,0.2224,0.2214,forwards,0.3605,0.1385,0.1328,0.2417,0.0305,0.0373,0.0865,0.0051,0.0051,0.0909,0.0026,0.0026,0.0479,0.0016,0.0017,1.95,0.1628,1971.8 +wake,0.6,7.062,0.4623,0.2138,0.2131,backwards,0.3369,0.1386,0.1336,0.0954,0.0176,0.0233,0.0729,0.0047,0.0047,0.0704,0.0025,0.0025,0.0363,0.0013,0.0014,2.0,0.16,1973.0 +wake,0.625,7.356,0.5162,0.1977,0.1972,forwards,0.4009,0.1337,0.1295,0.2001,0.0096,0.0118,0.1019,0.0043,0.0043,0.1075,0.0026,0.0025,0.0661,0.0013,0.0012,2.05,0.1574,1974.3 +wake,0.65,7.651,0.4317,0.1766,0.1764,backwards,0.3155,0.125,0.1217,0.064,0.0181,0.0164,0.0604,0.004,0.0039,0.062,0.0026,0.0025,0.0221,0.0014,0.0011,2.125,0.1569,1975.8 +wake,0.675,7.945,0.5637,0.1493,0.1492,forwards,0.4325,0.1125,0.1103,0.1969,0.0398,0.0386,0.1134,0.0042,0.0037,0.1142,0.0023,0.0021,0.0791,0.0015,0.0014,2.2,0.1564,1977.6 +wake,0.7,8.239,0.3839,0.0379,0.0361,backwards,0.3016,0.0707,0.0722,0.0864,0.1138,0.114,0.059,0.0011,0.0011,0.0636,0.0006,0.0006,0.0231,0.0005,0.0005,2.975,0.204,1980.4 +wake,0.725,8.533,0.5636,0.0476,0.0456,forwards,0.4169,0.0737,0.0754,0.1152,0.1292,0.1297,0.1059,0.0012,0.0012,0.0999,0.0007,0.0007,0.0417,0.0006,0.0006,3.0,0.1986,1983.3 +wake,0.75,8.828,0.3642,0.0559,0.0538,backwards,0.2686,0.0764,0.0782,0.0774,0.1437,0.1443,0.064,0.0013,0.0013,0.0608,0.0008,0.0008,0.0212,0.0007,0.0007,3.05,0.1952,1986.5 +wake,0.775,9.122,0.4436,0.0617,0.0597,forwards,0.3378,0.0794,0.0814,0.1076,0.1591,0.1599,0.0902,0.0015,0.0015,0.0854,0.0009,0.0009,0.0296,0.0008,0.0008,3.075,0.1905,1990.0 +wake,0.8,9.416,0.3672,0.0683,0.0661,backwards,0.2916,0.0797,0.0818,0.1358,0.1708,0.1717,0.0835,0.0015,0.0015,0.074,0.0009,0.0009,0.0307,0.0008,0.0008,3.1,0.186,1993.8 +wake,0.825,9.71,0.3473,0.0741,0.072,forwards,0.2935,0.0782,0.0805,0.1506,0.1801,0.1812,0.0706,0.0016,0.0016,0.0755,0.0009,0.0009,0.037,0.0009,0.0009,3.15,0.1833,1997.7 +wake,0.85,10.005,0.2972,0.0795,0.0775,backwards,0.229,0.0747,0.077,0.1536,0.1862,0.1874,0.0841,0.0016,0.0016,0.069,0.0008,0.0008,0.0331,0.0009,0.0009,3.175,0.1793,2001.8 +wake,0.875,10.299,0.2073,0.0844,0.0824,forwards,0.282,0.0695,0.0718,0.2415,0.1887,0.1901,0.0496,0.0016,0.0016,0.0708,0.0008,0.0008,0.0427,0.0009,0.0009,3.2,0.1755,2006.2 +wake,0.9,10.593,0.2812,0.0882,0.0864,backwards,0.2494,0.0624,0.0647,0.265,0.1876,0.189,0.0858,0.0016,0.0016,0.0735,0.0007,0.0007,0.0539,0.0009,0.0009,3.25,0.1733,2010.7 +wake,0.925,10.887,0.1989,0.091,0.0893,forwards,0.2994,0.0537,0.0559,0.2954,0.1824,0.1839,0.0554,0.0015,0.0015,0.0751,0.0006,0.0006,0.0428,0.0008,0.0008,3.3,0.1712,2015.3 +wake,0.95,11.182,0.1751,0.0927,0.0913,backwards,0.1391,0.0444,0.0464,0.2593,0.1735,0.175,0.0467,0.0015,0.0015,0.0394,0.0006,0.0006,0.0402,0.0007,0.0007,3.325,0.168,2020.2 +wake,0.975,11.476,0.2142,0.0929,0.0917,forwards,0.2965,0.0341,0.0358,0.3181,0.1594,0.1609,0.0601,0.0015,0.0014,0.0824,0.0007,0.0006,0.0483,0.0006,0.0006,3.4,0.1674,2025.3 +wake,1.0,11.77,0.1993,0.0908,0.0898,backwards,0.1855,0.0252,0.0264,,0.1401,0.1416,0.0622,0.0022,0.0019,0.0615,0.0009,0.0008,0.0607,0.0007,0.0008,3.45,0.1656,2030.6 diff --git a/validation/experiments/flotant/summary.json b/validation/experiments/flotant/summary.json new file mode 100644 index 00000000..338ec8c0 --- /dev/null +++ b/validation/experiments/flotant/summary.json @@ -0,0 +1,505 @@ +{ + "dt_s": 0.002, + "elements_per_table_element": 1, + "tow": { + "end": "identified", + "tmax_s": 60.0, + "statistics_after_s": 20.0, + "highpass_rad_s": 3.5, + "Ur_frequency_hz": 1.77, + "release_fraction_of_peak": 0.7, + "per_set": { + "uls19": { + "label": "Ulveseter et al. (2019), Table 1, Chh 1.5", + "fitted_to": "the NDP riser in uniform flow; blind here", + "speeds": [ + 0.025, + 0.05, + 0.075, + 0.1, + 0.125, + 0.15, + 0.175, + 0.2, + 0.225, + 0.25, + 0.275, + 0.3, + 0.325, + 0.35, + 0.375, + 0.4, + 0.425, + 0.45, + 0.475, + 0.5, + 0.525, + 0.55, + 0.575, + 0.6, + 0.625, + 0.65, + 0.675, + 0.7, + 0.725, + 0.75, + 0.775, + 0.8, + 0.825, + 0.85, + 0.875, + 0.9, + 0.925, + 0.95, + 0.975, + 1.0 + ], + "compared_tests": "Ur >= 3", + "cf_rms_log_error_all_stations": 0.730599035507909, + "cf_ratio_median_all_stations": 1.6045546300304596, + "il_rms_log_error_all_stations": 0.7422498473783267, + "il_ratio_median_all_stations": 1.0403634795667123, + "cf_rms_log_error": { + "1_2L": 0.6896505635145447, + "3_4L": 0.6054958725179113, + "L": 0.8757002334921515 + }, + "il_rms_log_error": { + "1_2L": 0.6242433471759753, + "3_4L": 0.5201489867187723, + "L": 0.9962779646872738 + }, + "cf_rms_log_error_1_2L_by_direction": { + "forwards": 0.6473677602467042, + "backwards": 0.7294866568382343 + }, + "cf_1_2L_peak": { + "peak_AD": 0.7547273832653888, + "peak_Ur": 5.296610169491525, + "release_Ur": 7.062146892655367, + "f_hz_at_peak": 1.2499999999984723 + }, + "cf_1_2L_peak_measured": { + "peak_AD": 0.7755, + "peak_Ur": 5.583, + "release_Ur": 5.884 + }, + "mean_top_tension_N_range": [ + 1962, + 2076 + ] + }, + "b1": { + "label": "generic set (Delta Flume case)", + "fitted_to": "no; blind", + "speeds": [ + 0.025, + 0.05, + 0.075, + 0.1, + 0.125, + 0.15, + 0.175, + 0.2, + 0.225, + 0.25, + 0.275, + 0.3, + 0.325, + 0.35, + 0.375, + 0.4, + 0.425, + 0.45, + 0.475, + 0.5, + 0.525, + 0.55, + 0.575, + 0.6, + 0.625, + 0.65, + 0.675, + 0.7, + 0.725, + 0.75, + 0.775, + 0.8, + 0.825, + 0.85, + 0.875, + 0.9, + 0.925, + 0.95, + 0.975, + 1.0 + ], + "compared_tests": "Ur >= 3", + "cf_rms_log_error_all_stations": 0.5941536831759612, + "cf_ratio_median_all_stations": 0.9491137600334464, + "il_rms_log_error_all_stations": 1.0166460852408143, + "il_ratio_median_all_stations": 0.5752475108833648, + "cf_rms_log_error": { + "1_2L": 0.496789066673788, + "3_4L": 0.4791025608890916, + "L": 0.7685296331328462 + }, + "il_rms_log_error": { + "1_2L": 0.8550027299528041, + "3_4L": 1.1234580174708335, + "L": 1.0523878575222048 + }, + "cf_rms_log_error_1_2L_by_direction": { + "forwards": 0.5636506860751169, + "backwards": 0.41940035481658433 + }, + "cf_1_2L_peak": { + "peak_AD": 0.48303768537307423, + "peak_Ur": 3.8253295668549905, + "release_Ur": 5.885122410546138, + "f_hz_at_peak": 1.2499999999984723 + }, + "cf_1_2L_peak_measured": { + "peak_AD": 0.7755, + "peak_Ur": 5.583, + "release_Ur": 5.884 + }, + "mean_top_tension_N_range": [ + 1962, + 2185 + ] + }, + "wake": { + "label": "Facchinetti et al. (2004) wake oscillator", + "fitted_to": "rigid-cylinder data; blind", + "speeds": [ + 0.025, + 0.05, + 0.075, + 0.1, + 0.125, + 0.15, + 0.175, + 0.2, + 0.225, + 0.25, + 0.275, + 0.3, + 0.325, + 0.35, + 0.375, + 0.4, + 0.425, + 0.45, + 0.475, + 0.5, + 0.525, + 0.55, + 0.575, + 0.6, + 0.625, + 0.65, + 0.675, + 0.7, + 0.725, + 0.75, + 0.775, + 0.8, + 0.825, + 0.85, + 0.875, + 0.9, + 0.925, + 0.95, + 0.975, + 1.0 + ], + "compared_tests": "Ur >= 3", + "cf_rms_log_error_all_stations": 1.2083674966459748, + "cf_ratio_median_all_stations": 0.4070965464436991, + "il_rms_log_error_all_stations": 3.605803405022973, + "il_ratio_median_all_stations": 0.02753921577465114, + "cf_rms_log_error": { + "1_2L": 1.1895195653845272, + "3_4L": 1.2909523301731947, + "L": 1.13726967599545 + }, + "il_rms_log_error": { + "1_2L": 3.325377943947132, + "3_4L": 3.92168317276405, + "L": 3.545097630446166 + }, + "cf_rms_log_error_1_2L_by_direction": { + "forwards": 1.214376106938135, + "backwards": 1.1641324081748472 + }, + "cf_1_2L_peak": { + "peak_AD": 0.2964251183985482, + "peak_Ur": 4.413841807909604, + "release_Ur": 5.296610169491525, + "f_hz_at_peak": 1.299999999998411 + }, + "cf_1_2L_peak_measured": { + "peak_AD": 0.7755, + "peak_Ur": 5.583, + "release_Ur": 5.884 + }, + "mean_top_tension_N_range": [ + 1962, + 2031 + ] + } + } + }, + "rao": { + "air_table_5mm": { + "surge": { + "rms_log_error": 0.2271249523692518, + "band_hz": [ + 1.4, + 2.0 + ], + "peaks_1_2L_cabledyn": [ + [ + 1.7, + 7.386 + ] + ], + "peaks_1_2L_measured": [ + [ + 1.7, + 8.683 + ] + ] + }, + "sway": { + "rms_log_error": 0.2775305840736591, + "band_hz": [ + 1.4, + 2.0 + ], + "peaks_1_2L_cabledyn": [ + [ + 1.7, + 7.386 + ] + ], + "peaks_1_2L_measured": [ + [ + 1.7, + 9.142 + ] + ] + } + }, + "air_table_10mm": { + "surge": { + "rms_log_error": 0.20858196424547804, + "band_hz": [ + 1.4, + 2.0 + ], + "peaks_1_2L_cabledyn": [ + [ + 1.7, + 7.234 + ] + ], + "peaks_1_2L_measured": [ + [ + 1.7, + 5.881 + ] + ] + }, + "sway": { + "rms_log_error": 0.22969544591422794, + "band_hz": [ + 1.4, + 2.0 + ], + "peaks_1_2L_cabledyn": [ + [ + 1.7, + 7.234 + ] + ], + "peaks_1_2L_measured": [ + [ + 1.7, + 6.398 + ] + ] + } + }, + "water_free_5mm": { + "surge": { + "rms_log_error": 1.1742370919761518, + "band_hz": [ + 1.0, + 3.0 + ], + "peaks_1_2L_cabledyn": [ + [ + 1.4, + 3.678 + ], + [ + 2.6, + 1.311 + ] + ], + "peaks_1_2L_measured": [ + [ + 1.3, + 4.246 + ], + [ + 1.8, + 4.403 + ] + ] + }, + "sway": { + "rms_log_error": 1.2074671000645258, + "band_hz": [ + 1.0, + 3.0 + ], + "peaks_1_2L_cabledyn": [ + [ + 1.4, + 3.678 + ], + [ + 2.6, + 1.311 + ] + ], + "peaks_1_2L_measured": [ + [ + 1.3, + 4.314 + ], + [ + 1.9, + 2.993 + ] + ] + } + }, + "water_identified_5mm": { + "surge": { + "rms_log_error": 0.45854152035091567, + "band_hz": [ + 1.0, + 3.0 + ], + "peaks_1_2L_cabledyn": [ + [ + 1.2, + 3.758 + ], + [ + 1.9, + 2.451 + ] + ], + "peaks_1_2L_measured": [ + [ + 1.3, + 4.246 + ], + [ + 1.8, + 4.403 + ] + ] + }, + "sway": { + "rms_log_error": 0.7431022078522367, + "band_hz": [ + 1.0, + 3.0 + ], + "peaks_1_2L_cabledyn": [ + [ + 1.2, + 3.758 + ], + [ + 1.9, + 2.451 + ] + ], + "peaks_1_2L_measured": [ + [ + 1.3, + 4.314 + ], + [ + 1.9, + 2.993 + ] + ] + } + }, + "water_table_5mm": { + "surge": { + "rms_log_error": 1.1862435338325563, + "band_hz": [ + 1.0, + 3.0 + ], + "peaks_1_2L_cabledyn": [ + [ + 1.3, + 3.943 + ], + [ + 2.5, + 1.359 + ] + ], + "peaks_1_2L_measured": [ + [ + 1.3, + 4.246 + ], + [ + 1.8, + 4.403 + ] + ] + }, + "sway": { + "rms_log_error": 1.2156538997830377, + "band_hz": [ + 1.0, + 3.0 + ], + "peaks_1_2L_cabledyn": [ + [ + 1.3, + 3.943 + ], + [ + 2.5, + 1.359 + ] + ], + "peaks_1_2L_measured": [ + [ + 1.3, + 4.314 + ], + [ + 1.9, + 2.993 + ] + ] + } + } + }, + "executable_sha256": "3a93a8b9ba3af58d2cf6d158cbcf61299b38de7541ab6ed8caef0a18bb3d2e4b" +} diff --git a/validation/experiments/ndp_riser/ndp_riser_viv.py b/validation/experiments/ndp_riser/ndp_riser_viv.py index 848efbad..a817a174 100644 --- a/validation/experiments/ndp_riser/ndp_riser_viv.py +++ b/validation/experiments/ndp_riser/ndp_riser_viv.py @@ -324,6 +324,11 @@ def run_case( if not ( same and out.is_file() and ran.is_file() and ran.read_text().strip() == sha ): + # A run that fails or is interrupted must not leave the previous model's result next + # to the new inputs, where the next attempt would reuse it. + result.unlink(missing_ok=True) + ran.unlink(missing_ok=True) + out.unlink(missing_ok=True) deck.write_text(text, encoding="utf-8") (folder / "current_profile.txt").write_text( f"z ux uy uz\n(m) (m/s) (m/s) (m/s)\n{-WATER_DEPTH:.2f} 0 {u} 0\n0.0 0 {u} 0\n", From dfbbf33909bcd76158cfe985401d4403d7c6a407 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Tue, 17 Nov 2026 14:18:12 +0900 Subject: [PATCH 33/47] build: the Release build is warning-free again (#176) gfortran 16.2 (-Wall -Wextra) reported seven warnings on dev, none a defect. Each site now gives the same result for every input, NaN, signed zeros and infinities included: - CD_VIV_Check_Amp_Table compared a row's A/D with amp(1, i - 1, e) behind IF (i > 1), which -Wdo-subscript cannot see through ("out of bounds (0 < 1)"). It now compares with the previous row's value, held from -1 below every valid first row, in the same order of checks, so every table gets the same message. - The half-cycle start of the amplitude estimate, .NOT. (p /= 0), is ABS(p) <= 0 (true for +-0 only, false for NaN, as before). - The three immersed-fraction Jacobian terms, dwf /= 0, are .NOT. (ABS(dwf) <= 0) (true for NaN, as before). - The attachment-weight fixed point, ALL(f_att_now == f_att), is ALL(f_att_now <= f_att .AND. f_att_now >= f_att), IEEE equality. - test_model declares its sub-step event counter with the kind of the counter it copies (INTEGER(int64)). All 138 example and test-data decks write byte-identical outputs and the same messages as the dev build; 431/431 tests pass on the default and the Prescott OpenBLAS kernel. Signed-off-by: Jae Hoon Seo --- src/CableDyn_DeckDriver.f90 | 2 +- src/CableDyn_HermiteCableDynamic.f90 | 6 +++--- src/CableDyn_VIV.f90 | 14 ++++++++------ tests/test_model.f90 | 3 ++- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index f03d875e..d0e7d5b5 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -4062,7 +4062,7 @@ SUBROUTINE torsion_after_attachments(est, emt) ! the weights at the twisted state: an attachment the twist moved within its radius of the ! surface carries another share of its buoyancy (once more, with the loads of this state) CALL attachment_static_weight(q_static, att_node, ln%att, opts, f_att_now, surface=.TRUE.) - IF (.NOT. has_drag .AND. ALL(f_att_now == f_att)) RETURN + IF (.NOT. has_drag .AND. ALL(f_att_now <= f_att .AND. f_att_now >= f_att)) RETURN IF (MAXVAL(ABS(q_static - q_prev)) <= FIXED_POINT_TOL) RETURN END DO est = CD_DECKDRV_SOLVEFAIL diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 68473b30..58bda2f7 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -12557,7 +12557,7 @@ SUBROUTINE CD_HermiteCable_Drag_Element(qe, ve, l0, fluid, waterline_z, rho, dia END DO ! the immersed fraction moves with the height of the point (in the surface band only): ! d wf/d qe(b) = dwf H(sp) for the vertical DOFs, dwf = d wf/d z - IF (dwf /= CD_ZERO) THEN + IF (.NOT. (ABS(dwf) <= CD_ZERO)) THEN DO sp = 1, 4 b = 3*sp djq(a, b) = djq(a, b) + gw(g)*speed*H(s)*fpl(c)*dwf*H(sp) @@ -12668,7 +12668,7 @@ SUBROUTINE CD_HermiteCable_VIV_Lift_Element(qe, ve, l0, fluid, waterline_z, k_no djq(a, b) = djq(a, b) + gww*H(s)*dH(sp)*(speed*jtan(c, cp) + fpl(c)*tangent(cp)) END DO END DO - IF (dwf /= CD_ZERO) THEN ! the immersed fraction moves with the height of the point + IF (.NOT. (ABS(dwf) <= CD_ZERO)) THEN ! the immersed fraction moves with the height of the point DO sp = 1, 4 b = 3*sp djq(a, b) = djq(a, b) + gw(g)*speed*H(s)*fpl(c)*dwf*H(sp) @@ -12984,7 +12984,7 @@ SUBROUTINE CD_HermiteCable_FK_Element(qe, l0, waterline_z, rho, diam, can, cat, fjq(a, b) = fjq(a, b) + (gw(g)*wf)*H(s)*dH(sp)*jq3(c, cp) END DO END DO - IF (dwf /= CD_ZERO) THEN ! the immersed fraction moves with the height of the point + IF (.NOT. (ABS(dwf) <= CD_ZERO)) THEN ! the immersed fraction moves with the height of the point DO sp = 1, 4 b = 3*sp fjq(a, b) = fjq(a, b) + gw(g)*speed*H(s)*fpl(c)*dwf*H(sp) diff --git a/src/CableDyn_VIV.f90 b/src/CableDyn_VIV.f90 index af7f719c..801bd17c 100644 --- a/src/CableDyn_VIV.f90 +++ b/src/CableDyn_VIV.f90 @@ -575,7 +575,7 @@ PURE SUBROUTINE CD_VIV_Amplitude_Update(st, yd, dt) IF (.NOT. (dt > CD_ZERO)) RETURN y_old = st(4) p = y_old - IF (.NOT. (p /= CD_ZERO)) p = st(1) + IF (ABS(p) <= CD_ZERO) p = st(1) IF ((p > CD_ZERO .AND. yd < CD_ZERO) .OR. (p < CD_ZERO .AND. yd > CD_ZERO)) THEN ! theta = 0 when the step starts on the sample at zero that ends the half cycle theta = y_old/(y_old - yd) @@ -619,6 +619,7 @@ PURE SUBROUTINE CD_VIV_Check_Amp_Table(amp, amp_n, cl, msg) INTEGER, INTENT(IN) :: amp_n(:) CHARACTER(*), INTENT(OUT) :: msg INTEGER :: e, n, i + REAL(wp) :: prev REAL(wp), PARAMETER :: big = 1.0e15_wp msg = '' IF (SIZE(amp, 1) /= 3 .OR. SIZE(amp, 2) /= CD_VIV_AMP_MAXP .OR. SIZE(amp, 3) /= SIZE(cl) .OR. & @@ -637,18 +638,19 @@ PURE SUBROUTINE CD_VIV_Check_Amp_Table(amp, amp_n, cl, msg) msg = 'a VIV amplitude table needs the cross-flow lift (cl > 0) on its element' RETURN END IF + ! the previous row's A/D; below every valid first row, which the range check holds at >= 0 + prev = -CD_ONE DO i = 1, n IF (.NOT. (amp(1, i, e) >= CD_ZERO .AND. amp(1, i, e) <= big .AND. amp(2, i, e) >= CD_ZERO .AND. & amp(2, i, e) <= big .AND. amp(3, i, e) > CD_ZERO .AND. amp(3, i, e) <= big)) THEN msg = 'VIV amplitude table rows need finite A/D >= 0, C_v >= 0 and drag factor > 0, each at most 1e15' RETURN END IF - IF (i > 1) THEN - IF (.NOT. (amp(1, i, e) > amp(1, i - 1, e))) THEN - msg = 'the A/D of a VIV amplitude table must increase strictly' - RETURN - END IF + IF (.NOT. (amp(1, i, e) > prev)) THEN + msg = 'the A/D of a VIV amplitude table must increase strictly' + RETURN END IF + prev = amp(1, i, e) END DO END DO END SUBROUTINE CD_VIV_Check_Amp_Table diff --git a/tests/test_model.f90 b/tests/test_model.f90 index d805b8f9..c1daee6a 100644 --- a/tests/test_model.f90 +++ b/tests/test_model.f90 @@ -1742,7 +1742,8 @@ SUBROUTINE case_substeps_restore_viv_state(inline) REAL(wp) :: q0(3*NN), v0(3*NN), f_ext(3*NN), pq(3*NN), pv(3*NN), pa(3*NN), fluid(3, NN), wl(NN) REAL(wp) :: l0(NE), ea(NE), rho_a(NE), cl(NE), dia(NE), cf(NE), df(NE), phi0(NN), w, t, phx0(NN) REAL(wp) :: tab(3, CD_VIV_AMP_MAXP, NE) - INTEGER :: tab_n(NE), ev0 + INTEGER :: tab_n(NE) + INTEGER(KIND(auto_m%sub_stats%events)) :: ev0 LOGICAL :: conv, stalled, all_conv CHARACTER(200) :: em From a244dfcd5a67a6dd56a5bc8491171bb95df36506 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Tue, 17 Nov 2026 16:28:52 +0900 Subject: [PATCH 34/47] fix: the side a symmetric static leaves its plane to follows the line, not its heading (#177) Past the pitchfork of a current along the vertical plane of a finite-EI line (the grounded run turned sideways on the seabed), the static solve adds a cross-flow of 1 % of the horizontal current to leave the plane, then polishes at the exact current. The cross-flow was the left normal of the line's local frame, and that frame is the identity for any chord without a y component. A chord from the anchor along -x therefore took the cross-flow at +y (to its right), a chord a round-off away from -x at -y (to its left), and a deck rotated by 180 degrees about the vertical left its plane to the same global side as the original. The cross-flow now points to the left of the horizontal chord from the anchor (End B) to the fairlead (End A) whatever its heading, +y for a vertical chord as before, so the rotated deck reaches the rotated equilibrium. Of the 138 example and test-data decks one changes, tests/data/fei_hairpin_current.dat (chord along -x): it reaches the mirror image of its previous equilibrium, x, z, tension and curvature identical to the bit, y negated, the same end forces with Fy reversed. The statics matrix gains a side check (the node farthest from y = 0 on the recorded side) and mirror twins (the mirror image of the parent to 1e-6): CUR_1013 and its 180-degree rotation leave to opposite sides (the rotation failed before), and a cross current of 2 % of the deck's own, toward +y or -y, picks the side, the two mirror images of each other. The theory page states the rule and that a deck can pick the side with a small cross component of its own current. 431/431 tests pass on the default and the Prescott OpenBLAS kernel. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 12 +++++++ doc/theory.rst | 7 +++- src/CableDyn_DeckDriver.f90 | 11 +++++- tests/data/cable_statics_matrix.json | 44 +++++++++++++++++++++++- tests/test_cable_statics_matrix.py | 50 +++++++++++++++++++++++++++- 5 files changed, 120 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29c376c6..264bf097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -190,6 +190,18 @@ All notable changes to CableDyn are recorded in this file. The format follows ### Fixed +- The side a finite-EI line leaves its vertical plane to in an in-plane current past the + pitchfork (the grounded run turned sideways on the seabed) followed the line's heading, not + the line. The symmetry-breaking cross-flow was taken from the line's local frame, which is + the identity for any chord without a y component, so a chord along -x took it at +y (to its + right) and a chord a round-off away from -x at -y (to its left), and a deck rotated by 180 + degrees about the vertical left to the same global side as the original. The cross-flow now + points to the left of the horizontal chord from the anchor (End B) to the fairlead (End A) + whatever its heading (+y for a vertical chord, as before), so the rotated deck reaches the + rotated equilibrium. A deck whose chord points exactly along -x and that reaches this branch + now leaves to the other side: the mirror image, with the same end forces. The statics matrix + checks the side of the deck and of its 180-degree rotation, and that a cross current of the + deck's own picks the side (mirror twins to 1e-6). The theory page states the rule. - The statics of a finite-EI line through the free surface could fail at isolated currents: each Gauss point's hydrodynamic load switched on and off at the surface, so the residual jumped and an equilibrium with a point at the waterline had no root (a light lazy-wave cable, diff --git a/doc/theory.rst b/doc/theory.rst index 0f8b3914..8ce9d1be 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -2609,7 +2609,12 @@ pitchfork: the equilibrium beyond it turns the grounded run sideways on the seab anchor and back (a lazy wave in a 0.7 to 1.2 m/s current along its plane, for example). Newton cannot leave the plane of a symmetric problem, so the line is then solved in 3D under the current with a cross-flow of 1 % of its horizontal speed, and that state is polished at -the exact current and audited like any other. A planar equilibrium in such a current is also +the exact current and audited like any other. The cross-flow points to the left of the +horizontal chord from the anchor (End B) to the fairlead (End A), along :math:`+y` for a +vertical chord, so the side the line leaves its plane to turns with the line: the same deck +rotated about the vertical reaches the rotated equilibrium. Both sides are equilibria of the +symmetric problem; a deck that needs one gives its current a small cross component of its own, +and the static solve then follows that side. A planar equilibrium in such a current is also checked with the line free to leave its plane; one that is a saddle there (the grounded run held in the plane only by the symmetry) is replaced by this 3D solve; when the 3D solve finds no equilibrium, the planar one is kept and a note says that it is held in the plane of the line diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index d0e7d5b5..4899abe6 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -4696,7 +4696,16 @@ LOGICAL FUNCTION symmetric_current_retry() RESULT(retry) ALLOCATE (fixed_dofs(6)) fixed_dofs = [1, 2, 3, ndof - 5, ndof - 4, ndof - 3] sym_broken = .TRUE. - nrm = [-frame_cs(2), frame_cs(1)] + ! The cross-flow points to the left of the horizontal chord from the anchor (End B) to the + ! fairlead (End A), +y for a vertical chord, so the side the line leaves its plane to + ! follows the line, not its heading: frame_cs is the identity for any chord without a y + ! component, which put the cross-flow at +y for a chord along -x (to its right) and at -y + ! for one a round-off away from it (to its left). + IF (hspan > 1.0e-9_wp*MAX(1.0_wp, ABS(dxh) + ABS(dyh))) THEN + nrm = [-dyh, dxh]/hspan + ELSE + nrm = [CD_ZERO, CD_ONE] + END IF uh = NORM2(cur_obj%velocity(1:2)) cur_obj%velocity(1:2) = cur_obj%velocity(1:2) + SYM_BREAK*uh*nrm IF (ALLOCATED(cur_obj%profile_velocity)) THEN diff --git a/tests/data/cable_statics_matrix.json b/tests/data/cable_statics_matrix.json index c1b3541c..029b444c 100644 --- a/tests/data/cable_statics_matrix.json +++ b/tests/data/cable_statics_matrix.json @@ -1486,7 +1486,49 @@ "lambda_over_length": 0.0 } }, - "note": "past its anchor, where it folds back" + "note": "past its anchor, where it folds back", + "side": "+y" + }, + { + "id": "CUR_1013__rot180", + "expect": "admissible", + "why": "The parent rotated by 180 degrees about z. Past the pitchfork of the in-plane current the symmetry-breaking pass adds a cross-flow to the left of the horizontal chord from the anchor (End B) to the fairlead (End A), so the rotated deck reaches the rotated equilibrium and leaves its plane to -y. Before, a chord without a y component always took the cross-flow at +y, so the parent (its chord from the anchor along -x) and this deck left to the same global side.", + "deck": "--------------------- CableDyn Input File ---------------------------\nCUR_1013__rot180\n--------------------- LINE TYPES ------------------------------------\nTypeName Diam MassDenInAir EA BA EI Cd_n Cd_t Ca_n Ca_t\n(-) (m) (kg/m) (N) (-) (N-m2) (-) (-) (-) (-)\nbare 0.1784650716 82.63060908 255233842 0 25945.91551 1.2 0.1 1 0\nbuoy 0.4710966462 88.94142595 255233842 0 40205.41756 1.2 0.1 1 0\n--------------------- POINTS ----------------------------------------\nID Type X Y Z\n(-) (-) (m) (m) (m)\n1 Coupled 0 0 -13.08348484\n2 Fixed -41.77649681 0 -42.543\n--------------------- LINES -----------------------------------------\nID NodeA NodeB Outputs\n(-) (-) (-) (-)\n1 1 2 -\n--------------------- SECTIONS --------------------------------------\nLineID LineType Length NumSegs\n(-) (-) (m) (-)\n1 bare 20.5504 2\n1 buoy 7.3589 1\n1 bare 35.1167 4\n--------------------- OPTIONS ---------------------------------------\n9.80665 g\n1025.0 rhoW\n42.543 WtrDpth\n3e+06 kBot\n1.0e4 cBot\n0.05 dtM\n0.0 TMax\nFalse adaptive_mesh\nTrue tensile_safety\nuniform -1.906 0.0 0.0 current\n--------------------- OUTPUTS ---------------------------------------\n\"FairTen1\"\n\"AnchTen1\"\n--------------------- need this line --------------------------------\n", + "lines": { + "1": { + "oracle_tfair": [], + "lambda_over_length": 0.0 + } + }, + "side": "-y", + "twin_of": "CUR_1013" + }, + { + "id": "CUR_1013__xp", + "expect": "admissible", + "why": "A cross current toward +y of 2 % of the in-plane current picks the side: the grounded run, folded back past its anchor, lies at -y.", + "deck": "--------------------- CableDyn Input File ---------------------------\nCUR_1013__xp\n--------------------- LINE TYPES ------------------------------------\nTypeName Diam MassDenInAir EA BA EI Cd_n Cd_t Ca_n Ca_t\n(-) (m) (kg/m) (N) (-) (N-m2) (-) (-) (-) (-)\nbare 0.1784650716 82.63060908 255233842 0 25945.91551 1.2 0.1 1 0\nbuoy 0.4710966462 88.94142595 255233842 0 40205.41756 1.2 0.1 1 0\n--------------------- POINTS ----------------------------------------\nID Type X Y Z\n(-) (-) (m) (m) (m)\n1 Coupled 0 0 -13.08348484\n2 Fixed 41.77649681 0 -42.543\n--------------------- LINES -----------------------------------------\nID NodeA NodeB Outputs\n(-) (-) (-) (-)\n1 1 2 -\n--------------------- SECTIONS --------------------------------------\nLineID LineType Length NumSegs\n(-) (-) (m) (-)\n1 bare 20.5504 2\n1 buoy 7.3589 1\n1 bare 35.1167 4\n--------------------- OPTIONS ---------------------------------------\n9.80665 g\n1025.0 rhoW\n42.543 WtrDpth\n3e+06 kBot\n1.0e4 cBot\n0.05 dtM\n0.0 TMax\nFalse adaptive_mesh\nTrue tensile_safety\nuniform 1.906 0.03812 0.0 current\n--------------------- OUTPUTS ---------------------------------------\n\"FairTen1\"\n\"AnchTen1\"\n--------------------- need this line --------------------------------\n", + "lines": { + "1": { + "oracle_tfair": [], + "lambda_over_length": 0.0 + } + }, + "side": "-y" + }, + { + "id": "CUR_1013__xm", + "expect": "admissible", + "why": "CUR_1013__xp with the cross current toward -y: the mirror image of its equilibrium.", + "deck": "--------------------- CableDyn Input File ---------------------------\nCUR_1013__xm\n--------------------- LINE TYPES ------------------------------------\nTypeName Diam MassDenInAir EA BA EI Cd_n Cd_t Ca_n Ca_t\n(-) (m) (kg/m) (N) (-) (N-m2) (-) (-) (-) (-)\nbare 0.1784650716 82.63060908 255233842 0 25945.91551 1.2 0.1 1 0\nbuoy 0.4710966462 88.94142595 255233842 0 40205.41756 1.2 0.1 1 0\n--------------------- POINTS ----------------------------------------\nID Type X Y Z\n(-) (-) (m) (m) (m)\n1 Coupled 0 0 -13.08348484\n2 Fixed 41.77649681 0 -42.543\n--------------------- LINES -----------------------------------------\nID NodeA NodeB Outputs\n(-) (-) (-) (-)\n1 1 2 -\n--------------------- SECTIONS --------------------------------------\nLineID LineType Length NumSegs\n(-) (-) (m) (-)\n1 bare 20.5504 2\n1 buoy 7.3589 1\n1 bare 35.1167 4\n--------------------- OPTIONS ---------------------------------------\n9.80665 g\n1025.0 rhoW\n42.543 WtrDpth\n3e+06 kBot\n1.0e4 cBot\n0.05 dtM\n0.0 TMax\nFalse adaptive_mesh\nTrue tensile_safety\nuniform 1.906 -0.03812 0.0 current\n--------------------- OUTPUTS ---------------------------------------\n\"FairTen1\"\n\"AnchTen1\"\n--------------------- need this line --------------------------------\n", + "lines": { + "1": { + "oracle_tfair": [], + "lambda_over_length": 0.0 + } + }, + "side": "+y", + "mirror_of": "CUR_1013__xp" }, { "id": "LWM_1002", diff --git a/tests/test_cable_statics_matrix.py b/tests/test_cable_statics_matrix.py index ad2b0f5f..64d5a9fa 100644 --- a/tests/test_cable_statics_matrix.py +++ b/tests/test_cable_statics_matrix.py @@ -40,7 +40,14 @@ parent profile at the same unstretched arc length; * at-rest twins (the parent deck marched in time with nothing moving) must report the line-end forces of the static solution at every output step: FairTen/AnchTen are the - end forces of the committed state, identical for the static and the dynamic run. + end forces of the committed state, identical for the static and the dynamic run; +* a deck with a ``side`` must leave its vertical plane to that side (``+y`` or ``-y``, its + recorded equilibrium): past the pitchfork of an in-plane current the symmetry-breaking pass + adds a cross-flow to the left of the horizontal chord from the anchor (End B) to the + fairlead (End A), so the deck rotated by 180 degrees about z leaves to the opposite global + side, and a small cross current of the deck's own picks the side; +* mirror twins (``mirror_of``: the parent deck reflected in y) must reach the mirror image of + the parent's equilibrium: end forces within 1e-6, nodes within 1e-6 of the line length. usage: test_cable_statics_matrix.py --exe --cases --output

""" @@ -285,6 +292,38 @@ def check_case(case: dict, res: dict) -> list: return errs +def side_errors(res: dict, side: str) -> list: + """The side a line turned to out of its vertical plane: the node farthest from y = 0 lies at + +y or -y (``side``) by more than 1e-3 of the line length.""" + errs = [] + for lid, rows in res["static"].items(): + length = rows[-1][0] - rows[0][0] + y = max((r[2] for r in rows), key=abs) + if abs(y) <= 1e-3 * length or (y > 0.0) != (side == "+y"): + errs.append("line %s turned to y = %.4g m, expected the %s side" % (lid, y, side)) + return errs + + +def mirror_errors(res: dict, pr: dict, parent: str) -> list: + """The mirror image in y of the parent's equilibrium: end forces within 1e-6, every node's x + and z equal and y opposite within 1e-6 of the line length.""" + errs = [] + for name, v in res["forces"].items(): + vp = pr["forces"].get(name) + if vp is None or abs(v - vp) > 1e-6 * max(abs(vp), 1.0): + errs.append("%s %.9g differs from its mirror %s (%s)" % (name, v, parent, vp)) + for lid, rows in res["static"].items(): + prow = pr["static"].get(lid) + if not prow or len(prow) != len(rows): + errs.append("line %s has no matching profile in %s" % (lid, parent)) + continue + length = rows[-1][0] - rows[0][0] + dev = max(max(abs(r[1] - p[1]), abs(r[2] + p[2]), abs(r[3] - p[3])) for r, p in zip(rows, prow)) + if dev > 1e-6 * length: + errs.append("line %s departs %.3g m from the mirror of %s" % (lid, dev, parent)) + return errs + + def mesh_twin_errors(res: dict, pr: dict, parent: str) -> list: """The same equilibrium on a refined mesh: FairTen within 0.5 %, every node within 1e-3 of the line length of the parent profile interpolated at its unstretched arc length.""" @@ -376,6 +415,15 @@ def main() -> int: errs.append("mesh parent %s did not converge" % mesh) else: errs += mesh_twin_errors(res, pr, mesh) + if case.get("side") and not errs: + errs += side_errors(res, case["side"]) + mirror = case.get("mirror_of") + if mirror and not errs: + pr = byid.get(mirror) + if pr is None or pr["rc"] != 0 or "forces" not in pr: + errs.append("mirror parent %s did not converge" % mirror) + else: + errs += mirror_errors(res, pr, mirror) status = "FAIL" if errs else "ok" print("%-4s %-18s %-14s rc=%-7s %6.2fs wall %6.2fs cpu %s" % ( status, case["id"], case["expect"], res["rc"], res["time"], res["cpu"], "; ".join(errs)[:400])) From 15b5ebc2c59687add163501d4a6cb8104bf83d46 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Tue, 17 Nov 2026 19:30:26 +0900 Subject: [PATCH 35/47] validation: SJTU catenary riser VIV under heave of its upper end (L3-Wh) (#178) The truncated steel catenary riser of Wang et al. (2014) in both cases Thorsen, Saevik & Larsen (2017) use to verify the synchronisation model, each with their published coefficient set, nothing fitted: - uniform current, 0.2 m/s (L3-W, Sec. 5.1): f at 8.25 m 0.992 Hz against the measured 1.00 Hz (their model 1.02 Hz); largest r.m.s. strain 1.073 times the measured largest (theirs 0.996), station mean 1.036 (theirs 0.970), r.m.s. log error 0.338 (theirs 0.360). The numbers of the earlier record are unchanged. - heave-induced VIV in still water (L3-Wh, Sec. 5.2): the upper end follows two sinusoids of 5.96 s fitted to the measured top motion (their Fig. 19: x 0.0485 m, z 0.1305 m, x lagging z by 83 deg); the strain is band-passed from 4 times the motion frequency to 50 Hz as Wang et al. process the measurement. Without a VIV FRAME row, the published model's phase input: f 1.019 Hz (measured close to 1 Hz), largest strain 1.208 times the measured largest (theirs 1.056), station mean 1.334 (theirs 1.087), lower / upper half of the span 1.71 / 0.93 (theirs 1.44 / 0.71). The heave period is about 6 VIV periods, below the scale separation the VIV FRAME filter needs (about 30), and the heave result depends on Tf. With Tf 0.35-0.5 s the response stays at 1.01-1.02 Hz (largest strain 1.07-1.13); with 0.75-1 s it moves to 0.88 Hz (0.96-0.97, upper half 0.60-0.63); at Tf 0.5 s half the time step moves it from the first branch to the second. It is reported as a sensitivity. Convergence on this build: half the time step and 400 elements change the largest strain by +0.13 % and +0.24 % in the current, -1.0 % and -0.7 % in heave (station mean -2.9 % and -2.3 %), frequencies unchanged. validation/experiments/wang_scr/wang_scr_viv.py writes the 11 decks of the record (primary, convergence and Tf runs), runs them in parallel, reuses a run whose inputs and executable are unchanged (removing the result, the executable stamp and the output before new inputs are written) and compares; the default command run into a new work directory reproduces response_comparison.csv and summary.json byte for byte. It replaces wang_scr_uniform_current.py. extract_thorsen2017.py reads Figs. 17 and 22 (vector) and the Fig. 19 top motion (raster) from the article's PDF; Thorsen et al.'s simulated lines peak at 99.6 % and 105.6 % of the measured largest strain, where their text gives 99.6 % and 6 % high. VALIDATION.md, the experiments indexes, the README, the CHANGELOG and the theory manual's table of published coefficient sets name the new case. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 11 + README.md | 4 +- VALIDATION.md | 29 +- doc/theory.rst | 10 +- validation/README.md | 2 +- validation/experiments/README.md | 4 +- validation/experiments/wang_scr/README.md | 253 ++- .../wang_scr/extract_thorsen2017.py | 219 +++ .../wang_scr/measured_rms_strain.csv | 26 - .../experiments/wang_scr/provenance.json | 23 +- .../wang_scr/response_comparison.csv | 276 +++ .../wang_scr/rms_strain_comparison.csv | 26 - validation/experiments/wang_scr/summary.json | 326 +++- .../wang_scr/thorsen2017_fig17.csv | 522 ++++++ .../wang_scr/thorsen2017_fig19_fit.json | 17 + .../wang_scr/thorsen2017_fig19_top.csv | 1481 +++++++++++++++++ .../wang_scr/thorsen2017_fig22.csv | 506 ++++++ .../wang_scr/wang_scr_uniform_current.py | 207 --- .../experiments/wang_scr/wang_scr_viv.py | 545 ++++++ 19 files changed, 4148 insertions(+), 339 deletions(-) create mode 100644 validation/experiments/wang_scr/extract_thorsen2017.py delete mode 100644 validation/experiments/wang_scr/measured_rms_strain.csv create mode 100644 validation/experiments/wang_scr/response_comparison.csv delete mode 100644 validation/experiments/wang_scr/rms_strain_comparison.csv create mode 100644 validation/experiments/wang_scr/thorsen2017_fig17.csv create mode 100644 validation/experiments/wang_scr/thorsen2017_fig19_fit.json create mode 100644 validation/experiments/wang_scr/thorsen2017_fig19_top.csv create mode 100644 validation/experiments/wang_scr/thorsen2017_fig22.csv delete mode 100644 validation/experiments/wang_scr/wang_scr_uniform_current.py create mode 100644 validation/experiments/wang_scr/wang_scr_viv.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 264bf097..827be464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -132,6 +132,17 @@ All notable changes to CableDyn are recorded in this file. The format follows (cross-flow r.m.s. log error 0.731); the generic set is 38 % low at the peak and releases at the measured speed (0.594); the wake oscillator of Facchinetti et al. (2004) is 62 % low (1.208). +- Validation case L3-Wh (`validation/experiments/wang_scr`): heave-induced cross-flow VIV of + the L3-W riser in still water, its upper end moved along the measured top trajectory of + Thorsen et al. (2017, period 5.96 s), with their coefficient set, the strain band-passed as + Wang et al. (2014) process it. Without a `VIV FRAME` row the dominant frequency is 1.019 Hz + (measured close to 1 Hz), the largest r.m.s. strain 20.8 % above the measured largest and the + lower half of the span 1.71 times the measured on average (Thorsen et al.'s model 5.6 % and + 1.44). The heave period is about 6 VIV periods, below the `VIV FRAME` scale separation, and the + result depends on `Tf` (0.35–1 s): the response falls on a 1.01–1.02 Hz or a 0.88–0.89 Hz + branch, reported as a sensitivity. The case's script is now `wang_scr_viv.py` for both parts + (it replaces `wang_scr_uniform_current.py`; the L3-W numbers are unchanged), and its data, + including Thorsen et al.'s simulated lines, are read by `extract_thorsen2017.py`. - Theory manual, Published coefficient sets: the VIV coefficient sets of Thorsen et al. (2016, 2017), Ulveseter et al. (2018), Andersen et al. (2024a, b) and Facchinetti et al. (2004), each with its source, its test data and the line-type columns it maps to, and Thorsen et al.'s diff --git a/README.md b/README.md index 1f6aa909..21109df1 100644 --- a/README.md +++ b/README.md @@ -172,8 +172,8 @@ layout is described in the architecture notes in the repository. CableDyn is verified against analytical solutions and compared with MoorDyn, OrcaFlex, seven published physical experiments (Holcombe lazy-wave, Bergdahl dynamic -chain, Chaplin riser natural frequencies and stepped-current VIV, Wang catenary-riser VIV, -NDP high-mode riser VIV, FLOTANT power-cable VIV), the IEA 15 MW VolturnUS-S reference systems, and coupled OpenFAST runs. Results, +chain, Chaplin riser natural frequencies and stepped-current VIV, Wang catenary-riser VIV in +current and heave, NDP high-mode riser VIV, FLOTANT power-cable VIV), the IEA 15 MW VolturnUS-S reference systems, and coupled OpenFAST runs. Results, acceptance criteria, and reproduction commands are in the [validation record](https://cabledyn.readthedocs.io/en/latest/validation.html); data and scripts are in [`validation/`](https://cabledyn.readthedocs.io/en/latest/validation.html). diff --git a/VALIDATION.md b/VALIDATION.md index c2e73f44..b68648de 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -84,7 +84,8 @@ article's methods, are compared in | **L3-B** | Bergdahl chain experiment, 30 orbit conditions | measured upper-end force | RMSE 1.58 N; MAPE 3.11%; Pearson 0.993; Lin concordance 0.989 | full published matrix | Pass | | **L3-C** | Chaplin Delta Flume riser, still-water natural frequencies | measured modes 1–7 at five tensions | mean error +1.87%, mean absolute 2.28%, largest 4.88% (34 of 35; one outlier reported) | full published table, no fitted parameter | Pass | | **L3-D** | Chaplin Delta Flume riser in a stepped current, blind-trial cases 1–9, cross-flow and in-line VIV | measured dominant mode, peak cross-flow amplitude, mean in-line displacement, curvature standard deviations | mode right in 5/9, within one in 9/9; mean in-line within ±17% in 7/9 (−25% to +34%); cross-flow amplitude −45% to +4%; cross-flow curvature −39% to +26% | generic coefficient set, no fitted parameter | Pass measured | -| **L3-W** | SJTU steel catenary riser in 0.2 m/s current, cross-flow VIV | measured r.m.s. strain (25 stations) and dominant frequency | frequency 0.992 vs 1.00 Hz; max r.m.s. strain +7.3%, station mean +3.6% | published coefficient set, no fitted parameter | Pass | +| **L3-W** | SJTU steel catenary riser in 0.2 m/s current, cross-flow VIV | measured r.m.s. strain (25 stations) and dominant frequency | frequency 0.992 vs 1.00 Hz; max r.m.s. strain +7.3%, station mean +3.6% (Thorsen et al. 2017: 1.02 Hz, −0.4%, −3.0%) | published coefficient set, no fitted parameter | Pass | +| **L3-Wh** | SJTU steel catenary riser, heave-induced cross-flow VIV in still water (measured top motion, 5.96 s) | measured r.m.s. strain (25 stations, band-passed 0.67–50 Hz) and dominant frequency | no `VIV FRAME`: frequency 1.019 Hz vs close to 1 Hz; max r.m.s. strain +20.8%, station mean +33%, lower/upper half 1.71/0.93 (Thorsen et al. 2017: +5.6%, +8.7%, 1.44/0.71); `VIV FRAME` `Tf` 0.35–1 s: two branches, 1.01–1.02 Hz (max +7 to +13%) or 0.88–0.89 Hz (max −2.8 to −4.2%), `Tf` 0.5 s changes branch at dt/2 | published coefficient set, no fitted parameter; heave period about 6 VIV periods, below the `VIV FRAME` scale separation | Pass measured | | **L3-N** | NDP 38 m high-mode riser in uniform flow, 0.3–2.4 m/s (22 tests), cross-flow VIV | measured maximum r.m.s. cross-flow strain, dominant frequency, spatial-mean σ/D | strain r.m.s. log error: Ulveseter et al. (2019) set 0.178, Andersen et al. (2024b) 0.186, generic set 0.277, Thorsen et al. (2016) 0.363 (their own simulation 0.187); f D/U 0.145 / 0.134 / 0.192 / 0.193 vs 0.143 measured | generic set blind; the other sets fitted by their authors to NDP tests (implementation check) | Pass measured | | **L3-F** | FLOTANT OD 48 mm power-cable specimen with a 200 kg clump, tow tests at 0.025–1.0 m/s (40 tests), cross-flow and in-line VIV | measured A/D_rms (σ/OD) at 1/2L, 3/4L and L (de Wilde et al. 2021, App. 3) | CF r.m.s. log error (Ur ≥ 3): Ulveseter et al. (2019) set 0.731, generic set 0.594, wake oscillator 1.208; first peak at 1/2L 0.755 / 0.483 / 0.296 vs 0.776 measured; release Ur 7.06 / 5.89 / 5.30 vs 5.88 | published VIV sets, none fitted to these tests; structure identified from the specimen's in-air and in-water RAOs | Pass measured | | **L-fig** | Along-arc curvature overlay (CableDyn / OrcaFlex / MoorDyn-F ±4×) | 3-code committed record | CableDyn peak 0.11% from OrcaFlex | <0.5% | Pass | @@ -373,9 +374,29 @@ the tow tests it predicts). Inputs, reduction scripts, results, and source prove frequency 8.25 m from the lower end is 0.992 Hz against the measured 1.00 Hz (their model 1.02 Hz; [Davies et al., 2026](https://cabledyn.readthedocs.io/en/latest/references.html#ref-davies2026), 1.04 Hz). The largest r.m.s. strain is 7.3% above the measured largest (theirs 0.4% below) and the - mean over the 25 stations 3.6% above. The response has one r.m.s. peak more along the span than - the test, as theirs, so the station-by-station ratio scatters. 400 elements and half the time step - change the largest r.m.s. strain by 0.2% and 0.1%. + mean over the 25 stations 3.6% above (theirs 3.0% below). The response has one r.m.s. peak more + along the span than the test, as theirs, so the station-by-station ratio scatters (r.m.s. log + error 0.338, theirs 0.360). 400 elements and half the time step change the largest r.m.s. + strain by 0.2% and 0.1%. + +- **L3-Wh SJTU steel catenary riser, heave-induced cross-flow VIV** + ([Wang et al., 2014](https://cabledyn.readthedocs.io/en/latest/references.html#ref-wang2014); + [Thorsen et al., 2017](https://cabledyn.readthedocs.io/en/latest/references.html#ref-thorsen2017)): + the L3-W riser in still water, its upper end moved along the measured top trajectory (two + sinusoids of 5.96 s fitted to their Fig. 19: x 0.049 m, z 0.130 m), with Thorsen et al.'s set + for this case (C_v 0.8), the strain band-passed from 4 times the motion frequency to 50 Hz as + Wang et al. process the measurement. Without a `VIV FRAME` row, the published model's phase + input, the dominant frequency 8.25 m from the lower end is 1.019 Hz (measured close to 1 Hz), + the largest r.m.s. strain 20.8% above the measured largest (theirs 5.6% above) and the + station mean 33% above (theirs 8.7%). The lower half of the span reads 1.71 times the measured + on average and the upper half 0.93 times; their model has the same pattern, 1.44 and 0.71. + Half the time step and 400 elements change the largest strain by −1.0% and −0.7% and the + station mean by −2.9% and −2.3%, at the same frequency. The heave period is about 6 VIV + periods, below the scale separation a `VIV FRAME` filter needs (about 30), and the result + depends on `Tf`: at 0.35–0.5 s the response stays at 1.01–1.02 Hz with the largest strain + 7–13% high, at 0.75–1 s it moves to 0.88 Hz with the largest strain 3–4% low and the upper half + 0.60–0.63 times the measured, and at 0.5 s half the time step moves it from the first branch + to the second. The default run reproduces the committed record byte for byte. - **L3-N NDP high-mode riser, cross-flow VIV in uniform flow** ([Trim et al., 2005](https://cabledyn.readthedocs.io/en/latest/references.html#ref-trim2005); diff --git a/doc/theory.rst b/doc/theory.rst index 8ce9d1be..c483be99 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1705,10 +1705,12 @@ and model form. The table gives each set with its source and the line-type colum damping :math:`C_{d,y} = 0.31 + 0.89\,y_0/D` (their Eq. 1) - a ``VIV AMPLITUDE`` table (below); ``VIV DAMPING`` ``0.31 0.89 0`` * - :ref:`Thorsen et al. (2017) `: the truncated catenary riser of - :ref:`Wang et al. (2014) ` in uniform current (Re about 3 000) - - :math:`C_v` 0.7, :math:`\hat f_0` 0.18, :math:`\Delta\hat f` 0.08, :math:`C_D` 1.2, - :math:`C_M` 2 - - ``Cl dF cF`` = ``0.7 0.08 0.18``, ``Cd_n`` 1.2, ``Ca_n`` 1.0 (validation case L3-W) + :ref:`Wang et al. (2014) ` in uniform current (Re about 3 000) and under + heave motion of its upper end (Re about 4 000) + - :math:`C_v` 0.7 in the current, 0.8 in heave; :math:`\hat f_0` 0.18, + :math:`\Delta\hat f` 0.08, :math:`C_D` 1.2, :math:`C_M` 2 + - ``Cl dF cF`` = ``0.7 0.08 0.18`` (current) or ``0.8 0.08 0.18`` (heave), ``Cd_n`` 1.2, + ``Ca_n`` 1.0 (validation cases L3-W and L3-Wh) * - :ref:`Ulveseter et al. (2018) `: in-line force at twice the cross-flow frequency - :math:`C_x` 0.85, :math:`\alpha` 0.15, with a cross-flow :math:`C_L` of 0.65 diff --git a/validation/README.md b/validation/README.md index ccda0555..36a42137 100644 --- a/validation/README.md +++ b/validation/README.md @@ -16,7 +16,7 @@ redistributed. | [`RELEASE_0_1_1.md`](RELEASE_0_1_1.md) | The same for v0.1.1 | | [`RELEASE_0_1_0.md`](RELEASE_0_1_0.md) | The same for v0.1.0 | | [`bodies/`](bodies/README.md) | Rigid-body, rod and shared-anchor cases with MoorDyn-C twins, stored references and pass limits | -| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, Wang et al. (2014) catenary-riser VIV, Trim et al. (2005) NDP high-mode riser VIV and de Wilde et al. (2021) FLOTANT power-cable VIV comparisons | +| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, Wang et al. (2014) catenary-riser VIV in current and heave, Trim et al. (2005) NDP high-mode riser VIV and de Wilde et al. (2021) FLOTANT power-cable VIV comparisons | | [`PERFORMANCE_0_1_0.md`](PERFORMANCE_0_1_0.md) | Wall time of CableDyn 0.1.0, MoorDyn-C and MoorDyn-F at equal accuracy on five mooring, cable, buoy and coupled cases | | [`performance/`](performance/README.md) | Same-host wall-clock records of the L5 cases: the resolved lazy-wave spans, the one-hour VolturnUS-S mooring and the tension-only chain | | [`PAPER_REPRODUCTION.md`](PAPER_REPRODUCTION.md) | Every CableDyn result in the journal article, re-run with the release defaults and in paper mode | diff --git a/validation/experiments/README.md b/validation/experiments/README.md index c9b32e25..aac5049e 100644 --- a/validation/experiments/README.md +++ b/validation/experiments/README.md @@ -13,8 +13,8 @@ committed results. | [`bergdahl/`](bergdahl/README.md) | Bergdahl et al. (2016), 33 m dynamically scaled chain | Tension-only mooring chain | | [`chaplin/`](chaplin/README.md) | Chaplin et al. (2005), 13.12 m vertical tension riser, still-water natural frequencies | Finite-EI riser, modal analysis | | [`delta_flume/`](delta_flume/README.md) | Chaplin et al. (2005), 13.12 m vertical tension riser, stepped current, blind-trial cases 1–9 | Finite-EI riser, synchronisation VIV, cross-flow and in-line | -| [`wang_scr/`](wang_scr/README.md) | Wang et al. (2014), truncated steel catenary riser in uniform current, cross-flow VIV | Finite-EI riser, synchronisation VIV | +| [`wang_scr/`](wang_scr/README.md) | Wang et al. (2014), truncated steel catenary riser in uniform current and under heave motion of its upper end, cross-flow VIV | Finite-EI riser, synchronisation VIV | | [`ndp_riser/`](ndp_riser/README.md) | Trim et al. (2005), NDP 38 m high-mode riser in uniform flow, cross-flow VIV with a generic and three published coefficient sets | Finite-EI riser, synchronisation VIV | | [`flotant/`](flotant/README.md) | de Wilde et al. (2021), FLOTANT OD 48 mm power-cable specimen with a clump weight, tow tests and forced-oscillation RAOs, cross-flow and in-line VIV with three published coefficient sets | Finite-EI cable, synchronisation and wake-oscillator VIV | -The results are summarised as cases L3-H, L3-B, L3-C, L3-D, L3-W, L3-N and L3-F in [`VALIDATION.md`](../../VALIDATION.md). +The results are summarised as cases L3-H, L3-B, L3-C, L3-D, L3-W, L3-Wh, L3-N and L3-F in [`VALIDATION.md`](../../VALIDATION.md). diff --git a/validation/experiments/wang_scr/README.md b/validation/experiments/wang_scr/README.md index c420ee21..76894c8c 100644 --- a/validation/experiments/wang_scr/README.md +++ b/validation/experiments/wang_scr/README.md @@ -1,61 +1,228 @@ -# Steel catenary riser in uniform current: cross-flow VIV +# Steel catenary riser: cross-flow VIV in uniform current and under heave -This directory compares CableDyn's cross-flow VIV with the SJTU model test of a truncated steel -catenary riser in a 0.2 m/s uniform current: Wang et al. (2014), -, as Thorsen et al. (2017), -, use it to verify the time-domain synchronisation -model that CableDyn's cross-flow VIV implements. The model runs with their coefficient set for this -case; nothing is fitted to the measurements. +This directory compares CableDyn's cross-flow VIV with the SJTU model tests of a truncated steel +catenary riser: Wang et al. (2014), , as Thorsen +et al. (2017), , use them to verify the +time-domain synchronisation model that CableDyn's cross-flow VIV implements. Both of their cases +are run, each with their published coefficient set for it; nothing is fitted to the measurements. + +- **Uniform current, 0.2 m/s (case L3-W):** the dominant strain frequency 8.25 m from the lower + end is 0.992 Hz against the measured 1.00 Hz (Thorsen et al.'s model 1.02 Hz). The largest r.m.s. + cross-flow strain is 7.3 % above the measured largest (theirs 0.4 % below), the mean over the 25 + stations 3.6 % above (theirs 3.0 % below), and the r.m.s. log error over the stations 0.338 + (theirs 0.360). +- **Heave-induced VIV in still water (case L3-Wh):** with the phase input of the published model + (no `VIV FRAME`), the largest r.m.s. strain is 20.8 % above the measured largest (theirs + 5.6 % above) and the station mean 33 % above (theirs 8.7 % above); the dominant frequency is + 1.019 Hz (measured close to 1 Hz). Over the lower half of the span the strain is 1.71 times + the measured on average, over the upper half 0.93 times; Thorsen et al.'s model has the same + pattern, 1.44 and 0.71. +- **The heave result depends on the `VIV FRAME` filter time `Tf`.** The heave period, 5.96 s, is + about 6 VIV periods, below the scale separation the filter needs (a motion period of at least + about 30 VIV periods; [`VIV FRAME`](../../../doc/driver_format.md)). With `Tf` from 0.35 to 1 s + the response falls on one of two branches, about 1.02 Hz or 0.88 Hz, and at `Tf` 0.5 s halving + the time step moves it from the first to the second. The `Tf` runs are a sensitivity, not the + result. ## Model and data -- **Riser (Thorsen et al. 2017, Table 1):** - - length 23.71 m, between universal joints (pinned); - - the top 21.0425 m horizontally and 9 m vertically from the lower end, with a 2.626 m flowline on - the seabed; - - D 0.024 m, 0.69 kg/m (a solid section: no internal water is added), EI 10.5 N m², EA 6.66e5 N. -- **Seabed:** 1 (kN/m)/m in compression (`kBot` = 1000/D), friction 0.2. -- **Current:** 0.2 m/s along the riser plane, from the lower end towards the top. -- **VIV (their set for this case):** C_v 0.7 (their choice for Re ≈ 3000), f̂0 0.18, Δf̂ 0.08, - cross-flow only; C_D 1.2, C_M 2. -- **Measurements:** `measured_rms_strain.csv` holds the 25 measured r.m.s. dynamic cross-flow strains - at the outer surface (Thorsen et al. 2017, Fig. 17), read from the vector figure. The axes are - calibrated on its tick marks; as a check, the simulated maximum of the same figure reads 99.6 % of - the measured one, as their text states. The measured dominant strain frequency 8.25 m from the - lower end is 1.00 Hz (their Fig. 18). -- **Assumed:** the top joint 0.5 m below the surface (not given; the current is uniform). -- **CableDyn:** 200 elements, dt 0.005 s, 150 s, statistics over t > 30 s. The cross-flow curvature - is the section component with no static mean (the in-plane one carries the catenary curvature); - strain = κ D/2. +- **Riser (Thorsen et al. 2017, Table 1; Wang et al. 2014, Table 2):** + - length 23.71 m, between universal joints (moment free); + - the top 21.0425 m horizontally and 9 m vertically from the lower end, with a 2.626 m flowline + on the fake seabed; + - D 0.024 m, 0.69 kg/m (a solid section of coating, PPR pipe and copper core: no internal water + is added), EI 10.5 N m², EA 6.66e5 N (Thorsen et al.; Wang et al. give 6.67e5 N). +- **Seabed (Thorsen et al. 2017, Sec. 5.1):** 1 (kN/m)/m in compression (`kBot` = 1000/D), + friction 0.2. +- **Coefficients (Thorsen et al.'s sets):** C_v 0.7 in the current (their choice for Re ≈ 3000) + and 0.8 in heave (Re ≈ 4000, from the largest r.m.s. in-plane velocity of their model, + 0.16 m/s); f̂0 0.18, Δf̂ 0.08, cross-flow only; C_D 1.2, C_M 2. +- **Assumed:** the top joint 0.5 m below the surface, in 9.5 m of water (not given). +- **CableDyn:** one finite-EI line, 200 elements, dt 0.005 s (Thorsen et al.'s step; they use 500 + elements). + +### Uniform current (Thorsen et al. 2017, Sec. 5.1) + +- **Current:** 0.2 m/s along the riser plane, from the lower end towards the top. In the test the + top and the seabed moved together on tracks through still water. +- **Run:** 150 s, statistics over t > 30 s (frequency resolution 0.0083 Hz). +- **Measured:** the r.m.s. dynamic cross-flow strain at the outer surface at the 25 stations + (Fig. 17), and the dominant strain frequency 8.25 m from the lower end, 1.00 Hz (Fig. 18). + Thorsen et al.'s model: 99.6 % of the measured largest r.m.s. strain (their text), 1.02 Hz. + +### Heave-induced VIV (Thorsen et al. 2017, Sec. 5.2) + +- **Top motion:** the measured x and z motion of the upper end (Fig. 19, top panel), fitted with + sinusoids of the period the text gives, 5.96 s: x amplitude 0.0485 m, z amplitude 0.1305 m, x + lagging z by 83°; the residuals of the fits are 3 and 7 mm, about the width of the plotted + lines. The motion is prescribed about the static position, ramped in over two periods, in still + water. Thorsen et al. prescribe the measured motion itself; Wang et al. drove the top along + trajectories they computed for pure heave of the full-length riser. +- **Run:** 200 s, statistics over t > 40 s (frequency resolution 0.0063 Hz). +- **Processing, as Wang et al. (2014, Sec. 3.1) process the measurement:** the cross-flow strain + band-passed from 4 times the motion frequency (0.67 Hz) to 50 Hz. +- **Measured:** the r.m.s. cross-flow strain at the 25 stations (Fig. 22; the largest, 5.96e-5, + at s 2.84 m); the dominant frequency 8.25 m from the lower end "close to 1 Hz" (Fig. 23 and + text). Thorsen et al.'s model: 6 % above the measured largest (their text), also close to 1 Hz. +- **`VIV FRAME`:** without the row the synchronisation phase reads the node's velocity across the + relative flow, as the published model does. A row with `Tf` > 0 takes the node's velocity less + its low-pass filtered value, so that the slow motion counts as flow; the runs at `Tf` 0.35, + 0.5, 0.75 and 1 s, and at 0.5 s with half the time step, measure how the result depends on it. + +### Analysis (`wang_scr_viv.py`) + +- The section axis x of a line not restrained in torsion starts at End A as global +z projected + normal to the line and is carried along it, so `CurvX` is the in-plane (catenary) curvature + and `CurvY` the cross-flow one; the script checks this on their static means. Strain = κ D/2, + the outer-surface strain of Figs. 17 and 22; arc length s from the lower end. +- The r.m.s. strain is compared with the measured values at the stations (linear interpolation + between nodes); the ratio is CableDyn over measured, and the r.m.s. log error + √(mean (ln ratio)²). The lower half of the span is stations 1–13 (s < 11.855 m), the upper half + stations 14–25. Thorsen et al.'s simulated line is scored the same way. +- The dominant frequency is the peak of the Hann-windowed spectrum of the strain at the node + nearest 8.25 m. In heave, the shares of that spectrum in 0.80–0.95 Hz and 0.95–1.10 Hz tell the + two response branches apart. + +### Data + +`extract_thorsen2017.py` reads Thorsen et al.'s PDF (not distributed; PyMuPDF, NumPy and Pillow): + +- `thorsen2017_fig17.csv`, `thorsen2017_fig22.csv`: the measured points and Thorsen et al.'s + simulated line of Figs. 17 and 22, read from the vector graphics. The tick labels are glyph + outlines, so the axes are calibrated on the tick marks. As a check, the simulated line peaks at + 99.6 % (Fig. 17) and 105.6 % (Fig. 22) of the measured largest value, where the text gives + 99.6 % and 6 % too high. +- `thorsen2017_fig19_top.csv`, `thorsen2017_fig19_fit.json`: the top motion of Fig. 19, a raster + image, traced by colour (742 and 738 pixel columns over t 30–50 s), with the axis calibrated on + the dotted grid lines, and the fitted sinusoids. + +The data are digitised from the article; its figures are not reproduced. ## Reproduce From the repository root, with `path/to/cabledyn.exe` the release executable or a local build: ```powershell -python validation/experiments/wang_scr/wang_scr_uniform_current.py ` - path/to/cabledyn.exe validation/experiments/wang_scr/work ` +python validation/experiments/wang_scr/wang_scr_viv.py ` + path/to/cabledyn.exe validation/experiments/wang_scr/work --jobs 11 ` --summary validation/experiments/wang_scr ``` -`--segments` and `--dt` change the mesh and the time step. +The default is the committed record: the 11 runs of the tables below, about 5 minutes with 11 +parallel runs on a 24-core workstation. Run into a new work directory with the executable of +`summary.json`, it reproduces `response_comparison.csv` and `summary.json` byte for byte. +`--runs` selects runs by name (a comma list: `current`, `current_dt2`, `current_n400`, `heave`, +`heave_dt2`, `heave_n400`, `heave_tf0.35`, `heave_tf0.5`, `heave_tf0.75`, `heave_tf1`, +`heave_tf0.5_dt2`). A run whose folder holds the same input files and executable is not +repeated; `--keep` keeps the output tables (100–400 MB a run). ## Results -| | CableDyn | Measured | Thorsen et al. (2017) | Davies et al. (2026) | -| --- | --- | --- | --- | --- | -| Dominant cross-flow strain frequency, 8.25 m from the lower end | **0.992 Hz** (±0.008) | 1.00 Hz | 1.02 Hz | 1.04 Hz | -| Maximum r.m.s. strain / measured maximum | **1.073** | 1 | 0.996 | - | -| Mean ratio at the 25 stations | 1.036 | 1 | - | - | -| r.m.s. peaks along the span | 7 | 6 | 7 | - | - -- **Frequency:** within the 0.008 Hz resolution of the measured value. -- **Strain magnitude:** the largest r.m.s. strain is 7 % above the measured largest, and the mean - over the stations 4 % above. -- **Spatial pattern:** the predicted response has one r.m.s. peak more along the span than the test - (7 against 6), as in Thorsen et al. (2017). So the peaks and troughs fall at different stations, - and the station-by-station ratio scatters (`rms_strain_comparison.csv`, r.m.s. log error 0.34). -- **Convergence:** 400 elements and half the time step change the maximum ratio by 0.2 % and 0.1 % - and leave the frequency unchanged (`provenance.json`). +`response_comparison.csv` holds the r.m.s. strain of every run, and of Thorsen et al.'s line, at +the 25 stations; `summary.json` the statistics, the top motion and the SHA-256 of the +executable; `provenance.json` the sources and the build. + +### Uniform current (L3-W) + +| | Largest r.m.s. strain / measured largest | Station mean ratio | r.m.s. log error | Lower / upper half mean ratio | f at 8.25 m | r.m.s. peaks along the span | +| --- | --- | --- | --- | --- | --- | --- | +| Measured | 1 | 1 | 0 | 1 / 1 | 1.00 Hz | 6 | +| CableDyn | **1.073** (s 14.0 m) | 1.036 | 0.338 | 0.947 / 1.133 | **0.992 Hz** (±0.008) | 7 | +| Thorsen et al. (2017) | 0.996 (s 14.1 m) | 0.970 | 0.360 | 0.879 / 1.068 | 1.02 Hz | 7 | + +- **Frequency:** within the 0.008 Hz resolution of the measured value; Thorsen et al.'s model is + 0.02 Hz above it. +- **Strain magnitude:** the largest r.m.s. strain is 7.3 % above the measured largest, and the + station mean 3.6 % above; Thorsen et al.'s are 0.4 % and 3.0 % below. +- **Spatial pattern:** CableDyn and Thorsen et al.'s model have one r.m.s. peak more along the + span than the test (7 against 6), so the peaks and troughs fall at different stations and the + station ratios scatter (0.41–1.71; Thorsen et al.'s 0.34–1.61). Station by station CableDyn's + r.m.s. strain is 1.07 times Thorsen et al.'s on average (0.87–1.20). + +### Heave-induced VIV (L3-Wh) + +The primary result is the run without `VIV FRAME`, the published model's phase input: + +| | Largest r.m.s. strain / measured largest | Station mean ratio | r.m.s. log error | Lower / upper half mean ratio | f at 8.25 m | +| --- | --- | --- | --- | --- | --- | +| Measured | 1 (s 2.84 m) | 1 | 0 | 1 / 1 | close to 1 Hz | +| CableDyn, no `VIV FRAME` | **1.208** (s 7.2 m) | 1.334 | 0.460 | 1.710 / 0.927 | **1.019 Hz** | +| Thorsen et al. (2017) | 1.056 (s 8.2 m) | 1.087 | 0.406 | 1.438 / 0.708 | close to 1 Hz | + +- **Frequency:** 1.019 Hz; 61 % of the band-passed spectrum at 8.25 m lies in 0.95–1.10 Hz and + 1 % in 0.80–0.95 Hz. +- **Strain magnitude:** the largest r.m.s. strain is 20.8 % above the measured largest, at s + 7.2 m instead of 2.84 m; Thorsen et al.'s is 5.6 % above, at s 8.2 m. +- **The lower half reads high:** over stations 1–13 the strain is 1.71 times the measured on + average, over stations 14–25 0.93 times. Thorsen et al. report the same pattern, "over-predicted + for the lower part and under-predicted for the upper half"; their line gives 1.44 and 0.71. + Station 1 (s 1.04 m, next to the lower joint, measured 0.57e-5) contributes most: 5.08 times + the measured value (Thorsen et al. 3.10); without it the lower-half means are 1.43 and 1.30. + Over the upper half CableDyn is closer to the measurement than Thorsen et al.'s model (0.93 + against 0.71). + +#### Sensitivity to the `VIV FRAME` filter time + +| `Tf` (s) | dt (s) | Largest r.m.s. strain / measured largest | Station mean ratio | Lower / upper half mean ratio | f at 8.25 m (Hz) | Spectral share 0.80–0.95 / 0.95–1.10 Hz | +| --- | --- | --- | --- | --- | --- | --- | +| none | 0.005 | 1.208 | 1.334 | 1.710 / 0.927 | 1.019 | 0.01 / 0.61 | +| 0.35 | 0.005 | 1.128 | 1.279 | 1.667 / 0.860 | 1.012 | 0.17 / 0.52 | +| 0.5 | 0.005 | 1.069 | 1.219 | 1.584 / 0.824 | 1.019 | 0.17 / 0.52 | +| 0.5 | 0.0025 | 0.972 | 1.107 | 1.454 / 0.731 | 0.894 | 0.59 / 0.22 | +| 0.75 | 0.005 | 0.967 | 1.029 | 1.400 / 0.628 | 0.881 | 0.69 / 0.14 | +| 1.0 | 0.005 | 0.958 | 1.009 | 1.390 / 0.596 | 0.881 | 0.71 / 0.12 | + +- **Two branches:** `Tf` ≤ 0.5 s at dt 0.005 s keeps the response at 1.01–1.02 Hz with the largest + strain 1.07–1.21 times the measured; `Tf` ≥ 0.75 s moves it to 0.88 Hz, the largest strain + 0.96–0.97 times the measured, at s 4.4 m, and the station mean to 1.01–1.03. At `Tf` 0.5 s, + halving the time step moves the response from the first branch to the second (largest strain + 1.069 to 0.972, f 1.019 to 0.894 Hz). +- **On the lower branch the strain distribution departs further from the measured one:** the + r.m.s. log error rises from 0.460 to 0.49–0.52 and the upper-half mean falls to 0.60–0.63, so + the station mean near 1 comes from a high lower half and a low upper half. +- **Why no `Tf` separates the scales:** the first-order filter keeps the fraction + ωTf/√(1 + (ωTf)²) of the VIV velocity in the phase input and leaves the same fraction of the + motion's velocity, at the motion frequency, in it. At the VIV frequency (1.02 Hz) and the heave + frequency (0.168 Hz): + + | `Tf` (s) | VIV velocity kept | Heave velocity left in the phase input | + | --- | --- | --- | + | 0.35 | 0.913 | 0.346 | + | 0.5 | 0.955 | 0.466 | + | 0.75 | 0.979 | 0.620 | + | 1.0 | 0.988 | 0.726 | + + Keeping 95 % of the VIV velocity while leaving at most 10 % of the motion's needs a motion + period of at least about 30 VIV periods; here it is about 6. Every `Tf` that keeps the VIV + velocity leaves 35–73 % of the heave velocity in the phase input, against 100 % without the row. + +### Convergence + +Re-run on this build (`summary.json`, runs `*_dt2` and `*_n400`): + +- **Uniform current:** half the time step and 400 elements change the largest r.m.s. strain by + +0.13 % and +0.24 %, the station mean by at most 0.05 %, and leave the frequency and the number + of peaks unchanged. +- **Heave, no `VIV FRAME`:** half the time step and 400 elements change the largest r.m.s. + strain by −1.0 % and −0.7 %, the station mean by −2.9 % and −2.3 %, the upper-half mean by + −5.8 % and −4.2 %, and leave the frequency (1.019 Hz) and the branch unchanged. +- **Heave with `VIV FRAME` `Tf` 0.5 s:** not converged in the time step; it changes branch (above). + +## Limitations + +- The heave case tests the model in a regime where its phase input is not defined uniquely: the + published model reads the node's velocity in the earth frame, and a filtered frame cannot + separate a motion only about 6 VIV periods long. Over the runs here the largest strain moves + by up to 21 % and the frequency by up to 14 % with that choice. +- The cause of the lower-half excess in heave is not identified. It is larger than in Thorsen et + al.'s model; the depth of the top joint, the seabed contact and the static procedure (Thorsen + et al. reach the static shape by a prescribed top displacement) differ from theirs or are + assumed. +- The top motion is a two-sinusoid fit to a raster figure; the measured motion's higher + harmonics (residual r.m.s. 3–7 mm, about the plotted line width) are not reproduced. +- Thorsen et al. do not state which case of the Wang et al. (2014) test matrix their heave case + is; the comparison uses the top motion and strains they plot. +- The measured strains were taken at a diameter of 19.5 mm and scaled to the outer surface by + Thorsen et al.; the uncertainties of the measurements are not published. diff --git a/validation/experiments/wang_scr/extract_thorsen2017.py b/validation/experiments/wang_scr/extract_thorsen2017.py new file mode 100644 index 00000000..4c36d5b5 --- /dev/null +++ b/validation/experiments/wang_scr/extract_thorsen2017.py @@ -0,0 +1,219 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Read the Wang et al. (2014) riser data of Thorsen, Saevik & Larsen (2017) from the article's PDF. + +The PDF is not distributed; this script documents how the committed CSV and JSON files were read +from it (PyMuPDF, NumPy and Pillow): + +- Fig. 17 (uniform current, PDF page 14) and Fig. 22 (heave-induced VIV, PDF page 16), vector + graphics: the measured r.m.s. dynamic cross-flow strains (4 x 4 pt stroked squares, the legend + square removed) and the simulated line of Thorsen et al. (two polylines of 200-300 straight + segments each, joined at s 9.5 m; their vertices). + The tick labels are glyph outlines, not text, so the axes are calibrated on the tick marks: + x 0, 5, ..., 25 m; y 0, 1, ..., 6 x 1e-5 (Fig. 17) and 0, 2, ..., 8 x 1e-5 (Fig. 22). + -> thorsen2017_fig17.csv, thorsen2017_fig22.csv (series measured or thorsen2017) +- Fig. 19 top panel (PDF page 15), a raster image: the measured x (red) and z (blue) + displacement of the riser's upper end, t 30-50 s. The panel's frame is found from its dark + pixels, the time axis spans the frame, the displacement axis is calibrated on the dotted grid + lines at -0.1, 0 and 0.1 m, and each colour gives one median row per pixel column. A sinusoid + of the period the text gives (5.96 s) is fitted to each component by least squares. + -> thorsen2017_fig19_top.csv, thorsen2017_fig19_fit.json + + python extract_thorsen2017.py THORSEN2017.pdf [--check fig19_check.png] + +Source: M.J. Thorsen, S. Saevik, C.M. Larsen (2017), Non-linear time domain analysis of +cross-flow vortex-induced vibrations, Marine Structures 51, 134-151, +https://doi.org/10.1016/j.marstruc.2016.10.007 +""" + +from __future__ import annotations + +import argparse +import csv +import io +import json +from pathlib import Path + +import numpy as np +import pymupdf +from PIL import Image + +HERE = Path(__file__).resolve().parent +PERIOD = 5.96 # s, the top motion period of Sec. 5.2 + + +def strain_figure(page, y_top: float, name: str) -> None: + """Measured squares and the simulated line of an r.m.s. strain figure in the lower part of + a page; y_top is the strain at the highest tick mark.""" + h = page.rect.height + dr = [g for g in page.get_drawings() if g["rect"].y0 > 0.6 * h] + strokes = [g for g in dr if g["type"] == "s"] + frame = max( + (g for g in strokes if len(g["items"]) == 2), key=lambda g: g["rect"].width + )["rect"] + xt = sorted( + { + round(g["rect"].x0, 2) + for g in strokes + if g["rect"].width < 0.1 + and 1.5 < g["rect"].height < 2.5 + and abs(g["rect"].y1 - frame.y1) < 3 + } + ) + yt = sorted( + { + round(g["rect"].y0, 2) + for g in strokes + if g["rect"].height < 0.1 + and 1.5 < g["rect"].width < 2.5 + and abs(g["rect"].x0 - frame.x0) < 3 + }, + reverse=True, + ) + assert len(xt) == 6, xt + assert len(yt) >= 5, yt + + def fx(x: float) -> float: + return (x - xt[0]) / (xt[-1] - xt[0]) * 25.0 + + def fy(y: float) -> float: + return (yt[0] - y) / (yt[0] - yt[-1]) * y_top + + squares = [ + g["rect"] + for g in strokes + if abs(g["rect"].width - 4.0) < 0.4 and abs(g["rect"].height - 4.0) < 0.4 + ] + # the legend square, in the upper right corner of the frame + squares = [ + r + for r in squares + if not ( + r.x0 > frame.x0 + 0.7 * frame.width and r.y1 < frame.y0 + 0.3 * frame.height + ) + ] + measured = sorted((fx((r.x0 + r.x1) / 2), fy((r.y0 + r.y1) / 2)) for r in squares) + # the simulated line is drawn as two polylines of straight segments, joined at x 254.7 pt + pts = set() + for line in strokes: + if len(line["items"]) >= 20 and all(it[0] == "l" for it in line["items"]): + for it in line["items"]: + pts.update(((it[1].x, it[1].y), (it[2].x, it[2].y))) + sim = sorted((fx(x), fy(y)) for x, y in pts) + with open(HERE / name, "w", newline="", encoding="utf-8") as fh: + w = csv.writer(fh, lineterminator="\n") + w.writerow(["series", "s_m", "rms_strain"]) + for series, data in (("measured", measured), ("thorsen2017", sim)): + w.writerows((series, round(a, 4), f"{b:.4e}") for a, b in data) + peak = max(measured, key=lambda p: p[1]) + print( + f"{name}: {len(measured)} measured points, max {peak[1]:.3e} at s {peak[0]:.2f} m; " + f"simulated line {len(sim)} points, max {max(v for _, v in sim):.3e} " + f"({100 * max(v for _, v in sim) / peak[1]:.1f} % of the measured max)" + ) + + +def top_motion(doc, check: Path | None) -> None: + page = doc[14] + big = max(page.get_image_info(xrefs=True), key=lambda i: i["width"] * i["height"]) + img = Image.open(io.BytesIO(doc.extract_image(big["xref"])["image"])).convert("RGB") + a = np.asarray(img).astype(int) + r, g, b = a[..., 0], a[..., 1], a[..., 2] + red = (r > 180) & (g < 110) & (b < 110) + blue = (b > 180) & (r < 110) & (g < 140) + dark = (r < 90) & (g < 90) & (b < 90) + # the top panel lies above the strain contour plot: the first row where coloured pixels + # fill more than 30 % of the width + colour = (np.abs(r - g) > 60) | (np.abs(g - b) > 60) | (np.abs(r - b) > 60) + top_end = int(np.flatnonzero(colour.mean(axis=1) > 0.3)[0]) - 8 + red[top_end:] = False + blue[top_end:] = False + rows = np.flatnonzero(red.any(axis=1)) + r0, r1 = rows.min(), rows.max() + # the panel frame: dark columns with long vertical runs over the red rows + band = dark[max(0, r0 - 40) : r1 + 40] + cand = np.flatnonzero(band.sum(axis=0) > 0.6 * band.shape[0]) + x0, x1 = cand.min(), cand.max() + hor = np.flatnonzero(dark[:, x0:x1].sum(axis=1) > 0.6 * (x1 - x0)) + hor = hor[(hor > r0 - 60) & (hor < r1 + 60)] + y_top, y_bot = hor.min(), hor.max() + # dotted grid lines: rows inside the frame with many dark pixels + darkish = (r < 140) & (g < 140) & (b < 140) & ~red & ~blue + inner = darkish[y_top + 4 : y_bot - 3, x0 + 4 : x1 - 3].sum(axis=1) + grid = np.flatnonzero(inner > 0.04 * (x1 - x0)) + y_top + 4 + groups = np.split(grid, np.flatnonzero(np.diff(grid) > 2) + 1) + gy = sorted(float(gr.mean()) for gr in groups if gr.size) + assert len(gy) == 3, gy # 0.1, 0 and -0.1 m from the top + + def disp(row: float) -> float: + return 0.1 - (row - gy[0]) / (gy[2] - gy[0]) * 0.2 + + def time(col: int) -> float: + return 30.0 + (col - x0) / (x1 - x0) * 20.0 + + w = 2 * np.pi / PERIOD + fit, traces = {}, {} + for name, mask in (("x", red), ("z", blue)): + cols, vals = [], [] + for c in range(x0 + 2, x1 - 1): + rr = np.flatnonzero(mask[y_top:y_bot, c]) + if rr.size: + cols.append(time(c)) + vals.append(disp(y_top + float(np.median(rr)))) + t, y = np.array(cols), np.array(vals) + basis = np.column_stack([np.sin(w * t), np.cos(w * t), np.ones_like(t)]) + coef, *_ = np.linalg.lstsq(basis, y, rcond=None) + resid = y - basis @ coef + fit[name] = { + "amp_m": float(np.hypot(coef[0], coef[1])), + "phase_rad": float(np.arctan2(coef[1], coef[0])), + "mean_m": float(coef[2]), + "rms_resid_m": float(resid.std()), + "n": int(t.size), + } + traces[name] = (t, y) + print( + f"{name}: amplitude {fit[name]['amp_m']:.4f} m, phase " + f"{np.degrees(fit[name]['phase_rad']):.2f} deg (A sin(w t + phase) + mean), " + f"residual r.m.s. {resid.std():.4f} m over {t.size} columns" + ) + (HERE / "thorsen2017_fig19_fit.json").write_text( + json.dumps({**fit, "period_s": PERIOD}, indent=1) + "\n", + encoding="utf-8", + newline="\n", + ) + with open( + HERE / "thorsen2017_fig19_top.csv", "w", newline="", encoding="utf-8" + ) as fh: + fh.write("component,t_s,disp_m\n") + for name, (t, y) in traces.items(): + fh.writelines( + f"{name},{tt:.4f},{yy:.5f}\n" for tt, yy in zip(t, y, strict=True) + ) + if check is not None: # the fitted sinusoids drawn over the image + chk = img.copy() + px = chk.load() + for v in fit.values(): + for c in range(x0, x1): + yy = v["amp_m"] * np.sin(w * time(c) + v["phase_rad"]) + v["mean_m"] + row = round(gy[0] + (0.1 - yy) / 0.2 * (gy[2] - gy[0])) + if 0 <= row < chk.height: + px[c, row] = (0, 0, 0) + box = (max(0, x0 - 60), max(0, y_top - 20), min(chk.width, x1 + 20), y_bot + 40) + chk.crop(box).save(check) + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + ap.add_argument("pdf") + ap.add_argument("--check", type=Path, default=None, help="PNG of the Fig. 19 fit") + a = ap.parse_args() + doc = pymupdf.open(a.pdf) + strain_figure(doc[13], 6.0e-5, "thorsen2017_fig17.csv") + strain_figure(doc[15], 8.0e-5, "thorsen2017_fig22.csv") + top_motion(doc, a.check) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/wang_scr/measured_rms_strain.csv b/validation/experiments/wang_scr/measured_rms_strain.csv deleted file mode 100644 index 6e123aaf..00000000 --- a/validation/experiments/wang_scr/measured_rms_strain.csv +++ /dev/null @@ -1,26 +0,0 @@ -s_m,rms_strain -1.044,4.5870e-05 -1.9427,3.5715e-05 -2.8415,3.9650e-05 -3.7493,5.3852e-05 -4.6479,4.5683e-05 -5.5467,2.5858e-05 -6.4454,2.9980e-05 -7.3441,4.7144e-05 -8.2428,5.1266e-05 -9.1416,3.9199e-05 -10.0493,2.9081e-05 -10.9479,4.0136e-05 -11.8468,4.8156e-05 -12.7454,4.5607e-05 -13.6441,3.3653e-05 -14.5428,3.3615e-05 -15.4416,4.0436e-05 -16.3494,4.2572e-05 -17.2481,3.9012e-05 -18.1467,2.5709e-05 -19.0456,2.8369e-05 -19.9442,3.7176e-05 -20.8429,3.3653e-05 -21.7416,2.8107e-05 -22.6495,2.2223e-05 diff --git a/validation/experiments/wang_scr/provenance.json b/validation/experiments/wang_scr/provenance.json index e2f3ebdc..a32d20a5 100644 --- a/validation/experiments/wang_scr/provenance.json +++ b/validation/experiments/wang_scr/provenance.json @@ -1,10 +1,18 @@ { - "source": "Wang, Fu, Baarholm, Wu & Larsen (2014), Marine Structures 39, 131-156 (the model riser, Table 2); Thorsen, Saevik & Larsen (2017), Marine Structures 51, 134-151 (Table 1, Sec. 5.1, Figs. 17-18)", + "source": "Wang, Fu, Baarholm, Wu & Larsen (2014), Fatigue damage of a steel catenary riser from vortex-induced vibration caused by vessel motions, Marine Structures 39, 131-156 (Table 2, the model riser; Sec. 3.1, the band-pass of the measured strain); Thorsen, Saevik & Larsen (2017), Non-linear time domain analysis of cross-flow vortex-induced vibrations, Marine Structures 51, 134-151 (Table 1; Secs. 5.1 and 5.2; Figs. 17, 18, 19, 22 and 23)", "doi": ["10.1016/j.marstruc.2014.07.002", "10.1016/j.marstruc.2016.10.007"], - "data_used": "the model riser properties; the 25 measured r.m.s. dynamic cross-flow strains of Fig. 17 (read from the vector figure, axes calibrated on its tick marks; the simulated maximum of the same figure reads 99.6 % of the measured one, as the text states); the measured dominant frequency 1.00 Hz 8.25 m from the lower end", - "coefficients": "Thorsen et al. (2017) for this case, not tuned: Cv 0.7, f0 0.18, df 0.08 (cross-flow only), CD 1.2, CM 2", - "CableDyn_commit": "4b94321 (dev) with the mid-point VIV phase update", - "validation_date": "2026-11-16", + "bibliographic_data": "authors, titles, journal, volume, year, pages and DOI from the first page of each article's PDF (Wang et al. 2014, PDF page 1, printed page 131; Thorsen et al. 2017, PDF page 1, printed page 134)", + "pdf_sha256": { + "thorsen2017": "b0c565301a775ed157bbbb5dc89853bbc02d534e2c162555b102b12fe3471b57", + "wang2014": "87883edf10c87b004fa6af7774665683cd252d391925ab4658dd408034fe7644" + }, + "data_used": "riser properties (Thorsen et al. 2017, Table 1; Wang et al. 2014, Table 2, which gives EA 6.67e5 N against Thorsen et al.'s 6.66e5 N); seabed stiffness and friction, time step and coefficient sets (Thorsen et al. 2017, Secs. 5.1 and 5.2); the 25 measured r.m.s. dynamic cross-flow strains and Thorsen et al.'s simulated line in uniform current (Fig. 17, PDF page 14) and in heave (Fig. 22, PDF page 16); the measured dominant frequency 8.25 m from the lower end, 1.00 Hz in current (Fig. 18) and close to 1 Hz in heave (Fig. 23 and text); the measured top motion in heave (Fig. 19 top panel, PDF page 15) and its period 5.96 s (text); the band-pass from 4 times the motion frequency to 50 Hz (Wang et al. 2014, Sec. 3.1)", + "extraction": "extract_thorsen2017.py: Figs. 17 and 22 are vector graphics; the axes are calibrated on the tick marks (the tick labels are glyph outlines), the measured points are the 4 x 4 pt stroked squares (legend square removed), Thorsen et al.'s line the vertices of its two polylines; as a check the line peaks at 99.6 % (Fig. 17) and 105.6 % (Fig. 22) of the measured largest value, where the text gives 99.6 % and 6 % too high. Fig. 19 is a raster image: the top panel's frame from its dark pixels, the time axis 30-50 s across it, the displacement axis on the dotted grid lines at -0.1, 0 and 0.1 m; the red (x) and blue (z) traces as one median row per pixel column (742 and 738 columns); sinusoids of period 5.96 s fitted by least squares: x 0.0485 m, z 0.1305 m, x lagging z by 83.3 deg, residual r.m.s. 3.3 and 7.1 mm", + "assumptions": "the top joint 0.5 m below the surface in 9.5 m of water (not given); the heave top motion as the two fitted sinusoids about the static position (the fitted means, 4.8 and 1.6 mm, dropped), ramped in over two periods with a half-cosine; the static shape from CableDyn's static solve between the two joints (Thorsen et al. reach it by a prescribed top displacement)", + "coefficients": "Thorsen et al. (2017), not tuned: uniform current Cv 0.7 (Re about 3000), heave Cv 0.8 (Re about 4000); f0 0.18, df 0.08, cross-flow only; CD 1.2, CM 2 (Ca 1)", + "processing": "cross-flow curvature CurvY at every node (the script checks that CurvX carries the static catenary curvature); strain = kappa D/2; current: r.m.s. of the strain less its mean over t > 30 s of 150 s; heave: the strain band-passed (FFT) from 4/5.96 Hz to 50 Hz over t > 40 s of 200 s; station values by linear interpolation along the arc length from the lower end; dominant frequency from the Hann-windowed spectrum at the node nearest 8.25 m; lower half stations 1-13 (s < 11.855 m)", + "CableDyn_commit": "dca9e29 (dev)", + "validation_date": "2026-11-17", "executable_name": "cabledyn.exe", "executable_sha256": "see summary.json", "compiler": "GNU Fortran 16.2.0", @@ -12,8 +20,5 @@ "platform": "Windows 11 x86-64", "segments": 200, "dt_s": 0.005, - "sensitivity": { - "segments_400": {"max_ratio": 1.0759, "mean_ratio_at_stations": 1.0365, "dominant_frequency_hz": 0.9917}, - "dt_0p0025": {"max_ratio": 1.0747, "mean_ratio_at_stations": 1.0365, "dominant_frequency_hz": 0.9917} - } + "reproduction": "the default command, run into a new work directory with the executable of summary.json, reproduces response_comparison.csv and summary.json byte for byte; the convergence runs (*_dt2, *_n400) and the VIV FRAME sensitivity runs (heave_tf*) are part of the default and of summary.json" } diff --git a/validation/experiments/wang_scr/response_comparison.csv b/validation/experiments/wang_scr/response_comparison.csv new file mode 100644 index 00000000..cd95da4f --- /dev/null +++ b/validation/experiments/wang_scr/response_comparison.csv @@ -0,0 +1,276 @@ +run,part,segments,dt_s,viv_frame_Tf_s,station,s_m,measured_rms_strain,cabledyn_rms_strain,cabledyn_ratio,thorsen2017_rms_strain,thorsen2017_ratio +current,current,200,0.005,0.0,1,1.0440,4.5870e-05,1.8728e-05,0.4083,1.5790e-05,0.3442 +current,current,200,0.005,0.0,2,1.9427,3.5715e-05,4.0661e-05,1.1385,4.6801e-05,1.3104 +current,current,200,0.005,0.0,3,2.8415,3.9650e-05,3.2307e-05,0.8148,2.6955e-05,0.6798 +current,current,200,0.005,0.0,4,3.7493,5.3852e-05,4.7825e-05,0.8881,4.3682e-05,0.8111 +current,current,200,0.005,0.0,5,4.6479,4.5683e-05,3.3000e-05,0.7224,3.3051e-05,0.7235 +current,current,200,0.005,0.0,6,5.5467,2.5858e-05,1.8539e-05,0.7170,1.6756e-05,0.6480 +current,current,200,0.005,0.0,7,6.4454,2.9980e-05,4.1568e-05,1.3865,3.5759e-05,1.1928 +current,current,200,0.005,0.0,8,7.3441,4.7144e-05,4.9799e-05,1.0563,4.5382e-05,0.9626 +current,current,200,0.005,0.0,9,8.2428,5.1266e-05,3.4437e-05,0.6717,3.3722e-05,0.6578 +current,current,200,0.005,0.0,10,9.1416,3.9199e-05,2.6991e-05,0.6886,2.4669e-05,0.6293 +current,current,200,0.005,0.0,11,10.0493,2.9081e-05,4.7442e-05,1.6314,4.1827e-05,1.4383 +current,current,200,0.005,0.0,12,10.9479,4.0136e-05,5.3466e-05,1.3321,4.8831e-05,1.2166 +current,current,200,0.005,0.0,13,11.8468,4.8156e-05,4.1015e-05,0.8517,3.9045e-05,0.8108 +current,current,200,0.005,0.0,14,12.7454,4.5607e-05,4.0325e-05,0.8842,3.6560e-05,0.8016 +current,current,200,0.005,0.0,15,13.6441,3.3653e-05,5.5747e-05,1.6565,5.0901e-05,1.5125 +current,current,200,0.005,0.0,16,14.5428,3.3615e-05,5.4845e-05,1.6316,5.1790e-05,1.5407 +current,current,200,0.005,0.0,17,15.4416,4.0436e-05,4.0492e-05,1.0014,3.9772e-05,0.9836 +current,current,200,0.005,0.0,18,16.3494,4.2572e-05,3.8411e-05,0.9023,3.6785e-05,0.8641 +current,current,200,0.005,0.0,19,17.2481,3.9012e-05,4.6689e-05,1.1968,4.3691e-05,1.1199 +current,current,200,0.005,0.0,20,18.1467,2.5709e-05,4.3858e-05,1.7059,4.1379e-05,1.6095 +current,current,200,0.005,0.0,21,19.0456,2.8369e-05,3.0204e-05,1.0647,2.9541e-05,1.0413 +current,current,200,0.005,0.0,22,19.9442,3.7176e-05,2.4982e-05,0.6720,2.3998e-05,0.6455 +current,current,200,0.005,0.0,23,20.8429,3.3653e-05,2.9929e-05,0.8893,2.7996e-05,0.8319 +current,current,200,0.005,0.0,24,21.7416,2.8107e-05,2.9243e-05,1.0404,2.7258e-05,0.9698 +current,current,200,0.005,0.0,25,22.6495,2.2223e-05,2.1115e-05,0.9501,1.9841e-05,0.8928 +current_dt2,current,200,0.0025,0.0,1,1.0440,4.5870e-05,1.8801e-05,0.4099,1.5790e-05,0.3442 +current_dt2,current,200,0.0025,0.0,2,1.9427,3.5715e-05,4.0685e-05,1.1392,4.6801e-05,1.3104 +current_dt2,current,200,0.0025,0.0,3,2.8415,3.9650e-05,3.2406e-05,0.8173,2.6955e-05,0.6798 +current_dt2,current,200,0.0025,0.0,4,3.7493,5.3852e-05,4.7890e-05,0.8893,4.3682e-05,0.8111 +current_dt2,current,200,0.0025,0.0,5,4.6479,4.5683e-05,3.2991e-05,0.7222,3.3051e-05,0.7235 +current_dt2,current,200,0.0025,0.0,6,5.5467,2.5858e-05,1.8621e-05,0.7201,1.6756e-05,0.6480 +current_dt2,current,200,0.0025,0.0,7,6.4454,2.9980e-05,4.1711e-05,1.3913,3.5759e-05,1.1928 +current_dt2,current,200,0.0025,0.0,8,7.3441,4.7144e-05,4.9864e-05,1.0577,4.5382e-05,0.9626 +current_dt2,current,200,0.0025,0.0,9,8.2428,5.1266e-05,3.4385e-05,0.6707,3.3722e-05,0.6578 +current_dt2,current,200,0.0025,0.0,10,9.1416,3.9199e-05,2.7107e-05,0.6915,2.4669e-05,0.6293 +current_dt2,current,200,0.0025,0.0,11,10.0493,2.9081e-05,4.7605e-05,1.6370,4.1827e-05,1.4383 +current_dt2,current,200,0.0025,0.0,12,10.9479,4.0136e-05,5.3489e-05,1.3327,4.8831e-05,1.2166 +current_dt2,current,200,0.0025,0.0,13,11.8468,4.8156e-05,4.0924e-05,0.8498,3.9045e-05,0.8108 +current_dt2,current,200,0.0025,0.0,14,12.7454,4.5607e-05,4.0433e-05,0.8865,3.6560e-05,0.8016 +current_dt2,current,200,0.0025,0.0,15,13.6441,3.3653e-05,5.5877e-05,1.6604,5.0901e-05,1.5125 +current_dt2,current,200,0.0025,0.0,16,14.5428,3.3615e-05,5.4804e-05,1.6304,5.1790e-05,1.5407 +current_dt2,current,200,0.0025,0.0,17,15.4416,4.0436e-05,4.0372e-05,0.9984,3.9772e-05,0.9836 +current_dt2,current,200,0.0025,0.0,18,16.3494,4.2572e-05,3.8461e-05,0.9034,3.6785e-05,0.8641 +current_dt2,current,200,0.0025,0.0,19,17.2481,3.9012e-05,4.6728e-05,1.1978,4.3691e-05,1.1199 +current_dt2,current,200,0.0025,0.0,20,18.1467,2.5709e-05,4.3777e-05,1.7028,4.1379e-05,1.6095 +current_dt2,current,200,0.0025,0.0,21,19.0456,2.8369e-05,3.0061e-05,1.0596,2.9541e-05,1.0413 +current_dt2,current,200,0.0025,0.0,22,19.9442,3.7176e-05,2.4976e-05,0.6718,2.3998e-05,0.6455 +current_dt2,current,200,0.0025,0.0,23,20.8429,3.3653e-05,2.9908e-05,0.8887,2.7996e-05,0.8319 +current_dt2,current,200,0.0025,0.0,24,21.7416,2.8107e-05,2.9163e-05,1.0376,2.7258e-05,0.9698 +current_dt2,current,200,0.0025,0.0,25,22.6495,2.2223e-05,2.1029e-05,0.9463,1.9841e-05,0.8928 +current_n400,current,400,0.005,0.0,1,1.0440,4.5870e-05,1.8567e-05,0.4048,1.5790e-05,0.3442 +current_n400,current,400,0.005,0.0,2,1.9427,3.5715e-05,4.0523e-05,1.1346,4.6801e-05,1.3104 +current_n400,current,400,0.005,0.0,3,2.8415,3.9650e-05,3.2343e-05,0.8157,2.6955e-05,0.6798 +current_n400,current,400,0.005,0.0,4,3.7493,5.3852e-05,4.7953e-05,0.8905,4.3682e-05,0.8111 +current_n400,current,400,0.005,0.0,5,4.6479,4.5683e-05,3.3026e-05,0.7229,3.3051e-05,0.7235 +current_n400,current,400,0.005,0.0,6,5.5467,2.5858e-05,1.8413e-05,0.7121,1.6756e-05,0.6480 +current_n400,current,400,0.005,0.0,7,6.4454,2.9980e-05,4.1658e-05,1.3895,3.5759e-05,1.1928 +current_n400,current,400,0.005,0.0,8,7.3441,4.7144e-05,4.9888e-05,1.0582,4.5382e-05,0.9626 +current_n400,current,400,0.005,0.0,9,8.2428,5.1266e-05,3.4408e-05,0.6712,3.3722e-05,0.6578 +current_n400,current,400,0.005,0.0,10,9.1416,3.9199e-05,2.6883e-05,0.6858,2.4669e-05,0.6293 +current_n400,current,400,0.005,0.0,11,10.0493,2.9081e-05,4.7502e-05,1.6335,4.1827e-05,1.4383 +current_n400,current,400,0.005,0.0,12,10.9479,4.0136e-05,5.3541e-05,1.3340,4.8831e-05,1.2166 +current_n400,current,400,0.005,0.0,13,11.8468,4.8156e-05,4.0951e-05,0.8504,3.9045e-05,0.8108 +current_n400,current,400,0.005,0.0,14,12.7454,4.5607e-05,4.0330e-05,0.8843,3.6560e-05,0.8016 +current_n400,current,400,0.005,0.0,15,13.6441,3.3653e-05,5.5852e-05,1.6597,5.0901e-05,1.5125 +current_n400,current,400,0.005,0.0,16,14.5428,3.3615e-05,5.4949e-05,1.6347,5.1790e-05,1.5407 +current_n400,current,400,0.005,0.0,17,15.4416,4.0436e-05,4.0482e-05,1.0011,3.9772e-05,0.9836 +current_n400,current,400,0.005,0.0,18,16.3494,4.2572e-05,3.8419e-05,0.9024,3.6785e-05,0.8641 +current_n400,current,400,0.005,0.0,19,17.2481,3.9012e-05,4.6786e-05,1.1993,4.3691e-05,1.1199 +current_n400,current,400,0.005,0.0,20,18.1467,2.5709e-05,4.3934e-05,1.7089,4.1379e-05,1.6095 +current_n400,current,400,0.005,0.0,21,19.0456,2.8369e-05,3.0203e-05,1.0647,2.9541e-05,1.0413 +current_n400,current,400,0.005,0.0,22,19.9442,3.7176e-05,2.4984e-05,0.6720,2.3998e-05,0.6455 +current_n400,current,400,0.005,0.0,23,20.8429,3.3653e-05,2.9967e-05,0.8905,2.7996e-05,0.8319 +current_n400,current,400,0.005,0.0,24,21.7416,2.8107e-05,2.9293e-05,1.0422,2.7258e-05,0.9698 +current_n400,current,400,0.005,0.0,25,22.6495,2.2223e-05,2.1130e-05,0.9508,1.9841e-05,0.8928 +heave,heave,200,0.005,0.0,1,1.0440,5.6840e-06,2.8889e-05,5.0826,1.7639e-05,3.1032 +heave,heave,200,0.005,0.0,2,1.9427,3.6518e-05,4.1125e-05,1.1262,3.6617e-05,1.0027 +heave,heave,200,0.005,0.0,3,2.8415,5.9631e-05,5.2727e-05,0.8842,5.2956e-05,0.8881 +heave,heave,200,0.005,0.0,4,3.7493,2.9745e-05,5.7556e-05,1.9350,5.2173e-05,1.7540 +heave,heave,200,0.005,0.0,5,4.6479,5.0537e-05,5.8642e-05,1.1604,5.6649e-05,1.1209 +heave,heave,200,0.005,0.0,6,5.5467,4.7884e-05,4.9077e-05,1.0249,5.6216e-05,1.1740 +heave,heave,200,0.005,0.0,7,6.4454,3.3960e-05,6.3530e-05,1.8707,4.5610e-05,1.3431 +heave,heave,200,0.005,0.0,8,7.3441,3.3628e-05,7.1699e-05,2.1321,5.4710e-05,1.6269 +heave,heave,200,0.005,0.0,9,8.2428,4.0733e-05,5.8324e-05,1.4319,6.2947e-05,1.5454 +heave,heave,200,0.005,0.0,10,9.1416,3.9927e-05,5.5233e-05,1.3833,5.3588e-05,1.3422 +heave,heave,200,0.005,0.0,11,10.0493,3.7322e-05,5.8864e-05,1.5772,4.5091e-05,1.2082 +heave,heave,200,0.005,0.0,12,10.9479,3.0170e-05,4.9345e-05,1.6356,4.3576e-05,1.4443 +heave,heave,200,0.005,0.0,13,11.8468,3.3912e-05,3.3262e-05,0.9808,3.8696e-05,1.1411 +heave,heave,200,0.005,0.0,14,12.7454,3.8980e-05,3.0015e-05,0.7700,3.4095e-05,0.8747 +heave,heave,200,0.005,0.0,15,13.6441,3.5144e-05,3.1940e-05,0.9088,2.8714e-05,0.8170 +heave,heave,200,0.005,0.0,16,14.5428,4.2438e-05,3.1133e-05,0.7336,2.4184e-05,0.5699 +heave,heave,200,0.005,0.0,17,15.4416,3.6044e-05,2.8514e-05,0.7911,2.3170e-05,0.6428 +heave,heave,200,0.005,0.0,18,16.3494,3.4149e-05,2.3451e-05,0.6867,2.2830e-05,0.6685 +heave,heave,200,0.005,0.0,19,17.2481,3.7796e-05,3.2391e-05,0.8570,2.2792e-05,0.6030 +heave,heave,200,0.005,0.0,20,18.1467,3.6281e-05,4.5077e-05,1.2425,2.7431e-05,0.7561 +heave,heave,200,0.005,0.0,21,19.0456,3.8317e-05,4.7681e-05,1.2444,2.7945e-05,0.7293 +heave,heave,200,0.005,0.0,22,19.9442,3.3202e-05,3.0239e-05,0.9108,2.0257e-05,0.6101 +heave,heave,200,0.005,0.0,23,20.8429,3.4670e-05,3.2493e-05,0.9372,2.6075e-05,0.7521 +heave,heave,200,0.005,0.0,24,21.7416,4.9590e-05,5.1923e-05,1.0470,3.8080e-05,0.7679 +heave,heave,200,0.005,0.0,25,22.6495,4.3859e-05,4.3785e-05,0.9983,3.0640e-05,0.6986 +heave_dt2,heave,200,0.0025,0.0,1,1.0440,5.6840e-06,2.8324e-05,4.9831,1.7639e-05,3.1032 +heave_dt2,heave,200,0.0025,0.0,2,1.9427,3.6518e-05,4.0434e-05,1.1072,3.6617e-05,1.0027 +heave_dt2,heave,200,0.0025,0.0,3,2.8415,5.9631e-05,5.1981e-05,0.8717,5.2956e-05,0.8881 +heave_dt2,heave,200,0.0025,0.0,4,3.7493,2.9745e-05,5.6694e-05,1.9060,5.2173e-05,1.7540 +heave_dt2,heave,200,0.0025,0.0,5,4.6479,5.0537e-05,5.8294e-05,1.1535,5.6649e-05,1.1209 +heave_dt2,heave,200,0.0025,0.0,6,5.5467,4.7884e-05,4.8606e-05,1.0151,5.6216e-05,1.1740 +heave_dt2,heave,200,0.0025,0.0,7,6.4454,3.3960e-05,6.2041e-05,1.8269,4.5610e-05,1.3431 +heave_dt2,heave,200,0.0025,0.0,8,7.3441,3.3628e-05,7.1221e-05,2.1179,5.4710e-05,1.6269 +heave_dt2,heave,200,0.0025,0.0,9,8.2428,4.0733e-05,5.8037e-05,1.4248,6.2947e-05,1.5454 +heave_dt2,heave,200,0.0025,0.0,10,9.1416,3.9927e-05,5.3913e-05,1.3503,5.3588e-05,1.3422 +heave_dt2,heave,200,0.0025,0.0,11,10.0493,3.7322e-05,5.7935e-05,1.5523,4.5091e-05,1.2082 +heave_dt2,heave,200,0.0025,0.0,12,10.9479,3.0170e-05,4.8694e-05,1.6140,4.3576e-05,1.4443 +heave_dt2,heave,200,0.0025,0.0,13,11.8468,3.3912e-05,3.3095e-05,0.9759,3.8696e-05,1.1411 +heave_dt2,heave,200,0.0025,0.0,14,12.7454,3.8980e-05,3.0183e-05,0.7743,3.4095e-05,0.8747 +heave_dt2,heave,200,0.0025,0.0,15,13.6441,3.5144e-05,3.1497e-05,0.8962,2.8714e-05,0.8170 +heave_dt2,heave,200,0.0025,0.0,16,14.5428,4.2438e-05,3.0126e-05,0.7099,2.4184e-05,0.5699 +heave_dt2,heave,200,0.0025,0.0,17,15.4416,3.6044e-05,2.7697e-05,0.7684,2.3170e-05,0.6428 +heave_dt2,heave,200,0.0025,0.0,18,16.3494,3.4149e-05,2.2488e-05,0.6585,2.2830e-05,0.6685 +heave_dt2,heave,200,0.0025,0.0,19,17.2481,3.7796e-05,3.0308e-05,0.8019,2.2792e-05,0.6030 +heave_dt2,heave,200,0.0025,0.0,20,18.1467,3.6281e-05,4.1406e-05,1.1413,2.7431e-05,0.7561 +heave_dt2,heave,200,0.0025,0.0,21,19.0456,3.8317e-05,4.3337e-05,1.1310,2.7945e-05,0.7293 +heave_dt2,heave,200,0.0025,0.0,22,19.9442,3.3202e-05,2.7835e-05,0.8384,2.0257e-05,0.6101 +heave_dt2,heave,200,0.0025,0.0,23,20.8429,3.4670e-05,3.0350e-05,0.8754,2.6075e-05,0.7521 +heave_dt2,heave,200,0.0025,0.0,24,21.7416,4.9590e-05,4.7993e-05,0.9678,3.8080e-05,0.7679 +heave_dt2,heave,200,0.0025,0.0,25,22.6495,4.3859e-05,4.0325e-05,0.9194,3.0640e-05,0.6986 +heave_n400,heave,400,0.005,0.0,1,1.0440,5.6840e-06,2.7978e-05,4.9222,1.7639e-05,3.1032 +heave_n400,heave,400,0.005,0.0,2,1.9427,3.6518e-05,4.0261e-05,1.1025,3.6617e-05,1.0027 +heave_n400,heave,400,0.005,0.0,3,2.8415,5.9631e-05,5.1910e-05,0.8705,5.2956e-05,0.8881 +heave_n400,heave,400,0.005,0.0,4,3.7493,2.9745e-05,5.6931e-05,1.9140,5.2173e-05,1.7540 +heave_n400,heave,400,0.005,0.0,5,4.6479,5.0537e-05,5.8525e-05,1.1581,5.6649e-05,1.1209 +heave_n400,heave,400,0.005,0.0,6,5.5467,4.7884e-05,4.8770e-05,1.0185,5.6216e-05,1.1740 +heave_n400,heave,400,0.005,0.0,7,6.4454,3.3960e-05,6.2491e-05,1.8401,4.5610e-05,1.3431 +heave_n400,heave,400,0.005,0.0,8,7.3441,3.3628e-05,7.1382e-05,2.1227,5.4710e-05,1.6269 +heave_n400,heave,400,0.005,0.0,9,8.2428,4.0733e-05,5.8452e-05,1.4350,6.2947e-05,1.5454 +heave_n400,heave,400,0.005,0.0,10,9.1416,3.9927e-05,5.4435e-05,1.3634,5.3588e-05,1.3422 +heave_n400,heave,400,0.005,0.0,11,10.0493,3.7322e-05,5.8654e-05,1.5716,4.5091e-05,1.2082 +heave_n400,heave,400,0.005,0.0,12,10.9479,3.0170e-05,4.9443e-05,1.6388,4.3576e-05,1.4443 +heave_n400,heave,400,0.005,0.0,13,11.8468,3.3912e-05,3.3282e-05,0.9814,3.8696e-05,1.1411 +heave_n400,heave,400,0.005,0.0,14,12.7454,3.8980e-05,3.0599e-05,0.7850,3.4095e-05,0.8747 +heave_n400,heave,400,0.005,0.0,15,13.6441,3.5144e-05,3.2243e-05,0.9175,2.8714e-05,0.8170 +heave_n400,heave,400,0.005,0.0,16,14.5428,4.2438e-05,3.0632e-05,0.7218,2.4184e-05,0.5699 +heave_n400,heave,400,0.005,0.0,17,15.4416,3.6044e-05,2.7773e-05,0.7705,2.3170e-05,0.6428 +heave_n400,heave,400,0.005,0.0,18,16.3494,3.4149e-05,2.2853e-05,0.6692,2.2830e-05,0.6685 +heave_n400,heave,400,0.005,0.0,19,17.2481,3.7796e-05,3.0796e-05,0.8148,2.2792e-05,0.6030 +heave_n400,heave,400,0.005,0.0,20,18.1467,3.6281e-05,4.1963e-05,1.1566,2.7431e-05,0.7561 +heave_n400,heave,400,0.005,0.0,21,19.0456,3.8317e-05,4.3942e-05,1.1468,2.7945e-05,0.7293 +heave_n400,heave,400,0.005,0.0,22,19.9442,3.3202e-05,2.8749e-05,0.8659,2.0257e-05,0.6101 +heave_n400,heave,400,0.005,0.0,23,20.8429,3.4670e-05,3.0872e-05,0.8905,2.6075e-05,0.7521 +heave_n400,heave,400,0.005,0.0,24,21.7416,4.9590e-05,4.8772e-05,0.9835,3.8080e-05,0.7679 +heave_n400,heave,400,0.005,0.0,25,22.6495,4.3859e-05,4.1234e-05,0.9401,3.0640e-05,0.6986 +heave_tf0.35,heave,200,0.005,0.35,1,1.0440,5.6840e-06,3.0135e-05,5.3017,1.7639e-05,3.1032 +heave_tf0.35,heave,200,0.005,0.35,2,1.9427,3.6518e-05,4.1384e-05,1.1332,3.6617e-05,1.0027 +heave_tf0.35,heave,200,0.005,0.35,3,2.8415,5.9631e-05,5.2827e-05,0.8859,5.2956e-05,0.8881 +heave_tf0.35,heave,200,0.005,0.35,4,3.7493,2.9745e-05,5.8871e-05,1.9792,5.2173e-05,1.7540 +heave_tf0.35,heave,200,0.005,0.35,5,4.6479,5.0537e-05,5.9374e-05,1.1749,5.6649e-05,1.1209 +heave_tf0.35,heave,200,0.005,0.35,6,5.5467,4.7884e-05,4.7928e-05,1.0009,5.6216e-05,1.1740 +heave_tf0.35,heave,200,0.005,0.35,7,6.4454,3.3960e-05,6.1267e-05,1.8041,4.5610e-05,1.3431 +heave_tf0.35,heave,200,0.005,0.35,8,7.3441,3.3628e-05,6.5973e-05,1.9618,5.4710e-05,1.6269 +heave_tf0.35,heave,200,0.005,0.35,9,8.2428,4.0733e-05,5.1891e-05,1.2739,6.2947e-05,1.5454 +heave_tf0.35,heave,200,0.005,0.35,10,9.1416,3.9927e-05,4.7940e-05,1.2007,5.3588e-05,1.3422 +heave_tf0.35,heave,200,0.005,0.35,11,10.0493,3.7322e-05,5.0917e-05,1.3643,4.5091e-05,1.2082 +heave_tf0.35,heave,200,0.005,0.35,12,10.9479,3.0170e-05,4.4692e-05,1.4813,4.3576e-05,1.4443 +heave_tf0.35,heave,200,0.005,0.35,13,11.8468,3.3912e-05,3.7529e-05,1.1067,3.8696e-05,1.1411 +heave_tf0.35,heave,200,0.005,0.35,14,12.7454,3.8980e-05,3.5035e-05,0.8988,3.4095e-05,0.8747 +heave_tf0.35,heave,200,0.005,0.35,15,13.6441,3.5144e-05,3.4491e-05,0.9814,2.8714e-05,0.8170 +heave_tf0.35,heave,200,0.005,0.35,16,14.5428,4.2438e-05,3.3896e-05,0.7987,2.4184e-05,0.5699 +heave_tf0.35,heave,200,0.005,0.35,17,15.4416,3.6044e-05,3.2582e-05,0.9039,2.3170e-05,0.6428 +heave_tf0.35,heave,200,0.005,0.35,18,16.3494,3.4149e-05,2.8024e-05,0.8206,2.2830e-05,0.6685 +heave_tf0.35,heave,200,0.005,0.35,19,17.2481,3.7796e-05,3.0609e-05,0.8098,2.2792e-05,0.6030 +heave_tf0.35,heave,200,0.005,0.35,20,18.1467,3.6281e-05,3.7521e-05,1.0342,2.7431e-05,0.7561 +heave_tf0.35,heave,200,0.005,0.35,21,19.0456,3.8317e-05,3.5144e-05,0.9172,2.7945e-05,0.7293 +heave_tf0.35,heave,200,0.005,0.35,22,19.9442,3.3202e-05,2.1634e-05,0.6516,2.0257e-05,0.6101 +heave_tf0.35,heave,200,0.005,0.35,23,20.8429,3.4670e-05,2.9349e-05,0.8465,2.6075e-05,0.7521 +heave_tf0.35,heave,200,0.005,0.35,24,21.7416,4.9590e-05,4.2590e-05,0.8588,3.8080e-05,0.7679 +heave_tf0.35,heave,200,0.005,0.35,25,22.6495,4.3859e-05,3.4807e-05,0.7936,3.0640e-05,0.6986 +heave_tf0.5,heave,200,0.005,0.5,1,1.0440,5.6840e-06,2.8314e-05,4.9814,1.7639e-05,3.1032 +heave_tf0.5,heave,200,0.005,0.5,2,1.9427,3.6518e-05,3.9382e-05,1.0784,3.6617e-05,1.0027 +heave_tf0.5,heave,200,0.005,0.5,3,2.8415,5.9631e-05,5.0388e-05,0.8450,5.2956e-05,0.8881 +heave_tf0.5,heave,200,0.005,0.5,4,3.7493,2.9745e-05,5.6056e-05,1.8845,5.2173e-05,1.7540 +heave_tf0.5,heave,200,0.005,0.5,5,4.6479,5.0537e-05,5.8135e-05,1.1503,5.6649e-05,1.1209 +heave_tf0.5,heave,200,0.005,0.5,6,5.5467,4.7884e-05,4.6075e-05,0.9622,5.6216e-05,1.1740 +heave_tf0.5,heave,200,0.005,0.5,7,6.4454,3.3960e-05,5.5818e-05,1.6436,4.5610e-05,1.3431 +heave_tf0.5,heave,200,0.005,0.5,8,7.3441,3.3628e-05,6.3489e-05,1.8880,5.4710e-05,1.6269 +heave_tf0.5,heave,200,0.005,0.5,9,8.2428,4.0733e-05,5.2463e-05,1.2880,6.2947e-05,1.5454 +heave_tf0.5,heave,200,0.005,0.5,10,9.1416,3.9927e-05,4.4718e-05,1.1200,5.3588e-05,1.3422 +heave_tf0.5,heave,200,0.005,0.5,11,10.0493,3.7322e-05,4.6059e-05,1.2341,4.5091e-05,1.2082 +heave_tf0.5,heave,200,0.005,0.5,12,10.9479,3.0170e-05,4.2612e-05,1.4124,4.3576e-05,1.4443 +heave_tf0.5,heave,200,0.005,0.5,13,11.8468,3.3912e-05,3.7296e-05,1.0998,3.8696e-05,1.1411 +heave_tf0.5,heave,200,0.005,0.5,14,12.7454,3.8980e-05,3.4149e-05,0.8761,3.4095e-05,0.8747 +heave_tf0.5,heave,200,0.005,0.5,15,13.6441,3.5144e-05,3.2373e-05,0.9211,2.8714e-05,0.8170 +heave_tf0.5,heave,200,0.005,0.5,16,14.5428,4.2438e-05,3.1212e-05,0.7355,2.4184e-05,0.5699 +heave_tf0.5,heave,200,0.005,0.5,17,15.4416,3.6044e-05,3.1392e-05,0.8709,2.3170e-05,0.6428 +heave_tf0.5,heave,200,0.005,0.5,18,16.3494,3.4149e-05,2.8104e-05,0.8230,2.2830e-05,0.6685 +heave_tf0.5,heave,200,0.005,0.5,19,17.2481,3.7796e-05,2.9760e-05,0.7874,2.2792e-05,0.6030 +heave_tf0.5,heave,200,0.005,0.5,20,18.1467,3.6281e-05,3.5537e-05,0.9795,2.7431e-05,0.7561 +heave_tf0.5,heave,200,0.005,0.5,21,19.0456,3.8317e-05,3.3631e-05,0.8777,2.7945e-05,0.7293 +heave_tf0.5,heave,200,0.005,0.5,22,19.9442,3.3202e-05,2.1147e-05,0.6369,2.0257e-05,0.6101 +heave_tf0.5,heave,200,0.005,0.5,23,20.8429,3.4670e-05,2.8045e-05,0.8089,2.6075e-05,0.7521 +heave_tf0.5,heave,200,0.005,0.5,24,21.7416,4.9590e-05,4.0545e-05,0.8176,3.8080e-05,0.7679 +heave_tf0.5,heave,200,0.005,0.5,25,22.6495,4.3859e-05,3.3274e-05,0.7587,3.0640e-05,0.6986 +heave_tf0.75,heave,200,0.005,0.75,1,1.0440,5.6840e-06,2.6208e-05,4.6108,1.7639e-05,3.1032 +heave_tf0.75,heave,200,0.005,0.75,2,1.9427,3.6518e-05,3.6896e-05,1.0103,3.6617e-05,1.0027 +heave_tf0.75,heave,200,0.005,0.75,3,2.8415,5.9631e-05,4.7654e-05,0.7992,5.2956e-05,0.8881 +heave_tf0.75,heave,200,0.005,0.75,4,3.7493,2.9745e-05,5.1961e-05,1.7469,5.2173e-05,1.7540 +heave_tf0.75,heave,200,0.005,0.75,5,4.6479,5.0537e-05,5.6474e-05,1.1175,5.6649e-05,1.1209 +heave_tf0.75,heave,200,0.005,0.75,6,5.5467,4.7884e-05,4.3433e-05,0.9070,5.6216e-05,1.1740 +heave_tf0.75,heave,200,0.005,0.75,7,6.4454,3.3960e-05,4.5309e-05,1.3342,4.5610e-05,1.3431 +heave_tf0.75,heave,200,0.005,0.75,8,7.3441,3.3628e-05,5.5610e-05,1.6537,5.4710e-05,1.6269 +heave_tf0.75,heave,200,0.005,0.75,9,8.2428,4.0733e-05,5.1002e-05,1.2521,6.2947e-05,1.5454 +heave_tf0.75,heave,200,0.005,0.75,10,9.1416,3.9927e-05,3.6181e-05,0.9062,5.3588e-05,1.3422 +heave_tf0.75,heave,200,0.005,0.75,11,10.0493,3.7322e-05,2.9588e-05,0.7928,4.5091e-05,1.2082 +heave_tf0.75,heave,200,0.005,0.75,12,10.9479,3.0170e-05,3.2550e-05,1.0789,4.3576e-05,1.4443 +heave_tf0.75,heave,200,0.005,0.75,13,11.8468,3.3912e-05,3.3666e-05,0.9927,3.8696e-05,1.1411 +heave_tf0.75,heave,200,0.005,0.75,14,12.7454,3.8980e-05,2.8412e-05,0.7289,3.4095e-05,0.8747 +heave_tf0.75,heave,200,0.005,0.75,15,13.6441,3.5144e-05,2.2875e-05,0.6509,2.8714e-05,0.8170 +heave_tf0.75,heave,200,0.005,0.75,16,14.5428,4.2438e-05,2.2083e-05,0.5204,2.4184e-05,0.5699 +heave_tf0.75,heave,200,0.005,0.75,17,15.4416,3.6044e-05,2.2390e-05,0.6212,2.3170e-05,0.6428 +heave_tf0.75,heave,200,0.005,0.75,18,16.3494,3.4149e-05,2.2992e-05,0.6733,2.2830e-05,0.6685 +heave_tf0.75,heave,200,0.005,0.75,19,17.2481,3.7796e-05,2.5027e-05,0.6622,2.2792e-05,0.6030 +heave_tf0.75,heave,200,0.005,0.75,20,18.1467,3.6281e-05,2.5990e-05,0.7164,2.7431e-05,0.7561 +heave_tf0.75,heave,200,0.005,0.75,21,19.0456,3.8317e-05,2.2860e-05,0.5966,2.7945e-05,0.7293 +heave_tf0.75,heave,200,0.005,0.75,22,19.9442,3.3202e-05,1.5301e-05,0.4609,2.0257e-05,0.6101 +heave_tf0.75,heave,200,0.005,0.75,23,20.8429,3.4670e-05,2.3340e-05,0.6732,2.6075e-05,0.7521 +heave_tf0.75,heave,200,0.005,0.75,24,21.7416,4.9590e-05,3.2119e-05,0.6477,3.8080e-05,0.7679 +heave_tf0.75,heave,200,0.005,0.75,25,22.6495,4.3859e-05,2.5533e-05,0.5822,3.0640e-05,0.6986 +heave_tf1,heave,200,0.005,1.0,1,1.0440,5.6840e-06,2.6051e-05,4.5832,1.7639e-05,3.1032 +heave_tf1,heave,200,0.005,1.0,2,1.9427,3.6518e-05,3.6716e-05,1.0054,3.6617e-05,1.0027 +heave_tf1,heave,200,0.005,1.0,3,2.8415,5.9631e-05,4.7545e-05,0.7973,5.2956e-05,0.8881 +heave_tf1,heave,200,0.005,1.0,4,3.7493,2.9745e-05,5.1417e-05,1.7286,5.2173e-05,1.7540 +heave_tf1,heave,200,0.005,1.0,5,4.6479,5.0537e-05,5.6022e-05,1.1085,5.6649e-05,1.1209 +heave_tf1,heave,200,0.005,1.0,6,5.5467,4.7884e-05,4.3427e-05,0.9069,5.6216e-05,1.1740 +heave_tf1,heave,200,0.005,1.0,7,6.4454,3.3960e-05,4.6076e-05,1.3568,4.5610e-05,1.3431 +heave_tf1,heave,200,0.005,1.0,8,7.3441,3.3628e-05,5.5635e-05,1.6544,5.4710e-05,1.6269 +heave_tf1,heave,200,0.005,1.0,9,8.2428,4.0733e-05,5.0118e-05,1.2304,6.2947e-05,1.5454 +heave_tf1,heave,200,0.005,1.0,10,9.1416,3.9927e-05,3.6443e-05,0.9128,5.3588e-05,1.3422 +heave_tf1,heave,200,0.005,1.0,11,10.0493,3.7322e-05,3.0689e-05,0.8223,4.5091e-05,1.2082 +heave_tf1,heave,200,0.005,1.0,12,10.9479,3.0170e-05,3.1236e-05,1.0353,4.3576e-05,1.4443 +heave_tf1,heave,200,0.005,1.0,13,11.8468,3.3912e-05,3.1528e-05,0.9297,3.8696e-05,1.1411 +heave_tf1,heave,200,0.005,1.0,14,12.7454,3.8980e-05,2.7338e-05,0.7013,3.4095e-05,0.8747 +heave_tf1,heave,200,0.005,1.0,15,13.6441,3.5144e-05,2.1857e-05,0.6219,2.8714e-05,0.8170 +heave_tf1,heave,200,0.005,1.0,16,14.5428,4.2438e-05,2.0210e-05,0.4762,2.4184e-05,0.5699 +heave_tf1,heave,200,0.005,1.0,17,15.4416,3.6044e-05,2.0127e-05,0.5584,2.3170e-05,0.6428 +heave_tf1,heave,200,0.005,1.0,18,16.3494,3.4149e-05,2.0989e-05,0.6146,2.2830e-05,0.6685 +heave_tf1,heave,200,0.005,1.0,19,17.2481,3.7796e-05,2.3243e-05,0.6149,2.2792e-05,0.6030 +heave_tf1,heave,200,0.005,1.0,20,18.1467,3.6281e-05,2.4001e-05,0.6615,2.7431e-05,0.7561 +heave_tf1,heave,200,0.005,1.0,21,19.0456,3.8317e-05,2.1390e-05,0.5582,2.7945e-05,0.7293 +heave_tf1,heave,200,0.005,1.0,22,19.9442,3.3202e-05,1.4975e-05,0.4510,2.0257e-05,0.6101 +heave_tf1,heave,200,0.005,1.0,23,20.8429,3.4670e-05,2.3424e-05,0.6756,2.6075e-05,0.7521 +heave_tf1,heave,200,0.005,1.0,24,21.7416,4.9590e-05,3.1818e-05,0.6416,3.8080e-05,0.7679 +heave_tf1,heave,200,0.005,1.0,25,22.6495,4.3859e-05,2.5180e-05,0.5741,3.0640e-05,0.6986 +heave_tf0.5_dt2,heave,200,0.0025,0.5,1,1.0440,5.6840e-06,2.6309e-05,4.6287,1.7639e-05,3.1032 +heave_tf0.5_dt2,heave,200,0.0025,0.5,2,1.9427,3.6518e-05,3.7033e-05,1.0141,3.6617e-05,1.0027 +heave_tf0.5_dt2,heave,200,0.0025,0.5,3,2.8415,5.9631e-05,4.8007e-05,0.8051,5.2956e-05,0.8881 +heave_tf0.5_dt2,heave,200,0.0025,0.5,4,3.7493,2.9745e-05,5.2828e-05,1.7760,5.2173e-05,1.7540 +heave_tf0.5_dt2,heave,200,0.0025,0.5,5,4.6479,5.0537e-05,5.6476e-05,1.1175,5.6649e-05,1.1209 +heave_tf0.5_dt2,heave,200,0.0025,0.5,6,5.5467,4.7884e-05,4.3849e-05,0.9157,5.6216e-05,1.1740 +heave_tf0.5_dt2,heave,200,0.0025,0.5,7,6.4454,3.3960e-05,4.8711e-05,1.4344,4.5610e-05,1.3431 +heave_tf0.5_dt2,heave,200,0.0025,0.5,8,7.3441,3.3628e-05,5.7886e-05,1.7214,5.4710e-05,1.6269 +heave_tf0.5_dt2,heave,200,0.0025,0.5,9,8.2428,4.0733e-05,5.1281e-05,1.2590,6.2947e-05,1.5454 +heave_tf0.5_dt2,heave,200,0.0025,0.5,10,9.1416,3.9927e-05,4.0614e-05,1.0172,5.3588e-05,1.3422 +heave_tf0.5_dt2,heave,200,0.0025,0.5,11,10.0493,3.7322e-05,3.5822e-05,0.9598,4.5091e-05,1.2082 +heave_tf0.5_dt2,heave,200,0.0025,0.5,12,10.9479,3.0170e-05,3.5925e-05,1.1908,4.3576e-05,1.4443 +heave_tf0.5_dt2,heave,200,0.0025,0.5,13,11.8468,3.3912e-05,3.6204e-05,1.0676,3.8696e-05,1.1411 +heave_tf0.5_dt2,heave,200,0.0025,0.5,14,12.7454,3.8980e-05,3.1080e-05,0.7973,3.4095e-05,0.8747 +heave_tf0.5_dt2,heave,200,0.0025,0.5,15,13.6441,3.5144e-05,2.6253e-05,0.7470,2.8714e-05,0.8170 +heave_tf0.5_dt2,heave,200,0.0025,0.5,16,14.5428,4.2438e-05,2.6805e-05,0.6316,2.4184e-05,0.5699 +heave_tf0.5_dt2,heave,200,0.0025,0.5,17,15.4416,3.6044e-05,2.7222e-05,0.7552,2.3170e-05,0.6428 +heave_tf0.5_dt2,heave,200,0.0025,0.5,18,16.3494,3.4149e-05,2.5587e-05,0.7493,2.2830e-05,0.6685 +heave_tf0.5_dt2,heave,200,0.0025,0.5,19,17.2481,3.7796e-05,2.7385e-05,0.7246,2.2792e-05,0.6030 +heave_tf0.5_dt2,heave,200,0.0025,0.5,20,18.1467,3.6281e-05,3.1441e-05,0.8666,2.7431e-05,0.7561 +heave_tf0.5_dt2,heave,200,0.0025,0.5,21,19.0456,3.8317e-05,2.8717e-05,0.7495,2.7945e-05,0.7293 +heave_tf0.5_dt2,heave,200,0.0025,0.5,22,19.9442,3.3202e-05,1.8691e-05,0.5630,2.0257e-05,0.6101 +heave_tf0.5_dt2,heave,200,0.0025,0.5,23,20.8429,3.4670e-05,2.6209e-05,0.7560,2.6075e-05,0.7521 +heave_tf0.5_dt2,heave,200,0.0025,0.5,24,21.7416,4.9590e-05,3.7068e-05,0.7475,3.8080e-05,0.7679 +heave_tf0.5_dt2,heave,200,0.0025,0.5,25,22.6495,4.3859e-05,2.9991e-05,0.6838,3.0640e-05,0.6986 diff --git a/validation/experiments/wang_scr/rms_strain_comparison.csv b/validation/experiments/wang_scr/rms_strain_comparison.csv deleted file mode 100644 index 8ed6894d..00000000 --- a/validation/experiments/wang_scr/rms_strain_comparison.csv +++ /dev/null @@ -1,26 +0,0 @@ -s_m,measured_rms_strain,cabledyn_rms_strain,ratio -1.0440,4.5870e-05,1.8728e-05,0.4083 -1.9427,3.5715e-05,4.0661e-05,1.1385 -2.8415,3.9650e-05,3.2307e-05,0.8148 -3.7493,5.3852e-05,4.7825e-05,0.8881 -4.6479,4.5683e-05,3.3000e-05,0.7224 -5.5467,2.5858e-05,1.8539e-05,0.7170 -6.4454,2.9980e-05,4.1568e-05,1.3865 -7.3441,4.7144e-05,4.9799e-05,1.0563 -8.2428,5.1266e-05,3.4437e-05,0.6717 -9.1416,3.9199e-05,2.6991e-05,0.6886 -10.0493,2.9081e-05,4.7442e-05,1.6314 -10.9479,4.0136e-05,5.3466e-05,1.3321 -11.8468,4.8156e-05,4.1015e-05,0.8517 -12.7454,4.5607e-05,4.0325e-05,0.8842 -13.6441,3.3653e-05,5.5747e-05,1.6565 -14.5428,3.3615e-05,5.4845e-05,1.6316 -15.4416,4.0436e-05,4.0492e-05,1.0014 -16.3494,4.2572e-05,3.8411e-05,0.9023 -17.2481,3.9012e-05,4.6689e-05,1.1968 -18.1467,2.5709e-05,4.3858e-05,1.7059 -19.0456,2.8369e-05,3.0204e-05,1.0647 -19.9442,3.7176e-05,2.4982e-05,0.6720 -20.8429,3.3653e-05,2.9929e-05,0.8893 -21.7416,2.8107e-05,2.9243e-05,1.0404 -22.6495,2.2223e-05,2.1115e-05,0.9501 diff --git a/validation/experiments/wang_scr/summary.json b/validation/experiments/wang_scr/summary.json index 7436d15d..8b57b68b 100644 --- a/validation/experiments/wang_scr/summary.json +++ b/validation/experiments/wang_scr/summary.json @@ -1,17 +1,313 @@ { - "segments": 200, - "dt_s": 0.005, - "analysis_window_s": [ - 30.0, - 150.0 - ], - "frequency_resolution_hz": 0.00833333333332907, - "max_rms_strain": 5.7799927402857905e-05, - "measured_max_rms_strain": 5.3852e-05, - "max_ratio": 1.0733106923207663, - "mean_ratio_at_stations": 1.0360992762509706, - "rms_log_error_at_stations": 0.3384790204846645, - "dominant_frequency_hz": 0.9916666666661592, - "measured_dominant_frequency_hz": 1.0, - "executable_sha256": "7810cc2efd3449cceb8825d543beacadfdf6cd86253f6bad1b1a8207ad7beca9" + "current": { + "coefficients": { + "Cv": 0.7, + "f0": 0.18, + "df": 0.08, + "CD": 1.2, + "CM": 2.0 + }, + "tmax_s": 150.0, + "statistics_after_s": 30.0, + "measured_max_rms_strain": 5.3852e-05, + "measured_dominant_frequency_hz": 1.0, + "thorsen2017": { + "max_rms_strain": 5.3628e-05, + "s_of_max_m": 14.0796, + "max_ratio": 0.99584, + "mean_ratio_at_stations": 0.969544, + "rms_log_error_at_stations": 0.360103, + "mean_ratio_lower_half": 0.878869, + "mean_ratio_upper_half": 1.06778 + }, + "runs": { + "current": { + "role": "primary", + "segments": 200, + "dt_s": 0.005, + "viv_frame_Tf_s": 0.0, + "max_rms_strain": 5.77999e-05, + "s_of_max_m": 13.9889, + "max_ratio": 1.07331, + "mean_ratio_at_stations": 1.0361, + "rms_log_error_at_stations": 0.338479, + "mean_ratio_lower_half": 0.946716, + "mean_ratio_upper_half": 1.13293, + "frequency_station_s_m": 8.2985, + "dominant_frequency_hz": 0.991667, + "frequency_resolution_hz": 0.00833333, + "rms_peaks": 7, + "mean_top_tension_N": 67.7937 + }, + "current_dt2": { + "role": "convergence: half the time step", + "segments": 200, + "dt_s": 0.0025, + "viv_frame_Tf_s": 0.0, + "max_rms_strain": 5.78745e-05, + "s_of_max_m": 13.9889, + "max_ratio": 1.0747, + "mean_ratio_at_stations": 1.0365, + "rms_log_error_at_stations": 0.338048, + "mean_ratio_lower_half": 0.948357, + "mean_ratio_upper_half": 1.13198, + "frequency_station_s_m": 8.2985, + "dominant_frequency_hz": 0.991667, + "frequency_resolution_hz": 0.00833333, + "rms_peaks": 7, + "mean_top_tension_N": 67.7942, + "max_ratio_change_from_primary": 0.00129009 + }, + "current_n400": { + "role": "convergence: twice the elements", + "segments": 400, + "dt_s": 0.005, + "viv_frame_Tf_s": 0.0, + "max_rms_strain": 5.79404e-05, + "s_of_max_m": 14.0482, + "max_ratio": 1.07592, + "mean_ratio_at_stations": 1.03655, + "rms_log_error_at_stations": 0.340338, + "mean_ratio_lower_half": 0.946395, + "mean_ratio_upper_half": 1.13421, + "frequency_station_s_m": 8.23922, + "dominant_frequency_hz": 0.991667, + "frequency_resolution_hz": 0.00833333, + "rms_peaks": 7, + "mean_top_tension_N": 67.7939, + "max_ratio_change_from_primary": 0.00242973 + } + } + }, + "heave": { + "coefficients": { + "Cv": 0.8, + "f0": 0.18, + "df": 0.08, + "CD": 1.2, + "CM": 2.0 + }, + "tmax_s": 200.0, + "statistics_after_s": 40.0, + "measured_max_rms_strain": 5.9631e-05, + "measured_dominant_frequency_hz": 1.0, + "thorsen2017": { + "max_rms_strain": 6.2947e-05, + "s_of_max_m": 8.1971, + "max_ratio": 1.05561, + "mean_ratio_at_stations": 1.08737, + "rms_log_error_at_stations": 0.406399, + "mean_ratio_lower_half": 1.438, + "mean_ratio_upper_half": 0.707507 + }, + "runs": { + "heave": { + "role": "primary (no VIV FRAME)", + "segments": 200, + "dt_s": 0.005, + "viv_frame_Tf_s": 0.0, + "max_rms_strain": 7.20238e-05, + "s_of_max_m": 7.23155, + "max_ratio": 1.20783, + "mean_ratio_at_stations": 1.33409, + "rms_log_error_at_stations": 0.459744, + "mean_ratio_lower_half": 1.70961, + "mean_ratio_upper_half": 0.927286, + "frequency_station_s_m": 8.2985, + "dominant_frequency_hz": 1.01875, + "frequency_resolution_hz": 0.00625, + "rms_peaks": 6, + "mean_top_tension_N": 64.1909, + "band_hz": [ + 0.671141, + 50.0 + ], + "share_0.80-0.95_hz": 0.00933546, + "share_0.95-1.10_hz": 0.611495 + }, + "heave_dt2": { + "role": "convergence: half the time step", + "segments": 200, + "dt_s": 0.0025, + "viv_frame_Tf_s": 0.0, + "max_rms_strain": 7.12927e-05, + "s_of_max_m": 7.23155, + "max_ratio": 1.19557, + "mean_ratio_at_stations": 1.29525, + "rms_log_error_at_stations": 0.45551, + "mean_ratio_lower_half": 1.68451, + "mean_ratio_upper_half": 0.873542, + "frequency_station_s_m": 8.2985, + "dominant_frequency_hz": 1.01875, + "frequency_resolution_hz": 0.00625, + "rms_peaks": 6, + "mean_top_tension_N": 64.1788, + "band_hz": [ + 0.671141, + 50.0 + ], + "share_0.80-0.95_hz": 0.0168386, + "share_0.95-1.10_hz": 0.59526, + "max_ratio_change_from_primary": -0.0101505 + }, + "heave_n400": { + "role": "convergence: twice the elements", + "segments": 400, + "dt_s": 0.005, + "viv_frame_Tf_s": 0.0, + "max_rms_strain": 7.14995e-05, + "s_of_max_m": 7.29083, + "max_ratio": 1.19903, + "mean_ratio_at_stations": 1.30404, + "rms_log_error_at_stations": 0.453764, + "mean_ratio_lower_half": 1.6876, + "mean_ratio_upper_half": 0.888513, + "frequency_station_s_m": 8.23922, + "dominant_frequency_hz": 1.01875, + "frequency_resolution_hz": 0.00625, + "rms_peaks": 6, + "mean_top_tension_N": 64.1786, + "band_hz": [ + 0.671141, + 50.0 + ], + "share_0.80-0.95_hz": 0.00847915, + "share_0.95-1.10_hz": 0.612012, + "max_ratio_change_from_primary": -0.0072802 + }, + "heave_tf0.35": { + "role": "VIV FRAME sensitivity", + "segments": 200, + "dt_s": 0.005, + "viv_frame_Tf_s": 0.35, + "max_rms_strain": 6.72598e-05, + "s_of_max_m": 7.113, + "max_ratio": 1.12793, + "mean_ratio_at_stations": 1.27936, + "rms_log_error_at_stations": 0.443287, + "mean_ratio_lower_half": 1.66681, + "mean_ratio_upper_half": 0.859609, + "frequency_station_s_m": 8.2985, + "dominant_frequency_hz": 1.0125, + "frequency_resolution_hz": 0.00625, + "rms_peaks": 6, + "mean_top_tension_N": 64.1743, + "band_hz": [ + 0.671141, + 50.0 + ], + "share_0.80-0.95_hz": 0.170412, + "share_0.95-1.10_hz": 0.518878, + "max_ratio_change_from_primary": -0.0661451 + }, + "heave_tf0.5": { + "role": "VIV FRAME sensitivity", + "segments": 200, + "dt_s": 0.005, + "viv_frame_Tf_s": 0.5, + "max_rms_strain": 6.37249e-05, + "s_of_max_m": 7.23155, + "max_ratio": 1.06865, + "mean_ratio_at_stations": 1.21924, + "rms_log_error_at_stations": 0.426653, + "mean_ratio_lower_half": 1.58367, + "mean_ratio_upper_half": 0.824439, + "frequency_station_s_m": 8.2985, + "dominant_frequency_hz": 1.01875, + "frequency_resolution_hz": 0.00625, + "rms_peaks": 6, + "mean_top_tension_N": 64.1602, + "band_hz": [ + 0.671141, + 50.0 + ], + "share_0.80-0.95_hz": 0.166241, + "share_0.95-1.10_hz": 0.523756, + "max_ratio_change_from_primary": -0.115225 + }, + "heave_tf0.75": { + "role": "VIV FRAME sensitivity", + "segments": 200, + "dt_s": 0.005, + "viv_frame_Tf_s": 0.75, + "max_rms_strain": 5.76812e-05, + "s_of_max_m": 4.38635, + "max_ratio": 0.967302, + "mean_ratio_at_stations": 1.02944, + "rms_log_error_at_stations": 0.492177, + "mean_ratio_lower_half": 1.40018, + "mean_ratio_upper_half": 0.627803, + "frequency_station_s_m": 8.2985, + "dominant_frequency_hz": 0.88125, + "frequency_resolution_hz": 0.00625, + "rms_peaks": 5, + "mean_top_tension_N": 64.1596, + "band_hz": [ + 0.671141, + 50.0 + ], + "share_0.80-0.95_hz": 0.694759, + "share_0.95-1.10_hz": 0.138379, + "max_ratio_change_from_primary": -0.199138 + }, + "heave_tf1": { + "role": "VIV FRAME sensitivity", + "segments": 200, + "dt_s": 0.005, + "viv_frame_Tf_s": 1.0, + "max_rms_strain": 5.71462e-05, + "s_of_max_m": 4.38635, + "max_ratio": 0.95833, + "mean_ratio_at_stations": 1.00885, + "rms_log_error_at_stations": 0.515722, + "mean_ratio_lower_half": 1.39013, + "mean_ratio_upper_half": 0.595803, + "frequency_station_s_m": 8.2985, + "dominant_frequency_hz": 0.88125, + "frequency_resolution_hz": 0.00625, + "rms_peaks": 5, + "mean_top_tension_N": 64.156, + "band_hz": [ + 0.671141, + 50.0 + ], + "share_0.80-0.95_hz": 0.709745, + "share_0.95-1.10_hz": 0.116697, + "max_ratio_change_from_primary": -0.206566 + }, + "heave_tf0.5_dt2": { + "role": "VIV FRAME sensitivity, half the time step", + "segments": 200, + "dt_s": 0.0025, + "viv_frame_Tf_s": 0.5, + "max_rms_strain": 5.79878e-05, + "s_of_max_m": 4.38635, + "max_ratio": 0.972444, + "mean_ratio_at_stations": 1.10714, + "rms_log_error_at_stations": 0.42963, + "mean_ratio_lower_half": 1.4544, + "mean_ratio_upper_half": 0.730944, + "frequency_station_s_m": 8.2985, + "dominant_frequency_hz": 0.89375, + "frequency_resolution_hz": 0.00625, + "rms_peaks": 6, + "mean_top_tension_N": 64.1618, + "band_hz": [ + 0.671141, + 50.0 + ], + "share_0.80-0.95_hz": 0.59208, + "share_0.95-1.10_hz": 0.217544, + "max_ratio_change_from_primary": -0.19488 + } + }, + "top_motion": { + "period_s": 5.96, + "x_amplitude_m": 0.0485065, + "z_amplitude_m": 0.130469, + "x_lag_behind_z_deg": 83.3184, + "ramp_periods": 2.0 + } + }, + "executable_sha256": "7b1bd9a903f6cbc473bbac1fddfe9370cd18e65771334faf048d255fbcc2faeb" } diff --git a/validation/experiments/wang_scr/thorsen2017_fig17.csv b/validation/experiments/wang_scr/thorsen2017_fig17.csv new file mode 100644 index 00000000..1ee1c226 --- /dev/null +++ b/validation/experiments/wang_scr/thorsen2017_fig17.csv @@ -0,0 +1,522 @@ +series,s_m,rms_strain +measured,1.044,4.5870e-05 +measured,1.9427,3.5715e-05 +measured,2.8415,3.9650e-05 +measured,3.7493,5.3852e-05 +measured,4.6479,4.5683e-05 +measured,5.5467,2.5858e-05 +measured,6.4454,2.9980e-05 +measured,7.3441,4.7144e-05 +measured,8.2428,5.1266e-05 +measured,9.1416,3.9199e-05 +measured,10.0493,2.9081e-05 +measured,10.9479,4.0136e-05 +measured,11.8468,4.8156e-05 +measured,12.7454,4.5607e-05 +measured,13.6441,3.3653e-05 +measured,14.5428,3.3615e-05 +measured,15.4416,4.0436e-05 +measured,16.3494,4.2572e-05 +measured,17.2481,3.9012e-05 +measured,18.1467,2.5709e-05 +measured,19.0456,2.8369e-05 +measured,19.9442,3.7176e-05 +measured,20.8429,3.3653e-05 +measured,21.7416,2.8107e-05 +measured,22.6495,2.2223e-05 +thorsen2017,-0.0001,7.5765e-08 +thorsen2017,0.0451,3.8711e-08 +thorsen2017,0.0907,1.1335e-07 +thorsen2017,0.136,1.5097e-07 +thorsen2017,0.1814,2.2617e-07 +thorsen2017,0.2359,2.6323e-07 +thorsen2017,0.2813,3.3790e-07 +thorsen2017,0.3267,4.1310e-07 +thorsen2017,0.372,5.2589e-07 +thorsen2017,0.4265,7.1283e-07 +thorsen2017,0.4719,1.0507e-06 +thorsen2017,0.5173,1.4997e-06 +thorsen2017,0.5626,2.1374e-06 +thorsen2017,0.608,2.8867e-06 +thorsen2017,0.6626,3.7858e-06 +thorsen2017,0.708,4.7602e-06 +thorsen2017,0.7532,5.8093e-06 +thorsen2017,0.7988,6.8589e-06 +thorsen2017,0.8532,7.9085e-06 +thorsen2017,0.8986,9.1074e-06 +thorsen2017,0.944,1.0644e-05 +thorsen2017,0.9893,1.2668e-05 +thorsen2017,1.0347,1.5253e-05 +thorsen2017,1.0892,1.8401e-05 +thorsen2017,1.1346,2.1998e-05 +thorsen2017,1.1799,2.5784e-05 +thorsen2017,1.2254,2.9456e-05 +thorsen2017,1.2798,3.2904e-05 +thorsen2017,1.3252,3.6051e-05 +thorsen2017,1.3707,3.8862e-05 +thorsen2017,1.4161,4.1299e-05 +thorsen2017,1.4613,4.3434e-05 +thorsen2017,1.5159,4.5233e-05 +thorsen2017,1.5613,4.6694e-05 +thorsen2017,1.6067,4.7819e-05 +thorsen2017,1.6521,4.8643e-05 +thorsen2017,1.7065,4.9130e-05 +thorsen2017,1.7518,4.9318e-05 +thorsen2017,1.7973,4.9168e-05 +thorsen2017,1.8426,4.8681e-05 +thorsen2017,1.888,4.7894e-05 +thorsen2017,1.9425,4.6807e-05 +thorsen2017,1.9879,4.5421e-05 +thorsen2017,2.0332,4.3809e-05 +thorsen2017,2.0788,4.1935e-05 +thorsen2017,2.1331,3.9874e-05 +thorsen2017,2.1784,3.7589e-05 +thorsen2017,2.224,3.5115e-05 +thorsen2017,2.2692,3.2529e-05 +thorsen2017,2.3148,2.9906e-05 +thorsen2017,2.3692,2.7395e-05 +thorsen2017,2.4146,2.5109e-05 +thorsen2017,2.4599,2.3310e-05 +thorsen2017,2.5053,2.2149e-05 +thorsen2017,2.5599,2.1624e-05 +thorsen2017,2.6052,2.1699e-05 +thorsen2017,2.6505,2.2261e-05 +thorsen2017,2.6959,2.3161e-05 +thorsen2017,2.7413,2.4284e-05 +thorsen2017,2.7958,2.5559e-05 +thorsen2017,2.8412,2.6946e-05 +thorsen2017,2.8867,2.8370e-05 +thorsen2017,2.9319,2.9756e-05 +thorsen2017,2.9865,3.1142e-05 +thorsen2017,3.0319,3.2492e-05 +thorsen2017,3.0771,3.3766e-05 +thorsen2017,3.1227,3.5002e-05 +thorsen2017,3.168,3.6126e-05 +thorsen2017,3.2225,3.7214e-05 +thorsen2017,3.2679,3.8225e-05 +thorsen2017,3.3133,3.9125e-05 +thorsen2017,3.3587,3.9949e-05 +thorsen2017,3.4131,4.0736e-05 +thorsen2017,3.4585,4.1373e-05 +thorsen2017,3.5038,4.1973e-05 +thorsen2017,3.5493,4.2459e-05 +thorsen2017,3.6039,4.2910e-05 +thorsen2017,3.6491,4.3246e-05 +thorsen2017,3.6946,4.3510e-05 +thorsen2017,3.74,4.3659e-05 +thorsen2017,3.7854,4.3771e-05 +thorsen2017,3.8398,4.3771e-05 +thorsen2017,3.8852,4.3696e-05 +thorsen2017,3.9306,4.3547e-05 +thorsen2017,3.976,4.3359e-05 +thorsen2017,4.0305,4.3059e-05 +thorsen2017,4.0758,4.2684e-05 +thorsen2017,4.1212,4.2235e-05 +thorsen2017,4.1666,4.1710e-05 +thorsen2017,4.212,4.1149e-05 +thorsen2017,4.2664,4.0474e-05 +thorsen2017,4.3118,3.9761e-05 +thorsen2017,4.3572,3.9013e-05 +thorsen2017,4.4025,3.8150e-05 +thorsen2017,4.4572,3.7288e-05 +thorsen2017,4.5025,3.6352e-05 +thorsen2017,4.5479,3.5340e-05 +thorsen2017,4.5933,3.4328e-05 +thorsen2017,4.6387,3.3241e-05 +thorsen2017,4.6931,3.2117e-05 +thorsen2017,4.7385,3.0993e-05 +thorsen2017,4.7839,2.9831e-05 +thorsen2017,4.8293,2.8632e-05 +thorsen2017,4.8837,2.7432e-05 +thorsen2017,4.9291,2.6233e-05 +thorsen2017,4.9744,2.5034e-05 +thorsen2017,5.0199,2.3872e-05 +thorsen2017,5.0652,2.2711e-05 +thorsen2017,5.1199,2.1624e-05 +thorsen2017,5.1651,2.0574e-05 +thorsen2017,5.2104,1.9638e-05 +thorsen2017,5.256,1.8776e-05 +thorsen2017,5.3104,1.8026e-05 +thorsen2017,5.3558,1.7427e-05 +thorsen2017,5.4012,1.6977e-05 +thorsen2017,5.4466,1.6715e-05 +thorsen2017,5.4919,1.6640e-05 +thorsen2017,5.5463,1.6753e-05 +thorsen2017,5.5918,1.7052e-05 +thorsen2017,5.6371,1.7539e-05 +thorsen2017,5.6826,1.8176e-05 +thorsen2017,5.737,1.8926e-05 +thorsen2017,5.7824,1.9825e-05 +thorsen2017,5.8278,2.0799e-05 +thorsen2017,5.8731,2.1849e-05 +thorsen2017,5.9185,2.2973e-05 +thorsen2017,5.973,2.4097e-05 +thorsen2017,6.0186,2.5296e-05 +thorsen2017,6.0637,2.6495e-05 +thorsen2017,6.1093,2.7695e-05 +thorsen2017,6.1637,2.8931e-05 +thorsen2017,6.2091,3.0130e-05 +thorsen2017,6.2544,3.1292e-05 +thorsen2017,6.2999,3.2454e-05 +thorsen2017,6.3453,3.3578e-05 +thorsen2017,6.3997,3.4702e-05 +thorsen2017,6.4451,3.5752e-05 +thorsen2017,6.4905,3.6764e-05 +thorsen2017,6.5358,3.7737e-05 +thorsen2017,6.5905,3.8675e-05 +thorsen2017,6.6357,3.9537e-05 +thorsen2017,6.6811,4.0361e-05 +thorsen2017,6.7266,4.1149e-05 +thorsen2017,6.7809,4.1823e-05 +thorsen2017,6.8264,4.2498e-05 +thorsen2017,6.8718,4.3059e-05 +thorsen2017,6.9172,4.3584e-05 +thorsen2017,6.9625,4.4071e-05 +thorsen2017,7.017,4.4446e-05 +thorsen2017,7.0624,4.4783e-05 +thorsen2017,7.1078,4.5046e-05 +thorsen2017,7.1531,4.5270e-05 +thorsen2017,7.2076,4.5383e-05 +thorsen2017,7.253,4.5458e-05 +thorsen2017,7.2984,4.5458e-05 +thorsen2017,7.3438,4.5383e-05 +thorsen2017,7.3891,4.5270e-05 +thorsen2017,7.4436,4.5083e-05 +thorsen2017,7.4892,4.4820e-05 +thorsen2017,7.5345,4.4521e-05 +thorsen2017,7.5799,4.4146e-05 +thorsen2017,7.6343,4.3696e-05 +thorsen2017,7.6797,4.3209e-05 +thorsen2017,7.7249,4.2647e-05 +thorsen2017,7.7705,4.2047e-05 +thorsen2017,7.8159,4.1373e-05 +thorsen2017,7.8703,4.0699e-05 +thorsen2017,7.9157,3.9949e-05 +thorsen2017,7.9611,3.9125e-05 +thorsen2017,8.0065,3.8300e-05 +thorsen2017,8.061,3.7439e-05 +thorsen2017,8.1063,3.6539e-05 +thorsen2017,8.1517,3.5640e-05 +thorsen2017,8.1971,3.4702e-05 +thorsen2017,8.2424,3.3729e-05 +thorsen2017,8.2969,3.2791e-05 +thorsen2017,8.3424,3.1817e-05 +thorsen2017,8.3878,3.0880e-05 +thorsen2017,8.433,2.9943e-05 +thorsen2017,8.4876,2.9044e-05 +thorsen2017,8.533,2.8182e-05 +thorsen2017,8.5784,2.7358e-05 +thorsen2017,8.6238,2.6608e-05 +thorsen2017,8.6692,2.5933e-05 +thorsen2017,8.7236,2.5296e-05 +thorsen2017,8.769,2.4772e-05 +thorsen2017,8.8144,2.4359e-05 +thorsen2017,8.8597,2.4059e-05 +thorsen2017,8.9142,2.3872e-05 +thorsen2017,8.9598,2.3797e-05 +thorsen2017,9.0049,2.3835e-05 +thorsen2017,9.0505,2.4022e-05 +thorsen2017,9.0957,2.4322e-05 +thorsen2017,9.1504,2.4735e-05 +thorsen2017,9.1957,2.5296e-05 +thorsen2017,9.2411,2.5896e-05 +thorsen2017,9.2865,2.6608e-05 +thorsen2017,9.3409,2.7395e-05 +thorsen2017,9.3863,2.8257e-05 +thorsen2017,9.4316,2.9156e-05 +thorsen2017,9.4772,3.0093e-05 +thorsen2017,9.5224,3.1068e-05 +thorsen2017,9.5225,3.1068e-05 +thorsen2017,9.577,3.2080e-05 +thorsen2017,9.6223,3.3091e-05 +thorsen2017,9.6679,3.4140e-05 +thorsen2017,9.7131,3.5152e-05 +thorsen2017,9.7677,3.6164e-05 +thorsen2017,9.8131,3.7175e-05 +thorsen2017,9.8585,3.8150e-05 +thorsen2017,9.9038,3.9125e-05 +thorsen2017,9.9492,4.0024e-05 +thorsen2017,10.0037,4.0924e-05 +thorsen2017,10.0491,4.1823e-05 +thorsen2017,10.0944,4.2647e-05 +thorsen2017,10.1398,4.3434e-05 +thorsen2017,10.1943,4.4146e-05 +thorsen2017,10.2397,4.4858e-05 +thorsen2017,10.2851,4.5533e-05 +thorsen2017,10.3306,4.6132e-05 +thorsen2017,10.3849,4.6695e-05 +thorsen2017,10.4304,4.7181e-05 +thorsen2017,10.4756,4.7631e-05 +thorsen2017,10.5212,4.8007e-05 +thorsen2017,10.5666,4.8343e-05 +thorsen2017,10.621,4.8605e-05 +thorsen2017,10.6663,4.8793e-05 +thorsen2017,10.7118,4.8943e-05 +thorsen2017,10.7572,4.9056e-05 +thorsen2017,10.8117,4.9093e-05 +thorsen2017,10.857,4.9056e-05 +thorsen2017,10.9024,4.8980e-05 +thorsen2017,10.9478,4.8831e-05 +thorsen2017,10.9931,4.8643e-05 +thorsen2017,11.0476,4.8381e-05 +thorsen2017,11.093,4.8081e-05 +thorsen2017,11.1385,4.7744e-05 +thorsen2017,11.1837,4.7369e-05 +thorsen2017,11.2383,4.6919e-05 +thorsen2017,11.2837,4.6470e-05 +thorsen2017,11.3291,4.5983e-05 +thorsen2017,11.3744,4.5420e-05 +thorsen2017,11.4199,4.4858e-05 +thorsen2017,11.4743,4.4296e-05 +thorsen2017,11.5197,4.3659e-05 +thorsen2017,11.5651,4.3022e-05 +thorsen2017,11.6104,4.2385e-05 +thorsen2017,11.6649,4.1711e-05 +thorsen2017,11.7557,4.0361e-05 +thorsen2017,11.8011,3.9724e-05 +thorsen2017,11.8464,3.9050e-05 +thorsen2017,11.9011,3.8413e-05 +thorsen2017,11.9462,3.7813e-05 +thorsen2017,11.9918,3.7214e-05 +thorsen2017,12.0372,3.6689e-05 +thorsen2017,12.0917,3.6202e-05 +thorsen2017,12.137,3.5752e-05 +thorsen2017,12.1823,3.5377e-05 +thorsen2017,12.2277,3.5077e-05 +thorsen2017,12.2731,3.4853e-05 +thorsen2017,12.3276,3.4665e-05 +thorsen2017,12.373,3.4553e-05 +thorsen2017,12.4184,3.4516e-05 +thorsen2017,12.4637,3.4590e-05 +thorsen2017,12.5181,3.4702e-05 +thorsen2017,12.5636,3.4928e-05 +thorsen2017,12.6092,3.5227e-05 +thorsen2017,12.6545,3.5640e-05 +thorsen2017,12.6997,3.6089e-05 +thorsen2017,12.7542,3.6651e-05 +thorsen2017,12.7997,3.7288e-05 +thorsen2017,12.8449,3.7963e-05 +thorsen2017,12.8905,3.8712e-05 +thorsen2017,12.945,3.9500e-05 +thorsen2017,12.9904,4.0361e-05 +thorsen2017,13.0356,4.1223e-05 +thorsen2017,13.081,4.2123e-05 +thorsen2017,13.1265,4.3022e-05 +thorsen2017,13.181,4.3884e-05 +thorsen2017,13.2263,4.4746e-05 +thorsen2017,13.2717,4.5608e-05 +thorsen2017,13.3171,4.6395e-05 +thorsen2017,13.3715,4.7181e-05 +thorsen2017,13.4169,4.7931e-05 +thorsen2017,13.4625,4.8605e-05 +thorsen2017,13.5078,4.9280e-05 +thorsen2017,13.5623,4.9918e-05 +thorsen2017,13.6076,5.0480e-05 +thorsen2017,13.653,5.1004e-05 +thorsen2017,13.6984,5.1492e-05 +thorsen2017,13.7437,5.1941e-05 +thorsen2017,13.7983,5.2353e-05 +thorsen2017,13.8436,5.2690e-05 +thorsen2017,13.889,5.2953e-05 +thorsen2017,13.9344,5.3215e-05 +thorsen2017,13.9888,5.3403e-05 +thorsen2017,14.0343,5.3515e-05 +thorsen2017,14.0796,5.3628e-05 +thorsen2017,14.1705,5.3628e-05 +thorsen2017,14.2248,5.3552e-05 +thorsen2017,14.2704,5.3440e-05 +thorsen2017,14.3157,5.3253e-05 +thorsen2017,14.3611,5.3028e-05 +thorsen2017,14.4155,5.2766e-05 +thorsen2017,14.4609,5.2465e-05 +thorsen2017,14.5517,5.1717e-05 +thorsen2017,14.597,5.1266e-05 +thorsen2017,14.6515,5.0779e-05 +thorsen2017,14.6969,5.0255e-05 +thorsen2017,14.7423,4.9730e-05 +thorsen2017,14.7879,4.9130e-05 +thorsen2017,14.8421,4.8531e-05 +thorsen2017,14.8875,4.7894e-05 +thorsen2017,15.0238,4.5870e-05 +thorsen2017,15.0781,4.5158e-05 +thorsen2017,15.1236,4.4446e-05 +thorsen2017,15.169,4.3734e-05 +thorsen2017,15.2144,4.3022e-05 +thorsen2017,15.2688,4.2310e-05 +thorsen2017,15.3142,4.1635e-05 +thorsen2017,15.3596,4.0924e-05 +thorsen2017,15.405,4.0287e-05 +thorsen2017,15.4503,3.9649e-05 +thorsen2017,15.5048,3.9050e-05 +thorsen2017,15.5502,3.8450e-05 +thorsen2017,15.5956,3.7925e-05 +thorsen2017,15.641,3.7439e-05 +thorsen2017,15.6954,3.7026e-05 +thorsen2017,15.7407,3.6651e-05 +thorsen2017,15.7863,3.6314e-05 +thorsen2017,15.8317,3.6052e-05 +thorsen2017,15.8771,3.5827e-05 +thorsen2017,15.9316,3.5677e-05 +thorsen2017,15.9769,3.5602e-05 +thorsen2017,16.0221,3.5565e-05 +thorsen2017,16.0677,3.5602e-05 +thorsen2017,16.1222,3.5677e-05 +thorsen2017,16.1675,3.5827e-05 +thorsen2017,16.2129,3.6014e-05 +thorsen2017,16.2582,3.6239e-05 +thorsen2017,16.3037,3.6501e-05 +thorsen2017,16.3581,3.6839e-05 +thorsen2017,16.4035,3.7175e-05 +thorsen2017,16.4491,3.7551e-05 +thorsen2017,16.4942,3.7925e-05 +thorsen2017,16.5487,3.8338e-05 +thorsen2017,16.594,3.8750e-05 +thorsen2017,16.6397,3.9162e-05 +thorsen2017,16.685,3.9612e-05 +thorsen2017,16.7304,4.0024e-05 +thorsen2017,16.7849,4.0437e-05 +thorsen2017,16.8302,4.0849e-05 +thorsen2017,16.8755,4.1261e-05 +thorsen2017,16.921,4.1635e-05 +thorsen2017,16.9755,4.2010e-05 +thorsen2017,17.0209,4.2385e-05 +thorsen2017,17.0662,4.2684e-05 +thorsen2017,17.1115,4.2985e-05 +thorsen2017,17.166,4.3284e-05 +thorsen2017,17.2116,4.3509e-05 +thorsen2017,17.2568,4.3734e-05 +thorsen2017,17.3024,4.3921e-05 +thorsen2017,17.3477,4.4071e-05 +thorsen2017,17.402,4.4184e-05 +thorsen2017,17.4473,4.4296e-05 +thorsen2017,17.4929,4.4334e-05 +thorsen2017,17.5384,4.4371e-05 +thorsen2017,17.5928,4.4334e-05 +thorsen2017,17.6382,4.4258e-05 +thorsen2017,17.6835,4.4184e-05 +thorsen2017,17.7289,4.4071e-05 +thorsen2017,17.7742,4.3884e-05 +thorsen2017,17.8288,4.3696e-05 +thorsen2017,17.9195,4.3172e-05 +thorsen2017,17.9648,4.2872e-05 +thorsen2017,18.0193,4.2498e-05 +thorsen2017,18.0647,4.2123e-05 +thorsen2017,18.1103,4.1711e-05 +thorsen2017,18.1556,4.1298e-05 +thorsen2017,18.201,4.0811e-05 +thorsen2017,18.2554,4.0324e-05 +thorsen2017,18.3009,3.9799e-05 +thorsen2017,18.3462,3.9238e-05 +thorsen2017,18.3916,3.8675e-05 +thorsen2017,18.4462,3.8075e-05 +thorsen2017,18.4915,3.7439e-05 +thorsen2017,18.5368,3.6801e-05 +thorsen2017,18.5822,3.6164e-05 +thorsen2017,18.6276,3.5489e-05 +thorsen2017,18.6823,3.4815e-05 +thorsen2017,18.7274,3.4140e-05 +thorsen2017,18.7728,3.3466e-05 +thorsen2017,18.8184,3.2754e-05 +thorsen2017,18.8728,3.2080e-05 +thorsen2017,18.918,3.1405e-05 +thorsen2017,18.9635,3.0730e-05 +thorsen2017,19.009,3.0056e-05 +thorsen2017,19.0543,2.9419e-05 +thorsen2017,19.1087,2.8781e-05 +thorsen2017,19.1542,2.8182e-05 +thorsen2017,19.1996,2.7620e-05 +thorsen2017,19.2448,2.7058e-05 +thorsen2017,19.2994,2.6534e-05 +thorsen2017,19.3448,2.6083e-05 +thorsen2017,19.3902,2.5634e-05 +thorsen2017,19.4355,2.5259e-05 +thorsen2017,19.4808,2.4922e-05 +thorsen2017,19.5355,2.4622e-05 +thorsen2017,19.5809,2.4359e-05 +thorsen2017,19.6262,2.4172e-05 +thorsen2017,19.6717,2.4022e-05 +thorsen2017,19.7261,2.3910e-05 +thorsen2017,19.7715,2.3835e-05 +thorsen2017,19.8166,2.3835e-05 +thorsen2017,19.8622,2.3872e-05 +thorsen2017,19.9077,2.3948e-05 +thorsen2017,19.9621,2.4022e-05 +thorsen2017,20.0075,2.4172e-05 +thorsen2017,20.0529,2.4322e-05 +thorsen2017,20.0982,2.4510e-05 +thorsen2017,20.1527,2.4734e-05 +thorsen2017,20.1981,2.4960e-05 +thorsen2017,20.2436,2.5184e-05 +thorsen2017,20.289,2.5409e-05 +thorsen2017,20.3434,2.5671e-05 +thorsen2017,20.3886,2.5934e-05 +thorsen2017,20.434,2.6159e-05 +thorsen2017,20.4796,2.6421e-05 +thorsen2017,20.525,2.6646e-05 +thorsen2017,20.5794,2.6908e-05 +thorsen2017,20.6248,2.7133e-05 +thorsen2017,20.6702,2.7320e-05 +thorsen2017,20.7155,2.7545e-05 +thorsen2017,20.7699,2.7732e-05 +thorsen2017,20.8154,2.7882e-05 +thorsen2017,20.8608,2.8070e-05 +thorsen2017,20.9061,2.8182e-05 +thorsen2017,20.9515,2.8295e-05 +thorsen2017,21.006,2.8407e-05 +thorsen2017,21.0515,2.8482e-05 +thorsen2017,21.0969,2.8557e-05 +thorsen2017,21.1421,2.8594e-05 +thorsen2017,21.1967,2.8632e-05 +thorsen2017,21.2419,2.8632e-05 +thorsen2017,21.2874,2.8594e-05 +thorsen2017,21.3329,2.8557e-05 +thorsen2017,21.3783,2.8482e-05 +thorsen2017,21.4327,2.8407e-05 +thorsen2017,21.478,2.8295e-05 +thorsen2017,21.5233,2.8145e-05 +thorsen2017,21.5689,2.7995e-05 +thorsen2017,21.6233,2.7808e-05 +thorsen2017,21.6687,2.7620e-05 +thorsen2017,21.714,2.7395e-05 +thorsen2017,21.7594,2.7170e-05 +thorsen2017,21.8048,2.6908e-05 +thorsen2017,21.8591,2.6608e-05 +thorsen2017,21.9048,2.6308e-05 +thorsen2017,21.95,2.6009e-05 +thorsen2017,21.9955,2.5671e-05 +thorsen2017,22.0497,2.5334e-05 +thorsen2017,22.0951,2.4960e-05 +thorsen2017,22.1405,2.4585e-05 +thorsen2017,22.1861,2.4172e-05 +thorsen2017,22.2315,2.3797e-05 +thorsen2017,22.2859,2.3385e-05 +thorsen2017,22.3312,2.2936e-05 +thorsen2017,22.3766,2.2523e-05 +thorsen2017,22.422,2.2074e-05 +thorsen2017,22.4766,2.1624e-05 +thorsen2017,22.522,2.1174e-05 +thorsen2017,22.5672,2.0687e-05 +thorsen2017,22.6126,2.0238e-05 +thorsen2017,22.658,1.9750e-05 +thorsen2017,22.7125,1.9300e-05 +thorsen2017,22.7578,1.8813e-05 +thorsen2017,22.8032,1.8326e-05 +thorsen2017,22.8488,1.7839e-05 +thorsen2017,22.9032,1.7314e-05 +thorsen2017,22.9484,1.6790e-05 +thorsen2017,22.9938,1.6265e-05 +thorsen2017,23.0394,1.5703e-05 +thorsen2017,23.0847,1.5141e-05 +thorsen2017,23.1391,1.4504e-05 +thorsen2017,23.1846,1.3867e-05 +thorsen2017,23.23,1.3154e-05 +thorsen2017,23.2753,1.2405e-05 +thorsen2017,23.3297,1.1543e-05 +thorsen2017,23.3752,1.0644e-05 +thorsen2017,23.4206,9.5946e-06 +thorsen2017,23.4659,8.4703e-06 +thorsen2017,23.5113,7.1586e-06 +thorsen2017,23.5658,5.6970e-06 +thorsen2017,23.6113,4.0480e-06 +thorsen2017,23.6564,2.1744e-06 +thorsen2017,23.7021,3.8711e-08 diff --git a/validation/experiments/wang_scr/thorsen2017_fig19_fit.json b/validation/experiments/wang_scr/thorsen2017_fig19_fit.json new file mode 100644 index 00000000..2d2505aa --- /dev/null +++ b/validation/experiments/wang_scr/thorsen2017_fig19_fit.json @@ -0,0 +1,17 @@ +{ + "x": { + "amp_m": 0.04850646676197546, + "phase_rad": -2.861742946927835, + "mean_m": 0.004840880575071412, + "rms_resid_m": 0.0032526093331303563, + "n": 742 + }, + "z": { + "amp_m": 0.1304688402025639, + "phase_rad": -1.4075616831041384, + "mean_m": 0.0015992444874741148, + "rms_resid_m": 0.0071182722737839176, + "n": 738 + }, + "period_s": 5.96 +} diff --git a/validation/experiments/wang_scr/thorsen2017_fig19_top.csv b/validation/experiments/wang_scr/thorsen2017_fig19_top.csv new file mode 100644 index 00000000..e5f109d6 --- /dev/null +++ b/validation/experiments/wang_scr/thorsen2017_fig19_top.csv @@ -0,0 +1,1481 @@ +component,t_s,disp_m +x,30.0537,-0.01515 +x,30.0805,-0.01667 +x,30.1074,-0.01818 +x,30.1342,-0.01970 +x,30.1611,-0.02121 +x,30.1879,-0.02121 +x,30.2148,-0.02424 +x,30.2416,-0.02576 +x,30.2685,-0.02576 +x,30.2953,-0.02727 +x,30.3221,-0.02879 +x,30.3490,-0.03030 +x,30.3758,-0.03030 +x,30.4027,-0.03182 +x,30.4295,-0.03333 +x,30.4564,-0.03485 +x,30.4832,-0.03485 +x,30.5101,-0.03636 +x,30.5369,-0.03636 +x,30.5638,-0.03939 +x,30.5906,-0.03939 +x,30.6174,-0.03939 +x,30.6443,-0.03939 +x,30.6711,-0.04242 +x,30.6980,-0.04242 +x,30.7248,-0.04242 +x,30.7517,-0.04394 +x,30.7785,-0.04394 +x,30.8054,-0.04394 +x,30.8322,-0.04394 +x,30.8591,-0.04545 +x,30.8859,-0.04545 +x,30.9128,-0.04545 +x,30.9396,-0.04394 +x,30.9664,-0.04545 +x,30.9933,-0.04394 +x,31.0201,-0.04545 +x,31.0470,-0.04545 +x,31.0738,-0.04394 +x,31.1007,-0.04394 +x,31.1275,-0.04545 +x,31.1544,-0.04394 +x,31.1812,-0.04394 +x,31.2081,-0.04394 +x,31.2349,-0.04394 +x,31.2617,-0.04242 +x,31.2886,-0.04242 +x,31.3154,-0.04242 +x,31.3423,-0.03939 +x,31.3691,-0.03939 +x,31.3960,-0.03939 +x,31.4228,-0.03939 +x,31.4497,-0.03939 +x,31.4765,-0.03939 +x,31.5034,-0.03636 +x,31.5302,-0.03636 +x,31.5570,-0.03636 +x,31.5839,-0.03485 +x,31.6107,-0.03485 +x,31.6376,-0.03333 +x,31.6644,-0.03333 +x,31.6913,-0.03030 +x,31.7181,-0.03030 +x,31.7450,-0.03030 +x,31.7718,-0.03030 +x,31.7987,-0.02879 +x,31.8255,-0.02727 +x,31.8523,-0.02576 +x,31.8792,-0.02576 +x,31.9060,-0.02576 +x,31.9329,-0.02424 +x,31.9597,-0.02424 +x,31.9866,-0.02121 +x,32.0134,-0.02121 +x,32.0403,-0.02121 +x,32.0671,-0.01970 +x,32.0940,-0.01818 +x,32.1208,-0.01667 +x,32.1477,-0.01667 +x,32.1745,-0.01515 +x,32.2013,-0.01364 +x,32.2282,-0.01212 +x,32.2550,-0.01212 +x,32.2819,-0.01061 +x,32.3087,-0.00909 +x,32.3356,-0.00758 +x,32.3624,-0.00758 +x,32.3893,-0.00606 +x,32.4161,-0.00455 +x,32.4430,-0.00303 +x,32.4698,-0.00303 +x,32.4966,-0.00152 +x,32.5235,0.00000 +x,32.5503,0.00152 +x,32.5772,0.00152 +x,32.6040,0.00303 +x,32.6309,0.00606 +x,32.6577,0.00606 +x,32.6846,0.00758 +x,32.7114,0.00909 +x,32.7383,0.01061 +x,32.7651,0.01212 +x,32.7919,0.01364 +x,32.8188,0.01515 +x,32.8456,0.01515 +x,32.8725,0.01818 +x,32.8993,0.01970 +x,32.9262,0.01970 +x,32.9530,0.02121 +x,32.9799,0.02424 +x,33.0067,0.02424 +x,33.0336,0.02576 +x,33.0604,0.02879 +x,33.0872,0.02879 +x,33.1141,0.03030 +x,33.1409,0.03182 +x,33.1678,0.03333 +x,33.1946,0.03333 +x,33.2215,0.03636 +x,33.2483,0.03788 +x,33.2752,0.03788 +x,33.3020,0.03939 +x,33.3289,0.04242 +x,33.3557,0.04242 +x,33.3826,0.04394 +x,33.4094,0.04545 +x,33.4362,0.04697 +x,33.4631,0.04697 +x,33.4899,0.04848 +x,33.5168,0.05000 +x,33.5436,0.05152 +x,33.5705,0.05152 +x,33.5973,0.05152 +x,33.6242,0.05152 +x,33.6510,0.05152 +x,33.6779,0.05455 +x,33.7047,0.05455 +x,33.7315,0.05455 +x,33.7584,0.05455 +x,33.7852,0.05606 +x,33.8121,0.05606 +x,33.8389,0.05606 +x,33.8658,0.05606 +x,33.8926,0.05606 +x,33.9195,0.05606 +x,33.9463,0.05606 +x,33.9732,0.05606 +x,34.0000,0.05606 +x,34.0268,0.05606 +x,34.0537,0.05606 +x,34.0805,0.05606 +x,34.1074,0.05455 +x,34.1342,0.05455 +x,34.1611,0.05455 +x,34.1879,0.05152 +x,34.2148,0.05152 +x,34.2416,0.05152 +x,34.2685,0.05152 +x,34.2953,0.05152 +x,34.3221,0.05152 +x,34.3490,0.05000 +x,34.3758,0.04848 +x,34.4027,0.04848 +x,34.4295,0.04697 +x,34.4564,0.04697 +x,34.4832,0.04697 +x,34.5101,0.04545 +x,34.5369,0.04545 +x,34.5638,0.04242 +x,34.5906,0.04242 +x,34.6174,0.04242 +x,34.6443,0.04242 +x,34.6711,0.04091 +x,34.6980,0.03939 +x,34.7248,0.03939 +x,34.7517,0.03788 +x,34.7785,0.03788 +x,34.8054,0.03636 +x,34.8322,0.03485 +x,34.8591,0.03333 +x,34.8859,0.03333 +x,34.9128,0.03333 +x,34.9396,0.03182 +x,34.9664,0.03030 +x,34.9933,0.02879 +x,35.0201,0.02879 +x,35.0470,0.02727 +x,35.0738,0.02576 +x,35.1007,0.02424 +x,35.1275,0.02424 +x,35.1544,0.02424 +x,35.1812,0.02121 +x,35.2081,0.02121 +x,35.2349,0.01970 +x,35.2617,0.01970 +x,35.2886,0.01818 +x,35.3154,0.01515 +x,35.3423,0.01515 +x,35.3691,0.01515 +x,35.3960,0.01364 +x,35.4228,0.01212 +x,35.4497,0.01061 +x,35.4765,0.01061 +x,35.5034,0.00909 +x,35.5302,0.00606 +x,35.5570,0.00606 +x,35.5839,0.00606 +x,35.6107,0.00303 +x,35.6376,0.00303 +x,35.6644,0.00152 +x,35.6913,0.00000 +x,35.7181,-0.00152 +x,35.7450,-0.00303 +x,35.7718,-0.00303 +x,35.7987,-0.00455 +x,35.8255,-0.00606 +x,35.8523,-0.00758 +x,35.8792,-0.00909 +x,35.9060,-0.01061 +x,35.9329,-0.01212 +x,35.9597,-0.01212 +x,35.9866,-0.01515 +x,36.0134,-0.01667 +x,36.0403,-0.01667 +x,36.0671,-0.01818 +x,36.0940,-0.01970 +x,36.1208,-0.02121 +x,36.1477,-0.02121 +x,36.1745,-0.02424 +x,36.2013,-0.02576 +x,36.2282,-0.02576 +x,36.2550,-0.02727 +x,36.2819,-0.02879 +x,36.3087,-0.03030 +x,36.3356,-0.03030 +x,36.3624,-0.03182 +x,36.3893,-0.03333 +x,36.4161,-0.03485 +x,36.4430,-0.03485 +x,36.4698,-0.03636 +x,36.4966,-0.03788 +x,36.5235,-0.03939 +x,36.5503,-0.03939 +x,36.5772,-0.03939 +x,36.6040,-0.03939 +x,36.6309,-0.04242 +x,36.6577,-0.04242 +x,36.6846,-0.04242 +x,36.7114,-0.04394 +x,36.7383,-0.04394 +x,36.7651,-0.04394 +x,36.7919,-0.04394 +x,36.8188,-0.04545 +x,36.8456,-0.04394 +x,36.8725,-0.04394 +x,36.8993,-0.04394 +x,36.9262,-0.04394 +x,36.9530,-0.04545 +x,36.9799,-0.04394 +x,37.0067,-0.04394 +x,37.0336,-0.04394 +x,37.0604,-0.04394 +x,37.0872,-0.04545 +x,37.1141,-0.04394 +x,37.1409,-0.04394 +x,37.1678,-0.04394 +x,37.1946,-0.04394 +x,37.2215,-0.04242 +x,37.2483,-0.04242 +x,37.2752,-0.04242 +x,37.3020,-0.03939 +x,37.3289,-0.03939 +x,37.3557,-0.03939 +x,37.3826,-0.03939 +x,37.4094,-0.03939 +x,37.4362,-0.03788 +x,37.4631,-0.03636 +x,37.4899,-0.03636 +x,37.5168,-0.03636 +x,37.5436,-0.03485 +x,37.5705,-0.03485 +x,37.5973,-0.03333 +x,37.6242,-0.03333 +x,37.6510,-0.03030 +x,37.6779,-0.03030 +x,37.7047,-0.03030 +x,37.7315,-0.03030 +x,37.7584,-0.03030 +x,37.7852,-0.02727 +x,37.8121,-0.02727 +x,37.8389,-0.02576 +x,37.8658,-0.02576 +x,37.8926,-0.02424 +x,37.9195,-0.02273 +x,37.9463,-0.02121 +x,37.9732,-0.02121 +x,38.0000,-0.02121 +x,38.0268,-0.01818 +x,38.0537,-0.01818 +x,38.0805,-0.01667 +x,38.1074,-0.01667 +x,38.1342,-0.01515 +x,38.1611,-0.01515 +x,38.1879,-0.01212 +x,38.2148,-0.01212 +x,38.2416,-0.01212 +x,38.2685,-0.00909 +x,38.2953,-0.00758 +x,38.3221,-0.00758 +x,38.3490,-0.00606 +x,38.3758,-0.00455 +x,38.4027,-0.00303 +x,38.4295,-0.00303 +x,38.4564,-0.00303 +x,38.4832,0.00000 +x,38.5101,0.00152 +x,38.5369,0.00152 +x,38.5638,0.00455 +x,38.5906,0.00606 +x,38.6174,0.00606 +x,38.6443,0.00758 +x,38.6711,0.01061 +x,38.6980,0.01061 +x,38.7248,0.01061 +x,38.7517,0.01212 +x,38.7785,0.01515 +x,38.8054,0.01515 +x,38.8322,0.01818 +x,38.8591,0.01970 +x,38.8859,0.01970 +x,38.9128,0.02121 +x,38.9396,0.02424 +x,38.9664,0.02424 +x,38.9933,0.02576 +x,39.0201,0.02727 +x,39.0470,0.02879 +x,39.0738,0.03030 +x,39.1007,0.03182 +x,39.1275,0.03333 +x,39.1544,0.03485 +x,39.1812,0.03636 +x,39.2081,0.03788 +x,39.2349,0.03788 +x,39.2617,0.03939 +x,39.2886,0.04242 +x,39.3154,0.04242 +x,39.3423,0.04394 +x,39.3691,0.04545 +x,39.3960,0.04697 +x,39.4228,0.04697 +x,39.4497,0.04848 +x,39.4765,0.05000 +x,39.5034,0.05152 +x,39.5302,0.05152 +x,39.5570,0.05152 +x,39.5839,0.05152 +x,39.6107,0.05152 +x,39.6376,0.05455 +x,39.6644,0.05455 +x,39.6913,0.05455 +x,39.7181,0.05455 +x,39.7450,0.05606 +x,39.7718,0.05606 +x,39.7987,0.05606 +x,39.8255,0.05606 +x,39.8523,0.05606 +x,39.8792,0.05606 +x,39.9060,0.05606 +x,39.9329,0.05606 +x,39.9597,0.05606 +x,39.9866,0.05606 +x,40.0134,0.05606 +x,40.0403,0.05455 +x,40.0671,0.05455 +x,40.0940,0.05455 +x,40.1208,0.05455 +x,40.1477,0.05152 +x,40.1745,0.05152 +x,40.2013,0.05152 +x,40.2282,0.05152 +x,40.2550,0.05152 +x,40.2819,0.05152 +x,40.3087,0.05152 +x,40.3356,0.04848 +x,40.3624,0.04848 +x,40.3893,0.04697 +x,40.4161,0.04697 +x,40.4430,0.04697 +x,40.4698,0.04545 +x,40.4966,0.04545 +x,40.5235,0.04242 +x,40.5503,0.04242 +x,40.5772,0.04242 +x,40.6040,0.04242 +x,40.6309,0.03939 +x,40.6577,0.03939 +x,40.6846,0.03788 +x,40.7114,0.03788 +x,40.7383,0.03788 +x,40.7651,0.03636 +x,40.7919,0.03485 +x,40.8188,0.03333 +x,40.8456,0.03333 +x,40.8725,0.03333 +x,40.8993,0.03030 +x,40.9262,0.02879 +x,40.9530,0.02879 +x,40.9799,0.02727 +x,41.0067,0.02727 +x,41.0336,0.02424 +x,41.0604,0.02424 +x,41.0872,0.02424 +x,41.1141,0.02273 +x,41.1409,0.02121 +x,41.1678,0.01970 +x,41.1946,0.01970 +x,41.2215,0.01818 +x,41.2483,0.01667 +x,41.2752,0.01515 +x,41.3020,0.01515 +x,41.3289,0.01364 +x,41.3557,0.01212 +x,41.3826,0.01061 +x,41.4094,0.01061 +x,41.4362,0.00909 +x,41.4631,0.00758 +x,41.4899,0.00606 +x,41.5168,0.00606 +x,41.5436,0.00455 +x,41.5705,0.00303 +x,41.5973,0.00152 +x,41.6242,0.00000 +x,41.6510,-0.00152 +x,41.6779,-0.00303 +x,41.7047,-0.00303 +x,41.7315,-0.00455 +x,41.7584,-0.00606 +x,41.7852,-0.00758 +x,41.8121,-0.00909 +x,41.8389,-0.01061 +x,41.8658,-0.01212 +x,41.8926,-0.01364 +x,41.9195,-0.01667 +x,41.9463,-0.01667 +x,41.9732,-0.01818 +x,42.0000,-0.02121 +x,42.0268,-0.02121 +x,42.0537,-0.02273 +x,42.0805,-0.02424 +x,42.1074,-0.02576 +x,42.1342,-0.02576 +x,42.1611,-0.02727 +x,42.1879,-0.03030 +x,42.2148,-0.03030 +x,42.2416,-0.03030 +x,42.2685,-0.03333 +x,42.2953,-0.03485 +x,42.3221,-0.03485 +x,42.3490,-0.03636 +x,42.3758,-0.03636 +x,42.4027,-0.03939 +x,42.4295,-0.03939 +x,42.4564,-0.03939 +x,42.4832,-0.03939 +x,42.5101,-0.04091 +x,42.5369,-0.04242 +x,42.5638,-0.04242 +x,42.5906,-0.04394 +x,42.6174,-0.04394 +x,42.6443,-0.04394 +x,42.6711,-0.04394 +x,42.6980,-0.04545 +x,42.7248,-0.04545 +x,42.7517,-0.04394 +x,42.7785,-0.04394 +x,42.8054,-0.04545 +x,42.8322,-0.04394 +x,42.8591,-0.04545 +x,42.8859,-0.04394 +x,42.9128,-0.04394 +x,42.9396,-0.04394 +x,42.9664,-0.04394 +x,42.9933,-0.04394 +x,43.0201,-0.04394 +x,43.0470,-0.04394 +x,43.0738,-0.04394 +x,43.1007,-0.04394 +x,43.1275,-0.04242 +x,43.1544,-0.04242 +x,43.1812,-0.04091 +x,43.2081,-0.03939 +x,43.2349,-0.03939 +x,43.2617,-0.03939 +x,43.2886,-0.03939 +x,43.3154,-0.03939 +x,43.3423,-0.03636 +x,43.3691,-0.03636 +x,43.3960,-0.03636 +x,43.4228,-0.03485 +x,43.4497,-0.03485 +x,43.4765,-0.03333 +x,43.5034,-0.03333 +x,43.5302,-0.03182 +x,43.5570,-0.03030 +x,43.5839,-0.03030 +x,43.6107,-0.03030 +x,43.6376,-0.03030 +x,43.6644,-0.02727 +x,43.6913,-0.02576 +x,43.7181,-0.02576 +x,43.7450,-0.02424 +x,43.7718,-0.02424 +x,43.7987,-0.02121 +x,43.8255,-0.02121 +x,43.8523,-0.02121 +x,43.8792,-0.01970 +x,43.9060,-0.01818 +x,43.9329,-0.01667 +x,43.9597,-0.01515 +x,43.9866,-0.01515 +x,44.0134,-0.01212 +x,44.0403,-0.01212 +x,44.0671,-0.01061 +x,44.0940,-0.00909 +x,44.1208,-0.00758 +x,44.1477,-0.00758 +x,44.1745,-0.00606 +x,44.2013,-0.00455 +x,44.2282,-0.00303 +x,44.2550,-0.00303 +x,44.2819,-0.00152 +x,44.3087,0.00000 +x,44.3356,0.00152 +x,44.3624,0.00152 +x,44.3893,0.00455 +x,44.4161,0.00606 +x,44.4430,0.00606 +x,44.4698,0.00758 +x,44.4966,0.00909 +x,44.5235,0.01061 +x,44.5503,0.01061 +x,44.5772,0.01212 +x,44.6040,0.01515 +x,44.6309,0.01515 +x,44.6577,0.01667 +x,44.6846,0.01970 +x,44.7114,0.01970 +x,44.7383,0.02121 +x,44.7651,0.02424 +x,44.7919,0.02424 +x,44.8188,0.02424 +x,44.8456,0.02727 +x,44.8725,0.02879 +x,44.8993,0.03030 +x,44.9262,0.03182 +x,44.9530,0.03333 +x,44.9799,0.03333 +x,45.0067,0.03636 +x,45.0336,0.03788 +x,45.0604,0.03788 +x,45.0872,0.03939 +x,45.1141,0.04242 +x,45.1409,0.04242 +x,45.1678,0.04394 +x,45.1946,0.04545 +x,45.2215,0.04697 +x,45.2483,0.04697 +x,45.2752,0.04848 +x,45.3020,0.05000 +x,45.3289,0.05152 +x,45.3557,0.05152 +x,45.3826,0.05152 +x,45.4094,0.05152 +x,45.4362,0.05152 +x,45.4631,0.05455 +x,45.4899,0.05455 +x,45.5168,0.05455 +x,45.5436,0.05455 +x,45.5705,0.05606 +x,45.5973,0.05606 +x,45.6242,0.05606 +x,45.6510,0.05606 +x,45.6779,0.05606 +x,45.7047,0.05606 +x,45.7315,0.05606 +x,45.7584,0.05606 +x,45.7852,0.05606 +x,45.8121,0.05606 +x,45.8389,0.05606 +x,45.8658,0.05606 +x,45.8926,0.05455 +x,45.9195,0.05455 +x,45.9463,0.05455 +x,45.9732,0.05152 +x,46.0000,0.05152 +x,46.0268,0.05152 +x,46.0537,0.05152 +x,46.0805,0.05152 +x,46.1074,0.05152 +x,46.1342,0.05000 +x,46.1611,0.04848 +x,46.1879,0.04848 +x,46.2148,0.04697 +x,46.2416,0.04697 +x,46.2685,0.04697 +x,46.2953,0.04545 +x,46.3221,0.04545 +x,46.3490,0.04394 +x,46.3758,0.04242 +x,46.4027,0.04242 +x,46.4295,0.04242 +x,46.4564,0.04091 +x,46.4832,0.03939 +x,46.5101,0.03788 +x,46.5369,0.03788 +x,46.5638,0.03788 +x,46.5906,0.03636 +x,46.6174,0.03485 +x,46.6443,0.03333 +x,46.6711,0.03333 +x,46.6980,0.03333 +x,46.7248,0.03030 +x,46.7517,0.03030 +x,46.7785,0.02879 +x,46.8054,0.02879 +x,46.8322,0.02727 +x,46.8591,0.02576 +x,46.8859,0.02424 +x,46.9128,0.02424 +x,46.9396,0.02424 +x,46.9664,0.02121 +x,46.9933,0.01970 +x,47.0201,0.01970 +x,47.0470,0.01818 +x,47.0738,0.01818 +x,47.1007,0.01515 +x,47.1275,0.01515 +x,47.1544,0.01515 +x,47.1812,0.01212 +x,47.2081,0.01061 +x,47.2349,0.01061 +x,47.2617,0.01061 +x,47.2886,0.00758 +x,47.3154,0.00606 +x,47.3423,0.00606 +x,47.3691,0.00455 +x,47.3960,0.00303 +x,47.4228,0.00152 +x,47.4497,0.00000 +x,47.4765,0.00000 +x,47.5034,-0.00303 +x,47.5302,-0.00303 +x,47.5570,-0.00455 +x,47.5839,-0.00606 +x,47.6107,-0.00758 +x,47.6376,-0.00909 +x,47.6644,-0.00909 +x,47.6913,-0.01212 +x,47.7181,-0.01212 +x,47.7450,-0.01364 +x,47.7718,-0.01515 +x,47.7987,-0.01667 +x,47.8255,-0.01818 +x,47.8523,-0.01970 +x,47.8792,-0.02121 +x,47.9060,-0.02273 +x,47.9329,-0.02424 +x,47.9597,-0.02576 +x,47.9866,-0.02576 +x,48.0134,-0.02727 +x,48.0403,-0.03030 +x,48.0671,-0.03030 +x,48.0940,-0.03030 +x,48.1208,-0.03333 +x,48.1477,-0.03333 +x,48.1745,-0.03485 +x,48.2013,-0.03485 +x,48.2282,-0.03636 +x,48.2550,-0.03939 +x,48.2819,-0.03939 +x,48.3087,-0.03939 +x,48.3356,-0.03939 +x,48.3624,-0.04091 +x,48.3893,-0.04242 +x,48.4161,-0.04242 +x,48.4430,-0.04394 +x,48.4698,-0.04394 +x,48.4966,-0.04394 +x,48.5235,-0.04394 +x,48.5503,-0.04545 +x,48.5772,-0.04545 +x,48.6040,-0.04545 +x,48.6309,-0.04394 +x,48.6577,-0.04394 +x,48.6846,-0.04394 +x,48.7114,-0.04394 +x,48.7383,-0.04394 +x,48.7651,-0.04394 +x,48.7919,-0.04394 +x,48.8188,-0.04545 +x,48.8456,-0.04394 +x,48.8725,-0.04394 +x,48.8993,-0.04394 +x,48.9262,-0.04394 +x,48.9530,-0.04394 +x,48.9799,-0.04242 +x,49.0067,-0.04242 +x,49.0336,-0.04091 +x,49.0604,-0.03939 +x,49.0872,-0.03939 +x,49.1141,-0.03939 +x,49.1409,-0.03939 +x,49.1678,-0.03939 +x,49.1946,-0.03788 +x,49.2215,-0.03636 +x,49.2483,-0.03636 +x,49.2752,-0.03485 +x,49.3020,-0.03485 +x,49.3289,-0.03485 +x,49.3557,-0.03333 +x,49.3826,-0.03333 +x,49.4094,-0.03030 +x,49.4362,-0.03030 +x,49.4631,-0.03030 +x,49.4899,-0.03030 +x,49.5168,-0.02727 +x,49.5436,-0.02727 +x,49.5705,-0.02576 +x,49.5973,-0.02576 +x,49.6242,-0.02424 +x,49.6510,-0.02424 +x,49.6779,-0.02273 +x,49.7047,-0.02121 +x,49.7315,-0.02121 +x,49.7584,-0.02121 +x,49.7852,-0.01818 +x,49.8121,-0.01667 +x,49.8389,-0.01667 +x,49.8658,-0.01667 +x,49.8926,-0.01515 +x,49.9195,-0.01212 +x,49.9463,-0.01212 +z,30.0537,-0.12121 +z,30.0805,-0.12121 +z,30.1074,-0.12121 +z,30.1342,-0.11818 +z,30.1611,-0.11667 +z,30.1879,-0.11667 +z,30.2148,-0.11364 +z,30.2416,-0.11212 +z,30.2685,-0.10909 +z,30.2953,-0.10758 +z,30.3221,-0.10455 +z,30.3490,-0.10303 +z,30.3758,-0.10000 +z,30.4027,-0.09848 +z,30.4295,-0.09545 +z,30.4564,-0.09242 +z,30.4832,-0.08939 +z,30.5101,-0.08636 +z,30.5369,-0.08333 +z,30.5638,-0.08030 +z,30.5906,-0.07727 +z,30.6174,-0.07424 +z,30.6443,-0.07121 +z,30.6711,-0.06667 +z,30.6980,-0.06364 +z,30.7248,-0.06061 +z,30.7517,-0.05758 +z,30.7785,-0.05303 +z,30.8054,-0.05000 +z,30.8322,-0.04848 +z,30.8591,-0.03939 +z,30.8859,-0.03788 +z,30.9128,-0.03485 +z,30.9396,-0.03182 +z,30.9664,-0.02879 +z,30.9933,-0.02424 +z,31.0201,-0.01970 +z,31.0470,-0.01667 +z,31.0738,-0.01364 +z,31.1007,-0.00909 +z,31.1275,-0.00606 +z,31.1544,-0.00152 +z,31.1812,0.00152 +z,31.2081,0.00455 +z,31.2349,0.00909 +z,31.2617,0.01212 +z,31.2886,0.01667 +z,31.3154,0.01970 +z,31.3423,0.02273 +z,31.3691,0.02727 +z,31.3960,0.03030 +z,31.4228,0.03333 +z,31.4497,0.03788 +z,31.4765,0.04091 +z,31.5034,0.04394 +z,31.5302,0.04697 +z,31.5570,0.05152 +z,31.5839,0.05606 +z,31.6107,0.05606 +z,31.6376,0.06061 +z,31.6644,0.06515 +z,31.6913,0.06515 +z,31.7181,0.06970 +z,31.7450,0.07273 +z,31.7718,0.07424 +z,31.7987,0.07879 +z,31.8255,0.08030 +z,31.8523,0.08333 +z,31.8792,0.08636 +z,31.9060,0.08788 +z,31.9329,0.09242 +z,31.9597,0.09394 +z,31.9866,0.09697 +z,32.0134,0.09848 +z,32.0403,0.10152 +z,32.0671,0.10303 +z,32.0940,0.10606 +z,32.1208,0.10606 +z,32.1477,0.10909 +z,32.1745,0.11061 +z,32.2013,0.11212 +z,32.2282,0.11515 +z,32.2550,0.11515 +z,32.2819,0.11818 +z,32.3087,0.11970 +z,32.3356,0.11970 +z,32.3624,0.12273 +z,32.3893,0.12424 +z,32.4161,0.12424 +z,32.4430,0.12424 +z,32.4698,0.12727 +z,32.4966,0.12727 +z,32.5235,0.12879 +z,32.5503,0.12879 +z,32.5772,0.12879 +z,32.6040,0.13030 +z,32.6309,0.13030 +z,32.6577,0.13030 +z,32.6846,0.13030 +z,32.7114,0.13030 +z,32.7383,0.13030 +z,32.7651,0.13030 +z,32.7919,0.13030 +z,32.8188,0.13030 +z,32.8456,0.13030 +z,32.8725,0.13030 +z,32.8993,0.13030 +z,32.9262,0.13030 +z,32.9530,0.12879 +z,32.9799,0.12879 +z,33.0067,0.12879 +z,33.0336,0.12727 +z,33.0604,0.12424 +z,33.0872,0.12424 +z,33.1141,0.12273 +z,33.1409,0.11970 +z,33.1678,0.11970 +z,33.1946,0.11667 +z,33.2215,0.11515 +z,33.2483,0.11364 +z,33.2752,0.11061 +z,33.3020,0.10758 +z,33.3289,0.10606 +z,33.3557,0.10455 +z,33.3826,0.10152 +z,33.4094,0.09848 +z,33.4362,0.09545 +z,33.4631,0.09242 +z,33.4899,0.08939 +z,33.5168,0.08636 +z,33.5436,0.08333 +z,33.5705,0.08030 +z,33.5973,0.07576 +z,33.6242,0.07273 +z,33.6510,0.06970 +z,33.6779,0.06515 +z,33.7047,0.06212 +z,33.7315,0.05909 +z,33.7852,0.05152 +z,33.8121,0.04697 +z,33.8389,0.04394 +z,33.8658,0.04091 +z,33.8926,0.03788 +z,33.9195,0.03333 +z,33.9463,0.02879 +z,33.9732,0.02576 +z,34.0000,0.02121 +z,34.0268,0.01818 +z,34.0537,0.01364 +z,34.0805,0.01061 +z,34.1074,0.00606 +z,34.1342,0.00303 +z,34.1611,-0.00152 +z,34.1879,-0.00455 +z,34.2148,-0.00758 +z,34.2416,-0.01061 +z,34.2685,-0.01667 +z,34.2953,-0.01970 +z,34.3221,-0.02273 +z,34.3490,-0.02576 +z,34.3758,-0.03030 +z,34.4027,-0.03333 +z,34.4295,-0.03636 +z,34.4564,-0.04091 +z,34.4832,-0.04394 +z,34.5101,-0.04697 +z,34.5369,-0.05000 +z,34.5638,-0.05303 +z,34.5906,-0.05606 +z,34.6174,-0.05909 +z,34.6443,-0.06212 +z,34.6711,-0.06515 +z,34.6980,-0.06818 +z,34.7248,-0.07121 +z,34.7517,-0.07424 +z,34.7785,-0.07727 +z,34.8054,-0.08030 +z,34.8322,-0.08333 +z,34.8591,-0.08636 +z,34.8859,-0.08939 +z,34.9128,-0.08939 +z,34.9396,-0.09394 +z,34.9664,-0.09394 +z,34.9933,-0.09848 +z,35.0201,-0.09848 +z,35.0470,-0.10303 +z,35.0738,-0.10303 +z,35.1007,-0.10606 +z,35.1275,-0.10758 +z,35.1544,-0.10909 +z,35.1812,-0.11212 +z,35.2081,-0.11212 +z,35.2349,-0.11364 +z,35.2617,-0.11667 +z,35.2886,-0.11667 +z,35.3154,-0.11818 +z,35.3423,-0.12121 +z,35.3691,-0.12121 +z,35.3960,-0.12121 +z,35.4228,-0.12273 +z,35.4497,-0.12424 +z,35.4765,-0.12576 +z,35.5034,-0.12576 +z,35.5302,-0.12576 +z,35.5570,-0.12727 +z,35.5839,-0.12727 +z,35.6107,-0.12727 +z,35.6376,-0.12727 +z,35.6644,-0.12727 +z,35.6913,-0.12879 +z,35.7181,-0.13030 +z,35.7450,-0.13030 +z,35.7718,-0.12727 +z,35.7987,-0.12727 +z,35.8255,-0.12727 +z,35.8523,-0.12727 +z,35.8792,-0.12727 +z,35.9060,-0.12576 +z,35.9329,-0.12576 +z,35.9597,-0.12576 +z,35.9866,-0.12424 +z,36.0134,-0.12121 +z,36.0403,-0.12121 +z,36.0671,-0.12121 +z,36.0940,-0.11818 +z,36.1208,-0.11667 +z,36.1477,-0.11515 +z,36.1745,-0.11212 +z,36.2013,-0.11212 +z,36.2282,-0.10909 +z,36.2550,-0.10758 +z,36.2819,-0.10455 +z,36.3087,-0.10303 +z,36.3356,-0.10000 +z,36.3624,-0.09848 +z,36.3893,-0.09394 +z,36.4161,-0.09242 +z,36.4430,-0.08939 +z,36.4698,-0.08636 +z,36.4966,-0.08333 +z,36.5235,-0.08030 +z,36.5503,-0.07727 +z,36.5772,-0.07424 +z,36.6040,-0.07121 +z,36.6309,-0.06667 +z,36.6577,-0.06364 +z,36.6846,-0.05909 +z,36.7114,-0.05606 +z,36.7383,-0.05303 +z,36.7651,-0.05000 +z,36.7919,-0.04848 +z,36.8188,-0.03939 +z,36.8456,-0.03788 +z,36.8725,-0.03485 +z,36.8993,-0.03182 +z,36.9262,-0.02879 +z,36.9530,-0.02424 +z,36.9799,-0.01970 +z,37.0067,-0.01667 +z,37.0336,-0.01364 +z,37.0604,-0.00909 +z,37.0872,-0.00606 +z,37.1141,-0.00152 +z,37.1409,0.00152 +z,37.1678,0.00606 +z,37.1946,0.01061 +z,37.2215,0.01364 +z,37.2483,0.01667 +z,37.2752,0.01970 +z,37.3020,0.02273 +z,37.3289,0.02727 +z,37.3557,0.03182 +z,37.3826,0.03485 +z,37.4094,0.03788 +z,37.4362,0.04091 +z,37.4631,0.04394 +z,37.4899,0.04697 +z,37.5168,0.05152 +z,37.5436,0.05606 +z,37.5705,0.05606 +z,37.5973,0.06061 +z,37.6242,0.06515 +z,37.6510,0.06515 +z,37.6779,0.06970 +z,37.7047,0.07424 +z,37.7315,0.07424 +z,37.7584,0.07879 +z,37.7852,0.08182 +z,37.8121,0.08333 +z,37.8389,0.08636 +z,37.8658,0.08939 +z,37.8926,0.09242 +z,37.9195,0.09394 +z,37.9463,0.09697 +z,37.9732,0.09848 +z,38.0000,0.10152 +z,38.0268,0.10303 +z,38.0537,0.10606 +z,38.0805,0.10606 +z,38.1074,0.10909 +z,38.1342,0.11061 +z,38.1611,0.11212 +z,38.1879,0.11515 +z,38.2148,0.11515 +z,38.2416,0.11818 +z,38.2685,0.11970 +z,38.2953,0.11970 +z,38.3221,0.12121 +z,38.3490,0.12424 +z,38.3758,0.12424 +z,38.4027,0.12424 +z,38.4295,0.12727 +z,38.4564,0.12879 +z,38.4832,0.12879 +z,38.5101,0.12879 +z,38.5369,0.12879 +z,38.5638,0.12879 +z,38.5906,0.13030 +z,38.6174,0.13030 +z,38.6443,0.13030 +z,38.6711,0.13030 +z,38.6980,0.13030 +z,38.7248,0.13030 +z,38.7517,0.13030 +z,38.7785,0.13030 +z,38.8054,0.13030 +z,38.8322,0.13030 +z,38.8591,0.13030 +z,38.8859,0.13030 +z,38.9128,0.12879 +z,38.9396,0.12879 +z,38.9664,0.12879 +z,38.9933,0.12727 +z,39.0201,0.12424 +z,39.0470,0.12424 +z,39.0738,0.12273 +z,39.1007,0.11970 +z,39.1275,0.11970 +z,39.1544,0.11667 +z,39.1812,0.11515 +z,39.2081,0.11364 +z,39.2349,0.11061 +z,39.2617,0.10758 +z,39.2886,0.10606 +z,39.3154,0.10303 +z,39.3423,0.10152 +z,39.3691,0.09697 +z,39.3960,0.09545 +z,39.4228,0.09242 +z,39.4497,0.08939 +z,39.4765,0.08636 +z,39.5034,0.08333 +z,39.5302,0.08030 +z,39.5570,0.07576 +z,39.5839,0.07121 +z,39.6107,0.06818 +z,39.6376,0.06515 +z,39.6644,0.06212 +z,39.6913,0.05909 +z,39.7450,0.05152 +z,39.7718,0.04697 +z,39.7987,0.04394 +z,39.8255,0.03939 +z,39.8523,0.03636 +z,39.8792,0.03182 +z,39.9060,0.02879 +z,39.9329,0.02576 +z,39.9597,0.02121 +z,39.9866,0.01818 +z,40.0134,0.01364 +z,40.0403,0.01061 +z,40.0671,0.00606 +z,40.0940,0.00303 +z,40.1208,-0.00152 +z,40.1477,-0.00455 +z,40.1745,-0.00758 +z,40.2013,-0.01212 +z,40.2282,-0.01667 +z,40.2550,-0.01970 +z,40.2819,-0.02273 +z,40.3087,-0.02576 +z,40.3356,-0.02879 +z,40.3624,-0.03485 +z,40.3893,-0.03788 +z,40.4161,-0.04091 +z,40.4430,-0.04394 +z,40.4698,-0.04697 +z,40.4966,-0.05000 +z,40.5235,-0.05303 +z,40.5503,-0.05758 +z,40.5772,-0.05909 +z,40.6040,-0.06212 +z,40.6309,-0.06515 +z,40.6577,-0.06818 +z,40.6846,-0.07121 +z,40.7114,-0.07576 +z,40.7383,-0.07727 +z,40.7651,-0.08030 +z,40.7919,-0.08333 +z,40.8188,-0.08636 +z,40.8456,-0.08939 +z,40.8725,-0.09242 +z,40.8993,-0.09394 +z,40.9262,-0.09697 +z,40.9530,-0.09848 +z,40.9799,-0.10152 +z,41.0067,-0.10303 +z,41.0336,-0.10606 +z,41.0604,-0.10758 +z,41.0872,-0.10909 +z,41.1141,-0.11212 +z,41.1409,-0.11212 +z,41.1678,-0.11364 +z,41.1946,-0.11667 +z,41.2215,-0.11667 +z,41.2483,-0.11818 +z,41.2752,-0.11970 +z,41.3020,-0.12121 +z,41.3289,-0.12121 +z,41.3557,-0.12273 +z,41.3826,-0.12424 +z,41.4094,-0.12576 +z,41.4362,-0.12576 +z,41.4631,-0.12576 +z,41.4899,-0.12576 +z,41.5168,-0.12727 +z,41.5436,-0.12727 +z,41.5705,-0.12727 +z,41.5973,-0.12727 +z,41.6242,-0.12727 +z,41.6510,-0.13030 +z,41.6779,-0.13030 +z,41.7047,-0.12727 +z,41.7315,-0.12727 +z,41.7584,-0.12727 +z,41.7852,-0.12727 +z,41.8121,-0.12727 +z,41.8389,-0.12576 +z,41.8658,-0.12576 +z,41.8926,-0.12424 +z,41.9195,-0.12121 +z,41.9463,-0.12121 +z,41.9732,-0.11970 +z,42.0000,-0.11667 +z,42.0268,-0.11667 +z,42.0537,-0.11364 +z,42.0805,-0.11212 +z,42.1074,-0.11061 +z,42.1342,-0.10758 +z,42.1611,-0.10606 +z,42.1879,-0.10303 +z,42.2148,-0.10152 +z,42.2416,-0.09848 +z,42.2685,-0.09545 +z,42.2953,-0.09242 +z,42.3221,-0.08939 +z,42.3490,-0.08788 +z,42.3758,-0.08485 +z,42.4027,-0.08030 +z,42.4295,-0.07727 +z,42.4564,-0.07424 +z,42.4832,-0.07121 +z,42.5101,-0.06818 +z,42.5369,-0.06515 +z,42.5638,-0.06212 +z,42.5906,-0.05909 +z,42.6174,-0.05455 +z,42.6443,-0.05000 +z,42.6711,-0.04848 +z,42.7248,-0.03939 +z,42.7517,-0.03636 +z,42.7785,-0.03333 +z,42.8054,-0.02879 +z,42.8322,-0.02576 +z,42.8591,-0.02121 +z,42.8859,-0.01818 +z,42.9128,-0.01364 +z,42.9396,-0.01061 +z,42.9664,-0.00758 +z,42.9933,-0.00455 +z,43.0201,0.00152 +z,43.0470,0.00303 +z,43.0738,0.00758 +z,43.1007,0.01061 +z,43.1275,0.01515 +z,43.1544,0.01970 +z,43.1812,0.02273 +z,43.2081,0.02576 +z,43.2349,0.02879 +z,43.2617,0.03182 +z,43.2886,0.03636 +z,43.3154,0.03939 +z,43.3423,0.04394 +z,43.3691,0.04697 +z,43.3960,0.05000 +z,43.4228,0.05455 +z,43.4497,0.05606 +z,43.4765,0.06061 +z,43.5034,0.06515 +z,43.5302,0.06515 +z,43.5570,0.06970 +z,43.5839,0.07424 +z,43.6107,0.07424 +z,43.6376,0.07879 +z,43.6644,0.08333 +z,43.6913,0.08333 +z,43.7181,0.08788 +z,43.7450,0.08939 +z,43.7718,0.09242 +z,43.7987,0.09545 +z,43.8255,0.09848 +z,43.8523,0.10152 +z,43.8792,0.10303 +z,43.9060,0.10606 +z,43.9329,0.10758 +z,43.9597,0.11061 +z,43.9866,0.11212 +z,44.0134,0.11515 +z,44.0403,0.11515 +z,44.0671,0.11818 +z,44.0940,0.11970 +z,44.1208,0.11970 +z,44.1477,0.12121 +z,44.1745,0.12424 +z,44.2013,0.12424 +z,44.2282,0.12424 +z,44.2550,0.12727 +z,44.2819,0.12879 +z,44.3087,0.12879 +z,44.3356,0.12879 +z,44.3624,0.12879 +z,44.3893,0.12879 +z,44.4161,0.13030 +z,44.4430,0.13030 +z,44.4698,0.13030 +z,44.4966,0.13030 +z,44.5235,0.13030 +z,44.5503,0.13030 +z,44.5772,0.13030 +z,44.6040,0.13030 +z,44.6309,0.13030 +z,44.6577,0.13030 +z,44.6846,0.13030 +z,44.7114,0.13030 +z,44.7383,0.12879 +z,44.7651,0.12879 +z,44.7919,0.12727 +z,44.8188,0.12727 +z,44.8456,0.12424 +z,44.8725,0.12424 +z,44.8993,0.12273 +z,44.9262,0.11970 +z,44.9530,0.11970 +z,44.9799,0.11667 +z,45.0067,0.11515 +z,45.0336,0.11364 +z,45.0604,0.11061 +z,45.0872,0.10758 +z,45.1141,0.10606 +z,45.1409,0.10303 +z,45.1678,0.10152 +z,45.1946,0.09848 +z,45.2215,0.09545 +z,45.2483,0.09242 +z,45.2752,0.08788 +z,45.3020,0.08636 +z,45.3289,0.08333 +z,45.3557,0.07879 +z,45.3826,0.07576 +z,45.4094,0.07273 +z,45.4362,0.06970 +z,45.4631,0.06515 +z,45.4899,0.06212 +z,45.5168,0.05909 +z,45.5705,0.05000 +z,45.5973,0.04697 +z,45.6242,0.04394 +z,45.6510,0.04091 +z,45.6779,0.03788 +z,45.7047,0.03182 +z,45.7315,0.02879 +z,45.7584,0.02576 +z,45.7852,0.02121 +z,45.8121,0.01818 +z,45.8389,0.01364 +z,45.8658,0.01061 +z,45.8926,0.00758 +z,45.9195,0.00152 +z,45.9463,-0.00152 +z,45.9732,-0.00455 +z,46.0000,-0.00758 +z,46.0268,-0.01212 +z,46.0537,-0.01667 +z,46.0805,-0.01970 +z,46.1074,-0.02273 +z,46.1342,-0.02576 +z,46.1611,-0.03030 +z,46.1879,-0.03485 +z,46.2148,-0.03788 +z,46.2416,-0.04091 +z,46.2685,-0.04394 +z,46.2953,-0.04697 +z,46.3221,-0.05000 +z,46.3490,-0.05303 +z,46.3758,-0.05758 +z,46.4027,-0.05909 +z,46.4295,-0.06212 +z,46.4564,-0.06667 +z,46.4832,-0.06818 +z,46.5101,-0.07121 +z,46.5369,-0.07576 +z,46.5638,-0.07727 +z,46.5906,-0.08030 +z,46.6174,-0.08333 +z,46.6443,-0.08636 +z,46.6711,-0.08939 +z,46.6980,-0.08939 +z,46.7248,-0.09394 +z,46.7517,-0.09545 +z,46.7785,-0.09848 +z,46.8054,-0.10152 +z,46.8322,-0.10303 +z,46.8591,-0.10455 +z,46.8859,-0.10758 +z,46.9128,-0.10758 +z,46.9396,-0.11061 +z,46.9664,-0.11212 +z,46.9933,-0.11364 +z,47.0201,-0.11515 +z,47.0470,-0.11667 +z,47.0738,-0.11818 +z,47.1007,-0.11970 +z,47.1275,-0.12121 +z,47.1544,-0.12121 +z,47.1812,-0.12121 +z,47.2081,-0.12273 +z,47.2349,-0.12576 +z,47.2617,-0.12576 +z,47.2886,-0.12576 +z,47.3154,-0.12576 +z,47.3423,-0.12727 +z,47.3691,-0.12727 +z,47.3960,-0.12727 +z,47.4228,-0.12727 +z,47.4497,-0.12727 +z,47.4765,-0.13030 +z,47.5034,-0.13030 +z,47.5302,-0.12879 +z,47.5570,-0.12727 +z,47.5839,-0.12727 +z,47.6107,-0.12727 +z,47.6376,-0.12727 +z,47.6644,-0.12576 +z,47.6913,-0.12576 +z,47.7181,-0.12576 +z,47.7450,-0.12424 +z,47.7718,-0.12121 +z,47.7987,-0.12121 +z,47.8255,-0.12121 +z,47.8523,-0.11818 +z,47.8792,-0.11667 +z,47.9060,-0.11364 +z,47.9329,-0.11212 +z,47.9597,-0.11061 +z,47.9866,-0.10758 +z,48.0134,-0.10758 +z,48.0403,-0.10455 +z,48.0671,-0.10152 +z,48.0940,-0.09848 +z,48.1208,-0.09545 +z,48.1477,-0.09394 +z,48.1745,-0.08939 +z,48.2013,-0.08788 +z,48.2282,-0.08485 +z,48.2550,-0.08030 +z,48.2819,-0.07727 +z,48.3087,-0.07576 +z,48.3356,-0.07121 +z,48.3624,-0.06970 +z,48.3893,-0.06515 +z,48.4161,-0.06212 +z,48.4430,-0.05909 +z,48.4698,-0.05606 +z,48.4966,-0.05303 +z,48.5235,-0.04848 +z,48.5503,-0.04848 +z,48.5772,-0.03939 +z,48.6040,-0.03788 +z,48.6309,-0.03485 +z,48.6577,-0.03030 +z,48.6846,-0.02576 +z,48.7114,-0.02273 +z,48.7383,-0.01818 +z,48.7651,-0.01515 +z,48.7919,-0.01061 +z,48.8188,-0.00758 +z,48.8456,-0.00455 +z,48.8725,0.00000 +z,48.8993,0.00303 +z,48.9262,0.00758 +z,48.9530,0.01061 +z,48.9799,0.01364 +z,49.0067,0.01818 +z,49.0336,0.02121 +z,49.0604,0.02576 +z,49.0872,0.02879 +z,49.1141,0.03182 +z,49.1409,0.03636 +z,49.1678,0.03788 +z,49.1946,0.04242 +z,49.2215,0.04697 +z,49.2483,0.05000 +z,49.2752,0.05303 +z,49.3020,0.05606 +z,49.3289,0.05909 +z,49.3557,0.06212 +z,49.3826,0.06515 +z,49.4094,0.06818 +z,49.4362,0.07121 +z,49.4631,0.07424 +z,49.4899,0.07727 +z,49.5168,0.07879 +z,49.5436,0.08333 +z,49.5705,0.08485 +z,49.5973,0.08788 +z,49.6242,0.08939 +z,49.6510,0.09242 +z,49.6779,0.09545 +z,49.7047,0.09697 +z,49.7315,0.10000 +z,49.7584,0.10152 +z,49.7852,0.10455 +z,49.8121,0.10606 +z,49.8389,0.10758 +z,49.8658,0.11061 +z,49.8926,0.11061 +z,49.9195,0.11364 +z,49.9463,0.11515 diff --git a/validation/experiments/wang_scr/thorsen2017_fig22.csv b/validation/experiments/wang_scr/thorsen2017_fig22.csv new file mode 100644 index 00000000..589a9b6c --- /dev/null +++ b/validation/experiments/wang_scr/thorsen2017_fig22.csv @@ -0,0 +1,506 @@ +series,s_m,rms_strain +measured,1.044,5.6840e-06 +measured,1.9427,3.6518e-05 +measured,2.8415,5.9631e-05 +measured,3.7493,2.9745e-05 +measured,4.6479,5.0537e-05 +measured,5.5467,4.7884e-05 +measured,6.4454,3.3960e-05 +measured,7.3441,3.3628e-05 +measured,8.2428,4.0733e-05 +measured,9.1416,3.9927e-05 +measured,10.0493,3.7322e-05 +measured,10.9479,3.0170e-05 +measured,11.8468,3.3912e-05 +measured,12.7454,3.8980e-05 +measured,13.6441,3.5144e-05 +measured,14.5428,4.2438e-05 +measured,15.4416,3.6044e-05 +measured,16.3494,3.4149e-05 +measured,17.2481,3.7796e-05 +measured,18.1467,3.6281e-05 +measured,19.0456,3.8317e-05 +measured,19.9442,3.3202e-05 +measured,20.8429,3.4670e-05 +measured,21.7416,4.9590e-05 +measured,22.6495,4.3859e-05 +thorsen2017,-0.0001,4.7509e-08 +thorsen2017,0.0451,8.5268e-07 +thorsen2017,0.0907,1.7997e-06 +thorsen2017,0.136,2.7000e-06 +thorsen2017,0.1814,3.6477e-06 +thorsen2017,0.2359,4.5947e-06 +thorsen2017,0.2813,5.5893e-06 +thorsen2017,0.3267,6.5364e-06 +thorsen2017,0.372,7.5316e-06 +thorsen2017,0.4265,8.4787e-06 +thorsen2017,0.4719,9.4732e-06 +thorsen2017,0.5173,1.0515e-05 +thorsen2017,0.5626,1.1557e-05 +thorsen2017,0.608,1.2694e-05 +thorsen2017,0.6626,1.3831e-05 +thorsen2017,0.708,1.4777e-05 +thorsen2017,0.7532,1.5441e-05 +thorsen2017,0.7988,1.5773e-05 +thorsen2017,0.8532,1.5963e-05 +thorsen2017,0.8986,1.6104e-05 +thorsen2017,0.944,1.6388e-05 +thorsen2017,0.9893,1.6815e-05 +thorsen2017,1.0347,1.7477e-05 +thorsen2017,1.0892,1.8425e-05 +thorsen2017,1.1346,1.9610e-05 +thorsen2017,1.1799,2.1172e-05 +thorsen2017,1.2254,2.2829e-05 +thorsen2017,1.2798,2.4488e-05 +thorsen2017,1.3252,2.6004e-05 +thorsen2017,1.3707,2.7329e-05 +thorsen2017,1.4161,2.8419e-05 +thorsen2017,1.4613,2.9365e-05 +thorsen2017,1.5159,3.0171e-05 +thorsen2017,1.5613,3.0787e-05 +thorsen2017,1.6067,3.1355e-05 +thorsen2017,1.6521,3.1877e-05 +thorsen2017,1.7065,3.2444e-05 +thorsen2017,1.7518,3.3060e-05 +thorsen2017,1.7973,3.3866e-05 +thorsen2017,1.8426,3.4718e-05 +thorsen2017,1.888,3.5666e-05 +thorsen2017,1.9425,3.6613e-05 +thorsen2017,1.9879,3.7560e-05 +thorsen2017,2.0332,3.8460e-05 +thorsen2017,2.0788,3.9313e-05 +thorsen2017,2.1331,4.0165e-05 +thorsen2017,2.1784,4.1065e-05 +thorsen2017,2.224,4.2059e-05 +thorsen2017,2.2692,4.3055e-05 +thorsen2017,2.3148,4.4143e-05 +thorsen2017,2.3692,4.5186e-05 +thorsen2017,2.4146,4.6227e-05 +thorsen2017,2.4599,4.7222e-05 +thorsen2017,2.5053,4.8217e-05 +thorsen2017,2.5599,4.9069e-05 +thorsen2017,2.6052,4.9875e-05 +thorsen2017,2.6505,5.0632e-05 +thorsen2017,2.6959,5.1296e-05 +thorsen2017,2.7413,5.1911e-05 +thorsen2017,2.7958,5.2433e-05 +thorsen2017,2.8412,5.2953e-05 +thorsen2017,2.8867,5.3474e-05 +thorsen2017,2.9319,5.3947e-05 +thorsen2017,2.9865,5.4327e-05 +thorsen2017,3.0319,5.4705e-05 +thorsen2017,3.0771,5.4990e-05 +thorsen2017,3.1227,5.5226e-05 +thorsen2017,3.168,5.5417e-05 +thorsen2017,3.2225,5.5510e-05 +thorsen2017,3.2679,5.5559e-05 +thorsen2017,3.3133,5.5510e-05 +thorsen2017,3.3587,5.5417e-05 +thorsen2017,3.4131,5.5274e-05 +thorsen2017,3.4585,5.5084e-05 +thorsen2017,3.5038,5.4753e-05 +thorsen2017,3.5493,5.4374e-05 +thorsen2017,3.6039,5.3947e-05 +thorsen2017,3.6491,5.3427e-05 +thorsen2017,3.6946,5.2905e-05 +thorsen2017,3.74,5.2290e-05 +thorsen2017,3.7854,5.1721e-05 +thorsen2017,3.8398,5.1153e-05 +thorsen2017,3.8852,5.0585e-05 +thorsen2017,3.9306,5.0111e-05 +thorsen2017,3.976,4.9780e-05 +thorsen2017,4.0305,4.9542e-05 +thorsen2017,4.0758,4.9495e-05 +thorsen2017,4.1212,4.9542e-05 +thorsen2017,4.1666,4.9827e-05 +thorsen2017,4.212,5.0254e-05 +thorsen2017,4.2664,5.0774e-05 +thorsen2017,4.3118,5.1437e-05 +thorsen2017,4.3572,5.2148e-05 +thorsen2017,4.4025,5.2905e-05 +thorsen2017,4.4572,5.3664e-05 +thorsen2017,4.5025,5.4421e-05 +thorsen2017,4.5479,5.5179e-05 +thorsen2017,4.5933,5.5889e-05 +thorsen2017,4.6387,5.6553e-05 +thorsen2017,4.6931,5.7121e-05 +thorsen2017,4.7385,5.7642e-05 +thorsen2017,4.7839,5.8116e-05 +thorsen2017,4.8293,5.8542e-05 +thorsen2017,4.8837,5.8827e-05 +thorsen2017,4.9291,5.9110e-05 +thorsen2017,4.9744,5.9252e-05 +thorsen2017,5.0199,5.9395e-05 +thorsen2017,5.1199,5.9395e-05 +thorsen2017,5.1651,5.9252e-05 +thorsen2017,5.2104,5.9110e-05 +thorsen2017,5.256,5.8827e-05 +thorsen2017,5.3104,5.8542e-05 +thorsen2017,5.3558,5.8163e-05 +thorsen2017,5.4012,5.7784e-05 +thorsen2017,5.4466,5.7311e-05 +thorsen2017,5.4919,5.6789e-05 +thorsen2017,5.5463,5.6221e-05 +thorsen2017,5.5918,5.5652e-05 +thorsen2017,5.6371,5.5037e-05 +thorsen2017,5.6826,5.4374e-05 +thorsen2017,5.737,5.3711e-05 +thorsen2017,5.7824,5.3048e-05 +thorsen2017,5.8278,5.2384e-05 +thorsen2017,5.9185,5.0964e-05 +thorsen2017,5.973,5.0300e-05 +thorsen2017,6.0186,4.9591e-05 +thorsen2017,6.0637,4.8927e-05 +thorsen2017,6.1093,4.8311e-05 +thorsen2017,6.2091,4.7270e-05 +thorsen2017,6.2544,4.6796e-05 +thorsen2017,6.2999,4.6370e-05 +thorsen2017,6.3453,4.6038e-05 +thorsen2017,6.3997,4.5801e-05 +thorsen2017,6.4451,4.5611e-05 +thorsen2017,6.4905,4.5469e-05 +thorsen2017,6.5358,4.5469e-05 +thorsen2017,6.5905,4.5518e-05 +thorsen2017,6.6357,4.5659e-05 +thorsen2017,6.6811,4.5896e-05 +thorsen2017,6.7266,4.6227e-05 +thorsen2017,6.7809,4.6654e-05 +thorsen2017,6.8264,4.7080e-05 +thorsen2017,6.8718,4.7601e-05 +thorsen2017,6.9172,4.8122e-05 +thorsen2017,6.9625,4.8738e-05 +thorsen2017,7.017,4.9400e-05 +thorsen2017,7.0624,5.0064e-05 +thorsen2017,7.1078,5.0774e-05 +thorsen2017,7.1531,5.1532e-05 +thorsen2017,7.2076,5.2290e-05 +thorsen2017,7.253,5.3048e-05 +thorsen2017,7.2984,5.3853e-05 +thorsen2017,7.3438,5.4705e-05 +thorsen2017,7.3891,5.5510e-05 +thorsen2017,7.4436,5.6269e-05 +thorsen2017,7.4892,5.7027e-05 +thorsen2017,7.5345,5.7784e-05 +thorsen2017,7.5799,5.8447e-05 +thorsen2017,7.6343,5.9110e-05 +thorsen2017,7.6797,5.9679e-05 +thorsen2017,7.7249,6.0247e-05 +thorsen2017,7.7705,6.0768e-05 +thorsen2017,7.8159,6.1242e-05 +thorsen2017,7.8703,6.1669e-05 +thorsen2017,7.9157,6.1999e-05 +thorsen2017,7.9611,6.2284e-05 +thorsen2017,8.0065,6.2521e-05 +thorsen2017,8.061,6.2662e-05 +thorsen2017,8.1063,6.2805e-05 +thorsen2017,8.1517,6.2899e-05 +thorsen2017,8.1971,6.2947e-05 +thorsen2017,8.2969,6.2947e-05 +thorsen2017,8.3424,6.2805e-05 +thorsen2017,8.3878,6.2615e-05 +thorsen2017,8.433,6.2379e-05 +thorsen2017,8.4876,6.2047e-05 +thorsen2017,8.533,6.1669e-05 +thorsen2017,8.5784,6.1242e-05 +thorsen2017,8.6238,6.0768e-05 +thorsen2017,8.6692,6.0200e-05 +thorsen2017,8.7236,5.9631e-05 +thorsen2017,8.769,5.9015e-05 +thorsen2017,8.8144,5.8400e-05 +thorsen2017,8.8597,5.7737e-05 +thorsen2017,8.9142,5.7027e-05 +thorsen2017,8.9598,5.6315e-05 +thorsen2017,9.0049,5.5605e-05 +thorsen2017,9.0505,5.4895e-05 +thorsen2017,9.0957,5.4185e-05 +thorsen2017,9.1504,5.3474e-05 +thorsen2017,9.1957,5.2763e-05 +thorsen2017,9.2411,5.2100e-05 +thorsen2017,9.2865,5.1437e-05 +thorsen2017,9.3409,5.0774e-05 +thorsen2017,9.3863,5.0159e-05 +thorsen2017,9.4316,4.9591e-05 +thorsen2017,9.4772,4.9021e-05 +thorsen2017,9.5224,4.8501e-05 +thorsen2017,9.5229,4.8501e-05 +thorsen2017,9.5775,4.8028e-05 +thorsen2017,9.6227,4.7553e-05 +thorsen2017,9.6683,4.7174e-05 +thorsen2017,9.7136,4.6795e-05 +thorsen2017,9.7681,4.6416e-05 +thorsen2017,9.8135,4.6133e-05 +thorsen2017,9.8589,4.5848e-05 +thorsen2017,9.9042,4.5611e-05 +thorsen2017,9.9496,4.5374e-05 +thorsen2017,10.0041,4.5233e-05 +thorsen2017,10.0495,4.5090e-05 +thorsen2017,10.0948,4.4948e-05 +thorsen2017,10.1402,4.4853e-05 +thorsen2017,10.1947,4.4758e-05 +thorsen2017,10.2401,4.4664e-05 +thorsen2017,10.2856,4.4617e-05 +thorsen2017,10.331,4.4569e-05 +thorsen2017,10.3853,4.4474e-05 +thorsen2017,10.4308,4.4427e-05 +thorsen2017,10.476,4.4381e-05 +thorsen2017,10.5216,4.4332e-05 +thorsen2017,10.567,4.4285e-05 +thorsen2017,10.6214,4.4190e-05 +thorsen2017,10.6667,4.4142e-05 +thorsen2017,10.7122,4.4049e-05 +thorsen2017,10.7576,4.4001e-05 +thorsen2017,10.8121,4.3906e-05 +thorsen2017,10.8574,4.3812e-05 +thorsen2017,10.9028,4.3669e-05 +thorsen2017,10.9482,4.3575e-05 +thorsen2017,10.9935,4.3433e-05 +thorsen2017,11.048,4.3290e-05 +thorsen2017,11.1389,4.2912e-05 +thorsen2017,11.1841,4.2722e-05 +thorsen2017,11.2387,4.2486e-05 +thorsen2017,11.2841,4.2248e-05 +thorsen2017,11.3295,4.2011e-05 +thorsen2017,11.3748,4.1727e-05 +thorsen2017,11.4203,4.1443e-05 +thorsen2017,11.4747,4.1112e-05 +thorsen2017,11.5201,4.0780e-05 +thorsen2017,11.5655,4.0496e-05 +thorsen2017,11.6108,4.0164e-05 +thorsen2017,11.6653,3.9880e-05 +thorsen2017,11.7107,3.9549e-05 +thorsen2017,11.7561,3.9265e-05 +thorsen2017,11.8015,3.8981e-05 +thorsen2017,11.8468,3.8696e-05 +thorsen2017,11.9015,3.8412e-05 +thorsen2017,11.9466,3.8175e-05 +thorsen2017,11.9922,3.7891e-05 +thorsen2017,12.0376,3.7655e-05 +thorsen2017,12.0921,3.7417e-05 +thorsen2017,12.1374,3.7180e-05 +thorsen2017,12.1827,3.6896e-05 +thorsen2017,12.2281,3.6660e-05 +thorsen2017,12.2735,3.6423e-05 +thorsen2017,12.328,3.6233e-05 +thorsen2017,12.4641,3.5523e-05 +thorsen2017,12.5185,3.5286e-05 +thorsen2017,12.564,3.5049e-05 +thorsen2017,12.6096,3.4813e-05 +thorsen2017,12.6549,3.4528e-05 +thorsen2017,12.7001,3.4291e-05 +thorsen2017,12.7547,3.4055e-05 +thorsen2017,12.8001,3.3770e-05 +thorsen2017,12.8454,3.3486e-05 +thorsen2017,12.8909,3.3249e-05 +thorsen2017,12.9454,3.2965e-05 +thorsen2017,12.9908,3.2681e-05 +thorsen2017,13.036,3.2397e-05 +thorsen2017,13.1269,3.1828e-05 +thorsen2017,13.1814,3.1544e-05 +thorsen2017,13.2267,3.1260e-05 +thorsen2017,13.2721,3.0976e-05 +thorsen2017,13.3175,3.0692e-05 +thorsen2017,13.3719,3.0408e-05 +thorsen2017,13.4174,3.0123e-05 +thorsen2017,13.4629,2.9839e-05 +thorsen2017,13.5082,2.9555e-05 +thorsen2017,13.5627,2.9224e-05 +thorsen2017,13.608,2.8939e-05 +thorsen2017,13.6988,2.8372e-05 +thorsen2017,13.7441,2.8086e-05 +thorsen2017,13.7987,2.7803e-05 +thorsen2017,13.844,2.7518e-05 +thorsen2017,13.8894,2.7234e-05 +thorsen2017,13.9348,2.6950e-05 +thorsen2017,13.9892,2.6666e-05 +thorsen2017,14.0348,2.6429e-05 +thorsen2017,14.08,2.6145e-05 +thorsen2017,14.1254,2.5908e-05 +thorsen2017,14.1709,2.5623e-05 +thorsen2017,14.2252,2.5387e-05 +thorsen2017,14.2708,2.5198e-05 +thorsen2017,14.3161,2.4961e-05 +thorsen2017,14.3615,2.4771e-05 +thorsen2017,14.4159,2.4582e-05 +thorsen2017,14.5067,2.4297e-05 +thorsen2017,14.5521,2.4155e-05 +thorsen2017,14.5974,2.4013e-05 +thorsen2017,14.6519,2.3919e-05 +thorsen2017,14.6973,2.3871e-05 +thorsen2017,14.7427,2.3777e-05 +thorsen2017,14.7883,2.3729e-05 +thorsen2017,14.8425,2.3682e-05 +thorsen2017,14.9334,2.3587e-05 +thorsen2017,14.9788,2.3540e-05 +thorsen2017,15.0242,2.3493e-05 +thorsen2017,15.0786,2.3493e-05 +thorsen2017,15.1694,2.3397e-05 +thorsen2017,15.2148,2.3350e-05 +thorsen2017,15.2692,2.3302e-05 +thorsen2017,15.3146,2.3256e-05 +thorsen2017,15.36,2.3256e-05 +thorsen2017,15.4054,2.3208e-05 +thorsen2017,15.4507,2.3161e-05 +thorsen2017,15.5052,2.3114e-05 +thorsen2017,15.5506,2.3114e-05 +thorsen2017,15.596,2.3066e-05 +thorsen2017,15.6414,2.3018e-05 +thorsen2017,15.6958,2.2972e-05 +thorsen2017,15.7411,2.2972e-05 +thorsen2017,15.7867,2.2923e-05 +thorsen2017,15.8321,2.2923e-05 +thorsen2017,15.8775,2.2877e-05 +thorsen2017,16.0681,2.2877e-05 +thorsen2017,16.1226,2.2830e-05 +thorsen2017,16.4039,2.2830e-05 +thorsen2017,16.4495,2.2782e-05 +thorsen2017,16.4946,2.2735e-05 +thorsen2017,16.5491,2.2687e-05 +thorsen2017,16.5944,2.2593e-05 +thorsen2017,16.6401,2.2498e-05 +thorsen2017,16.6854,2.2403e-05 +thorsen2017,16.7308,2.2308e-05 +thorsen2017,16.7853,2.2214e-05 +thorsen2017,16.8306,2.2118e-05 +thorsen2017,16.8759,2.2025e-05 +thorsen2017,16.9214,2.2025e-05 +thorsen2017,16.9759,2.2071e-05 +thorsen2017,17.0213,2.2118e-05 +thorsen2017,17.0666,2.2214e-05 +thorsen2017,17.1119,2.2355e-05 +thorsen2017,17.1664,2.2498e-05 +thorsen2017,17.212,2.2640e-05 +thorsen2017,17.2572,2.2830e-05 +thorsen2017,17.3028,2.3066e-05 +thorsen2017,17.3481,2.3256e-05 +thorsen2017,17.4025,2.3493e-05 +thorsen2017,17.4477,2.3729e-05 +thorsen2017,17.4933,2.4013e-05 +thorsen2017,17.5388,2.4250e-05 +thorsen2017,17.5932,2.4534e-05 +thorsen2017,17.6386,2.4771e-05 +thorsen2017,17.6839,2.5055e-05 +thorsen2017,17.7293,2.5340e-05 +thorsen2017,17.7746,2.5577e-05 +thorsen2017,17.8292,2.5860e-05 +thorsen2017,17.8747,2.6097e-05 +thorsen2017,17.9199,2.6334e-05 +thorsen2017,17.9652,2.6619e-05 +thorsen2017,18.0197,2.6807e-05 +thorsen2017,18.0651,2.7045e-05 +thorsen2017,18.1107,2.7281e-05 +thorsen2017,18.2014,2.7660e-05 +thorsen2017,18.2558,2.7850e-05 +thorsen2017,18.3013,2.8040e-05 +thorsen2017,18.3466,2.8181e-05 +thorsen2017,18.392,2.8323e-05 +thorsen2017,18.4467,2.8418e-05 +thorsen2017,18.4919,2.8560e-05 +thorsen2017,18.5372,2.8608e-05 +thorsen2017,18.5826,2.8702e-05 +thorsen2017,18.628,2.8702e-05 +thorsen2017,18.6827,2.8750e-05 +thorsen2017,18.7278,2.8750e-05 +thorsen2017,18.7732,2.8702e-05 +thorsen2017,18.8188,2.8655e-05 +thorsen2017,18.8732,2.8560e-05 +thorsen2017,18.9185,2.8418e-05 +thorsen2017,18.9639,2.8277e-05 +thorsen2017,19.0094,2.8134e-05 +thorsen2017,19.0547,2.7897e-05 +thorsen2017,19.1091,2.7660e-05 +thorsen2017,19.1546,2.7376e-05 +thorsen2017,19.2,2.7092e-05 +thorsen2017,19.2452,2.6761e-05 +thorsen2017,19.2998,2.6429e-05 +thorsen2017,19.3452,2.6050e-05 +thorsen2017,19.3907,2.5672e-05 +thorsen2017,19.4812,2.4818e-05 +thorsen2017,19.5359,2.4346e-05 +thorsen2017,19.5813,2.3919e-05 +thorsen2017,19.6266,2.3445e-05 +thorsen2017,19.6721,2.2972e-05 +thorsen2017,19.7265,2.2498e-05 +thorsen2017,19.7719,2.1976e-05 +thorsen2017,19.8171,2.1503e-05 +thorsen2017,19.8626,2.0982e-05 +thorsen2017,19.9081,2.0509e-05 +thorsen2017,19.9625,2.0130e-05 +thorsen2017,20.0079,1.9751e-05 +thorsen2017,20.0533,1.9467e-05 +thorsen2017,20.0986,1.9276e-05 +thorsen2017,20.1531,1.9183e-05 +thorsen2017,20.1986,1.9183e-05 +thorsen2017,20.244,1.9276e-05 +thorsen2017,20.2894,1.9467e-05 +thorsen2017,20.3438,1.9703e-05 +thorsen2017,20.389,2.0035e-05 +thorsen2017,20.4345,2.0414e-05 +thorsen2017,20.48,2.0887e-05 +thorsen2017,20.5254,2.1456e-05 +thorsen2017,20.5798,2.2071e-05 +thorsen2017,20.6252,2.2687e-05 +thorsen2017,20.6706,2.3397e-05 +thorsen2017,20.7159,2.4108e-05 +thorsen2017,20.7703,2.4866e-05 +thorsen2017,20.8158,2.5623e-05 +thorsen2017,20.8612,2.6381e-05 +thorsen2017,20.9065,2.7139e-05 +thorsen2017,20.9519,2.7897e-05 +thorsen2017,21.0065,2.8655e-05 +thorsen2017,21.0519,2.9413e-05 +thorsen2017,21.0973,3.0217e-05 +thorsen2017,21.1426,3.0976e-05 +thorsen2017,21.1971,3.1781e-05 +thorsen2017,21.2424,3.2492e-05 +thorsen2017,21.2878,3.3249e-05 +thorsen2017,21.3333,3.3912e-05 +thorsen2017,21.3787,3.4576e-05 +thorsen2017,21.4331,3.5192e-05 +thorsen2017,21.4784,3.5807e-05 +thorsen2017,21.5237,3.6327e-05 +thorsen2017,21.5693,3.6802e-05 +thorsen2017,21.6237,3.7228e-05 +thorsen2017,21.6691,3.7606e-05 +thorsen2017,21.7144,3.7938e-05 +thorsen2017,21.7598,3.8175e-05 +thorsen2017,21.8052,3.8364e-05 +thorsen2017,21.8595,3.8507e-05 +thorsen2017,21.9052,3.8554e-05 +thorsen2017,21.9505,3.8554e-05 +thorsen2017,21.9959,3.8459e-05 +thorsen2017,22.0501,3.8317e-05 +thorsen2017,22.0955,3.8080e-05 +thorsen2017,22.1409,3.7797e-05 +thorsen2017,22.1865,3.7417e-05 +thorsen2017,22.2319,3.6991e-05 +thorsen2017,22.2863,3.6470e-05 +thorsen2017,22.3316,3.5949e-05 +thorsen2017,22.377,3.5334e-05 +thorsen2017,22.4224,3.4670e-05 +thorsen2017,22.477,3.3960e-05 +thorsen2017,22.5225,3.3154e-05 +thorsen2017,22.5676,3.2302e-05 +thorsen2017,22.613,3.1402e-05 +thorsen2017,22.6584,3.0454e-05 +thorsen2017,22.7129,2.9460e-05 +thorsen2017,22.7582,2.8418e-05 +thorsen2017,22.8036,2.7281e-05 +thorsen2017,22.8492,2.6145e-05 +thorsen2017,22.9036,2.4961e-05 +thorsen2017,22.9488,2.3729e-05 +thorsen2017,22.9943,2.2450e-05 +thorsen2017,23.0398,2.1171e-05 +thorsen2017,23.0851,1.9798e-05 +thorsen2017,23.1395,1.8424e-05 +thorsen2017,23.185,1.7003e-05 +thorsen2017,23.2304,1.5535e-05 +thorsen2017,23.2757,1.4067e-05 +thorsen2017,23.3301,1.2551e-05 +thorsen2017,23.3756,1.1035e-05 +thorsen2017,23.421,9.4725e-06 +thorsen2017,23.4663,7.9572e-06 +thorsen2017,23.5117,6.3469e-06 +thorsen2017,23.5663,4.7834e-06 +thorsen2017,23.6117,3.2199e-06 +thorsen2017,23.6568,1.6103e-06 +thorsen2017,23.7025,4.6794e-08 diff --git a/validation/experiments/wang_scr/wang_scr_uniform_current.py b/validation/experiments/wang_scr/wang_scr_uniform_current.py deleted file mode 100644 index 69b982b9..00000000 --- a/validation/experiments/wang_scr/wang_scr_uniform_current.py +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 -# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University -"""Cross-flow VIV of the SJTU truncated steel catenary riser in a 0.2 m/s uniform current. - -The model test of Wang et al. (2014), as used by Thorsen et al. (2017, Sec. 5.1) to verify the -time-domain synchronisation model that CableDyn's cross-flow VIV implements: writes the deck, runs -it, and compares the r.m.s. of the dynamic cross-flow strain along the riser with the 25 measured -values (Thorsen et al. 2017, Fig. 17) and the dominant strain frequency 8.25 m from the lower end -with the measured 1.00 Hz. - - python wang_scr_uniform_current.py path/to/cabledyn.exe WORKDIR [--segments 200] - [--dt 0.005] [--tmax 150] [--t0 30] [--summary DIR] - -Sources: - J. Wang, S. Fu, R. Baarholm, J. Wu, C.M. Larsen (2014), Fatigue damage of a steel catenary - riser from vortex-induced vibration caused by vessel motions, Marine Structures 39, 131-156, - https://doi.org/10.1016/j.marstruc.2014.07.002 (Table 2: the model riser) - M.J. Thorsen, S. Saevik, C.M. Larsen (2017), Non-linear time domain analysis of cross-flow - vortex-induced vibrations, Marine Structures 51, 134-151, - https://doi.org/10.1016/j.marstruc.2016.10.007 (Table 1, Sec. 5.1, Fig. 17: the measured - r.m.s. strains, read from the vector figure) -""" - -from __future__ import annotations - -import argparse -import csv -import hashlib -import json -import os -import shutil -import subprocess -from pathlib import Path - -import numpy as np - -HERE = Path(__file__).resolve().parent - -# Thorsen et al. (2017) Table 1 / Wang et al. (2014) Table 2: the truncated model riser. The -# outer coating, PPR pipe and copper core are solid: no internal water is added to the 0.69 kg/m. -LENGTH = 23.71 # m -X_TOP = 21.0425 # m, horizontal distance of the top joint from the lower end -H_TOP = 9.0 # m, height of the top joint above the fake seabed -DIAMETER = 0.024 # m -MASS = 0.69 # kg/m -EI = 10.5 # N m^2 -EA = 6.66e5 # N -# Thorsen et al. (2017) Sec. 5.1: seabed springs of 1 (kN/m)/m in compression, friction 0.2; -# their coefficient set for this case: Cv 0.7 (Re about 3000), f0 0.18, df 0.08, CD 1.2, CM 2 -SEABED_K_PER_LENGTH = 1000.0 # N/m per m of riser -FRICTION = 0.2 -CV, F0, DF, CD, CA = 0.7, 0.18, 0.08, 1.2, 1.0 -CURRENT = 0.2 # m/s, uniform, in the riser plane from the lower end towards the top -WATER_DEPTH = ( - 9.5 # m: the top joint 0.5 m below the surface (not given; the current is uniform) -) -MEASURED_FREQUENCY = ( - 1.00 # Hz, 8.25 m from the lower end (Thorsen et al. 2017, Fig. 18) -) -FREQUENCY_STATION = 8.25 # m from the lower end - - -def write_deck(case: Path, segments: int, dt: float, tmax: float) -> Path: - case.mkdir(parents=True, exist_ok=True) - (case / "current_profile.txt").write_text( - f"z ux uy uz\n(m) (m/s) (m/s) (m/s)\n{-WATER_DEPTH:.2f} {CURRENT} 0 0\n0.0 {CURRENT} 0 0\n", - encoding="utf-8", - ) - outs = "".join(f"CurvX1N{j}\nCurvY1N{j}\n" for j in range(1, segments + 2)) - text = f"""--------------------- CableDyn Input File --------------------------------- -Wang et al. (2014) truncated SCR, 0.2 m/s uniform current (Thorsen et al. 2017, case 1) ------------------------ LINE TYPES ------------------------------------------ -TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t Cl dF cF -(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) (-) (-) (-) -scr {DIAMETER} {MASS} {EA:.6e} 0.0 {EI} {CD} 0.0 {CA} 0.0 {CV} {DF} {F0} ------------------------ POINTS ---------------------------------------------- -ID Attachment X Y Z M V CdA CA -(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) -1 Coupled {X_TOP} 0.0 {-(WATER_DEPTH - H_TOP):.4f} 0 0 0 0 -2 Fixed 0.0 0.0 {-WATER_DEPTH:.4f} 0 0 0 0 ------------------------ LINES ----------------------------------------------- -ID LineType AttachA AttachB UnstrLen NumSegs Outputs -(-) (-) (-) (-) (m) (-) (-) -1 scr 1 2 {LENGTH} {segments} - ----------------------- OPTIONS ---------------------------------------------- -1025.0 rhoW -9.80665 g -{WATER_DEPTH} WtrDpth -{SEABED_K_PER_LENGTH / DIAMETER:.6e} kBot -{FRICTION} frictionMu -{dt:.6f} dtM -{round(tmax / dt) * dt:.6f} TMax -1 Currents ----------------------- OUTPUTS ----------------------------------------------- -{outs}END -------------------------- need this line -------------------------------------- -""" - deck = case / "wang_scr.dat" - deck.write_text(text, encoding="utf-8") - return deck - - -def cross_flow_strain(out: Path, t0: float): - """Arc length from the lower end, r.m.s. dynamic cross-flow strain, the strain histories. - - The cross-flow (out-of-plane) curvature is the section component with no static mean (the - in-plane one carries the catenary curvature); the strain is kappa D/2 at the outer surface, - as Fig. 17 reports it. - """ - lines = out.read_text(encoding="utf-8").splitlines() - head = lines[1].split() - a = np.loadtxt(lines[3:]) - t = a[:, 0] - keep = t > t0 - nodes = sorted({int(c[7:]) for c in head if c.startswith("CurvX1N")}) - cx = np.array([a[keep, head.index(f"CurvX1N{j}")] for j in nodes]) - cy = np.array([a[keep, head.index(f"CurvY1N{j}")] for j in nodes]) - cf = cx if np.abs(cx.mean(axis=1)).mean() < np.abs(cy.mean(axis=1)).mean() else cy - strain = (cf - cf.mean(axis=1, keepdims=True)) * DIAMETER / 2.0 - s = LENGTH - (np.array(nodes) - 1) * LENGTH / (len(nodes) - 1) - order = np.argsort(s) - return ( - s[order], - np.sqrt((strain[order] ** 2).mean(axis=1)), - strain[order], - t[keep][1] - t[keep][0], - ) - - -def main() -> None: - ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) - ap.add_argument("exe") - ap.add_argument("workdir") - ap.add_argument("--segments", type=int, default=200) - ap.add_argument("--dt", type=float, default=0.005) - ap.add_argument("--tmax", type=float, default=150.0) - ap.add_argument("--t0", type=float, default=30.0) - ap.add_argument( - "--summary", - default=None, - help="directory for the comparison CSV and summary JSON", - ) - a = ap.parse_args() - # the run starts in the case folder: resolve the executable against the invocation directory - # (or PATH, for a bare name) first - found = a.exe if Path(a.exe).is_file() else shutil.which(a.exe) - if found is None: - raise SystemExit(f"CableDyn executable not found: {a.exe}") - exe = Path(found).resolve() - case = Path(a.workdir) / f"wang_scr_n{a.segments}_dt{a.dt:g}" - deck = write_deck(case, a.segments, a.dt, a.tmax) - env = dict(os.environ, OMP_NUM_THREADS="1") - proc = subprocess.run( - [str(exe), deck.name, "out"], - cwd=case, - capture_output=True, - text=True, - env=env, - check=False, - ) - if proc.returncode != 0: - raise SystemExit(f"CableDyn failed ({proc.returncode}):\n{proc.stderr[-2000:]}") - s, rms, strain, dt = cross_flow_strain(case / "out.out", a.t0) - with open(HERE / "measured_rms_strain.csv", encoding="utf-8") as fh: - measured = [ - (float(r["s_m"]), float(r["rms_strain"])) for r in csv.DictReader(fh) - ] - sm = np.array([m[0] for m in measured]) - em = np.array([m[1] for m in measured]) - at = np.interp(sm, s, rms) - j = int(np.argmin(np.abs(s - FREQUENCY_STATION))) - spec = np.abs(np.fft.rfft(strain[j] * np.hanning(strain.shape[1]))) - freq = np.fft.rfftfreq(strain.shape[1], dt) - f_dom = float(freq[1 + int(np.argmax(spec[1:]))]) - summary = { - "segments": a.segments, - "dt_s": a.dt, - "analysis_window_s": [a.t0, a.tmax], - "frequency_resolution_hz": float(freq[1]), - "max_rms_strain": float(rms.max()), - "measured_max_rms_strain": float(em.max()), - "max_ratio": float(rms.max() / em.max()), - "mean_ratio_at_stations": float(np.mean(at / em)), - "rms_log_error_at_stations": float(np.sqrt(np.mean(np.log(at / em) ** 2))), - "dominant_frequency_hz": f_dom, - "measured_dominant_frequency_hz": MEASURED_FREQUENCY, - "executable_sha256": hashlib.sha256(exe.read_bytes()).hexdigest(), - } - print(json.dumps(summary, indent=2)) - if a.summary: - out = Path(a.summary) - out.mkdir(parents=True, exist_ok=True) - with open( - out / "rms_strain_comparison.csv", "w", newline="", encoding="utf-8" - ) as fh: - w = csv.writer(fh, lineterminator="\n") - w.writerow(["s_m", "measured_rms_strain", "cabledyn_rms_strain", "ratio"]) - for x, m, c in zip(sm, em, at, strict=True): - w.writerow([f"{x:.4f}", f"{m:.4e}", f"{c:.4e}", f"{c / m:.4f}"]) - (out / "summary.json").write_text( - json.dumps(summary, indent=2) + "\n", encoding="utf-8", newline="\n" - ) - - -if __name__ == "__main__": - main() diff --git a/validation/experiments/wang_scr/wang_scr_viv.py b/validation/experiments/wang_scr/wang_scr_viv.py new file mode 100644 index 00000000..94515612 --- /dev/null +++ b/validation/experiments/wang_scr/wang_scr_viv.py @@ -0,0 +1,545 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Cross-flow VIV of the SJTU truncated steel catenary riser: uniform current and heave. + +The model test of Wang et al. (2014) as Thorsen et al. (2017) use it to verify the time-domain +synchronisation model that CableDyn's cross-flow VIV implements, in its two parts: + +- current: a 0.2 m/s uniform in-plane current (Thorsen et al. 2017, Sec. 5.1): the r.m.s. of + the dynamic cross-flow strain along the riser against the 25 measured values (their Fig. 17) + and the dominant strain frequency 8.25 m from the lower end against the measured 1.00 Hz; +- heave: still water, the upper end moved along the measured top trajectory (Sec. 5.2, period + 5.96 s, their Fig. 19): the r.m.s. cross-flow strain band-passed from 4 times the motion + frequency to 50 Hz, as Wang et al. (2014) process the measurement, against the 25 measured + values of their Fig. 22, with and without a VIV FRAME filter. + +Writes a deck per run, runs them in parallel (a run whose folder holds the same input files and +executable is reused) and compares. The default runs are the committed record: the two primary +runs, their convergence runs (half the time step, twice the elements) and the frame-filter +sensitivity of the heave case. + + python wang_scr_viv.py path/to/cabledyn.exe WORKDIR [--runs NAME,...] [--jobs N] + [--keep] [--summary DIR] + +Sources: + J. Wang, S. Fu, R. Baarholm, J. Wu, C.M. Larsen (2014), Fatigue damage of a steel catenary + riser from vortex-induced vibration caused by vessel motions, Marine Structures 39, 131-156, + https://doi.org/10.1016/j.marstruc.2014.07.002 (Table 2: the model riser; Sec. 3.1: the + band-pass of the measured strain) + M.J. Thorsen, S. Saevik, C.M. Larsen (2017), Non-linear time domain analysis of cross-flow + vortex-induced vibrations, Marine Structures 51, 134-151, + https://doi.org/10.1016/j.marstruc.2016.10.007 (Table 1; Secs. 5.1 and 5.2; Figs. 17, 19 + and 22, read by extract_thorsen2017.py) +""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import json +import math +import os +import shutil +import subprocess +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path + +import numpy as np + +HERE = Path(__file__).resolve().parent + +# Thorsen et al. (2017) Table 1 / Wang et al. (2014) Table 2: the truncated model riser. The +# outer coating, PPR pipe and copper core are solid: no internal water is added to the 0.69 kg/m. +# Wang et al. give EA 6.67e5 N; Thorsen et al.'s 6.66e5 N is used. +LENGTH = 23.71 # m +X_TOP = 21.0425 # m, horizontal distance of the top joint from the lower end +H_TOP = 9.0 # m, height of the top joint above the fake seabed +DIAMETER = 0.024 # m +MASS = 0.69 # kg/m +EI = 10.5 # N m^2 +EA = 6.66e5 # N +# Thorsen et al. (2017) Sec. 5.1: seabed springs of 1 (kN/m)/m in compression, friction 0.2 +SEABED_K_PER_LENGTH = 1000.0 # N/m per m of riser +FRICTION = 0.2 +# Their coefficient sets: C_v 0.7 in the current (Re about 3000), 0.8 in heave (Re about 4000); +# f0 0.18, df 0.08, cross-flow only; C_D 1.2, C_M 2 (C_a 1) +CV = {"current": 0.7, "heave": 0.8} +F0, DF, CD, CA = 0.18, 0.08, 1.2, 1.0 +CURRENT = 0.2 # m/s, uniform, in the riser plane from the lower end towards the top +WATER_DEPTH = 9.5 # m: the top joint 0.5 m below the surface (not given) +FREQUENCY_STATION = 8.25 # m from the lower end +MEASURED_FREQUENCY = { + "current": 1.00, + "heave": 1.0, +} # Hz: Fig. 18; "close to 1 Hz" (Fig. 23) +RAMP_PERIODS = 2.0 # the top motion is ramped in over two periods +BAND_HIGH = 50.0 # Hz, the upper end of Wang et al.'s band-pass +# The two response branches of the heave case: spectral shares of the band-passed strain 8.25 m +# from the lower end +BRANCHES = {"0.80-0.95": (0.80, 0.95), "0.95-1.10": (0.95, 1.10)} +PART = { + "current": {"tmax": 150.0, "t0": 30.0, "fig": "thorsen2017_fig17.csv"}, + "heave": {"tmax": 200.0, "t0": 40.0, "fig": "thorsen2017_fig22.csv"}, +} +ANALYSIS = "1" # part of the reuse key: bump when analyse() changes + +# name: (part, role, segments, dt, Tf); the first of each part is its primary run +RUNS: dict[str, tuple[str, str, int, float, float]] = { + "current": ("current", "primary", 200, 0.005, 0.0), + "current_dt2": ("current", "convergence: half the time step", 200, 0.0025, 0.0), + "current_n400": ("current", "convergence: twice the elements", 400, 0.005, 0.0), + "heave": ("heave", "primary (no VIV FRAME)", 200, 0.005, 0.0), + "heave_dt2": ("heave", "convergence: half the time step", 200, 0.0025, 0.0), + "heave_n400": ("heave", "convergence: twice the elements", 400, 0.005, 0.0), + "heave_tf0.35": ("heave", "VIV FRAME sensitivity", 200, 0.005, 0.35), + "heave_tf0.5": ("heave", "VIV FRAME sensitivity", 200, 0.005, 0.5), + "heave_tf0.75": ("heave", "VIV FRAME sensitivity", 200, 0.005, 0.75), + "heave_tf1": ("heave", "VIV FRAME sensitivity", 200, 0.005, 1.0), + "heave_tf0.5_dt2": ( + "heave", + "VIV FRAME sensitivity, half the time step", + 200, + 0.0025, + 0.5, + ), +} + + +def top_motion() -> dict: + """The sinusoids fitted to the measured top motion (extract_thorsen2017.py).""" + return json.loads((HERE / "thorsen2017_fig19_fit.json").read_text(encoding="utf-8")) + + +def deck_files(part: str, segments: int, dt: float, tf: float) -> dict[str, str]: + tmax = round(PART[part]["tmax"] / dt) * dt + z_top = -(WATER_DEPTH - H_TOP) + frame = ( + "--------------------- VIV FRAME ----------------------------------------\n" + f"TypeName Tf\n(-) (s)\nscr {tf:g}\n" + if tf > 0 + else "" + ) + drive = "1 Currents" if part == "current" else "motion.txt motionFile" + nodes = segments + 1 + # The cross-flow curvature at every node; the in-plane one at every tenth, to check which + # component is which (analyse()) + outs = "FairTen1\n" + "".join(f"CurvY1N{j}\n" for j in range(1, nodes + 1)) + outs += "".join(f"CurvX1N{j}\n" for j in range(1, nodes + 1, 10)) + title = ( + f"{CURRENT} m/s uniform current (Thorsen et al. 2017, case 1)" + if part == "current" + else "heave-induced VIV in still water (Thorsen et al. 2017, case 2)" + ) + files = { + "wang.dat": f"""--------------------- CableDyn Input File --------------------------------- +Wang et al. (2014) truncated SCR, {title} +----------------------- LINE TYPES ------------------------------------------ +TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t Cl dF cF +(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) (-) (-) (-) +scr {DIAMETER} {MASS} {EA:.6e} 0.0 {EI} {CD} 0.0 {CA} 0.0 {CV[part]} {DF} {F0} +----------------------- POINTS ---------------------------------------------- +ID Attachment X Y Z M V CdA CA +(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) +1 Coupled {X_TOP} 0.0 {z_top:.4f} 0 0 0 0 +2 Fixed 0.0 0.0 {-WATER_DEPTH:.4f} 0 0 0 0 +----------------------- LINES ----------------------------------------------- +ID LineType AttachA AttachB UnstrLen NumSegs Outputs +(-) (-) (-) (-) (m) (-) (-) +1 scr 1 2 {LENGTH} {segments} - +{frame}---------------------- OPTIONS ---------------------------------------------- +1025.0 rhoW +9.80665 g +{WATER_DEPTH} WtrDpth +{SEABED_K_PER_LENGTH / DIAMETER:.6e} kBot +{FRICTION} frictionMu +{dt:.6f} dtM +{tmax:.6f} TMax +{drive} +---------------------- OUTPUTS ----------------------------------------------- +{outs}END +------------------------- need this line -------------------------------------- +""" + } + if part == "current": + files["current_profile.txt"] = ( + f"z ux uy uz\n(m) (m/s) (m/s) (m/s)\n{-WATER_DEPTH:.2f} {CURRENT} 0 0\n" + f"0.0 {CURRENT} 0 0\n" + ) + else: + files["motion.txt"] = motion_text(dt, tmax, z_top) + return files + + +def motion_text(dt: float, tmax: float, z_top: float) -> str: + """The top joint's x and z: the fitted sinusoids about the static position, ramped in over + RAMP_PERIODS periods with a half-cosine, with their exact velocities and accelerations.""" + fit = top_motion() + w = 2.0 * math.pi / fit["period_s"] + ramp = RAMP_PERIODS * fit["period_s"] + rows = ["# time point x y z vx vy vz ax ay az\n"] + for k in range(round(tmax / dt) + 1): + t = k * dt + if t < ramp: + q = math.pi / ramp + r, dr, ddr = ( + 0.5 * (1.0 - math.cos(q * t)), + 0.5 * q * math.sin(q * t), + 0.5 * q * q * math.cos(q * t), + ) + else: + r, dr, ddr = 1.0, 0.0, 0.0 + vals = [] + for comp, base in (("x", X_TOP), ("z", z_top)): + amp, ph = fit[comp]["amp_m"], fit[comp]["phase_rad"] + s, c = math.sin(w * t + ph), math.cos(w * t + ph) + vals.append( + ( + base + amp * r * s, + amp * (dr * s + r * w * c), + amp * (ddr * s + 2.0 * dr * w * c - r * w * w * s), + ) + ) + (x, vx, ax), (z, vz, az) = vals + rows.append( + f"{t:.6f} 1 {x:.9e} 0 {z:.9e} {vx:.9e} 0 {vz:.9e} {ax:.9e} 0 {az:.9e}\n" + ) + return "".join(rows) + + +def share(spec: np.ndarray, f: np.ndarray, lo: float, hi: float) -> float | None: + total = spec.sum() + return float(spec[(f >= lo) & (f < hi)].sum() / total) if total > 0 else None + + +def analyse(out: Path, part: str, t0: float) -> dict: + """r.m.s. cross-flow strain along the riser (arc length s from the lower end) and the + spectrum of the strain 8.25 m from the lower end, over t > t0. + + The section axes of a line not restrained in torsion start at End A with x the projection + of global +z normal to the line, so CurvX is the in-plane curvature (the catenary's) and + CurvY the cross-flow one; this is checked on the static means. The strain is kappa D/2 at + the outer surface, as Figs. 17 and 22 report it. Current: the dynamic part (mean removed). + Heave: band-passed from 4 times the motion frequency to 50 Hz, as Wang et al. (2014, Sec. + 3.1) process the measurement. + """ + with open(out, encoding="utf-8") as fh: + fh.readline() + head = fh.readline().split() + fh.readline() + a = np.loadtxt(fh) + t = a[:, 0] + keep = t > t0 + dt = float(t[1] - t[0]) + nodes = sorted(int(c[7:]) for c in head if c.startswith("CurvY1N")) + cy = np.array([a[keep, head.index(f"CurvY1N{j}")] for j in nodes]) + sampled = sorted(int(c[7:]) for c in head if c.startswith("CurvX1N")) + cx_mean = np.abs( + [a[keep, head.index(f"CurvX1N{j}")].mean() for j in sampled] + ).mean() + cy_mean = np.abs(cy[[nodes.index(j) for j in sampled]].mean(axis=1)).mean() + if not cx_mean > 10.0 * cy_mean: + raise SystemExit( + f"{out}: CurvX is not the in-plane curvature ({cx_mean}, {cy_mean})" + ) + strain = (cy - cy.mean(axis=1, keepdims=True)) * DIAMETER / 2.0 + f = np.fft.rfftfreq(strain.shape[1], dt) + band = None + if part == "heave": + band = (4.0 / top_motion()["period_s"], BAND_HIGH) + sp = np.fft.rfft(strain, axis=1) + sp[:, (f < band[0]) | (f > band[1])] = 0.0 + strain = np.fft.irfft(sp, strain.shape[1], axis=1) + s = LENGTH - (np.array(nodes) - 1) * LENGTH / (len(nodes) - 1) + order = np.argsort(s) + s, strain = s[order], strain[order] + rms = np.sqrt((strain**2).mean(axis=1)) + j = int(np.argmin(np.abs(s - FREQUENCY_STATION))) + spec = np.abs(np.fft.rfft(strain[j] * np.hanning(strain.shape[1]))) ** 2 + inner = ( + (rms[1:-1] > rms[:-2]) & (rms[1:-1] > rms[2:]) & (rms[1:-1] > 0.5 * rms.max()) + ) + res = { + "s_m": s.tolist(), + "rms_strain": rms.tolist(), + "frequency_station_s_m": float(s[j]), + "dominant_frequency_hz": float(f[1 + int(np.argmax(spec[1:]))]), + "frequency_resolution_hz": float(f[1]), + "rms_peaks": int(inner.sum()), + "mean_top_tension_N": float(a[keep, head.index("FairTen1")].mean()), + } + if band is not None: + res["band_hz"] = list(band) + for name, (lo, hi) in BRANCHES.items(): + res[f"share_{name}_hz"] = share(spec, f, lo, hi) + return res + + +def run_case( + exe: Path, folder: Path, files: dict, analyse_out, key: str, keep: bool, sha: str +): + """Write the input files, run the deck and analyse it. A folder that holds the same input + files run by the same executable is not run again: its result is reused when the analysis + key is also the same, and its output is analysed again if it was kept.""" + folder.mkdir(parents=True, exist_ok=True) + result, out, ran = ( + folder / "result.json", + folder / "wang.out", + folder / "executable_sha256.txt", + ) + same = all( + (folder / n).is_file() and (folder / n).read_text(encoding="utf-8") == v + for n, v in files.items() + ) + if same and result.is_file(): + old = json.loads(result.read_text(encoding="utf-8")) + if old.pop("reuse_key", None) == f"{sha}:{key}": + return old + if not ( + same and out.is_file() and ran.is_file() and ran.read_text().strip() == sha + ): + # A run that fails or is interrupted must not leave the previous model's result next + # to the new inputs, where the next attempt would reuse it. + result.unlink(missing_ok=True) + ran.unlink(missing_ok=True) + out.unlink(missing_ok=True) + for n, v in files.items(): + (folder / n).write_text(v, encoding="utf-8", newline="\n") + proc = subprocess.run( + [str(exe), "wang.dat", "wang"], + cwd=folder, + capture_output=True, + text=True, + encoding="utf-8", + errors="replace", + env=dict(os.environ, OMP_NUM_THREADS="1"), + check=False, + ) + (folder / "console.txt").write_text(proc.stdout + proc.stderr, encoding="utf-8") + if proc.returncode != 0: + raise SystemExit(f"{folder}: CableDyn exited with {proc.returncode}") + ran.write_text(sha + "\n", encoding="utf-8") + res = analyse_out(out) + result.write_text( + json.dumps({**res, "reuse_key": f"{sha}:{key}"}, indent=1) + "\n", + encoding="utf-8", + ) + if not keep: + out.unlink() + return res + + +def figure(name: str) -> dict[str, np.ndarray]: + """The measured points and Thorsen et al.'s simulated line of Fig. 17 or 22.""" + data: dict[str, list] = {"measured": [], "thorsen2017": []} + with open(HERE / name, encoding="utf-8") as fh: + for r in csv.DictReader(fh): + data[r["series"]].append((float(r["s_m"]), float(r["rms_strain"]))) + return {k: np.array(sorted(v)) for k, v in data.items()} + + +def mean_or_none(values) -> float | None: + values = list(values) + return float(np.mean(values)) if values else None + + +def scores(s: np.ndarray, rms: np.ndarray, measured: np.ndarray) -> dict: + """r.m.s. strain against the measured stations: the largest over the span, the station + ratios, and their means over the lower and upper halves of the span.""" + at = np.interp(measured[:, 0], s, rms) + ratio = at / measured[:, 1] + lower = measured[:, 0] < LENGTH / 2.0 + return { + "max_rms_strain": float(rms.max()), + "s_of_max_m": float(s[int(np.argmax(rms))]), + "max_ratio": float(rms.max() / measured[:, 1].max()), + "mean_ratio_at_stations": float(ratio.mean()), + "rms_log_error_at_stations": float(np.sqrt(np.mean(np.log(ratio) ** 2))), + "mean_ratio_lower_half": mean_or_none(ratio[lower]), + "mean_ratio_upper_half": mean_or_none(ratio[~lower]), + "station_ratios": ratio.tolist(), + "station_values": at.tolist(), + } + + +def rounded(x): + """Six significant digits, so the record does not carry the last bits of the arithmetic.""" + if isinstance(x, float): + return float(f"{x:.6g}") + if isinstance(x, dict): + return {k: rounded(v) for k, v in x.items()} + if isinstance(x, list): + return [rounded(v) for v in x] + return x + + +def fmt(value: float | None, spec: str = ".3f") -> str: + """A score for the console; n/a when the selection holds nothing for it.""" + return "n/a" if value is None else format(value, spec) + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + ap.add_argument("exe") + ap.add_argument("workdir") + ap.add_argument( + "--runs", default="all", help="comma list of " + ", ".join(RUNS) + ", or all" + ) + ap.add_argument("--jobs", type=int, default=os.cpu_count() or 1) + ap.add_argument("--keep", action="store_true", help="keep the output tables") + ap.add_argument( + "--summary", + default=None, + help="directory for the comparison CSV and summary JSON", + ) + a = ap.parse_args() + found = a.exe if Path(a.exe).is_file() else shutil.which(a.exe) + if found is None: + raise SystemExit(f"CableDyn executable not found: {a.exe}") + exe = Path(found).resolve() + sha = hashlib.sha256(exe.read_bytes()).hexdigest() + names = ( + list(RUNS) + if a.runs == "all" + else [n.strip() for n in a.runs.split(",") if n.strip()] + ) + if not names or any(n not in RUNS for n in names): + raise SystemExit(f"--runs: choose from {', '.join(RUNS)}, got {a.runs!r}") + work = Path(a.workdir).resolve() + + def one(name: str) -> dict: + part, _, segments, dt, tf = RUNS[name] + t0 = PART[part]["t0"] + folder = work / f"{part}_n{segments}_dt{dt:g}_tf{tf:g}" + files = deck_files(part, segments, dt, tf) + return run_case( + exe, + folder, + files, + lambda out: analyse(out, part, t0), + f"{part}:{t0:g}:{ANALYSIS}", + a.keep, + sha, + ) + + with ThreadPoolExecutor(max_workers=max(1, min(a.jobs, len(names)))) as pool: + results = dict(zip(names, pool.map(one, names), strict=True)) + + rows, summary = [], {} + for part in PART: + fig = figure(PART[part]["fig"]) + measured, th = fig["measured"], fig["thorsen2017"] + th_scores = scores(th[:, 0], th[:, 1], measured) + block = { + "coefficients": { + "Cv": CV[part], + "f0": F0, + "df": DF, + "CD": CD, + "CM": 1.0 + CA, + }, + "tmax_s": PART[part]["tmax"], + "statistics_after_s": PART[part]["t0"], + "measured_max_rms_strain": float(measured[:, 1].max()), + "measured_dominant_frequency_hz": MEASURED_FREQUENCY[part], + "thorsen2017": { + k: v + for k, v in th_scores.items() + if k not in ("station_ratios", "station_values") + }, + "runs": {}, + } + if part == "heave": + fit = top_motion() + block["top_motion"] = { + "period_s": fit["period_s"], + "x_amplitude_m": fit["x"]["amp_m"], + "z_amplitude_m": fit["z"]["amp_m"], + "x_lag_behind_z_deg": math.degrees( + fit["z"]["phase_rad"] - fit["x"]["phase_rad"] + ), + "ramp_periods": RAMP_PERIODS, + } + for name in (n for n in RUNS if n in results and RUNS[n][0] == part): + _, role, segments, dt, tf = RUNS[name] + r = results[name] + sc = scores(np.array(r["s_m"]), np.array(r["rms_strain"]), measured) + run = { + "role": role, + "segments": segments, + "dt_s": dt, + "viv_frame_Tf_s": tf, + **{ + k: v + for k, v in sc.items() + if k not in ("station_ratios", "station_values") + }, + **{k: v for k, v in r.items() if k not in ("s_m", "rms_strain")}, + } + block["runs"][name] = run + th_at = np.interp(measured[:, 0], th[:, 0], th[:, 1]) + for k, (sm, em) in enumerate(measured): + rows.append( + { + "run": name, + "part": part, + "segments": segments, + "dt_s": dt, + "viv_frame_Tf_s": tf, + "station": k + 1, + "s_m": f"{sm:.4f}", + "measured_rms_strain": f"{em:.4e}", + "cabledyn_rms_strain": f"{sc['station_values'][k]:.4e}", + "cabledyn_ratio": f"{sc['station_ratios'][k]:.4f}", + "thorsen2017_rms_strain": f"{th_at[k]:.4e}", + "thorsen2017_ratio": f"{th_at[k] / em:.4f}", + } + ) + print( + f"{name:16s} max r.m.s. / measured {fmt(run['max_ratio'])} at s " + f"{run['s_of_max_m']:.2f} m; station mean {fmt(run['mean_ratio_at_stations'])} " + f"(lower half {fmt(run['mean_ratio_lower_half'])}, upper " + f"{fmt(run['mean_ratio_upper_half'])}), log error " + f"{fmt(run['rms_log_error_at_stations'])}; f({FREQUENCY_STATION} m) " + f"{run['dominant_frequency_hz']:.3f} Hz" + + "".join( + f"; share {b} Hz {fmt(run.get(f'share_{b}_hz'), '.2f')}" + for b in BRANCHES + if part == "heave" + ) + ) + if block["runs"]: + primary = next(n for n in RUNS if RUNS[n][0] == part) + base = block["runs"].get(primary) + for name, run in block["runs"].items(): + if name != primary and base is not None: + run["max_ratio_change_from_primary"] = ( + run["max_ratio"] / base["max_ratio"] - 1.0 + ) + ths = block["thorsen2017"] + print( + f"{part}: Thorsen et al. (2017) max {fmt(ths['max_ratio'])}, station mean " + f"{fmt(ths['mean_ratio_at_stations'])} (lower {fmt(ths['mean_ratio_lower_half'])}, " + f"upper {fmt(ths['mean_ratio_upper_half'])}), log error " + f"{fmt(ths['rms_log_error_at_stations'])}" + ) + summary[part] = block + summary["executable_sha256"] = sha + summary = rounded(summary) + if a.summary: + out = Path(a.summary) + out.mkdir(parents=True, exist_ok=True) + with open( + out / "response_comparison.csv", "w", newline="", encoding="utf-8" + ) as fh: + w = csv.DictWriter(fh, fieldnames=list(rows[0]), lineterminator="\n") + w.writeheader() + w.writerows(rows) + (out / "summary.json").write_text( + json.dumps(summary, indent=2) + "\n", encoding="utf-8", newline="\n" + ) + + +if __name__ == "__main__": + main() From b49dddbccf5dee882ccf25aeb3df15816d4dc122 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Tue, 17 Nov 2026 21:41:13 +0900 Subject: [PATCH 36/47] validation: SJTU flexible cylinder VIV in oscillatory flow (L3-O) (#180) The tests of Fu, Wang, Baarholm, Wu & Larsen (2014): a 4 m flexible cylinder (D 24 mm, EI 10.5 N m^2, pretension 500 N) moved across its axis through still water, A_m 0.68 m (KC 178) at periods 16.5, 10.2 and 8.45 s (U_R,max 4, 6.5 and 7.9). The relative flow reverses twice per cycle, so the case tests the VIV models through flow reversal and on the accelerating and decelerating halves of each half-cycle, where Fu et al. measure different amplitudes (hysteresis). validation/experiments/fu_oscillatory/fu_oscillatory_viv.py writes a deck per run, runs them in parallel (reused when deck and executable are unchanged) and compares the cross-flow A/D at mid-span (station CF4) against the instantaneous U_R on the two paths with the measured paths of Figs. 15-17, and the share of each half-cycle above sqrt(2)/2 of its peak with the article's lock-in shares (about 17, 34 and 50 %). extract_fu2014.py reads the paths from the figures, raster images calibrated on the plot frame and traced by colour; the traced gaps between the paths (0.164 at U_R 3.5, 0.222 at 4) match the figures' annotations 0.15D and 0.2D. Three published sets, none fitted to these tests (uls19, b1, wake, as in the FLOTANT and NDP cases), each with a VIV FRAME row: the cylinder moves through still water, where without it the wake oscillator never sheds. The primary runs take Tf 0.2 s; the motion period is 23-44 periods of f1, around the 30 the frame's two conditions need, so the record reports the runs without the row and with Tf 0.1 and 0.3 s. Results (A/D r.m.s. error over both paths; largest A/D): - every run converges through the flow reversals; - U_R,max 4: the wake oscillator gives the measured largest A/D (0.280 against 0.286), the generic set is 65 % high, uls19 barely responds; - U_R,max 6.5 and 7.9: every set holds the lock-in while the flow slows, the mean gap between the paths 2-5 times the measured one and the largest A/D 1.3-2.3 times the measured; the wake oscillator comes closest (0.177 and 0.132). Without the row the generic set scores 0.034 at U_R,max 4, the best of any run, but keeps the deceleration hold at 6.5 and 7.9. Half the time step and 80 elements change the largest A/D by at most 0.1 % (generic set, wake oscillator) and 4.1 % (uls19). The default command run into a new work directory reproduces response_comparison.csv and summary.json byte for byte. Added to VALIDATION.md as L3-O, to the experiments indexes, the top-level README, the changelog and the references (Fu et al. 2014, from the article's first page and footers). Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 8 + README.md | 4 +- VALIDATION.md | 22 + doc/references.rst | 6 + validation/README.md | 2 +- validation/experiments/README.md | 1 + .../experiments/fu_oscillatory/README.md | 116 + .../fu_oscillatory/extract_fu2014.py | 226 ++ .../fu_oscillatory/fu2014_hysteresis.csv | 147 ++ .../fu_oscillatory/fu_oscillatory_viv.py | 580 +++++ .../fu_oscillatory/provenance.json | 32 + .../fu_oscillatory/response_comparison.csv | 2065 +++++++++++++++++ .../experiments/fu_oscillatory/summary.json | 909 ++++++++ 13 files changed, 4115 insertions(+), 3 deletions(-) create mode 100644 validation/experiments/fu_oscillatory/README.md create mode 100644 validation/experiments/fu_oscillatory/extract_fu2014.py create mode 100644 validation/experiments/fu_oscillatory/fu2014_hysteresis.csv create mode 100644 validation/experiments/fu_oscillatory/fu_oscillatory_viv.py create mode 100644 validation/experiments/fu_oscillatory/provenance.json create mode 100644 validation/experiments/fu_oscillatory/response_comparison.csv create mode 100644 validation/experiments/fu_oscillatory/summary.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 827be464..16c78a35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -143,6 +143,14 @@ All notable changes to CableDyn are recorded in this file. The format follows branch, reported as a sensitivity. The case's script is now `wang_scr_viv.py` for both parts (it replaces `wang_scr_uniform_current.py`; the L3-W numbers are unchanged), and its data, including Thorsen et al.'s simulated lines, are read by `extract_thorsen2017.py`. +- Validation case L3-O (`validation/experiments/fu_oscillatory`): cross-flow VIV of the SJTU + flexible cylinder of Fu et al. (2014) moved harmonically through still water (KC 178, U_R,max 4, + 6.5 and 7.9), A/D at mid-span on the acceleration and deceleration paths against the measured + paths of their Figs. 15-17 (read from the figures by `extract_fu2014.py`), with three published + coefficient sets and a `VIV FRAME` row. Every run converges through the flow reversals. At + U_R,max 4 the wake oscillator gives the measured largest A/D (0.280 against 0.286); at 6.5 and + 7.9 every set holds the lock-in while the flow slows, the gap between the paths 2-5 times the + measured one and the largest A/D 1.3-2.3 times the measured. - Theory manual, Published coefficient sets: the VIV coefficient sets of Thorsen et al. (2016, 2017), Ulveseter et al. (2018), Andersen et al. (2024a, b) and Facchinetti et al. (2004), each with its source, its test data and the line-type columns it maps to, and Thorsen et al.'s diff --git a/README.md b/README.md index 21109df1..00fb2cae 100644 --- a/README.md +++ b/README.md @@ -171,9 +171,9 @@ layout is described in the architecture notes in the repository. ## Validation CableDyn is verified against analytical solutions and compared with MoorDyn, -OrcaFlex, seven published physical experiments (Holcombe lazy-wave, Bergdahl dynamic +OrcaFlex, eight published physical experiments (Holcombe lazy-wave, Bergdahl dynamic chain, Chaplin riser natural frequencies and stepped-current VIV, Wang catenary-riser VIV in -current and heave, NDP high-mode riser VIV, FLOTANT power-cable VIV), the IEA 15 MW VolturnUS-S reference systems, and coupled OpenFAST runs. Results, +current and heave, NDP high-mode riser VIV, FLOTANT power-cable VIV, oscillatory-flow cylinder VIV), the IEA 15 MW VolturnUS-S reference systems, and coupled OpenFAST runs. Results, acceptance criteria, and reproduction commands are in the [validation record](https://cabledyn.readthedocs.io/en/latest/validation.html); data and scripts are in [`validation/`](https://cabledyn.readthedocs.io/en/latest/validation.html). diff --git a/VALIDATION.md b/VALIDATION.md index b68648de..2702dc15 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -88,6 +88,7 @@ article's methods, are compared in | **L3-Wh** | SJTU steel catenary riser, heave-induced cross-flow VIV in still water (measured top motion, 5.96 s) | measured r.m.s. strain (25 stations, band-passed 0.67–50 Hz) and dominant frequency | no `VIV FRAME`: frequency 1.019 Hz vs close to 1 Hz; max r.m.s. strain +20.8%, station mean +33%, lower/upper half 1.71/0.93 (Thorsen et al. 2017: +5.6%, +8.7%, 1.44/0.71); `VIV FRAME` `Tf` 0.35–1 s: two branches, 1.01–1.02 Hz (max +7 to +13%) or 0.88–0.89 Hz (max −2.8 to −4.2%), `Tf` 0.5 s changes branch at dt/2 | published coefficient set, no fitted parameter; heave period about 6 VIV periods, below the `VIV FRAME` scale separation | Pass measured | | **L3-N** | NDP 38 m high-mode riser in uniform flow, 0.3–2.4 m/s (22 tests), cross-flow VIV | measured maximum r.m.s. cross-flow strain, dominant frequency, spatial-mean σ/D | strain r.m.s. log error: Ulveseter et al. (2019) set 0.178, Andersen et al. (2024b) 0.186, generic set 0.277, Thorsen et al. (2016) 0.363 (their own simulation 0.187); f D/U 0.145 / 0.134 / 0.192 / 0.193 vs 0.143 measured | generic set blind; the other sets fitted by their authors to NDP tests (implementation check) | Pass measured | | **L3-F** | FLOTANT OD 48 mm power-cable specimen with a 200 kg clump, tow tests at 0.025–1.0 m/s (40 tests), cross-flow and in-line VIV | measured A/D_rms (σ/OD) at 1/2L, 3/4L and L (de Wilde et al. 2021, App. 3) | CF r.m.s. log error (Ur ≥ 3): Ulveseter et al. (2019) set 0.731, generic set 0.594, wake oscillator 1.208; first peak at 1/2L 0.755 / 0.483 / 0.296 vs 0.776 measured; release Ur 7.06 / 5.89 / 5.30 vs 5.88 | published VIV sets, none fitted to these tests; structure identified from the specimen's in-air and in-water RAOs | Pass measured | +| **L3-O** | SJTU 4 m flexible cylinder moved harmonically through still water, KC 178 at U_R,max 4, 6.5 and 7.9, cross-flow VIV | measured A/D on the acceleration and deceleration paths at mid-span (Fu et al. 2014, Figs. 15–17); lock-in shares 17/34/50 % | A/D r.m.s. error: wake oscillator 0.088 / 0.177 / 0.132, generic set 0.138 / 0.339 / 0.345, Ulveseter et al. (2019) set 0.079 / 0.340 / 0.338; largest A/D at U_R,max 4: 0.280 / 0.472 / 0.124 vs 0.286; at 6.5 and 7.9 every set holds the lock-in while the flow slows: mean deceleration-acceleration gap 0.25–0.50 vs 0.09–0.12 measured | published VIV sets, none fitted to these tests; `VIV FRAME` Tf 0.2 s (sensitivity none, 0.1, 0.3 s) | Pass measured | | **L-fig** | Along-arc curvature overlay (CableDyn / OrcaFlex / MoorDyn-F ±4×) | 3-code committed record | CableDyn peak 0.11% from OrcaFlex | <0.5% | Pass | | **L4-1** | Coupled platform + mooring | synthetic reference | bit-for-bit | — | Pass | | **L4-1b** | VolturnUS-S coupled platform + power cable | OpenFAST v5.0.0 (CompMooring 5 vs 3) | platform DOFs <0.6% (3-seed DLC-1.1); fairlead and anchor <0.001% static | <3% platform | Pass | @@ -450,6 +451,27 @@ the tow tests it predicts). Inputs, reduction scripts, results, and source prove Half the time step, two elements per table element and 120 s runs change no A/D_rms by more than 0.006 at five speeds; the default run reproduces the committed record byte for byte. +- **L3-O SJTU flexible cylinder in oscillatory flow, cross-flow VIV hysteresis** + ([Fu et al., 2014](https://cabledyn.readthedocs.io/en/latest/references.html#ref-fu2014)): + the 4 m cylinder (D 24 mm, pretension 500 N) moved across its axis through still water, A_m + 0.68 m (KC 178) at periods 16.5, 10.2 and 8.45 s (U_R,max 4, 6.5 and 7.9), so the relative flow + reverses twice per cycle. The cross-flow A/D at mid-span is compared against the instantaneous + U_R on the acceleration and deceleration paths with the measured paths of Figs. 15–17 (read from + the raster figures; the traced gaps match the figures' annotations 0.15D and 0.2D), and the share + of each half-cycle above √2/2 of its peak with the article's lock-in shares. Three published sets, + none fitted to these tests, each with a `VIV FRAME` row (Tf 0.2 s), without which the wake + oscillator does not shed for a cylinder moving through still water. Every run converges through + the flow reversals. At U_R,max 4 the wake oscillator gives the measured largest A/D (0.280 + against 0.286), the generic set is 65% high and the Ulveseter et al. (2019) set barely responds. + At U_R,max 6.5 and 7.9 every set holds the lock-in while the flow slows: the deceleration path + stays near its peak, the mean gap between the paths is 2–5 times the measured one and the largest + A/D 1.3–2.3 times the measured; the wake oscillator comes closest (A/D r.m.s. error 0.18 and + 0.13). Without the row the synchronisation sets respond less (the generic set 0.034 at U_R,max 4, + the best of any run) but keep the hold; with Tf 0.1 and 0.3 s their largest A/D moves by up to + 21%, the wake oscillator's by up to 11%. Half the time step and 80 elements change the largest A/D + by at most 0.1% (generic set, wake oscillator) and 4.1% (Ulveseter et al. set); the default run + reproduces the committed record byte for byte. + ## L4 coupled OpenFAST - **L4-1 synthetic** (`l4_platform_mooring`): 6-DOF platform moored by three taut diff --git a/doc/references.rst b/doc/references.rst index 1003799c..715b4c44 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -272,6 +272,12 @@ Verification and validation references catenary riser from vortex-induced vibration caused by vessel motions. *Marine Structures* **39**, 131–156. https://doi.org/10.1016/j.marstruc.2014.07.002 +.. _ref-fu2014: + +- **Fu, S., Wang, J., Baarholm, R., Wu, J. & Larsen, C. M. (2014).** Features of vortex-induced + vibration in oscillatory flow. *Journal of Offshore Mechanics and Arctic Engineering* + **136**\ (1), 011801. https://doi.org/10.1115/1.4025759 + .. _ref-davies2026: - **Davies, R., Lekkala, M. R., Michaloliakos, A., Wong, W.-Y., Hall, M., Vakakis, A. & Zuo, L. diff --git a/validation/README.md b/validation/README.md index 36a42137..a22b4391 100644 --- a/validation/README.md +++ b/validation/README.md @@ -16,7 +16,7 @@ redistributed. | [`RELEASE_0_1_1.md`](RELEASE_0_1_1.md) | The same for v0.1.1 | | [`RELEASE_0_1_0.md`](RELEASE_0_1_0.md) | The same for v0.1.0 | | [`bodies/`](bodies/README.md) | Rigid-body, rod and shared-anchor cases with MoorDyn-C twins, stored references and pass limits | -| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, Wang et al. (2014) catenary-riser VIV in current and heave, Trim et al. (2005) NDP high-mode riser VIV and de Wilde et al. (2021) FLOTANT power-cable VIV comparisons | +| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, Wang et al. (2014) catenary-riser VIV in current and heave, Trim et al. (2005) NDP high-mode riser VIV, de Wilde et al. (2021) FLOTANT power-cable VIV and Fu et al. (2014) oscillatory-flow cylinder VIV comparisons | | [`PERFORMANCE_0_1_0.md`](PERFORMANCE_0_1_0.md) | Wall time of CableDyn 0.1.0, MoorDyn-C and MoorDyn-F at equal accuracy on five mooring, cable, buoy and coupled cases | | [`performance/`](performance/README.md) | Same-host wall-clock records of the L5 cases: the resolved lazy-wave spans, the one-hour VolturnUS-S mooring and the tension-only chain | | [`PAPER_REPRODUCTION.md`](PAPER_REPRODUCTION.md) | Every CableDyn result in the journal article, re-run with the release defaults and in paper mode | diff --git a/validation/experiments/README.md b/validation/experiments/README.md index aac5049e..cc4668dc 100644 --- a/validation/experiments/README.md +++ b/validation/experiments/README.md @@ -16,5 +16,6 @@ committed results. | [`wang_scr/`](wang_scr/README.md) | Wang et al. (2014), truncated steel catenary riser in uniform current and under heave motion of its upper end, cross-flow VIV | Finite-EI riser, synchronisation VIV | | [`ndp_riser/`](ndp_riser/README.md) | Trim et al. (2005), NDP 38 m high-mode riser in uniform flow, cross-flow VIV with a generic and three published coefficient sets | Finite-EI riser, synchronisation VIV | | [`flotant/`](flotant/README.md) | de Wilde et al. (2021), FLOTANT OD 48 mm power-cable specimen with a clump weight, tow tests and forced-oscillation RAOs, cross-flow and in-line VIV with three published coefficient sets | Finite-EI cable, synchronisation and wake-oscillator VIV | +| [`fu_oscillatory/`](fu_oscillatory/README.md) | Fu et al. (2014), SJTU 4 m flexible cylinder moved harmonically through still water, cross-flow VIV on the acceleration and deceleration paths with three published coefficient sets | Finite-EI cylinder, synchronisation and wake-oscillator VIV, `VIV FRAME` | The results are summarised as cases L3-H, L3-B, L3-C, L3-D, L3-W, L3-Wh, L3-N and L3-F in [`VALIDATION.md`](../../VALIDATION.md). diff --git a/validation/experiments/fu_oscillatory/README.md b/validation/experiments/fu_oscillatory/README.md new file mode 100644 index 00000000..97c11744 --- /dev/null +++ b/validation/experiments/fu_oscillatory/README.md @@ -0,0 +1,116 @@ + + +# SJTU flexible cylinder in oscillatory flow: cross-flow VIV hysteresis + +This directory compares CableDyn's cross-flow VIV of a flexible cylinder moved harmonically through +still water with the tests of Fu et al. (2014), . The relative +flow reverses twice per motion cycle and the shedding frequency sweeps from zero to its largest value +and back, so the case tests what a steady current cannot: the VIV model through flow reversal, and +the response on the accelerating and decelerating halves of each half-cycle. Fu et al. measure +different amplitudes on the two halves (hysteresis) and give the paths for three cases. No model +parameter is fitted to these tests. + +## Model and data + +- **Cylinder** (Table 1): length 4 m, diameter 24 mm, 0.69 kg/m, EI 10.5 N m², EA 6.67e5 N, + pretension 500 N; their calculated first natural frequency in water f1 2.68 Hz (with C_a 1) + defines U_R. The ends are universal joints (pinned here), 40 elements, dt 1 ms (the axial period in + 8 steps), C_d 1.2 and C_a 1. +- **Motion:** the whole cylinder moved across its axis, y = A_m sin(2πt/T), A_m 0.68 m (KC 178), with + a one-period cosine ramp, 8 cycles after it. The three KC 178 cases are the periods of the captions + of Figs. 15-17, T 16.5, 10.2 and 8.45 s, U_R,max = 2πA_m/(T f1 D) 4.03, 6.51 and 7.86 (the + article's 4, 6.5 and 7.9). +- **Measured** (Figs. 15-17, station CF4): A/D against the instantaneous U_R = |V|/(f1 D) on the + acceleration and deceleration paths, averaged by Fu et al. over 10 middle cycles of 15 (their + Eq. 20). `extract_fu2014.py` reads the paths from the figures, embedded raster images, calibrated + on the plot frame and traced by colour, at U_R steps of 0.25 (`fu2014_hysteresis.csv`). The traced + gaps between the paths, 0.164 at U_R 3.5 (U_R,max 6.5) and 0.222 at U_R 4 (7.9), match the + figures' own annotations, 0.15D and 0.2D. +- **Model output:** the cross-flow (vertical) displacement at mid-span, band-passed 0.5-25 Hz, its + Hilbert envelope over D, averaged in U_R bins of ±0.125 over the half-cycles from two periods on, + on the two paths. CF4 is the fourth of seven cross-flow stations at 0.5 m spacing (Table 2), taken + as mid-span. +- **Lock-in share:** the share of each half-cycle the envelope spends above √2/2 of its largest value, + the article's definition (Sec. 4.6), against the shares it gives for KC > 100: about 17, 34 and 50 %. + +## Coefficient sets + +The sets of the FLOTANT and NDP cases, none fitted to these tests: + +- **uls19:** Ulveseter et al. (2019), Table 1 (Cl 0.85, cF 0.144, dF 0.064; VIV ClX 0.75, alpha 0.15, + Chh 1.5), fitted by them to the NDP riser; +- **b1:** the generic set of the Delta Flume case (Cl 0.8, cF 0.18, dF 0.08; ClX 0.85, alpha 0.15, + Ulveseter et al. 2018, Table 3; VIV AMPLITUDE with the drag amplification of Chaplin et al. 2005, + Eq. 4; VIV DAMPING 0 0 1); +- **wake:** the wake oscillator of Facchinetti et al. (2004) (CL0 0.3, St 0.2, eps 0.3, A 12), + cross-flow only. + +The cylinder moves through still water, so every set runs with a `VIV FRAME` row: without it the +wake oscillator never sheds (the ambient flow is zero) and the amplitude estimate and damping split +of b1 act across a flow that is not there. Its filter time cannot meet both of the frame's +conditions here: the motion period is 23-44 periods of f1, around the 30 the conditions need. +The primary runs take `Tf` 0.2 s (ωTf 3.4 at f1; ω_m Tf 0.08, 0.12 and 0.15 at the three periods), and +the record reports the runs without the row and with `Tf` 0.1 and 0.3 s. + +## Results (primary runs, `Tf` 0.2 s) + +| U_R,max | Set | A/D r.m.s. error | Mean gap dec. − acc. (measured) | Largest A/D (measured) | Lock-in share (measured) | +|---|---|---|---|---|---| +| 4 | uls19 | 0.079 | −0.005 (+0.009) | 0.124 (0.286) | 0.08 (0.17) | +| 4 | b1 | 0.138 | +0.123 (+0.009) | 0.472 (0.286) | 0.31 (0.17) | +| 4 | wake | 0.088 | +0.106 (+0.009) | 0.280 (0.286) | 0.27 (0.17) | +| 6.5 | uls19 | 0.340 | +0.426 (+0.089) | 1.007 (0.475) | 0.34 (0.34) | +| 6.5 | b1 | 0.339 | +0.364 (+0.089) | 0.874 (0.475) | 0.53 (0.34) | +| 6.5 | wake | 0.177 | +0.271 (+0.089) | 0.609 (0.475) | 0.46 (0.34) | +| 7.9 | uls19 | 0.338 | +0.498 (+0.123) | 1.043 (0.450) | 0.34 (0.50) | +| 7.9 | b1 | 0.345 | +0.380 (+0.123) | 0.937 (0.450) | 0.60 (0.50) | +| 7.9 | wake | 0.132 | +0.255 (+0.123) | 0.570 (0.450) | 0.50 (0.50) | + +The largest measured A/D is the largest on the U_R grid; the measured deceleration line ends at 0.32 at +U_R 4.12 in Fig. 15. + +- **Through the flow reversals** every run converges, the synchronisation phases and the wake + variable running continuously through U → 0. +- **U_R,max 4:** the wake oscillator gives the measured largest amplitude (0.280 against 0.286); uls19 + barely responds (its band centre, 0.144, is reached only near the velocity peak); b1 is 65 % high. +- **U_R,max 6.5 and 7.9: every set holds the lock-in on the deceleration path.** The deceleration path + stays near its peak while the flow slows, so the mean gap between the paths is 2-5 times the + measured one and the largest amplitude 1.3-2.3 times the measured. The measured hysteresis is the + same in kind (the deceleration path above the acceleration path), smaller in size. The wake + oscillator comes closest. +- The same persistence shows in the FLOTANT case, whose lock-in releases late for the set that + reaches its peak. + +## Sensitivity and convergence + +- **Without `VIV FRAME`:** the wake oscillator does not shed (largest A/D 0.000-0.021). The + synchronisation sets respond less: b1 0.297, 0.769 and 0.760 (A/D r.m.s. error 0.034 at U_R,max 4, + the best of any run there; 0.229 and 0.212 at 6.5 and 7.9), uls19 0.080, 0.738 and 0.824. The + deceleration hold remains (mean gap +0.25 to +0.35 at 6.5 and 7.9). +- **`Tf` 0.1 and 0.3 s:** b1's largest A/D 0.404-0.511, 0.710-0.922 and 0.738-0.978; uls19 + 0.110-0.139, 0.945-0.969 and 1.096-1.141; the wake oscillator 0.273-0.284, 0.607-0.621 and + 0.579-0.633. The synchronisation sets depend on the filter time because their amplitude estimate and + damping split take the filtered frame; the wake oscillator's wake frequency barely does. +- **Convergence (U_R,max 6.5):** half the time step changes the largest A/D by +0.03 % (b1), −0.1 % + (wake) and −4.1 % (uls19); 80 elements by +0.1 %, +0.07 % and −4.1 %. +- The default command, run into a new work directory, reproduces `response_comparison.csv` and + `summary.json` byte for byte. + +## Limitations + +- The measured A/D is reconstructed from strain by a sinusoidal modal fit with constant tension (Fu + et al., Sec. 3.2), while the tension varies with the motion; the model's A/D is the displacement. +- The submergence of the cylinder, the band-pass cut-offs and the structural damping are not given; + the model takes 2 m, 0.5-25 Hz and no structural damping. +- The paths are one station (CF4) and three cases; Fu et al. do not show the scatter between cycles. +- The lock-in shares are "about" values from the text, for KC > 100. + +## Reproduction + +```text +python extract_fu2014.py FU2014.pdf +python fu_oscillatory_viv.py path/to/cabledyn.exe WORKDIR --jobs 8 --summary . +``` + +The executable of the record is named by its SHA-256 in `summary.json`; `provenance.json` gives the +sources, the data used and the build. diff --git a/validation/experiments/fu_oscillatory/extract_fu2014.py b/validation/experiments/fu_oscillatory/extract_fu2014.py new file mode 100644 index 00000000..4f0bb63d --- /dev/null +++ b/validation/experiments/fu_oscillatory/extract_fu2014.py @@ -0,0 +1,226 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Read the measured hysteresis paths of Fu et al. (2014), Figs. 15-17, from the article's PDF. + +The three figures are embedded raster images (1503 px wide): the cross-flow A/D at CF4 against the +instantaneous reduced velocity U_R = |V|/(f1 D) on the acceleration path (black solid line) and the +deceleration path (red dashed line), for KC 178 and U_R,max 4, 6.5 and 7.9. Each image is calibrated +on its plot frame, the outermost dark lines that span the plot, with the axis limits printed at the +frame's corners (U_R 0 to 5, 7 and 8; A/D 0 to 0.4, 0 to 0.6 and 0.1 to 0.6). The inset, the legend +and the title box are masked, and so are the tick marks inside the frame; the line is followed column by column from its +left end (the run of its colour nearest the previous column's centre), its centre the run's median row, +and columns where an arrowhead widens the line are bridged linearly. The +paths are written at U_R steps of 0.25 between the ends of each line. + + python extract_fu2014.py FU2014.pdf [--out fu2014_hysteresis.csv] [--check DIR] + +Source: + S. Fu, J. Wang, R. Baarholm, J. Wu, C.M. Larsen (2014), Features of vortex-induced vibration in + oscillatory flow, Journal of Offshore Mechanics and Arctic Engineering 136(1), 011801, + https://doi.org/10.1115/1.4025759 (Figs. 15-17, p. 011801-7 and 011801-8) +""" + +from __future__ import annotations + +import argparse +import csv +import io +import json +from pathlib import Path + +import numpy as np +import pymupdf +from PIL import Image + +HERE = Path(__file__).resolve().parent + +# (page index, image index on the page, U_R,max, T [s], x range, y range, masked boxes in pixels +# (x0, y0, x1, y1): the inset, the legend and the title box) +FIGURES = ( + ( + "15", + 6, + 1, + 4.0, + 16.5, + (0.0, 5.0), + (0.0, 0.4), + ((160, 115, 780, 340), (1160, 10, 1500, 110), (650, 15, 955, 110)), + ), + ( + "16", + 6, + 2, + 6.5, + 10.2, + (0.0, 7.0), + (0.0, 0.6), + ((180, 80, 750, 310), (1160, 10, 1500, 110), (630, 15, 960, 105)), + ), + ( + "17", + 7, + 0, + 7.9, + 8.45, + (0.0, 8.0), + (0.1, 0.6), + ((165, 80, 760, 310), (1155, 10, 1500, 110), (635, 15, 960, 105)), + ), +) + + +def frame(dark: np.ndarray) -> tuple[float, float, float, float]: + """The plot frame: centre rows of the top and bottom lines, centre columns of the side lines.""" + h, w = dark.shape + rows = np.where(dark.sum(axis=1) > 0.8 * w)[0] + cols = np.where(dark.sum(axis=0) > 0.8 * h)[0] + + def centre(idx: np.ndarray, first: bool) -> float: + groups = np.split(idx, np.where(np.diff(idx) > 1)[0] + 1) + g = groups[0] if first else groups[-1] + return float(g.mean()) + + return ( + centre(cols, True), + centre(cols, False), + centre(rows, True), + centre(rows, False), + ) + + +def trace(mask: np.ndarray, x0: float, x1: float) -> tuple[np.ndarray, np.ndarray]: + """The line's centre row in each column inside the frame, following the line from its left end. + + In each column the coloured pixels split into contiguous runs; the run nearest the previous + column's centre is the line (a stray mark elsewhere in the column is ignored), and its median row + is the centre. Columns where an arrowhead widens the run are dropped and bridged linearly. + """ + cols, rows, widths = [], [], [] + prev = None + for c in range(int(np.ceil(x0)) + 3, int(np.floor(x1)) - 2): + r = np.where(mask[:, c])[0] + if not len(r): + continue + runs = np.split(r, np.where(np.diff(r) > 2)[0] + 1) + if prev is None: + run = max(runs, key=len) + else: + run = min(runs, key=lambda q: abs(float(np.median(q)) - prev)) + if ( + abs(float(np.median(run)) - prev) > 40 + ): # nothing of this line in the column + continue + prev = float(np.median(run)) + cols.append(c) + rows.append(prev) + widths.append(int(run.max() - run.min() + 1)) + cols_a, rows_a, w = np.array(cols), np.array(rows), np.array(widths) + keep = w <= 2.5 * np.median(w) + 2 + return cols_a[keep], rows_a[keep] + + +def extract(pdf: Path, check: Path | None) -> list[dict]: + doc = pymupdf.open(pdf) + out = [] + for fig, page, index, urmax, period, (ux0, ux1), (ay0, ay1), boxes in FIGURES: + xref = doc[page].get_images(full=True)[index][0] + img = np.asarray( + Image.open(io.BytesIO(doc.extract_image(xref)["image"])).convert("RGB") + ).astype(int) + r, g, b = img[..., 0], img[..., 1], img[..., 2] + dark = img.max(axis=2) < 100 + left, right, top, bottom = frame(dark) + # the solid line is anti-aliased: any neutral grey darker than the blue-grey grid + black = (img.max(axis=2) < 150) & (np.abs(r - b) < 30) & (np.abs(r - g) < 30) + red = (r > 170) & (g < 110) & (b < 110) + for x0, y0, x1, y1 in boxes: + black[y0:y1, x0:x1] = False + red[y0:y1, x0:x1] = False + # exclude the frame lines and the tick marks drawn inward from them (at most 11 px on the + # horizontal axis, 20 px on the vertical axes) + for m in (black, red): + m[:, : int(left) + 21] = False + m[:, int(right) - 20 :] = False + m[: int(top) + 12, :] = False + m[int(bottom) - 11 :, :] = False + + def ur(c): + return ux0 + (np.asarray(c, float) - left) / (right - left) * (ux1 - ux0) + + def ad(rw): + return ay1 - (np.asarray(rw, float) - top) / (bottom - top) * (ay1 - ay0) + + for path, m in (("acceleration", black), ("deceleration", red)): + c, rw = trace(m, left, right) + u, a = ur(c), ad(rw) + grid = np.arange(np.ceil(u.min() / 0.25) * 0.25, u.max() + 1e-9, 0.25) + vals = np.interp(grid, u, a) + for gu, gv in zip(grid, vals): + out.append( + { + "figure": fig, + "U_R_max": urmax, + "T_s": period, + "KC": 178, + "path": path, + "U_R": round(float(gu), 4), + "A_D": round(float(gv), 4), + } + ) + out.append( + { + "figure": fig, + "U_R_max": urmax, + "T_s": period, + "KC": 178, + "path": path, + "U_R": round(float(u.max()), 4), + "A_D": round(float(a[np.argmax(u)]), 4), + "end": 1, + } + ) + if check is not None: + check.mkdir(parents=True, exist_ok=True) + vis = img.astype(np.uint8).copy() + for path, m, colour in ( + ("acceleration", black, (0, 200, 0)), + ("deceleration", red, (0, 120, 255)), + ): + c, rw = trace(m, left, right) + for cc, rr in zip(c, rw): + vis[int(round(rr)) - 1 : int(round(rr)) + 2, cc] = colour + Image.fromarray(vis).save(check / f"fig{fig}_check.png") + return out + + +def main() -> None: + ap = argparse.ArgumentParser() + ap.add_argument("pdf", type=Path) + ap.add_argument("--out", type=Path, default=HERE / "fu2014_hysteresis.csv") + ap.add_argument( + "--check", type=Path, help="write the traced lines over each figure into DIR" + ) + a = ap.parse_args() + rows = extract(a.pdf, a.check) + with open(a.out, "w", encoding="utf-8", newline="\n") as fh: + w = csv.DictWriter( + fh, + fieldnames=["figure", "U_R_max", "T_s", "KC", "path", "U_R", "A_D"], + lineterminator="\n", + ) + w.writeheader() + for row in rows: + if not row.get("end"): + w.writerow({k: row[k] for k in w.fieldnames}) + ends = [ + {k: row[k] for k in ("figure", "path", "U_R", "A_D")} + for row in rows + if row.get("end") + ] + print(json.dumps(ends, indent=1)) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/fu_oscillatory/fu2014_hysteresis.csv b/validation/experiments/fu_oscillatory/fu2014_hysteresis.csv new file mode 100644 index 00000000..665b732a --- /dev/null +++ b/validation/experiments/fu_oscillatory/fu2014_hysteresis.csv @@ -0,0 +1,147 @@ +figure,U_R_max,T_s,KC,path,U_R,A_D +15,4.0,16.5,178,acceleration,0.25,0.0094 +15,4.0,16.5,178,acceleration,0.5,0.0097 +15,4.0,16.5,178,acceleration,0.75,0.0097 +15,4.0,16.5,178,acceleration,1.0,0.0094 +15,4.0,16.5,178,acceleration,1.25,0.0078 +15,4.0,16.5,178,acceleration,1.5,0.0105 +15,4.0,16.5,178,acceleration,1.75,0.0123 +15,4.0,16.5,178,acceleration,2.0,0.0086 +15,4.0,16.5,178,acceleration,2.25,0.0155 +15,4.0,16.5,178,acceleration,2.5,0.0217 +15,4.0,16.5,178,acceleration,2.75,0.0331 +15,4.0,16.5,178,acceleration,3.0,0.0528 +15,4.0,16.5,178,acceleration,3.25,0.0844 +15,4.0,16.5,178,acceleration,3.5,0.1307 +15,4.0,16.5,178,acceleration,3.75,0.1941 +15,4.0,16.5,178,acceleration,4.0,0.2576 +15,4.0,16.5,178,deceleration,0.25,0.0138 +15,4.0,16.5,178,deceleration,0.5,0.014 +15,4.0,16.5,178,deceleration,0.75,0.0146 +15,4.0,16.5,178,deceleration,1.0,0.0152 +15,4.0,16.5,178,deceleration,1.25,0.017 +15,4.0,16.5,178,deceleration,1.5,0.0183 +15,4.0,16.5,178,deceleration,1.75,0.0181 +15,4.0,16.5,178,deceleration,2.0,0.0199 +15,4.0,16.5,178,deceleration,2.25,0.0228 +15,4.0,16.5,178,deceleration,2.5,0.032 +15,4.0,16.5,178,deceleration,2.75,0.0467 +15,4.0,16.5,178,deceleration,3.0,0.0588 +15,4.0,16.5,178,deceleration,3.25,0.088 +15,4.0,16.5,178,deceleration,3.5,0.1305 +15,4.0,16.5,178,deceleration,3.75,0.2108 +15,4.0,16.5,178,deceleration,4.0,0.2863 +16,6.5,10.2,178,acceleration,0.25,0.0998 +16,6.5,10.2,178,acceleration,0.5,0.0975 +16,6.5,10.2,178,acceleration,0.75,0.0945 +16,6.5,10.2,178,acceleration,1.0,0.0914 +16,6.5,10.2,178,acceleration,1.25,0.0888 +16,6.5,10.2,178,acceleration,1.5,0.0866 +16,6.5,10.2,178,acceleration,1.75,0.084 +16,6.5,10.2,178,acceleration,2.0,0.0819 +16,6.5,10.2,178,acceleration,2.25,0.0792 +16,6.5,10.2,178,acceleration,2.5,0.0779 +16,6.5,10.2,178,acceleration,2.75,0.0766 +16,6.5,10.2,178,acceleration,3.0,0.0766 +16,6.5,10.2,178,acceleration,3.25,0.0823 +16,6.5,10.2,178,acceleration,3.5,0.0875 +16,6.5,10.2,178,acceleration,3.75,0.0983 +16,6.5,10.2,178,acceleration,4.0,0.1128 +16,6.5,10.2,178,acceleration,4.25,0.1303 +16,6.5,10.2,178,acceleration,4.5,0.1608 +16,6.5,10.2,178,acceleration,4.75,0.192 +16,6.5,10.2,178,acceleration,5.0,0.2341 +16,6.5,10.2,178,acceleration,5.25,0.2808 +16,6.5,10.2,178,acceleration,5.5,0.3281 +16,6.5,10.2,178,acceleration,5.75,0.3811 +16,6.5,10.2,178,acceleration,6.0,0.4333 +16,6.5,10.2,178,acceleration,6.25,0.4535 +16,6.5,10.2,178,acceleration,6.5,0.4729 +16,6.5,10.2,178,deceleration,0.25,0.1015 +16,6.5,10.2,178,deceleration,0.5,0.111 +16,6.5,10.2,178,deceleration,0.75,0.1202 +16,6.5,10.2,178,deceleration,1.0,0.1298 +16,6.5,10.2,178,deceleration,1.25,0.1397 +16,6.5,10.2,178,deceleration,1.5,0.1493 +16,6.5,10.2,178,deceleration,1.75,0.1598 +16,6.5,10.2,178,deceleration,2.0,0.1724 +16,6.5,10.2,178,deceleration,2.25,0.1859 +16,6.5,10.2,178,deceleration,2.5,0.1996 +16,6.5,10.2,178,deceleration,2.75,0.2096 +16,6.5,10.2,178,deceleration,3.0,0.226 +16,6.5,10.2,178,deceleration,3.25,0.2385 +16,6.5,10.2,178,deceleration,3.5,0.2508 +16,6.5,10.2,178,deceleration,3.75,0.2634 +16,6.5,10.2,178,deceleration,4.0,0.2758 +16,6.5,10.2,178,deceleration,4.25,0.2914 +16,6.5,10.2,178,deceleration,4.5,0.3104 +16,6.5,10.2,178,deceleration,4.75,0.3301 +16,6.5,10.2,178,deceleration,5.0,0.3533 +16,6.5,10.2,178,deceleration,5.25,0.3777 +16,6.5,10.2,178,deceleration,5.5,0.3932 +16,6.5,10.2,178,deceleration,5.75,0.4206 +16,6.5,10.2,178,deceleration,6.0,0.4416 +16,6.5,10.2,178,deceleration,6.25,0.4583 +16,6.5,10.2,178,deceleration,6.5,0.4754 +17,7.9,8.45,178,acceleration,0.25,0.1589 +17,7.9,8.45,178,acceleration,0.5,0.1582 +17,7.9,8.45,178,acceleration,0.75,0.1574 +17,7.9,8.45,178,acceleration,1.0,0.1567 +17,7.9,8.45,178,acceleration,1.25,0.156 +17,7.9,8.45,178,acceleration,1.5,0.1549 +17,7.9,8.45,178,acceleration,1.75,0.1545 +17,7.9,8.45,178,acceleration,2.0,0.1541 +17,7.9,8.45,178,acceleration,2.25,0.1534 +17,7.9,8.45,178,acceleration,2.5,0.1538 +17,7.9,8.45,178,acceleration,2.75,0.1545 +17,7.9,8.45,178,acceleration,3.0,0.1567 +17,7.9,8.45,178,acceleration,3.25,0.1622 +17,7.9,8.45,178,acceleration,3.5,0.1673 +17,7.9,8.45,178,acceleration,3.75,0.1774 +17,7.9,8.45,178,acceleration,4.0,0.1905 +17,7.9,8.45,178,acceleration,4.25,0.2041 +17,7.9,8.45,178,acceleration,4.5,0.2223 +17,7.9,8.45,178,acceleration,4.75,0.2441 +17,7.9,8.45,178,acceleration,5.0,0.2671 +17,7.9,8.45,178,acceleration,5.25,0.2906 +17,7.9,8.45,178,acceleration,5.5,0.3165 +17,7.9,8.45,178,acceleration,5.75,0.3423 +17,7.9,8.45,178,acceleration,6.0,0.367 +17,7.9,8.45,178,acceleration,6.25,0.3918 +17,7.9,8.45,178,acceleration,6.5,0.4172 +17,7.9,8.45,178,acceleration,6.75,0.4268 +17,7.9,8.45,178,acceleration,7.0,0.4354 +17,7.9,8.45,178,acceleration,7.25,0.443 +17,7.9,8.45,178,acceleration,7.5,0.4212 +17,7.9,8.45,178,acceleration,7.75,0.3992 +17,7.9,8.45,178,deceleration,0.25,0.211 +17,7.9,8.45,178,deceleration,0.5,0.2251 +17,7.9,8.45,178,deceleration,0.75,0.2393 +17,7.9,8.45,178,deceleration,1.0,0.2539 +17,7.9,8.45,178,deceleration,1.25,0.2681 +17,7.9,8.45,178,deceleration,1.5,0.2823 +17,7.9,8.45,178,deceleration,1.75,0.2962 +17,7.9,8.45,178,deceleration,2.0,0.3139 +17,7.9,8.45,178,deceleration,2.25,0.3241 +17,7.9,8.45,178,deceleration,2.5,0.338 +17,7.9,8.45,178,deceleration,2.75,0.3516 +17,7.9,8.45,178,deceleration,3.0,0.3651 +17,7.9,8.45,178,deceleration,3.25,0.3784 +17,7.9,8.45,178,deceleration,3.5,0.391 +17,7.9,8.45,178,deceleration,3.75,0.4029 +17,7.9,8.45,178,deceleration,4.0,0.413 +17,7.9,8.45,178,deceleration,4.25,0.4235 +17,7.9,8.45,178,deceleration,4.5,0.4324 +17,7.9,8.45,178,deceleration,4.75,0.4378 +17,7.9,8.45,178,deceleration,5.0,0.442 +17,7.9,8.45,178,deceleration,5.25,0.4488 +17,7.9,8.45,178,deceleration,5.5,0.45 +17,7.9,8.45,178,deceleration,5.75,0.45 +17,7.9,8.45,178,deceleration,6.0,0.4493 +17,7.9,8.45,178,deceleration,6.25,0.4482 +17,7.9,8.45,178,deceleration,6.5,0.4403 +17,7.9,8.45,178,deceleration,6.75,0.4326 +17,7.9,8.45,178,deceleration,7.0,0.4251 +17,7.9,8.45,178,deceleration,7.25,0.4163 +17,7.9,8.45,178,deceleration,7.5,0.4065 +17,7.9,8.45,178,deceleration,7.75,0.3974 diff --git a/validation/experiments/fu_oscillatory/fu_oscillatory_viv.py b/validation/experiments/fu_oscillatory/fu_oscillatory_viv.py new file mode 100644 index 00000000..a1765f5b --- /dev/null +++ b/validation/experiments/fu_oscillatory/fu_oscillatory_viv.py @@ -0,0 +1,580 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Cross-flow VIV of the SJTU flexible cylinder moved harmonically through still water. + +The tests of Fu et al. (2014): a 4 m horizontal flexible cylinder (D 24 mm, pretension 500 N) +carried by a towing carriage on a sinusoidal path across its axis, A_m 0.68 m (KC 178) at three +periods, U_R,max = 2 pi A_m/(T f1 D) of 4, 6.5 and 7.9. Writes a deck per run, runs them in +parallel (a run whose folder holds the same input files and executable is reused) and compares +the cross-flow A/D at mid-span (station CF4) against the instantaneous reduced velocity U_R on +the acceleration and deceleration halves of each half motion cycle with the measured paths of +their Figs. 15-17 (read by extract_fu2014.py), for three published VIV coefficient sets; and the +share of each half-cycle the envelope spends above sqrt(2)/2 of its largest value with the +"lock-in" shares the article gives (about 17, 34 and 50 %). + +The default runs are the committed record: every set and case with a VIV FRAME filter of 0.2 s, +their convergence runs at U_R,max 6.5 (half the time step, twice the elements) and the +sensitivity to the filter time (none, 0.1 and 0.3 s). + + python fu_oscillatory_viv.py path/to/cabledyn.exe WORKDIR [--runs NAME,...] [--jobs N] + [--keep] [--summary DIR] + +Sources: + S. Fu, J. Wang, R. Baarholm, J. Wu, C.M. Larsen (2014), Features of vortex-induced vibration + in oscillatory flow, Journal of Offshore Mechanics and Arctic Engineering 136(1), 011801, + https://doi.org/10.1115/1.4025759 (Table 1: the cylinder; Tables 2 and 3: the stations and + the test matrix; Secs. 4.3 and 4.6; Eqs. 19 and 20; Figs. 15-17 and their captions) + J.V. Ulveseter, M.J. Thorsen, S. Saevik, C.M. Larsen (2019), Simulating fundamental and higher + harmonic VIV of slender structures, Applied Ocean Research 90, 101856, + https://doi.org/10.1016/j.apor.2019.101856 (Table 1) + J.V. Ulveseter, M.J. Thorsen, S. Saevik, C.M. Larsen (2018), Time domain simulation of riser + VIV in current and irregular waves, Marine Structures 60, 241-260, + https://doi.org/10.1016/j.marstruc.2018.04.001 (Table 3) + J.R. Chaplin, P.W. Bearman, F.J. Huera Huarte, R.J. Pattenden (2005), Laboratory measurements + of vortex-induced vibrations of a vertical tension riser in a stepped current, Journal of + Fluids and Structures 21(1), 3-24, https://doi.org/10.1016/j.jfluidstructs.2005.04.010 (Eq. 4) + M.L. Facchinetti, E. de Langre, F. Biolley (2004), Coupling of structure and wake oscillators + in vortex-induced vibrations, Journal of Fluids and Structures 19(2), 123-140, + https://doi.org/10.1016/j.jfluidstructs.2003.12.004 +""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import json +import math +import os +import shutil +import subprocess +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path + +import numpy as np + +HERE = Path(__file__).resolve().parent +GRAVITY = 9.80665 # m/s^2 +RHO = 1000.0 # kg/m^3, fresh water (a towing tank; not stated) +# Fu et al. (2014) Table 1 +LENGTH = 4.0 # m +DIAMETER = 0.024 # m +MASS = 0.69 # kg/m +EI = 10.5 # N m^2 +EA = 6.67e5 # N +PRETENSION = 500.0 # N +F1 = 2.68 # Hz, their calculated first natural frequency in water, the frequency of U_R +CD, CA = ( + 1.2, + 1.0, +) # C_a 1 is the added mass of the article's natural frequencies (its Eq. 19) +AMPLITUDE = 0.68 # m, the largest A_m of Table 3, KC = 2 pi A_m/D = 178 +DEPTH = 2.0 # m, the cylinder's submergence (not stated) +WATER_DEPTH = 4.0 # m +SEGMENTS, DT = 40, 0.001 # the axial period (8 ms) in 8 steps +# The three KC 178 cases of Figs. 15-17: U_R,max -> the period of the captions [s] +CASES = {"4": 16.5, "6.5": 10.2, "7.9": 8.45} +RAMP_PERIODS = 1.0 # the motion is ramped in over one period +CYCLES = 8 # motion cycles after the ramp +SKIP_PERIODS = 2.0 # statistics from two periods on (the ramp and one cycle) +BAND = (0.5, 25.0) # Hz, the band-pass of the cross-flow displacement +UR_STEP = 0.25 # the U_R grid of the comparison +LOCK_IN = ( + math.sqrt(2.0) / 2.0 +) # Sec. 4.6: the envelope above sqrt(2)/2 of its largest value +MEASURED_LOCK_IN = {"4": 0.17, "6.5": 0.34, "7.9": 0.50} # Sec. 4.6, "about" +ANALYSIS = "1" # part of the reuse key: bump when an analysis changes + + +def chaplin_amplification(ad: float) -> float: + """Chaplin et al. (2005, Eq. 4): Cd/Cd0 = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2).""" + s = ad / math.sqrt(2.0) + return 1.0 + 2.3 * s + 1.7 * s * s + + +# The coefficient sets of the FLOTANT and NDP cases: LINE TYPES Cl dF cF; VIV row (ClX, alpha, +# Chh); VIV AMPLITUDE with Chaplin's drag amplification; VIV DAMPING (a, b, c); WAKE OSCILLATOR +# (CL0, St, eps, A). +SETS: dict[str, dict] = { + "uls19": { + "label": "Ulveseter et al. (2019), Table 1, Chh 1.5", + "cl": (0.85, 0.064, 0.144), + "viv": (0.75, 0.15, 1.5), + "amp": False, + "damping": None, + "wake": None, + }, + "b1": { + "label": "generic set (Delta Flume case)", + "cl": (0.8, 0.08, 0.18), + "viv": (0.85, 0.15, None), + "amp": True, + "damping": (0, 0, 1), + "wake": None, + }, + "wake": { + "label": "Facchinetti et al. (2004) wake oscillator", + "cl": (0, 0.08, 0.18), + "viv": None, + "amp": False, + "damping": None, + "wake": (0.3, 0.2, 0.3, 12), + }, +} + +TF_PRIMARY = 0.2 # s +# name -> (set, U_R,max, role, segments, dt, Tf) +RUNS: dict[str, tuple] = {} +for _s in SETS: + for _c in CASES: + RUNS[f"{_s}_ur{_c}"] = (_s, _c, "primary", SEGMENTS, DT, TF_PRIMARY) +for _s in SETS: + RUNS[f"{_s}_ur6.5_dt"] = ( + _s, + "6.5", + "half the time step", + SEGMENTS, + DT / 2.0, + TF_PRIMARY, + ) + RUNS[f"{_s}_ur6.5_n80"] = ( + _s, + "6.5", + "twice the elements", + 2 * SEGMENTS, + DT, + TF_PRIMARY, + ) +for _tf in (0.0, 0.1, 0.3): + for _s in SETS: + for _c in CASES: + RUNS[f"{_s}_ur{_c}_tf{_tf:g}"] = ( + _s, + _c, + "VIV FRAME sensitivity", + SEGMENTS, + DT, + _tf, + ) + + +def viv_sections(hset: str, tf: float) -> str: + s = SETS[hset] + text = "" + if s["viv"]: + clx, alpha, chh = s["viv"] + cols, vals = "ClX alpha", f"{clx} {alpha}" + if chh is not None: + cols, vals = cols + " Chh", vals + f" {chh}" + text += ( + "--------------------- VIV ----------------------------------------------\n" + f"TypeName {cols}\n(-){' (-)' * len(cols.split())}\npipe {vals}\n" + ) + if s["amp"]: + text += ( + "--------------------- VIV AMPLITUDE ------------------------------------\n" + "TypeName AD Cv CdAmp\n(-) (-) (-) (-)\n" + + "".join( + f"pipe {0.1 * k:.2f} {s['cl'][0]} {chaplin_amplification(0.1 * k):.5f}\n" + for k in range(16) + ) + ) + if s["damping"]: + a, b, c = s["damping"] + text += ( + "--------------------- VIV DAMPING ------------------------------------\n" + f"TypeName a b c\n(-) (-) (-) (-)\npipe {a} {b} {c}\n" + ) + if s["wake"]: + text += ( + "--------------------- WAKE OSCILLATOR ----------------------------------\n" + "TypeName CL0 St eps A\n(-) (-) (-) (-) (-)\n" + f"pipe {' '.join(f'{v:g}' for v in s['wake'])}\n" + ) + if tf > 0.0: + text += ( + "--------------------- VIV FRAME ----------------------------------------\n" + f"TypeName Tf\n(-) (s)\npipe {tf:g}\n" + ) + return text + + +def ramp(t: float, period: float) -> tuple[float, float, float]: + """The cosine ramp over RAMP_PERIODS periods and its first two derivatives.""" + tr = RAMP_PERIODS * period + if t >= tr: + return 1.0, 0.0, 0.0 + w = math.pi / tr + return ( + 0.5 * (1.0 - math.cos(w * t)), + 0.5 * w * math.sin(w * t), + 0.5 * w * w * math.cos(w * t), + ) + + +def deck_files( + hset: str, case: str, segments: int, dt: float, tf: float +) -> dict[str, str]: + period = CASES[case] + tmax = round(period * (RAMP_PERIODS + CYCLES) / dt) * dt + l0 = LENGTH / (1.0 + PRETENSION / EA) + mid = segments // 2 + 1 + cl = " ".join(f"{v:g}" for v in SETS[hset]["cl"]) + deck = f"""--------------------- CableDyn Input File --------------------------------- +Fu et al. (2014) flexible cylinder in oscillatory flow: KC 178, U_R,max {case} (T {period:g} s), set {hset} +----------------------- LINE TYPES ------------------------------------------ +TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t Cl dF cF +(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) (-) (-) (-) +pipe {DIAMETER} {MASS} {EA:.6e} 0.0 {EI} {CD} 0.0 {CA} 0.0 {cl} +----------------------- POINTS ---------------------------------------------- +ID Attachment X Y Z M V CdA CA +(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) +1 Coupled 0.0 0.0 {-DEPTH} 0 0 0 0 +2 Coupled {LENGTH} 0.0 {-DEPTH} 0 0 0 0 +----------------------- LINES ----------------------------------------------- +ID LineType AttachA AttachB UnstrLen NumSegs Outputs +(-) (-) (-) (-) (m) (-) (-) +1 pipe 1 2 {l0:.9f} {segments} - +{viv_sections(hset, tf)}---------------------- OPTIONS ---------------------------------------------- +{RHO} rhoW +{GRAVITY} g +{WATER_DEPTH} WtrDpth +{dt:.6f} dtM +{tmax:.6f} TMax +motion.txt motionFile +---------------------- OUTPUTS ----------------------------------------------- +FairTen1 +L1N{mid}pz +END +------------------------- need this line -------------------------------------- +""" + w = 2.0 * math.pi / period + lines = ["# time point x y z vx vy vz ax ay az"] + for k in range(int(round(tmax / dt)) + 1): + t = k * dt + r, dr, ddr = ramp(t, period) + s, c = math.sin(w * t), math.cos(w * t) + y = AMPLITUDE * r * s + vy = AMPLITUDE * (dr * s + r * w * c) + ay = AMPLITUDE * (ddr * s + 2.0 * dr * w * c - r * w * w * s) + for pid, x0 in ((1, 0.0), (2, LENGTH)): + lines.append( + f"{t:.6f} {pid} {x0:.9e} {y:.9e} {-DEPTH:.9e} 0 {vy:.9e} 0 0 {ay:.9e} 0" + ) + return {"fu.dat": deck, "motion.txt": "\n".join(lines) + "\n"} + + +def read_output(out: Path) -> tuple[list[str], np.ndarray]: + lines = out.read_text(encoding="utf-8").splitlines() + return lines[1].split(), np.loadtxt(lines[3:], ndmin=2) + + +def envelope(x: np.ndarray, dt: float) -> np.ndarray: + """Hilbert envelope of x band-passed over BAND (by FFT).""" + n = len(x) + f = np.fft.fftfreq(n, dt) + sp = np.fft.fft(x - x.mean()) + sp[(np.abs(f) < BAND[0]) | (np.abs(f) > BAND[1])] = 0.0 + h = np.zeros(n) + h[0] = 1.0 + h[1 : (n + 1) // 2] = 2.0 + if n % 2 == 0: + h[n // 2] = 1.0 + return np.abs(np.fft.ifft(sp * h)) + + +def analyse(out: Path, case: str, segments: int) -> dict: + """A/D at mid-span on the U_R grid, acceleration and deceleration paths, averaged over the + half-cycles after SKIP_PERIODS (the last half period dropped, where the envelope ends); the + lock-in share of each half-cycle.""" + period = CASES[case] + head, a = read_output(out) + t = a[:, 0] + dt = float(t[1] - t[0]) + env = envelope(a[:, head.index(f"L1N{segments // 2 + 1}pz")], dt) / DIAMETER + w = 2.0 * math.pi / period + ur = np.abs(AMPLITUDE * w * np.cos(w * t)) / (F1 * DIAMETER) + accel = np.sin(2.0 * w * t) < 0.0 # |cos| rising + keep = (t >= SKIP_PERIODS * period) & (t <= t[-1] - 0.5 * period) + grid = np.arange(UR_STEP, float(ur.max()) + 1e-9, UR_STEP) + paths = {} + for name, sel in (("acceleration", accel), ("deceleration", ~accel)): + vals = [] + for u0 in grid: + b = keep & sel & (np.abs(ur - u0) <= 0.5 * UR_STEP) + vals.append(float(env[b].mean()) if b.any() else None) + paths[name] = vals + shares, peaks = [], [] + k = int(math.ceil(2.0 * SKIP_PERIODS)) + while (k + 1) * period / 2.0 <= t[-1] - 0.5 * period + 1e-9: + e = env[(t >= k * period / 2.0) & (t < (k + 1) * period / 2.0)] + peaks.append(float(e.max())) + shares.append(float(np.mean(e > LOCK_IN * e.max()))) + k += 1 + return { + "U_R": [float(u) for u in grid], + **paths, + "lock_in_share": float(np.mean(shares)), + "half_cycle_peak_AD": float(np.mean(peaks)), + "half_cycles": len(shares), + "steps": int(len(t)), + } + + +def run_case( + exe: Path, folder: Path, files: dict, analyse_fn, key: str, keep: bool, sha: str +) -> dict: + """Write the deck, run it and analyse it. A folder that holds the same input files run by + the same executable is not run again: its result is reused when the analysis key is also + the same, and its output is analysed again if it was kept.""" + folder.mkdir(parents=True, exist_ok=True) + result, out, ran = ( + folder / "result.json", + folder / "fu.out", + folder / "executable_sha256.txt", + ) + same = all( + (folder / n).is_file() and (folder / n).read_text(encoding="utf-8") == v + for n, v in files.items() + ) + if same and result.is_file(): + old = json.loads(result.read_text(encoding="utf-8")) + if old.pop("reuse_key", None) == f"{sha}:{key}": + return old + if not ( + same and out.is_file() and ran.is_file() and ran.read_text().strip() == sha + ): + # A run that fails or is interrupted must not leave the previous model's result next + # to the new inputs, where the next attempt would reuse it. + result.unlink(missing_ok=True) + ran.unlink(missing_ok=True) + out.unlink(missing_ok=True) + for n, v in files.items(): + (folder / n).write_text(v, encoding="utf-8", newline="\n") + proc = subprocess.run( + [str(exe), "fu.dat", "fu"], + cwd=folder, + capture_output=True, + text=True, + encoding="utf-8", + errors="replace", + env=dict(os.environ, OMP_NUM_THREADS="1"), + check=False, + ) + (folder / "console.txt").write_text(proc.stdout + proc.stderr, encoding="utf-8") + if proc.returncode != 0: + raise SystemExit(f"{folder}: CableDyn exited with {proc.returncode}") + ran.write_text(sha + "\n", encoding="utf-8") + res = analyse_fn(out) + result.write_text( + json.dumps({**res, "reuse_key": f"{sha}:{key}"}, indent=1) + "\n", + encoding="utf-8", + ) + if not keep: + out.unlink() + return res + + +def measured_paths() -> dict[str, dict[str, dict[float, float]]]: + """{U_R,max: {path: {U_R: A/D}}} of Figs. 15-17 (extract_fu2014.py).""" + data: dict = {} + with open(HERE / "fu2014_hysteresis.csv", encoding="utf-8") as fh: + for r in csv.DictReader(fh): + case = f"{float(r['U_R_max']):g}" + data.setdefault(case, {}).setdefault(r["path"], {})[float(r["U_R"])] = ( + float(r["A_D"]) + ) + return data + + +def compare(res: dict, meas: dict) -> tuple[dict, list]: + """Scores of a run against the measured paths of its case: the r.m.s. A/D error over both + paths, the mean hysteresis gap (deceleration less acceleration) over the U_R where both + paths exist, and the largest A/D.""" + model = { + p: dict(zip(res["U_R"], res[p], strict=True)) + for p in ("acceleration", "deceleration") + } + errors, gaps_m, gaps_c, rows = [], [], [], [] + for path in ("acceleration", "deceleration"): + for u, am in sorted(meas[path].items()): + ac = model[path].get(u) + rows.append((path, u, am, ac)) + if ac is not None: + errors.append(ac - am) + for u, am_acc in sorted(meas["acceleration"].items()): + am_dec = meas["deceleration"].get(u) + ac_acc, ac_dec = model["acceleration"].get(u), model["deceleration"].get(u) + if None not in (am_dec, ac_acc, ac_dec): + gaps_m.append(am_dec - am_acc) + gaps_c.append(ac_dec - ac_acc) + largest = [v for p in model.values() for v in p.values() if v is not None] + return { + "rms_AD_error": float(np.sqrt(np.mean(np.square(errors)))) if errors else None, + "mean_AD_bias": float(np.mean(errors)) if errors else None, + "mean_hysteresis_gap": float(np.mean(gaps_c)) if gaps_c else None, + "measured_mean_hysteresis_gap": float(np.mean(gaps_m)) if gaps_m else None, + "largest_AD": max(largest) if largest else None, + "measured_largest_AD": max(v for p in meas.values() for v in p.values()), + "points": len(errors), + }, rows + + +def rounded(x): + """Six significant digits, so the record does not carry the last bits of the arithmetic.""" + if isinstance(x, float): + return float(f"{x:.6g}") + if isinstance(x, dict): + return {k: rounded(v) for k, v in x.items()} + if isinstance(x, list): + return [rounded(v) for v in x] + return x + + +def fmt(value: float | None, spec: str = ".3f") -> str: + """A score for the console; n/a when the selection holds nothing for it.""" + return "n/a" if value is None else format(value, spec) + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + ap.add_argument("exe") + ap.add_argument("workdir") + ap.add_argument( + "--runs", default="all", help="comma list of run names (see RUNS), or all" + ) + ap.add_argument("--jobs", type=int, default=os.cpu_count() or 1) + ap.add_argument("--keep", action="store_true", help="keep the output tables") + ap.add_argument( + "--summary", + default=None, + help="directory for the comparison CSV and summary JSON", + ) + a = ap.parse_args() + found = a.exe if Path(a.exe).is_file() else shutil.which(a.exe) + if found is None: + raise SystemExit(f"CableDyn executable not found: {a.exe}") + exe = Path(found).resolve() + sha = hashlib.sha256(exe.read_bytes()).hexdigest() + names = ( + list(RUNS) + if a.runs == "all" + else [n.strip() for n in a.runs.split(",") if n.strip()] + ) + if not names or any(n not in RUNS for n in names): + raise SystemExit(f"--runs: choose from {', '.join(RUNS)}, got {a.runs!r}") + work = Path(a.workdir).resolve() + + def one(name: str) -> dict: + hset, case, _, segments, dt, tf = RUNS[name] + folder = work / f"{hset}_ur{case}_n{segments}_dt{dt:g}_tf{tf:g}" + return run_case( + exe, + folder, + deck_files(hset, case, segments, dt, tf), + lambda out: analyse(out, case, segments), + f"{case}:{segments}:{ANALYSIS}", + a.keep, + sha, + ) + + with ThreadPoolExecutor(max_workers=max(1, min(a.jobs, len(names)))) as pool: + results = dict(zip(names, pool.map(one, names), strict=True)) + + meas = measured_paths() + rows, runs = [], {} + for name in (n for n in RUNS if n in results): + hset, case, role, segments, dt, tf = RUNS[name] + res = results[name] + sc, pts = compare(res, meas[case]) + runs[name] = { + "set": hset, + "U_R_max": float(case), + "period_s": CASES[case], + "role": role, + "segments": segments, + "dt_s": dt, + "viv_frame_Tf_s": tf, + **sc, + "lock_in_share": res["lock_in_share"], + "measured_lock_in_share": MEASURED_LOCK_IN[case], + "half_cycle_peak_AD": res["half_cycle_peak_AD"], + "half_cycles": res["half_cycles"], + } + for path, u, am, ac in pts: + rows.append( + { + "run": name, + "set": hset, + "U_R_max": case, + "viv_frame_Tf_s": f"{tf:g}", + "segments": segments, + "dt_s": f"{dt:g}", + "path": path, + "U_R": f"{u:g}", + "measured_AD": f"{am:.4f}", + "cabledyn_AD": "" if ac is None else f"{ac:.4f}", + } + ) + r = runs[name] + print( + f"{name:22s} A/D r.m.s. error {fmt(r['rms_AD_error'])} (bias {fmt(r['mean_AD_bias'], '+.3f')}); " + f"hysteresis gap {fmt(r['mean_hysteresis_gap'], '+.3f')} [measured " + f"{fmt(r['measured_mean_hysteresis_gap'], '+.3f')}]; largest {fmt(r['largest_AD'])} " + f"[{fmt(r['measured_largest_AD'])}]; lock-in share {r['lock_in_share']:.2f} " + f"[{MEASURED_LOCK_IN[case]:.2f}]" + ) + for name, r in runs.items(): + base = runs.get(f"{r['set']}_ur{r['U_R_max']:g}") + if ( + r["role"] != "primary" + and base is not None + and base["largest_AD"] + and r["largest_AD"] + ): + r["largest_AD_change_from_primary"] = ( + r["largest_AD"] / base["largest_AD"] - 1.0 + ) + summary = rounded( + { + "sets": {k: v["label"] for k, v in SETS.items()}, + "cases": { + c: { + "period_s": p, + "U_R_max_from_period": 2 + * math.pi + * AMPLITUDE + / (p * F1 * DIAMETER), + } + for c, p in CASES.items() + }, + "amplitude_m": AMPLITUDE, + "KC": 2.0 * math.pi * AMPLITUDE / DIAMETER, + "statistics": { + "skip_periods": SKIP_PERIODS, + "cycles_after_ramp": CYCLES, + "band_hz": list(BAND), + "U_R_bin": UR_STEP, + "lock_in_level": LOCK_IN, + }, + "runs": runs, + "executable_sha256": sha, + } + ) + if a.summary: + out = Path(a.summary) + out.mkdir(parents=True, exist_ok=True) + with open( + out / "response_comparison.csv", "w", newline="", encoding="utf-8" + ) as fh: + w = csv.DictWriter(fh, fieldnames=list(rows[0]), lineterminator="\n") + w.writeheader() + w.writerows(rows) + (out / "summary.json").write_text( + json.dumps(summary, indent=2) + "\n", encoding="utf-8", newline="\n" + ) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/fu_oscillatory/provenance.json b/validation/experiments/fu_oscillatory/provenance.json new file mode 100644 index 00000000..5d9c5328 --- /dev/null +++ b/validation/experiments/fu_oscillatory/provenance.json @@ -0,0 +1,32 @@ +{ + "source": "Fu, Wang, Baarholm, Wu & Larsen (2014), Features of vortex-induced vibration in oscillatory flow, Journal of Offshore Mechanics and Arctic Engineering 136(1), 011801 (Tables 1-3; Secs. 2, 3.1, 4.3, 4.6; Eqs. 19-20; Figs. 15-17 and their captions); Ulveseter, Thorsen, Saevik & Larsen (2019), Applied Ocean Research 90, 101856 (Table 1); Ulveseter, Thorsen, Saevik & Larsen (2018), Marine Structures 60, 241-260 (Table 3); Chaplin, Bearman, Huera Huarte & Pattenden (2005), Journal of Fluids and Structures 21(1), 3-24 (Eq. 4); Facchinetti, de Langre & Biolley (2004), Journal of Fluids and Structures 19(2), 123-140 (Secs. 2-3)", + "doi": [ + "10.1115/1.4025759", + "10.1016/j.apor.2019.101856", + "10.1016/j.marstruc.2018.04.001", + "10.1016/j.jfluidstructs.2005.04.010", + "10.1016/j.jfluidstructs.2003.12.004" + ], + "bibliographic_data": "Fu et al. (2014): authors, title and DOI from the article's first page, journal, volume, article number and month from its page footers, the issue from the publisher's PDF address; the other articles as in the FLOTANT case", + "data_used": "the cylinder (Table 1: L 4 m, D 0.024 m, 0.69 kg/m, EI 10.5 N m^2, EA 6.67e5 N, pretension 500 N, f1 2.68 Hz in water); the cross-flow stations (Table 2: 7 at 0.5 m spacing); the motion amplitude A_m 0.68 m, the largest of Table 3 (KC 178); the periods 16.5, 10.2 and 8.45 s of the captions of Figs. 15-17; A/D against U_R on the acceleration and deceleration paths at CF4 (Figs. 15-17); the lock-in shares for KC > 100, about 17, 34 and 50 % of the half period, and their definition, the envelope above sqrt(2)/2 of its maximum (Sec. 4.6); C_a 1 of their natural frequencies (Eq. 19)", + "extraction": "extract_fu2014.py: Figs. 15-17 are embedded raster images (1503 px wide); each is calibrated on its plot frame (the outermost dark lines spanning the plot, at the axis limits printed at its corners); the inset, legend and title box and the tick marks are masked; each line is followed column by column by colour (black solid acceleration, red dashed deceleration), its centre the median row of its run, arrowhead columns bridged linearly; written at U_R steps of 0.25. The traced gaps 0.164 (U_R 3.5, Fig. 16) and 0.222 (U_R 4, Fig. 17) against the figures' annotations 0.15D and 0.2D", + "assumptions": "fresh water 1000 kg/m^3; the cylinder 2 m below the surface (not stated) in 4 m of water; pinned ends (universal joints); C_d 1.2 and C_a 1; no structural damping (not reported); CF4 at mid-span (the fourth of seven stations at 0.5 m spacing); a one-period cosine ramp of the motion; the measured A/D, reconstructed by the article from strain with constant-tension modes, compared with the model's displacement", + "coefficients": { + "uls19": "Ulveseter et al. (2019), Table 1, fitted by them to the NDP riser in uniform flow (Sec. 4.1, Chh 1.5): Cd 1.2, CM 2, Cl 0.85, cF 0.144, dF 0.064; VIV ClX 0.75, alpha 0.15, Chh 1.5; blind here", + "b1": "the generic set of the Delta Flume case, nothing fitted to these tests: Cl 0.8, cF 0.18, dF 0.08, Cd 1.2; VIV ClX 0.85, alpha 0.15 (Ulveseter et al. 2018, Table 3); VIV AMPLITUDE Cv 0.8 with CdAmp = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2), at A/D 0-1.5 (Chaplin et al. 2005, Eq. 4); VIV DAMPING 0 0 1", + "wake": "Facchinetti et al. (2004): WAKE OSCILLATOR CL0 0.3, St 0.2, eps 0.3, A 12, LINE TYPES Cl 0, Cd 1.2; cross-flow only", + "viv_frame": "VIV FRAME Tf 0.2 s on every set in the primary runs (the cylinder moves through still water); none, 0.1 and 0.3 s as sensitivity" + }, + "processing": "the vertical (cross-flow) displacement at mid-span, band-passed 0.5-25 Hz by FFT, Hilbert envelope over D; U_R(t) = |V(t)|/(f1 D) of the prescribed motion; the acceleration path where |V| rises; the envelope averaged in U_R bins of +-0.125 at the grid points over the half-cycles from 2 periods to the end less half a period (13 half-cycles); scores over the measured grid points of both paths: r.m.s. and mean A/D error, the mean gap deceleration less acceleration where both paths exist, the largest A/D; the lock-in share of each half-cycle above sqrt(2)/2 of its maximum, averaged", + "CableDyn_commit": "a244dfc (dev)", + "validation_date": "2026-11-17", + "executable_name": "cabledyn.exe", + "executable_sha256": "see summary.json", + "compiler": "GNU Fortran 16.2.0", + "build_type": "Release", + "platform": "Windows 11 x86-64", + "dt_s": 0.001, + "segments": 40, + "cycles_after_ramp": 8, + "reproduction": "the default command, run into a new work directory with the executable of summary.json, reproduces response_comparison.csv and summary.json byte for byte" +} diff --git a/validation/experiments/fu_oscillatory/response_comparison.csv b/validation/experiments/fu_oscillatory/response_comparison.csv new file mode 100644 index 00000000..0709f47f --- /dev/null +++ b/validation/experiments/fu_oscillatory/response_comparison.csv @@ -0,0 +1,2065 @@ +run,set,U_R_max,viv_frame_Tf_s,segments,dt_s,path,U_R,measured_AD,cabledyn_AD +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,0.25,0.0094,0.0455 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,0.5,0.0097,0.0449 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,0.75,0.0097,0.0435 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,1,0.0094,0.0371 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,1.25,0.0078,0.0363 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,1.5,0.0105,0.0464 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,1.75,0.0123,0.0540 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,2,0.0086,0.0630 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,2.25,0.0155,0.0751 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,2.5,0.0217,0.0998 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,2.75,0.0331,0.1236 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,3,0.0528,0.1156 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,3.25,0.0844,0.0791 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,3.5,0.1307,0.0744 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,3.75,0.1941,0.0936 +uls19_ur4,uls19,4,0.2,40,0.001,acceleration,4,0.2576,0.0713 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,0.25,0.0138,0.0482 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,0.5,0.0140,0.0494 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,0.75,0.0146,0.0493 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,1,0.0152,0.0591 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,1.25,0.0170,0.0714 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,1.5,0.0183,0.0701 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,1.75,0.0181,0.0607 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,2,0.0199,0.0579 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,2.25,0.0228,0.0746 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,2.5,0.0320,0.0922 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,2.75,0.0467,0.0947 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,3,0.0588,0.0891 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,3.25,0.0880,0.0642 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,3.5,0.1305,0.0489 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,3.75,0.2108,0.0395 +uls19_ur4,uls19,4,0.2,40,0.001,deceleration,4,0.2863,0.0465 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,0.25,0.0998,0.2733 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,0.5,0.0975,0.2606 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,0.75,0.0945,0.2495 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,1,0.0914,0.2398 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,1.25,0.0888,0.2261 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,1.5,0.0866,0.2165 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,1.75,0.0840,0.2102 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,2,0.0819,0.2051 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,2.25,0.0792,0.2052 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,2.5,0.0779,0.2017 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,2.75,0.0766,0.1910 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,3,0.0766,0.1716 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,3.25,0.0823,0.1446 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,3.5,0.0875,0.1199 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,3.75,0.0983,0.1001 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,4,0.1128,0.0907 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,4.25,0.1303,0.0979 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,4.5,0.1608,0.1178 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,4.75,0.1920,0.1558 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,5,0.2341,0.2050 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,5.25,0.2808,0.2713 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,5.5,0.3281,0.3643 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,5.75,0.3811,0.4631 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,6,0.4333,0.5800 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,6.25,0.4535,0.7234 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,acceleration,6.5,0.4729,0.8571 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,0.25,0.1015,0.2914 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,0.5,0.1110,0.3007 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,0.75,0.1202,0.3050 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,1,0.1298,0.3180 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,1.25,0.1397,0.3368 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,1.5,0.1493,0.3657 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,1.75,0.1598,0.4140 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,2,0.1724,0.4691 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,2.25,0.1859,0.5309 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,2.5,0.1996,0.5923 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,2.75,0.2096,0.6450 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,3,0.2260,0.6942 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,3.25,0.2385,0.7339 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,3.5,0.2508,0.7703 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,3.75,0.2634,0.8056 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,4,0.2758,0.8428 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,4.25,0.2914,0.8847 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,4.5,0.3104,0.9092 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,4.75,0.3301,0.9447 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,5,0.3533,0.9547 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,5.25,0.3777,0.9918 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,5.5,0.3932,0.9995 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,5.75,0.4206,1.0044 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,6,0.4416,1.0073 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,6.25,0.4583,0.9781 +uls19_ur6.5,uls19,6.5,0.2,40,0.001,deceleration,6.5,0.4754,0.9352 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,0.25,0.1589,0.3731 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,0.5,0.1582,0.3646 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,0.75,0.1574,0.3543 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,1,0.1567,0.3406 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,1.25,0.1560,0.3307 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,1.5,0.1549,0.3233 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,1.75,0.1545,0.3165 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,2,0.1541,0.3080 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,2.25,0.1534,0.3025 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,2.5,0.1538,0.2974 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,2.75,0.1545,0.2887 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,3,0.1567,0.2765 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,3.25,0.1622,0.2618 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,3.5,0.1673,0.2438 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,3.75,0.1774,0.2204 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,4,0.1905,0.1958 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,4.25,0.2041,0.1728 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,4.5,0.2223,0.1530 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,4.75,0.2441,0.1421 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,5,0.2671,0.1425 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,5.25,0.2906,0.1442 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,5.5,0.3165,0.1553 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,5.75,0.3423,0.1954 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,6,0.3670,0.2332 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,6.25,0.3918,0.2755 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,6.5,0.4172,0.3445 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,6.75,0.4268,0.3933 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,7,0.4354,0.4793 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,7.25,0.4430,0.5347 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,7.5,0.4212,0.6248 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,acceleration,7.75,0.3992,0.7549 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,0.25,0.2110,0.3997 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,0.5,0.2251,0.4162 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,0.75,0.2393,0.4336 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,1,0.2539,0.4580 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,1.25,0.2681,0.4928 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,1.5,0.2823,0.5338 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,1.75,0.2962,0.5745 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,2,0.3139,0.6214 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,2.25,0.3241,0.6699 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,2.5,0.3380,0.7131 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,2.75,0.3516,0.7457 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,3,0.3651,0.7754 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,3.25,0.3784,0.8080 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,3.5,0.3910,0.8373 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,3.75,0.4029,0.8622 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,4,0.4130,0.8896 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,4.25,0.4235,0.9150 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,4.5,0.4324,0.9336 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,4.75,0.4378,0.9605 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,5,0.4420,0.9915 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,5.25,0.4488,1.0045 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,5.5,0.4500,1.0187 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,5.75,0.4500,1.0388 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,6,0.4493,1.0297 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,6.25,0.4482,1.0288 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,6.5,0.4403,1.0427 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,6.75,0.4326,1.0220 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,7,0.4251,1.0185 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,7.25,0.4163,0.9761 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,7.5,0.4065,0.9346 +uls19_ur7.9,uls19,7.9,0.2,40,0.001,deceleration,7.75,0.3974,0.8420 +b1_ur4,b1,4,0.2,40,0.001,acceleration,0.25,0.0094,0.0708 +b1_ur4,b1,4,0.2,40,0.001,acceleration,0.5,0.0097,0.0674 +b1_ur4,b1,4,0.2,40,0.001,acceleration,0.75,0.0097,0.0605 +b1_ur4,b1,4,0.2,40,0.001,acceleration,1,0.0094,0.0617 +b1_ur4,b1,4,0.2,40,0.001,acceleration,1.25,0.0078,0.0551 +b1_ur4,b1,4,0.2,40,0.001,acceleration,1.5,0.0105,0.0450 +b1_ur4,b1,4,0.2,40,0.001,acceleration,1.75,0.0123,0.0531 +b1_ur4,b1,4,0.2,40,0.001,acceleration,2,0.0086,0.0487 +b1_ur4,b1,4,0.2,40,0.001,acceleration,2.25,0.0155,0.0256 +b1_ur4,b1,4,0.2,40,0.001,acceleration,2.5,0.0217,0.0388 +b1_ur4,b1,4,0.2,40,0.001,acceleration,2.75,0.0331,0.0653 +b1_ur4,b1,4,0.2,40,0.001,acceleration,3,0.0528,0.0800 +b1_ur4,b1,4,0.2,40,0.001,acceleration,3.25,0.0844,0.1114 +b1_ur4,b1,4,0.2,40,0.001,acceleration,3.5,0.1307,0.1741 +b1_ur4,b1,4,0.2,40,0.001,acceleration,3.75,0.1941,0.2654 +b1_ur4,b1,4,0.2,40,0.001,acceleration,4,0.2576,0.3699 +b1_ur4,b1,4,0.2,40,0.001,deceleration,0.25,0.0138,0.0749 +b1_ur4,b1,4,0.2,40,0.001,deceleration,0.5,0.0140,0.0765 +b1_ur4,b1,4,0.2,40,0.001,deceleration,0.75,0.0146,0.0771 +b1_ur4,b1,4,0.2,40,0.001,deceleration,1,0.0152,0.0880 +b1_ur4,b1,4,0.2,40,0.001,deceleration,1.25,0.0170,0.0903 +b1_ur4,b1,4,0.2,40,0.001,deceleration,1.5,0.0183,0.0940 +b1_ur4,b1,4,0.2,40,0.001,deceleration,1.75,0.0181,0.1220 +b1_ur4,b1,4,0.2,40,0.001,deceleration,2,0.0199,0.1354 +b1_ur4,b1,4,0.2,40,0.001,deceleration,2.25,0.0228,0.1376 +b1_ur4,b1,4,0.2,40,0.001,deceleration,2.5,0.0320,0.2033 +b1_ur4,b1,4,0.2,40,0.001,deceleration,2.75,0.0467,0.2944 +b1_ur4,b1,4,0.2,40,0.001,deceleration,3,0.0588,0.3665 +b1_ur4,b1,4,0.2,40,0.001,deceleration,3.25,0.0880,0.4225 +b1_ur4,b1,4,0.2,40,0.001,deceleration,3.5,0.1305,0.4568 +b1_ur4,b1,4,0.2,40,0.001,deceleration,3.75,0.2108,0.4723 +b1_ur4,b1,4,0.2,40,0.001,deceleration,4,0.2863,0.4509 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,0.25,0.0998,0.3278 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,0.5,0.0975,0.3126 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,0.75,0.0945,0.2969 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,1,0.0914,0.2829 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,1.25,0.0888,0.2709 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,1.5,0.0866,0.2608 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,1.75,0.0840,0.2497 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,2,0.0819,0.2331 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,2.25,0.0792,0.2108 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,2.5,0.0779,0.1842 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,2.75,0.0766,0.1580 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,3,0.0766,0.1414 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,3.25,0.0823,0.1403 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,3.5,0.0875,0.1545 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,3.75,0.0983,0.1788 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,4,0.1128,0.2081 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,4.25,0.1303,0.2412 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,4.5,0.1608,0.2812 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,4.75,0.1920,0.3301 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,5,0.2341,0.3920 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,5.25,0.2808,0.4599 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,5.5,0.3281,0.5339 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,5.75,0.3811,0.6062 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,6,0.4333,0.6790 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,6.25,0.4535,0.7468 +b1_ur6.5,b1,6.5,0.2,40,0.001,acceleration,6.5,0.4729,0.8107 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,0.25,0.1015,0.3531 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,0.5,0.1110,0.3701 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,0.75,0.1202,0.3933 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,1,0.1298,0.4268 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,1.25,0.1397,0.4695 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,1.5,0.1493,0.5158 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,1.75,0.1598,0.5621 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,2,0.1724,0.6050 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,2.25,0.1859,0.6430 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,2.5,0.1996,0.6757 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,2.75,0.2096,0.7028 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,3,0.2260,0.7287 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,3.25,0.2385,0.7523 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,3.5,0.2508,0.7748 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,3.75,0.2634,0.7957 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,4,0.2758,0.8096 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,4.25,0.2914,0.8237 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,4.5,0.3104,0.8355 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,4.75,0.3301,0.8502 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,5,0.3533,0.8575 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,5.25,0.3777,0.8635 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,5.5,0.3932,0.8712 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,5.75,0.4206,0.8745 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,6,0.4416,0.8740 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,6.25,0.4583,0.8701 +b1_ur6.5,b1,6.5,0.2,40,0.001,deceleration,6.5,0.4754,0.8525 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,0.25,0.1589,0.4526 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,0.5,0.1582,0.4370 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,0.75,0.1574,0.4197 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,1,0.1567,0.4004 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,1.25,0.1560,0.3776 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,1.5,0.1549,0.3517 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,1.75,0.1545,0.3241 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,2,0.1541,0.2975 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,2.25,0.1534,0.2744 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,2.5,0.1538,0.2560 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,2.75,0.1545,0.2434 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,3,0.1567,0.2386 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,3.25,0.1622,0.2418 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,3.5,0.1673,0.2509 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,3.75,0.1774,0.2636 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,4,0.1905,0.2786 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,4.25,0.2041,0.2949 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,4.5,0.2223,0.3128 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,4.75,0.2441,0.3340 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,5,0.2671,0.3577 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,5.25,0.2906,0.3871 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,5.5,0.3165,0.4254 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,5.75,0.3423,0.4715 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,6,0.3670,0.5352 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,6.25,0.3918,0.5948 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,6.5,0.4172,0.6463 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,6.75,0.4268,0.6857 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,7,0.4354,0.7315 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,7.25,0.4430,0.7821 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,7.5,0.4212,0.8172 +b1_ur7.9,b1,7.9,0.2,40,0.001,acceleration,7.75,0.3992,0.8664 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,0.25,0.2110,0.4889 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,0.5,0.2251,0.5191 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,0.75,0.2393,0.5564 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,1,0.2539,0.5959 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,1.25,0.2681,0.6348 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,1.5,0.2823,0.6703 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,1.75,0.2962,0.6986 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,2,0.3139,0.7205 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,2.25,0.3241,0.7435 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,2.5,0.3380,0.7699 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,2.75,0.3516,0.7923 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,3,0.3651,0.8106 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,3.25,0.3784,0.8322 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,3.5,0.3910,0.8519 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,3.75,0.4029,0.8557 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,4,0.4130,0.8554 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,4.25,0.4235,0.8715 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,4.5,0.4324,0.8900 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,4.75,0.4378,0.8985 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,5,0.4420,0.9138 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,5.25,0.4488,0.9173 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,5.5,0.4500,0.9030 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,5.75,0.4500,0.9159 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,6,0.4493,0.9271 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,6.25,0.4482,0.9373 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,6.5,0.4403,0.9311 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,6.75,0.4326,0.9222 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,7,0.4251,0.9336 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,7.25,0.4163,0.9356 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,7.5,0.4065,0.9202 +b1_ur7.9,b1,7.9,0.2,40,0.001,deceleration,7.75,0.3974,0.9079 +wake_ur4,wake,4,0.2,40,0.001,acceleration,0.25,0.0094,0.0607 +wake_ur4,wake,4,0.2,40,0.001,acceleration,0.5,0.0097,0.0576 +wake_ur4,wake,4,0.2,40,0.001,acceleration,0.75,0.0097,0.0583 +wake_ur4,wake,4,0.2,40,0.001,acceleration,1,0.0094,0.0525 +wake_ur4,wake,4,0.2,40,0.001,acceleration,1.25,0.0078,0.0485 +wake_ur4,wake,4,0.2,40,0.001,acceleration,1.5,0.0105,0.0475 +wake_ur4,wake,4,0.2,40,0.001,acceleration,1.75,0.0123,0.0373 +wake_ur4,wake,4,0.2,40,0.001,acceleration,2,0.0086,0.0375 +wake_ur4,wake,4,0.2,40,0.001,acceleration,2.25,0.0155,0.0354 +wake_ur4,wake,4,0.2,40,0.001,acceleration,2.5,0.0217,0.0194 +wake_ur4,wake,4,0.2,40,0.001,acceleration,2.75,0.0331,0.0296 +wake_ur4,wake,4,0.2,40,0.001,acceleration,3,0.0528,0.0367 +wake_ur4,wake,4,0.2,40,0.001,acceleration,3.25,0.0844,0.0313 +wake_ur4,wake,4,0.2,40,0.001,acceleration,3.5,0.1307,0.0396 +wake_ur4,wake,4,0.2,40,0.001,acceleration,3.75,0.1941,0.0718 +wake_ur4,wake,4,0.2,40,0.001,acceleration,4,0.2576,0.1485 +wake_ur4,wake,4,0.2,40,0.001,deceleration,0.25,0.0138,0.0624 +wake_ur4,wake,4,0.2,40,0.001,deceleration,0.5,0.0140,0.0661 +wake_ur4,wake,4,0.2,40,0.001,deceleration,0.75,0.0146,0.0695 +wake_ur4,wake,4,0.2,40,0.001,deceleration,1,0.0152,0.0728 +wake_ur4,wake,4,0.2,40,0.001,deceleration,1.25,0.0170,0.0819 +wake_ur4,wake,4,0.2,40,0.001,deceleration,1.5,0.0183,0.0900 +wake_ur4,wake,4,0.2,40,0.001,deceleration,1.75,0.0181,0.1019 +wake_ur4,wake,4,0.2,40,0.001,deceleration,2,0.0199,0.1235 +wake_ur4,wake,4,0.2,40,0.001,deceleration,2.25,0.0228,0.1498 +wake_ur4,wake,4,0.2,40,0.001,deceleration,2.5,0.0320,0.1810 +wake_ur4,wake,4,0.2,40,0.001,deceleration,2.75,0.0467,0.2106 +wake_ur4,wake,4,0.2,40,0.001,deceleration,3,0.0588,0.2389 +wake_ur4,wake,4,0.2,40,0.001,deceleration,3.25,0.0880,0.2622 +wake_ur4,wake,4,0.2,40,0.001,deceleration,3.5,0.1305,0.2786 +wake_ur4,wake,4,0.2,40,0.001,deceleration,3.75,0.2108,0.2795 +wake_ur4,wake,4,0.2,40,0.001,deceleration,4,0.2863,0.2398 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,0.25,0.0998,0.2832 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,0.5,0.0975,0.2741 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,0.75,0.0945,0.2602 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,1,0.0914,0.2432 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,1.25,0.0888,0.2273 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,1.5,0.0866,0.2179 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,1.75,0.0840,0.2143 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,2,0.0819,0.2119 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,2.25,0.0792,0.2046 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,2.5,0.0779,0.1869 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,2.75,0.0766,0.1612 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,3,0.0766,0.1364 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,3.25,0.0823,0.1234 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,3.5,0.0875,0.1242 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,3.75,0.0983,0.1277 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,4,0.1128,0.1245 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,4.25,0.1303,0.1126 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,4.5,0.1608,0.0959 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,4.75,0.1920,0.1023 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,5,0.2341,0.1315 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,5.25,0.2808,0.1714 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,5.5,0.3281,0.2179 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,5.75,0.3811,0.2665 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,6,0.4333,0.3343 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,6.25,0.4535,0.4271 +wake_ur6.5,wake,6.5,0.2,40,0.001,acceleration,6.5,0.4729,0.5168 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,0.25,0.1015,0.2908 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,0.5,0.1110,0.2976 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,0.75,0.1202,0.3099 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,1,0.1298,0.3284 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,1.25,0.1397,0.3505 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,1.5,0.1493,0.3717 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,1.75,0.1598,0.3903 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,2,0.1724,0.4057 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,2.25,0.1859,0.4200 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,2.5,0.1996,0.4381 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,2.75,0.2096,0.4608 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,3,0.2260,0.4850 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,3.25,0.2385,0.5059 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,3.5,0.2508,0.5195 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,3.75,0.2634,0.5289 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,4,0.2758,0.5408 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,4.25,0.2914,0.5589 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,4.5,0.3104,0.5746 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,4.75,0.3301,0.5836 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,5,0.3533,0.5868 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,5.25,0.3777,0.5962 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,5.5,0.3932,0.6043 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,5.75,0.4206,0.6072 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,6,0.4416,0.6086 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,6.25,0.4583,0.6040 +wake_ur6.5,wake,6.5,0.2,40,0.001,deceleration,6.5,0.4754,0.5802 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,0.25,0.1589,0.3528 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,0.5,0.1582,0.3480 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,0.75,0.1574,0.3381 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,1,0.1567,0.3243 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,1.25,0.1560,0.3085 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,1.5,0.1549,0.2902 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,1.75,0.1545,0.2716 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,2,0.1541,0.2571 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,2.25,0.1534,0.2482 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,2.5,0.1538,0.2429 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,2.75,0.1545,0.2386 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,3,0.1567,0.2340 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,3.25,0.1622,0.2273 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,3.5,0.1673,0.2150 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,3.75,0.1774,0.1960 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,4,0.1905,0.1730 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,4.25,0.2041,0.1469 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,4.5,0.2223,0.1240 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,4.75,0.2441,0.1189 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,5,0.2671,0.1233 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,5.25,0.2906,0.1299 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,5.5,0.3165,0.1402 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,5.75,0.3423,0.1566 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,6,0.3670,0.1778 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,6.25,0.3918,0.2048 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,6.5,0.4172,0.2329 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,6.75,0.4268,0.2622 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,7,0.4354,0.3099 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,7.25,0.4430,0.3619 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,7.5,0.4212,0.4072 +wake_ur7.9,wake,7.9,0.2,40,0.001,acceleration,7.75,0.3992,0.5091 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,0.25,0.2110,0.3568 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,0.5,0.2251,0.3615 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,0.75,0.2393,0.3690 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,1,0.2539,0.3810 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,1.25,0.2681,0.3985 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,1.5,0.2823,0.4197 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,1.75,0.2962,0.4396 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,2,0.3139,0.4556 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,2.25,0.3241,0.4690 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,2.5,0.3380,0.4802 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,2.75,0.3516,0.4887 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,3,0.3651,0.4966 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,3.25,0.3784,0.5066 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,3.5,0.3910,0.5172 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,3.75,0.4029,0.5258 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,4,0.4130,0.5334 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,4.25,0.4235,0.5415 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,4.5,0.4324,0.5462 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,4.75,0.4378,0.5481 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,5,0.4420,0.5541 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,5.25,0.4488,0.5603 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,5.5,0.4500,0.5600 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,5.75,0.4500,0.5582 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,6,0.4493,0.5576 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,6.25,0.4482,0.5563 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,6.5,0.4403,0.5650 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,6.75,0.4326,0.5683 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,7,0.4251,0.5664 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,7.25,0.4163,0.5631 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,7.5,0.4065,0.5701 +wake_ur7.9,wake,7.9,0.2,40,0.001,deceleration,7.75,0.3974,0.5583 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,0.25,0.0998,0.2653 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,0.5,0.0975,0.2535 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,0.75,0.0945,0.2428 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,1,0.0914,0.2315 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,1.25,0.0888,0.2211 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,1.5,0.0866,0.2124 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,1.75,0.0840,0.2063 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,2,0.0819,0.2027 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,2.25,0.0792,0.1999 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,2.5,0.0779,0.1931 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,2.75,0.0766,0.1799 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,3,0.0766,0.1592 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,3.25,0.0823,0.1309 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,3.5,0.0875,0.1011 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,3.75,0.0983,0.0812 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,4,0.1128,0.0840 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,4.25,0.1303,0.1110 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,4.5,0.1608,0.1466 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,4.75,0.1920,0.1913 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,5,0.2341,0.2563 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,5.25,0.2808,0.3208 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,5.5,0.3281,0.4062 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,5.75,0.3811,0.4972 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,6,0.4333,0.5905 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,6.25,0.4535,0.7225 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,acceleration,6.5,0.4729,0.8399 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,0.25,0.1015,0.2887 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,0.5,0.1110,0.2991 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,0.75,0.1202,0.3076 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,1,0.1298,0.3146 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,1.25,0.1397,0.3285 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,1.5,0.1493,0.3529 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,1.75,0.1598,0.3886 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,2,0.1724,0.4374 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,2.25,0.1859,0.4961 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,2.5,0.1996,0.5592 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,2.75,0.2096,0.6144 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,3,0.2260,0.6585 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,3.25,0.2385,0.6965 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,3.5,0.2508,0.7333 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,3.75,0.2634,0.7632 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,4,0.2758,0.8019 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,4.25,0.2914,0.8388 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,4.5,0.3104,0.8666 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,4.75,0.3301,0.8924 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,5,0.3533,0.9146 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,5.25,0.3777,0.9367 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,5.5,0.3932,0.9592 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,5.75,0.4206,0.9623 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,6,0.4416,0.9665 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,6.25,0.4583,0.9520 +uls19_ur6.5_dt,uls19,6.5,0.2,40,0.0005,deceleration,6.5,0.4754,0.9133 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,0.25,0.0998,0.2685 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,0.5,0.0975,0.2564 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,0.75,0.0945,0.2458 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,1,0.0914,0.2341 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,1.25,0.0888,0.2209 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,1.5,0.0866,0.2107 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,1.75,0.0840,0.2039 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,2,0.0819,0.2013 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,2.25,0.0792,0.2017 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,2.5,0.0779,0.1972 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,2.75,0.0766,0.1841 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,3,0.0766,0.1590 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,3.25,0.0823,0.1241 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,3.5,0.0875,0.0892 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,3.75,0.0983,0.0675 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,4,0.1128,0.0745 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,4.25,0.1303,0.1056 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,4.5,0.1608,0.1513 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,4.75,0.1920,0.2012 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,5,0.2341,0.2597 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,5.25,0.2808,0.3256 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,5.5,0.3281,0.4197 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,5.75,0.3811,0.5147 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,6,0.4333,0.6237 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,6.25,0.4535,0.7575 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,acceleration,6.5,0.4729,0.8708 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,0.25,0.1015,0.2883 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,0.5,0.1110,0.2981 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,0.75,0.1202,0.3035 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,1,0.1298,0.3120 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,1.25,0.1397,0.3278 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,1.5,0.1493,0.3531 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,1.75,0.1598,0.3950 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,2,0.1724,0.4502 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,2.25,0.1859,0.5145 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,2.5,0.1996,0.5768 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,2.75,0.2096,0.6280 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,3,0.2260,0.6713 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,3.25,0.2385,0.7106 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,3.5,0.2508,0.7464 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,3.75,0.2634,0.7747 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,4,0.2758,0.8147 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,4.25,0.2914,0.8498 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,4.5,0.3104,0.8784 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,4.75,0.3301,0.9029 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,5,0.3533,0.9205 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,5.25,0.3777,0.9431 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,5.5,0.3932,0.9596 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,5.75,0.4206,0.9643 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,6,0.4416,0.9656 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,6.25,0.4583,0.9475 +uls19_ur6.5_n80,uls19,6.5,0.2,80,0.001,deceleration,6.5,0.4754,0.9172 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,0.25,0.0998,0.3267 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,0.5,0.0975,0.3111 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,0.75,0.0945,0.2946 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,1,0.0914,0.2807 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,1.25,0.0888,0.2699 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,1.5,0.0866,0.2603 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,1.75,0.0840,0.2499 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,2,0.0819,0.2337 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,2.25,0.0792,0.2113 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,2.5,0.0779,0.1850 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,2.75,0.0766,0.1589 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,3,0.0766,0.1426 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,3.25,0.0823,0.1418 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,3.5,0.0875,0.1556 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,3.75,0.0983,0.1799 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,4,0.1128,0.2089 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,4.25,0.1303,0.2422 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,4.5,0.1608,0.2821 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,4.75,0.1920,0.3312 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,5,0.2341,0.3936 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,5.25,0.2808,0.4627 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,5.5,0.3281,0.5346 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,5.75,0.3811,0.6075 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,6,0.4333,0.6802 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,6.25,0.4535,0.7482 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,acceleration,6.5,0.4729,0.8112 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,0.25,0.1015,0.3538 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,0.5,0.1110,0.3701 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,0.75,0.1202,0.3937 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,1,0.1298,0.4268 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,1.25,0.1397,0.4692 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,1.5,0.1493,0.5166 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,1.75,0.1598,0.5629 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,2,0.1724,0.6049 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,2.25,0.1859,0.6413 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,2.5,0.1996,0.6738 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,2.75,0.2096,0.7033 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,3,0.2260,0.7278 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,3.25,0.2385,0.7518 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,3.5,0.2508,0.7732 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,3.75,0.2634,0.7929 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,4,0.2758,0.8107 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,4.25,0.2914,0.8218 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,4.5,0.3104,0.8346 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,4.75,0.3301,0.8467 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,5,0.3533,0.8583 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,5.25,0.3777,0.8621 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,5.5,0.3932,0.8678 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,5.75,0.4206,0.8748 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,6,0.4416,0.8720 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,6.25,0.4583,0.8705 +b1_ur6.5_dt,b1,6.5,0.2,40,0.0005,deceleration,6.5,0.4754,0.8524 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,0.25,0.0998,0.3282 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,0.5,0.0975,0.3129 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,0.75,0.0945,0.2971 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,1,0.0914,0.2831 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,1.25,0.0888,0.2710 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,1.5,0.0866,0.2610 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,1.75,0.0840,0.2499 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,2,0.0819,0.2333 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,2.25,0.0792,0.2111 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,2.5,0.0779,0.1844 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,2.75,0.0766,0.1581 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,3,0.0766,0.1414 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,3.25,0.0823,0.1401 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,3.5,0.0875,0.1544 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,3.75,0.0983,0.1787 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,4,0.1128,0.2082 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,4.25,0.1303,0.2414 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,4.5,0.1608,0.2815 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,4.75,0.1920,0.3299 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,5,0.2341,0.3911 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,5.25,0.2808,0.4583 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,5.5,0.3281,0.5314 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,5.75,0.3811,0.6039 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,6,0.4333,0.6776 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,6.25,0.4535,0.7466 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,acceleration,6.5,0.4729,0.8121 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,0.25,0.1015,0.3533 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,0.5,0.1110,0.3702 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,0.75,0.1202,0.3934 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,1,0.1298,0.4270 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,1.25,0.1397,0.4701 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,1.5,0.1493,0.5164 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,1.75,0.1598,0.5625 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,2,0.1724,0.6053 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,2.25,0.1859,0.6432 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,2.5,0.1996,0.6761 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,2.75,0.2096,0.7033 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,3,0.2260,0.7291 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,3.25,0.2385,0.7528 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,3.5,0.2508,0.7750 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,3.75,0.2634,0.7963 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,4,0.2758,0.8103 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,4.25,0.2914,0.8243 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,4.5,0.3104,0.8359 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,4.75,0.3301,0.8510 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,5,0.3533,0.8584 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,5.25,0.3777,0.8644 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,5.5,0.3932,0.8721 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,5.75,0.4206,0.8756 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,6,0.4416,0.8751 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,6.25,0.4583,0.8715 +b1_ur6.5_n80,b1,6.5,0.2,80,0.001,deceleration,6.5,0.4754,0.8540 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,0.25,0.0998,0.2879 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,0.5,0.0975,0.2766 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,0.75,0.0945,0.2593 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,1,0.0914,0.2403 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,1.25,0.0888,0.2226 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,1.5,0.0866,0.2147 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,1.75,0.0840,0.2149 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,2,0.0819,0.2133 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,2.25,0.0792,0.2050 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,2.5,0.0779,0.1830 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,2.75,0.0766,0.1501 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,3,0.0766,0.1220 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,3.25,0.0823,0.1106 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,3.5,0.0875,0.1159 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,3.75,0.0983,0.1211 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,4,0.1128,0.1123 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,4.25,0.1303,0.0894 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,4.5,0.1608,0.0602 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,4.75,0.1920,0.0746 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,5,0.2341,0.1173 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,5.25,0.2808,0.1668 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,5.5,0.3281,0.2116 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,5.75,0.3811,0.2499 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,6,0.4333,0.3206 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,6.25,0.4535,0.4224 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,acceleration,6.5,0.4729,0.5117 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,0.25,0.1015,0.2916 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,0.5,0.1110,0.2950 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,0.75,0.1202,0.3050 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,1,0.1298,0.3258 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,1.25,0.1397,0.3508 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,1.5,0.1493,0.3744 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,1.75,0.1598,0.3951 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,2,0.1724,0.4069 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,2.25,0.1859,0.4166 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,2.5,0.1996,0.4343 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,2.75,0.2096,0.4577 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,3,0.2260,0.4858 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,3.25,0.2385,0.5099 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,3.5,0.2508,0.5218 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,3.75,0.2634,0.5264 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,4,0.2758,0.5372 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,4.25,0.2914,0.5583 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,4.5,0.3104,0.5747 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,4.75,0.3301,0.5859 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,5,0.3533,0.5841 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,5.25,0.3777,0.5959 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,5.5,0.3932,0.6024 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,5.75,0.4206,0.6056 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,6,0.4416,0.6080 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,6.25,0.4583,0.6016 +wake_ur6.5_dt,wake,6.5,0.2,40,0.0005,deceleration,6.5,0.4754,0.5763 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,0.25,0.0998,0.2865 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,0.5,0.0975,0.2748 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,0.75,0.0945,0.2584 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,1,0.0914,0.2397 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,1.25,0.0888,0.2232 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,1.5,0.0866,0.2166 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,1.75,0.0840,0.2165 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,2,0.0819,0.2153 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,2.25,0.0792,0.2064 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,2.5,0.0779,0.1830 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,2.75,0.0766,0.1504 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,3,0.0766,0.1222 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,3.25,0.0823,0.1114 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,3.5,0.0875,0.1188 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,3.75,0.0983,0.1272 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,4,0.1128,0.1237 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,4.25,0.1303,0.1050 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,4.5,0.1608,0.0778 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,4.75,0.1920,0.0844 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,5,0.2341,0.1221 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,5.25,0.2808,0.1671 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,5.5,0.3281,0.2117 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,5.75,0.3811,0.2549 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,6,0.4333,0.3249 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,6.25,0.4535,0.4223 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,acceleration,6.5,0.4729,0.5131 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,0.25,0.1015,0.2923 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,0.5,0.1110,0.2968 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,0.75,0.1202,0.3066 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,1,0.1298,0.3255 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,1.25,0.1397,0.3499 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,1.5,0.1493,0.3731 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,1.75,0.1598,0.3939 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,2,0.1724,0.4083 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,2.25,0.1859,0.4187 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,2.5,0.1996,0.4351 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,2.75,0.2096,0.4579 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,3,0.2260,0.4847 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,3.25,0.2385,0.5089 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,3.5,0.2508,0.5223 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,3.75,0.2634,0.5282 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,4,0.2758,0.5374 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,4.25,0.2914,0.5581 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,4.5,0.3104,0.5750 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,4.75,0.3301,0.5857 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,5,0.3533,0.5847 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,5.25,0.3777,0.5963 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,5.5,0.3932,0.6032 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,5.75,0.4206,0.6060 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,6,0.4416,0.6091 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,6.25,0.4583,0.6017 +wake_ur6.5_n80,wake,6.5,0.2,80,0.001,deceleration,6.5,0.4754,0.5778 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,0.25,0.0094,0.0488 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,0.5,0.0097,0.0483 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,0.75,0.0097,0.0459 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,1,0.0094,0.0419 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,1.25,0.0078,0.0390 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,1.5,0.0105,0.0408 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,1.75,0.0123,0.0432 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,2,0.0086,0.0421 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,2.25,0.0155,0.0463 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,2.5,0.0217,0.0608 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,2.75,0.0331,0.0680 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,3,0.0528,0.0709 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,3.25,0.0844,0.0539 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,3.5,0.1307,0.0452 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,3.75,0.1941,0.0499 +uls19_ur4_tf0,uls19,4,0,40,0.001,acceleration,4,0.2576,0.0440 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,0.25,0.0138,0.0525 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,0.5,0.0140,0.0534 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,0.75,0.0146,0.0554 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,1,0.0152,0.0637 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,1.25,0.0170,0.0757 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,1.5,0.0183,0.0801 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,1.75,0.0181,0.0695 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,2,0.0199,0.0526 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,2.25,0.0228,0.0478 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,2.5,0.0320,0.0481 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,2.75,0.0467,0.0528 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,3,0.0588,0.0443 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,3.25,0.0880,0.0333 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,3.5,0.1305,0.0288 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,3.75,0.2108,0.0309 +uls19_ur4_tf0,uls19,4,0,40,0.001,deceleration,4,0.2863,0.0364 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,0.25,0.0998,0.1605 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,0.5,0.0975,0.1590 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,0.75,0.0945,0.1590 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,1,0.0914,0.1543 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,1.25,0.0888,0.1523 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,1.5,0.0866,0.1457 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,1.75,0.0840,0.1328 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,2,0.0819,0.1198 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,2.25,0.0792,0.1014 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,2.5,0.0779,0.0905 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,2.75,0.0766,0.0953 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,3,0.0766,0.1126 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,3.25,0.0823,0.1366 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,3.5,0.0875,0.1534 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,3.75,0.0983,0.1580 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,4,0.1128,0.1487 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,4.25,0.1303,0.1356 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,4.5,0.1608,0.1263 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,4.75,0.1920,0.1120 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,5,0.2341,0.1381 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,5.25,0.2808,0.1840 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,5.5,0.3281,0.2495 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,5.75,0.3811,0.3346 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,6,0.4333,0.4246 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,6.25,0.4535,0.4878 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,acceleration,6.5,0.4729,0.5974 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,0.25,0.1015,0.1672 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,0.5,0.1110,0.1745 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,0.75,0.1202,0.1866 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,1,0.1298,0.1944 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,1.25,0.1397,0.2071 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,1.5,0.1493,0.2120 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,1.75,0.1598,0.2055 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,2,0.1724,0.2047 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,2.25,0.1859,0.2050 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,2.5,0.1996,0.2228 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,2.75,0.2096,0.2723 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,3,0.2260,0.3301 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,3.25,0.2385,0.4033 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,3.5,0.2508,0.4734 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,3.75,0.2634,0.5378 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,4,0.2758,0.5782 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,4.25,0.2914,0.6121 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,4.5,0.3104,0.6416 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,4.75,0.3301,0.6648 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,5,0.3533,0.6898 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,5.25,0.3777,0.7106 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,5.5,0.3932,0.7173 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,5.75,0.4206,0.7308 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,6,0.4416,0.7377 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,6.25,0.4583,0.7282 +uls19_ur6.5_tf0,uls19,6.5,0,40,0.001,deceleration,6.5,0.4754,0.6863 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,0.25,0.1589,0.2499 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,0.5,0.1582,0.2490 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,0.75,0.1574,0.2461 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,1,0.1567,0.2378 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,1.25,0.1560,0.2313 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,1.5,0.1549,0.2266 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,1.75,0.1545,0.2158 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,2,0.1541,0.1961 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,2.25,0.1534,0.1754 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,2.5,0.1538,0.1562 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,2.75,0.1545,0.1373 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,3,0.1567,0.1241 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,3.25,0.1622,0.1239 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,3.5,0.1673,0.1372 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,3.75,0.1774,0.1541 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,4,0.1905,0.1679 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,4.25,0.2041,0.1851 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,4.5,0.2223,0.2068 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,4.75,0.2441,0.2253 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,5,0.2671,0.2408 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,5.25,0.2906,0.2469 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,5.5,0.3165,0.2542 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,5.75,0.3423,0.2780 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,6,0.3670,0.2981 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,6.25,0.3918,0.3420 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,6.5,0.4172,0.3814 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,6.75,0.4268,0.4299 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,7,0.4354,0.4999 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,7.25,0.4430,0.5512 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,7.5,0.4212,0.6150 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,acceleration,7.75,0.3992,0.7136 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,0.25,0.2110,0.2648 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,0.5,0.2251,0.2692 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,0.75,0.2393,0.2703 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,1,0.2539,0.2774 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,1.25,0.2681,0.2921 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,1.5,0.2823,0.3080 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,1.75,0.2962,0.3247 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,2,0.3139,0.3536 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,2.25,0.3241,0.3960 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,2.5,0.3380,0.4431 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,2.75,0.3516,0.4911 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,3,0.3651,0.5422 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,3.25,0.3784,0.5883 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,3.5,0.3910,0.6176 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,3.75,0.4029,0.6439 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,4,0.4130,0.6818 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,4.25,0.4235,0.7148 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,4.5,0.4324,0.7271 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,4.75,0.4378,0.7317 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,5,0.4420,0.7517 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,5.25,0.4488,0.7728 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,5.5,0.4500,0.7921 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,5.75,0.4500,0.7984 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,6,0.4493,0.8047 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,6.25,0.4482,0.8200 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,6.5,0.4403,0.8081 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,6.75,0.4326,0.8234 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,7,0.4251,0.8133 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,7.25,0.4163,0.8240 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,7.5,0.4065,0.8039 +uls19_ur7.9_tf0,uls19,7.9,0,40,0.001,deceleration,7.75,0.3974,0.7859 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,0.25,0.0094,0.0120 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,0.5,0.0097,0.0152 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,0.75,0.0097,0.0121 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,1,0.0094,0.0106 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,1.25,0.0078,0.0171 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,1.5,0.0105,0.0118 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,1.75,0.0123,0.0111 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,2,0.0086,0.0257 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,2.25,0.0155,0.0308 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,2.5,0.0217,0.0328 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,2.75,0.0331,0.0511 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,3,0.0528,0.0661 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,3.25,0.0844,0.0861 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,3.5,0.1307,0.1136 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,3.75,0.1941,0.1592 +b1_ur4_tf0,b1,4,0,40,0.001,acceleration,4,0.2576,0.2403 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,0.25,0.0138,0.0143 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,0.5,0.0140,0.0117 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,0.75,0.0146,0.0163 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,1,0.0152,0.0146 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,1.25,0.0170,0.0140 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,1.5,0.0183,0.0277 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,1.75,0.0181,0.0240 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,2,0.0199,0.0216 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,2.25,0.0228,0.0519 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,2.5,0.0320,0.0574 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,2.75,0.0467,0.0294 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,3,0.0588,0.0882 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,3.25,0.0880,0.1808 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,3.5,0.1305,0.2552 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,3.75,0.2108,0.2973 +b1_ur4_tf0,b1,4,0,40,0.001,deceleration,4,0.2863,0.2964 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,0.25,0.0998,0.2370 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,0.5,0.0975,0.2310 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,0.75,0.0945,0.2219 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,1,0.0914,0.2153 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,1.25,0.0888,0.2050 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,1.5,0.0866,0.1924 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,1.75,0.0840,0.1840 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,2,0.0819,0.1756 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,2.25,0.0792,0.1719 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,2.5,0.0779,0.1732 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,2.75,0.0766,0.1710 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,3,0.0766,0.1671 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,3.25,0.0823,0.1568 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,3.5,0.0875,0.1409 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,3.75,0.0983,0.1213 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,4,0.1128,0.0997 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,4.25,0.1303,0.0829 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,4.5,0.1608,0.0752 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,4.75,0.1920,0.0913 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,5,0.2341,0.1236 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,5.25,0.2808,0.1714 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,5.5,0.3281,0.2315 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,5.75,0.3811,0.3111 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,6,0.4333,0.4098 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,6.25,0.4535,0.5233 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,acceleration,6.5,0.4729,0.6415 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,0.25,0.1015,0.2530 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,0.5,0.1110,0.2582 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,0.75,0.1202,0.2646 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,1,0.1298,0.2756 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,1.25,0.1397,0.2862 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,1.5,0.1493,0.3077 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,1.75,0.1598,0.3395 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,2,0.1724,0.3729 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,2.25,0.1859,0.4171 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,2.5,0.1996,0.4617 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,2.75,0.2096,0.5085 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,3,0.2260,0.5600 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,3.25,0.2385,0.5927 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,3.5,0.2508,0.6355 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,3.75,0.2634,0.6581 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,4,0.2758,0.6837 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,4.25,0.2914,0.7231 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,4.5,0.3104,0.7305 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,4.75,0.3301,0.7488 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,5,0.3533,0.7484 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,5.25,0.3777,0.7689 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,5.5,0.3932,0.7660 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,5.75,0.4206,0.7559 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,6,0.4416,0.7634 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,6.25,0.4583,0.7489 +b1_ur6.5_tf0,b1,6.5,0,40,0.001,deceleration,6.5,0.4754,0.7216 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,0.25,0.1589,0.3332 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,0.5,0.1582,0.3232 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,0.75,0.1574,0.3127 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,1,0.1567,0.3024 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,1.25,0.1560,0.2919 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,1.5,0.1549,0.2829 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,1.75,0.1545,0.2757 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,2,0.1541,0.2709 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,2.25,0.1534,0.2673 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,2.5,0.1538,0.2637 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,2.75,0.1545,0.2586 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,3,0.1567,0.2513 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,3.25,0.1622,0.2412 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,3.5,0.1673,0.2269 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,3.75,0.1774,0.2096 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,4,0.1905,0.1909 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,4.25,0.2041,0.1717 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,4.5,0.2223,0.1546 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,4.75,0.2441,0.1422 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,5,0.2671,0.1365 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,5.25,0.2906,0.1402 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,5.5,0.3165,0.1541 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,5.75,0.3423,0.1784 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,6,0.3670,0.2152 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,6.25,0.3918,0.2614 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,6.5,0.4172,0.3200 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,6.75,0.4268,0.3879 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,7,0.4354,0.4622 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,7.25,0.4430,0.5479 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,7.5,0.4212,0.6289 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,acceleration,7.75,0.3992,0.7057 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,0.25,0.2110,0.3514 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,0.5,0.2251,0.3622 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,0.75,0.2393,0.3767 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,1,0.2539,0.3940 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,1.25,0.2681,0.4144 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,1.5,0.2823,0.4389 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,1.75,0.2962,0.4683 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,2,0.3139,0.4994 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,2.25,0.3241,0.5319 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,2.5,0.3380,0.5658 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,2.75,0.3516,0.5998 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,3,0.3651,0.6308 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,3.25,0.3784,0.6564 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,3.5,0.3910,0.6810 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,3.75,0.4029,0.7023 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,4,0.4130,0.7154 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,4.25,0.4235,0.7233 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,4.5,0.4324,0.7325 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,4.75,0.4378,0.7432 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,5,0.4420,0.7512 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,5.25,0.4488,0.7559 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,5.5,0.4500,0.7604 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,5.75,0.4500,0.7592 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,6,0.4493,0.7547 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,6.25,0.4482,0.7574 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,6.5,0.4403,0.7581 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,6.75,0.4326,0.7560 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,7,0.4251,0.7507 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,7.25,0.4163,0.7520 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,7.5,0.4065,0.7492 +b1_ur7.9_tf0,b1,7.9,0,40,0.001,deceleration,7.75,0.3974,0.7379 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,0.25,0.0094,0.0001 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,0.5,0.0097,0.0001 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,0.75,0.0097,0.0001 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,1,0.0094,0.0001 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,1.25,0.0078,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,1.5,0.0105,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,1.75,0.0123,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,2,0.0086,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,2.25,0.0155,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,2.5,0.0217,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,2.75,0.0331,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,3,0.0528,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,3.25,0.0844,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,3.5,0.1307,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,3.75,0.1941,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,acceleration,4,0.2576,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,0.25,0.0138,0.0001 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,0.5,0.0140,0.0001 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,0.75,0.0146,0.0001 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,1,0.0152,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,1.25,0.0170,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,1.5,0.0183,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,1.75,0.0181,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,2,0.0199,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,2.25,0.0228,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,2.5,0.0320,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,2.75,0.0467,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,3,0.0588,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,3.25,0.0880,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,3.5,0.1305,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,3.75,0.2108,0.0000 +wake_ur4_tf0,wake,4,0,40,0.001,deceleration,4,0.2863,0.0000 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,0.25,0.0998,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,0.5,0.0975,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,0.75,0.0945,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,1,0.0914,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,1.25,0.0888,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,1.5,0.0866,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,1.75,0.0840,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,2,0.0819,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,2.25,0.0792,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,2.5,0.0779,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,2.75,0.0766,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,3,0.0766,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,3.25,0.0823,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,3.5,0.0875,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,3.75,0.0983,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,4,0.1128,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,4.25,0.1303,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,4.5,0.1608,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,4.75,0.1920,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,5,0.2341,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,5.25,0.2808,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,5.5,0.3281,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,5.75,0.3811,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,6,0.4333,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,6.25,0.4535,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,acceleration,6.5,0.4729,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,0.25,0.1015,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,0.5,0.1110,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,0.75,0.1202,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,1,0.1298,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,1.25,0.1397,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,1.5,0.1493,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,1.75,0.1598,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,2,0.1724,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,2.25,0.1859,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,2.5,0.1996,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,2.75,0.2096,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,3,0.2260,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,3.25,0.2385,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,3.5,0.2508,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,3.75,0.2634,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,4,0.2758,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,4.25,0.2914,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,4.5,0.3104,0.0005 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,4.75,0.3301,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,5,0.3533,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,5.25,0.3777,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,5.5,0.3932,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,5.75,0.4206,0.0006 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,6,0.4416,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,6.25,0.4583,0.0007 +wake_ur6.5_tf0,wake,6.5,0,40,0.001,deceleration,6.5,0.4754,0.0007 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,0.25,0.1589,0.0083 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,0.5,0.1582,0.0089 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,0.75,0.1574,0.0098 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,1,0.1567,0.0108 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,1.25,0.1560,0.0118 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,1.5,0.1549,0.0127 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,1.75,0.1545,0.0131 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,2,0.1541,0.0132 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,2.25,0.1534,0.0131 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,2.5,0.1538,0.0128 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,2.75,0.1545,0.0127 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,3,0.1567,0.0127 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,3.25,0.1622,0.0129 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,3.5,0.1673,0.0131 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,3.75,0.1774,0.0134 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,4,0.1905,0.0136 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,4.25,0.2041,0.0138 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,4.5,0.2223,0.0141 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,4.75,0.2441,0.0144 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,5,0.2671,0.0149 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,5.25,0.2906,0.0154 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,5.5,0.3165,0.0158 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,5.75,0.3423,0.0162 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,6,0.3670,0.0164 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,6.25,0.3918,0.0165 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,6.5,0.4172,0.0167 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,6.75,0.4268,0.0170 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,7,0.4354,0.0176 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,7.25,0.4430,0.0184 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,7.5,0.4212,0.0194 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,acceleration,7.75,0.3992,0.0213 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,0.25,0.2110,0.0080 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,0.5,0.2251,0.0080 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,0.75,0.2393,0.0082 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,1,0.2539,0.0083 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,1.25,0.2681,0.0085 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,1.5,0.2823,0.0086 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,1.75,0.2962,0.0088 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,2,0.3139,0.0089 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,2.25,0.3241,0.0091 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,2.5,0.3380,0.0092 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,2.75,0.3516,0.0094 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,3,0.3651,0.0095 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,3.25,0.3784,0.0097 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,3.5,0.3910,0.0099 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,3.75,0.4029,0.0101 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,4,0.4130,0.0102 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,4.25,0.4235,0.0104 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,4.5,0.4324,0.0105 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,4.75,0.4378,0.0107 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,5,0.4420,0.0108 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,5.25,0.4488,0.0111 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,5.5,0.4500,0.0114 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,5.75,0.4500,0.0117 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,6,0.4493,0.0122 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,6.25,0.4482,0.0129 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,6.5,0.4403,0.0137 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,6.75,0.4326,0.0147 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,7,0.4251,0.0159 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,7.25,0.4163,0.0171 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,7.5,0.4065,0.0183 +wake_ur7.9_tf0,wake,7.9,0,40,0.001,deceleration,7.75,0.3974,0.0191 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,0.25,0.0094,0.0650 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,0.5,0.0097,0.0634 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,0.75,0.0097,0.0608 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,1,0.0094,0.0524 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,1.25,0.0078,0.0480 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,1.5,0.0105,0.0536 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,1.75,0.0123,0.0597 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,2,0.0086,0.0725 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,2.25,0.0155,0.0866 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,2.5,0.0217,0.1053 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,2.75,0.0331,0.1393 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,3,0.0528,0.1223 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,3.25,0.0844,0.0792 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,3.5,0.1307,0.0895 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,3.75,0.1941,0.0871 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,acceleration,4,0.2576,0.0706 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,0.25,0.0138,0.0704 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,0.5,0.0140,0.0714 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,0.75,0.0146,0.0740 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,1,0.0152,0.0854 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,1.25,0.0170,0.0959 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,1.5,0.0183,0.0913 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,1.75,0.0181,0.0802 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,2,0.0199,0.0792 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,2.25,0.0228,0.0902 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,2.5,0.0320,0.1123 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,2.75,0.0467,0.1144 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,3,0.0588,0.1025 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,3.25,0.0880,0.0700 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,3.5,0.1305,0.0614 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,3.75,0.2108,0.0489 +uls19_ur4_tf0.1,uls19,4,0.1,40,0.001,deceleration,4,0.2863,0.0547 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,0.25,0.0998,0.2788 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,0.5,0.0975,0.2690 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,0.75,0.0945,0.2551 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,1,0.0914,0.2466 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,1.25,0.0888,0.2350 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,1.5,0.0866,0.2233 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,1.75,0.0840,0.2197 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,2,0.0819,0.2160 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,2.25,0.0792,0.2157 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,2.5,0.0779,0.2166 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,2.75,0.0766,0.2067 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,3,0.0766,0.1892 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,3.25,0.0823,0.1610 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,3.5,0.0875,0.1311 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,3.75,0.0983,0.1086 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,4,0.1128,0.0961 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,4.25,0.1303,0.0987 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,4.5,0.1608,0.1136 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,4.75,0.1920,0.1600 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,5,0.2341,0.2057 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,5.25,0.2808,0.2738 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,5.5,0.3281,0.3541 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,5.75,0.3811,0.4337 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,6,0.4333,0.5190 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,6.25,0.4535,0.6351 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,acceleration,6.5,0.4729,0.7817 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,0.25,0.1015,0.3016 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,0.5,0.1110,0.3090 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,0.75,0.1202,0.3176 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,1,0.1298,0.3334 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,1.25,0.1397,0.3478 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,1.5,0.1493,0.3785 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,1.75,0.1598,0.4209 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,2,0.1724,0.4692 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,2.25,0.1859,0.5318 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,2.5,0.1996,0.5915 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,2.75,0.2096,0.6422 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,3,0.2260,0.6819 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,3.25,0.2385,0.7138 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,3.5,0.2508,0.7540 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,3.75,0.2634,0.7743 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,4,0.2758,0.8177 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,4.25,0.2914,0.8555 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,4.5,0.3104,0.8692 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,4.75,0.3301,0.9156 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,5,0.3533,0.9171 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,5.25,0.3777,0.9584 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,5.5,0.3932,0.9641 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,5.75,0.4206,0.9671 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,6,0.4416,0.9694 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,6.25,0.4583,0.9549 +uls19_ur6.5_tf0.1,uls19,6.5,0.1,40,0.001,deceleration,6.5,0.4754,0.9009 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,0.25,0.1589,0.3757 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,0.5,0.1582,0.3607 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,0.75,0.1574,0.3509 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,1,0.1567,0.3427 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,1.25,0.1560,0.3318 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,1.5,0.1549,0.3215 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,1.75,0.1545,0.3139 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,2,0.1541,0.3091 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,2.25,0.1534,0.3014 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,2.5,0.1538,0.2934 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,2.75,0.1545,0.2876 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,3,0.1567,0.2812 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,3.25,0.1622,0.2725 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,3.5,0.1673,0.2614 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,3.75,0.1774,0.2451 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,4,0.1905,0.2224 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,4.25,0.2041,0.2008 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,4.5,0.2223,0.1820 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,4.75,0.2441,0.1589 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,5,0.2671,0.1463 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,5.25,0.2906,0.1517 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,5.5,0.3165,0.1526 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,5.75,0.3423,0.1614 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,6,0.3670,0.2132 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,6.25,0.3918,0.2632 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,6.5,0.4172,0.2882 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,6.75,0.4268,0.3797 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,7,0.4354,0.4092 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,7.25,0.4430,0.5051 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,7.5,0.4212,0.5936 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,acceleration,7.75,0.3992,0.7489 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,0.25,0.2110,0.4084 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,0.5,0.2251,0.4289 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,0.75,0.2393,0.4624 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,1,0.2539,0.5026 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,1.25,0.2681,0.5406 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,1.5,0.2823,0.5756 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,1.75,0.2962,0.6186 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,2,0.3139,0.6587 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,2.25,0.3241,0.6874 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,2.5,0.3380,0.7189 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,2.75,0.3516,0.7687 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,3,0.3651,0.8179 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,3.25,0.3784,0.8358 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,3.5,0.3910,0.8431 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,3.75,0.4029,0.8769 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,4,0.4130,0.9233 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,4.25,0.4235,0.9439 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,4.5,0.4324,0.9579 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,4.75,0.4378,0.9874 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,5,0.4420,1.0235 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,5.25,0.4488,1.0406 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,5.5,0.4500,1.0498 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,5.75,0.4500,1.0683 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,6,0.4493,1.0901 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,6.25,0.4482,1.0756 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,6.5,0.4403,1.0956 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,6.75,0.4326,1.0793 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,7,0.4251,1.0783 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,7.25,0.4163,1.0315 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,7.5,0.4065,1.0065 +uls19_ur7.9_tf0.1,uls19,7.9,0.1,40,0.001,deceleration,7.75,0.3974,0.9111 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,0.25,0.0094,0.0579 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,0.5,0.0097,0.0530 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,0.75,0.0097,0.0499 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,1,0.0094,0.0524 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,1.25,0.0078,0.0430 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,1.5,0.0105,0.0400 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,1.75,0.0123,0.0484 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,2,0.0086,0.0354 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,2.25,0.0155,0.0235 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,2.5,0.0217,0.0499 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,2.75,0.0331,0.0661 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,3,0.0528,0.0740 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,3.25,0.0844,0.1008 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,3.5,0.1307,0.1557 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,3.75,0.1941,0.2320 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,acceleration,4,0.2576,0.3244 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,0.25,0.0138,0.0592 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,0.5,0.0140,0.0630 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,0.75,0.0146,0.0619 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,1,0.0152,0.0724 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,1.25,0.0170,0.0785 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,1.5,0.0183,0.0744 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,1.75,0.0181,0.0961 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,2,0.0199,0.1158 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,2.25,0.0228,0.1070 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,2.5,0.0320,0.1488 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,2.75,0.0467,0.2316 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,3,0.0588,0.2929 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,3.25,0.0880,0.3426 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,3.5,0.1305,0.3788 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,3.75,0.2108,0.4038 +b1_ur4_tf0.1,b1,4,0.1,40,0.001,deceleration,4,0.2863,0.4005 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,0.25,0.0998,0.2383 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,0.5,0.0975,0.2311 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,0.75,0.0945,0.2240 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,1,0.0914,0.2168 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,1.25,0.0888,0.2079 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,1.5,0.0866,0.1947 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,1.75,0.0840,0.1790 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,2,0.0819,0.1629 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,2.25,0.0792,0.1503 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,2.5,0.0779,0.1462 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,2.75,0.0766,0.1501 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,3,0.0766,0.1592 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,3.25,0.0823,0.1693 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,3.5,0.0875,0.1781 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,3.75,0.0983,0.1875 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,4,0.1128,0.1995 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,4.25,0.1303,0.2196 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,4.5,0.1608,0.2506 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,4.75,0.1920,0.2943 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,5,0.2341,0.3477 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,5.25,0.2808,0.4066 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,5.5,0.3281,0.4681 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,5.75,0.3811,0.5308 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,6,0.4333,0.5830 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,6.25,0.4535,0.6295 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,acceleration,6.5,0.4729,0.6718 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,0.25,0.1015,0.2548 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,0.5,0.1110,0.2619 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,0.75,0.1202,0.2718 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,1,0.1298,0.2873 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,1.25,0.1397,0.3095 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,1.5,0.1493,0.3412 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,1.75,0.1598,0.3798 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,2,0.1724,0.4196 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,2.25,0.1859,0.4587 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,2.5,0.1996,0.4929 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,2.75,0.2096,0.5219 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,3,0.2260,0.5485 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,3.25,0.2385,0.5708 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,3.5,0.2508,0.5928 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,3.75,0.2634,0.6124 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,4,0.2758,0.6301 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,4.25,0.2914,0.6451 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,4.5,0.3104,0.6570 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,4.75,0.3301,0.6683 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,5,0.3533,0.6805 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,5.25,0.3777,0.6900 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,5.5,0.3932,0.6958 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,5.75,0.4206,0.7037 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,6,0.4416,0.7087 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,6.25,0.4583,0.7095 +b1_ur6.5_tf0.1,b1,6.5,0.1,40,0.001,deceleration,6.5,0.4754,0.7003 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,0.25,0.1589,0.3302 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,0.5,0.1582,0.3170 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,0.75,0.1574,0.3034 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,1,0.1567,0.2882 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,1.25,0.1560,0.2727 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,1.5,0.1549,0.2587 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,1.75,0.1545,0.2469 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,2,0.1541,0.2378 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,2.25,0.1534,0.2315 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,2.5,0.1538,0.2291 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,2.75,0.1545,0.2295 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,3,0.1567,0.2309 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,3.25,0.1622,0.2323 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,3.5,0.1673,0.2341 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,3.75,0.1774,0.2360 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,4,0.1905,0.2378 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,4.25,0.2041,0.2417 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,4.5,0.2223,0.2497 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,4.75,0.2441,0.2633 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,5,0.2671,0.2844 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,5.25,0.2906,0.3145 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,5.5,0.3165,0.3539 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,5.75,0.3423,0.4014 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,6,0.3670,0.4516 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,6.25,0.3918,0.5052 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,6.5,0.4172,0.5522 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,6.75,0.4268,0.5963 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,7,0.4354,0.6373 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,7.25,0.4430,0.6694 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,7.5,0.4212,0.6893 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,acceleration,7.75,0.3992,0.7164 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,0.25,0.2110,0.3589 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,0.5,0.2251,0.3740 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,0.75,0.2393,0.3926 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,1,0.2539,0.4159 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,1.25,0.2681,0.4430 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,1.5,0.2823,0.4709 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,1.75,0.2962,0.4989 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,2,0.3139,0.5274 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,2.25,0.3241,0.5541 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,2.5,0.3380,0.5757 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,2.75,0.3516,0.5936 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,3,0.3651,0.6109 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,3.25,0.3784,0.6248 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,3.5,0.3910,0.6351 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,3.75,0.4029,0.6444 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,4,0.4130,0.6556 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,4.25,0.4235,0.6651 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,4.5,0.4324,0.6718 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,4.75,0.4378,0.6817 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,5,0.4420,0.6893 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,5.25,0.4488,0.6935 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,5.5,0.4500,0.6991 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,5.75,0.4500,0.7033 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,6,0.4493,0.7094 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,6.25,0.4482,0.7180 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,6.5,0.4403,0.7230 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,6.75,0.4326,0.7263 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,7,0.4251,0.7290 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,7.25,0.4163,0.7360 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,7.5,0.4065,0.7384 +b1_ur7.9_tf0.1,b1,7.9,0.1,40,0.001,deceleration,7.75,0.3974,0.7378 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,0.25,0.0094,0.0600 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,0.5,0.0097,0.0563 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,0.75,0.0097,0.0557 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,1,0.0094,0.0532 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,1.25,0.0078,0.0465 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,1.5,0.0105,0.0457 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,1.75,0.0123,0.0417 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,2,0.0086,0.0313 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,2.25,0.0155,0.0336 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,2.5,0.0217,0.0351 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,2.75,0.0331,0.0212 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,3,0.0528,0.0218 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,3.25,0.0844,0.0395 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,3.5,0.1307,0.0611 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,3.75,0.1941,0.0916 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,acceleration,4,0.2576,0.1612 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,0.25,0.0138,0.0611 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,0.5,0.0140,0.0647 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,0.75,0.0146,0.0673 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,1,0.0152,0.0711 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,1.25,0.0170,0.0795 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,1.5,0.0183,0.0877 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,1.75,0.0181,0.0993 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,2,0.0199,0.1187 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,2.25,0.0228,0.1462 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,2.5,0.0320,0.1774 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,2.75,0.0467,0.2091 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,3,0.0588,0.2382 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,3.25,0.0880,0.2631 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,3.5,0.1305,0.2817 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,3.75,0.2108,0.2844 +wake_ur4_tf0.1,wake,4,0.1,40,0.001,deceleration,4,0.2863,0.2481 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,0.25,0.0998,0.2754 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,0.5,0.0975,0.2686 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,0.75,0.0945,0.2576 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,1,0.0914,0.2433 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,1.25,0.0888,0.2280 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,1.5,0.0866,0.2165 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,1.75,0.0840,0.2101 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,2,0.0819,0.2061 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,2.25,0.0792,0.2011 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,2.5,0.0779,0.1906 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,2.75,0.0766,0.1739 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,3,0.0766,0.1555 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,3.25,0.0823,0.1414 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,3.5,0.0875,0.1372 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,3.75,0.0983,0.1407 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,4,0.1128,0.1466 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,4.25,0.1303,0.1528 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,4.5,0.1608,0.1564 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,4.75,0.1920,0.1617 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,5,0.2341,0.1745 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,5.25,0.2808,0.2027 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,5.5,0.3281,0.2464 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,5.75,0.3811,0.2960 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,6,0.4333,0.3529 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,6.25,0.4535,0.4305 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,acceleration,6.5,0.4729,0.5126 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,0.25,0.1015,0.2839 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,0.5,0.1110,0.2933 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,0.75,0.1202,0.3076 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,1,0.1298,0.3260 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,1.25,0.1397,0.3452 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,1.5,0.1493,0.3630 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,1.75,0.1598,0.3806 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,2,0.1724,0.3986 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,2.25,0.1859,0.4187 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,2.5,0.1996,0.4417 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,2.75,0.2096,0.4637 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,3,0.2260,0.4842 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,3.25,0.2385,0.5035 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,3.5,0.2508,0.5204 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,3.75,0.2634,0.5356 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,4,0.2758,0.5496 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,4.25,0.2914,0.5629 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,4.5,0.3104,0.5757 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,4.75,0.3301,0.5880 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,5,0.3533,0.5922 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,5.25,0.3777,0.5962 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,5.5,0.3932,0.6028 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,5.75,0.4206,0.6065 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,6,0.4416,0.6001 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,6.25,0.4583,0.5977 +wake_ur6.5_tf0.1,wake,6.5,0.1,40,0.001,deceleration,6.5,0.4754,0.5712 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,0.25,0.1589,0.3573 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,0.5,0.1582,0.3510 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,0.75,0.1574,0.3374 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,1,0.1567,0.3197 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,1.25,0.1560,0.3023 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,1.5,0.1549,0.2830 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,1.75,0.1545,0.2613 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,2,0.1541,0.2439 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,2.25,0.1534,0.2365 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,2.5,0.1538,0.2355 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,2.75,0.1545,0.2339 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,3,0.1567,0.2303 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,3.25,0.1622,0.2234 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,3.5,0.1673,0.2065 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,3.75,0.1774,0.1765 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,4,0.1905,0.1405 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,4.25,0.2041,0.1031 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,4.5,0.2223,0.0691 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,4.75,0.2441,0.0539 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,5,0.2671,0.0690 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,5.25,0.2906,0.0973 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,5.5,0.3165,0.1232 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,5.75,0.3423,0.1480 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,6,0.3670,0.1732 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,6.25,0.3918,0.1934 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,6.5,0.4172,0.2107 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,6.75,0.4268,0.2248 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,7,0.4354,0.2654 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,7.25,0.4430,0.3388 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,7.5,0.4212,0.4136 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,acceleration,7.75,0.3992,0.4827 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,0.25,0.2110,0.3637 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,0.5,0.2251,0.3675 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,0.75,0.2393,0.3696 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,1,0.2539,0.3754 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,1.25,0.2681,0.3904 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,1.5,0.2823,0.4123 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,1.75,0.2962,0.4344 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,2,0.3139,0.4564 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,2.25,0.3241,0.4804 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,2.5,0.3380,0.5024 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,2.75,0.3516,0.5142 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,3,0.3651,0.5183 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,3.25,0.3784,0.5211 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,3.5,0.3910,0.5220 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,3.75,0.4029,0.5239 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,4,0.4130,0.5362 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,4.25,0.4235,0.5582 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,4.5,0.4324,0.5704 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,4.75,0.4378,0.5732 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,5,0.4420,0.5786 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,5.25,0.4488,0.5728 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,5.5,0.4500,0.5548 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,5.75,0.4500,0.5565 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,6,0.4493,0.5631 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,6.25,0.4482,0.5577 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,6.5,0.4403,0.5652 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,6.75,0.4326,0.5527 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,7,0.4251,0.5513 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,7.25,0.4163,0.5379 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,7.5,0.4065,0.5441 +wake_ur7.9_tf0.1,wake,7.9,0.1,40,0.001,deceleration,7.75,0.3974,0.5314 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,0.25,0.0094,0.0581 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,0.5,0.0097,0.0571 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,0.75,0.0097,0.0544 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,1,0.0094,0.0497 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,1.25,0.0078,0.0439 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,1.5,0.0105,0.0464 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,1.75,0.0123,0.0547 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,2,0.0086,0.0613 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,2.25,0.0155,0.0679 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,2.5,0.0217,0.0872 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,2.75,0.0331,0.1103 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,3,0.0528,0.0947 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,3.25,0.0844,0.0633 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,3.5,0.1307,0.0639 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,3.75,0.1941,0.0658 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,acceleration,4,0.2576,0.0715 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,0.25,0.0138,0.0631 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,0.5,0.0140,0.0636 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,0.75,0.0146,0.0660 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,1,0.0152,0.0788 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,1.25,0.0170,0.0901 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,1.5,0.0183,0.0891 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,1.75,0.0181,0.0779 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,2,0.0199,0.0589 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,2.25,0.0228,0.0558 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,2.5,0.0320,0.0586 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,2.75,0.0467,0.0603 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,3,0.0588,0.0542 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,3.25,0.0880,0.0478 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,3.5,0.1305,0.0413 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,3.75,0.2108,0.0461 +uls19_ur4_tf0.3,uls19,4,0.3,40,0.001,deceleration,4,0.2863,0.0619 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,0.25,0.0998,0.2564 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,0.5,0.0975,0.2440 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,0.75,0.0945,0.2326 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,1,0.0914,0.2235 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,1.25,0.0888,0.2122 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,1.5,0.0866,0.2051 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,1.75,0.0840,0.2014 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,2,0.0819,0.1979 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,2.25,0.0792,0.1958 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,2.5,0.0779,0.1878 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,2.75,0.0766,0.1711 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,3,0.0766,0.1467 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,3.25,0.0823,0.1140 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,3.5,0.0875,0.0878 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,3.75,0.0983,0.0753 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,4,0.1128,0.0856 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,4.25,0.1303,0.1155 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,4.5,0.1608,0.1613 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,4.75,0.1920,0.2088 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,5,0.2341,0.2687 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,5.25,0.2808,0.3335 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,5.5,0.3281,0.4211 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,5.75,0.3811,0.5188 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,6,0.4333,0.6285 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,6.25,0.4535,0.7549 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,acceleration,6.5,0.4729,0.8544 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,0.25,0.1015,0.2798 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,0.5,0.1110,0.2902 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,0.75,0.1202,0.2975 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,1,0.1298,0.3071 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,1.25,0.1397,0.3192 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,1.5,0.1493,0.3406 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,1.75,0.1598,0.3767 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,2,0.1724,0.4202 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,2.25,0.1859,0.4753 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,2.5,0.1996,0.5380 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,2.75,0.2096,0.5985 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,3,0.2260,0.6510 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,3.25,0.2385,0.6851 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,3.5,0.2508,0.7160 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,3.75,0.2634,0.7541 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,4,0.2758,0.7904 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,4.25,0.2914,0.8149 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,4.5,0.3104,0.8552 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,4.75,0.3301,0.8736 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,5,0.3533,0.8995 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,5.25,0.3777,0.9117 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,5.5,0.3932,0.9446 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,5.75,0.4206,0.9386 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,6,0.4416,0.9450 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,6.25,0.4583,0.9446 +uls19_ur6.5_tf0.3,uls19,6.5,0.3,40,0.001,deceleration,6.5,0.4754,0.8992 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,0.25,0.1589,0.3934 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,0.5,0.1582,0.3770 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,0.75,0.1574,0.3650 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,1,0.1567,0.3581 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,1.25,0.1560,0.3487 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,1.5,0.1549,0.3349 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,1.75,0.1545,0.3257 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,2,0.1541,0.3234 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,2.25,0.1534,0.3185 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,2.5,0.1538,0.3089 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,2.75,0.1545,0.3015 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,3,0.1567,0.2960 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,3.25,0.1622,0.2816 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,3.5,0.1673,0.2591 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,3.75,0.1774,0.2381 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,4,0.1905,0.2137 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,4.25,0.2041,0.1804 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,4.5,0.2223,0.1504 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,4.75,0.2441,0.1368 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,5,0.2671,0.1283 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,5.25,0.2906,0.1182 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,5.5,0.3165,0.1243 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,5.75,0.3423,0.1494 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,6,0.3670,0.1814 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,6.25,0.3918,0.2210 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,6.5,0.4172,0.2853 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,6.75,0.4268,0.3515 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,7,0.4354,0.4305 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,7.25,0.4430,0.5181 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,7.5,0.4212,0.6179 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,acceleration,7.75,0.3992,0.7739 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,0.25,0.2110,0.4164 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,0.5,0.2251,0.4361 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,0.75,0.2393,0.4650 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,1,0.2539,0.4931 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,1.25,0.2681,0.5217 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,1.5,0.2823,0.5636 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,1.75,0.2962,0.6114 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,2,0.3139,0.6548 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,2.25,0.3241,0.6976 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,2.5,0.3380,0.7472 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,2.75,0.3516,0.7917 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,3,0.3651,0.8256 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,3.25,0.3784,0.8574 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,3.5,0.3910,0.8945 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,3.75,0.4029,0.9241 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,4,0.4130,0.9370 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,4.25,0.4235,0.9657 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,4.5,0.4324,1.0101 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,4.75,0.4378,1.0353 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,5,0.4420,1.0546 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,5.25,0.4488,1.0920 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,5.5,0.4500,1.0962 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,5.75,0.4500,1.1062 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,6,0.4493,1.1309 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,6.25,0.4482,1.1225 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,6.5,0.4403,1.1415 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,6.75,0.4326,1.1211 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,7,0.4251,1.1247 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,7.25,0.4163,1.0937 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,7.5,0.4065,1.0614 +uls19_ur7.9_tf0.3,uls19,7.9,0.3,40,0.001,deceleration,7.75,0.3974,0.9634 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,0.25,0.0094,0.0744 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,0.5,0.0097,0.0724 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,0.75,0.0097,0.0647 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,1,0.0094,0.0648 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,1.25,0.0078,0.0602 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,1.5,0.0105,0.0477 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,1.75,0.0123,0.0535 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,2,0.0086,0.0539 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,2.25,0.0155,0.0300 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,2.5,0.0217,0.0339 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,2.75,0.0331,0.0624 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,3,0.0528,0.0818 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,3.25,0.0844,0.1149 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,3.5,0.1307,0.1774 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,3.75,0.1941,0.2731 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,acceleration,4,0.2576,0.3974 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,0.25,0.0138,0.0798 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,0.5,0.0140,0.0804 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,0.75,0.0146,0.0830 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,1,0.0152,0.0936 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,1.25,0.0170,0.0953 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,1.5,0.0183,0.1031 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,1.75,0.0181,0.1323 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,2,0.0199,0.1428 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,2.25,0.0228,0.1517 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,2.5,0.0320,0.2267 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,2.75,0.0467,0.3196 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,3,0.0588,0.3918 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,3.25,0.0880,0.4501 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,3.5,0.1305,0.4896 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,3.75,0.2108,0.5110 +b1_ur4_tf0.3,b1,4,0.3,40,0.001,deceleration,4,0.2863,0.4929 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,0.25,0.0998,0.3558 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,0.5,0.0975,0.3412 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,0.75,0.0945,0.3245 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,1,0.0914,0.3084 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,1.25,0.0888,0.2931 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,1.5,0.0866,0.2802 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,1.75,0.0840,0.2690 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,2,0.0819,0.2558 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,2.25,0.0792,0.2377 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,2.5,0.0779,0.2128 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,2.75,0.0766,0.1828 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,3,0.0766,0.1531 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,3.25,0.0823,0.1322 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,3.5,0.0875,0.1289 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,3.75,0.0983,0.1445 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,4,0.1128,0.1743 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,4.25,0.1303,0.2128 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,4.5,0.1608,0.2591 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,4.75,0.1920,0.3126 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,5,0.2341,0.3727 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,5.25,0.2808,0.4413 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,5.5,0.3281,0.5177 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,5.75,0.3811,0.5995 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,6,0.4333,0.6808 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,6.25,0.4535,0.7663 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,acceleration,6.5,0.4729,0.8423 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,0.25,0.1015,0.3867 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,0.5,0.1110,0.4079 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,0.75,0.1202,0.4366 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,1,0.1298,0.4747 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,1.25,0.1397,0.5205 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,1.5,0.1493,0.5695 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,1.75,0.1598,0.6176 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,2,0.1724,0.6605 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,2.25,0.1859,0.6967 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,2.5,0.1996,0.7272 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,2.75,0.2096,0.7549 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,3,0.2260,0.7821 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,3.25,0.2385,0.8072 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,3.5,0.2508,0.8288 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,3.75,0.2634,0.8462 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,4,0.2758,0.8614 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,4.25,0.2914,0.8764 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,4.5,0.3104,0.8890 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,4.75,0.3301,0.8990 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,5,0.3533,0.9076 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,5.25,0.3777,0.9153 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,5.5,0.3932,0.9187 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,5.75,0.4206,0.9221 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,6,0.4416,0.9216 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,6.25,0.4583,0.9148 +b1_ur6.5_tf0.3,b1,6.5,0.3,40,0.001,deceleration,6.5,0.4754,0.8926 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,0.25,0.1589,0.4949 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,0.5,0.1582,0.4770 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,0.75,0.1574,0.4595 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,1,0.1567,0.4412 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,1.25,0.1560,0.4213 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,1.5,0.1549,0.3980 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,1.75,0.1545,0.3703 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,2,0.1541,0.3406 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,2.25,0.1534,0.3117 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,2.5,0.1538,0.2843 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,2.75,0.1545,0.2617 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,3,0.1567,0.2482 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,3.25,0.1622,0.2449 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,3.5,0.1673,0.2497 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,3.75,0.1774,0.2607 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,4,0.1905,0.2771 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,4.25,0.2041,0.2973 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,4.5,0.2223,0.3199 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,4.75,0.2441,0.3459 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,5,0.2671,0.3747 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,5.25,0.2906,0.4062 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,5.5,0.3165,0.4438 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,5.75,0.3423,0.4897 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,6,0.3670,0.5432 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,6.25,0.3918,0.5972 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,6.5,0.4172,0.6538 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,6.75,0.4268,0.7053 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,7,0.4354,0.7552 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,7.25,0.4430,0.8038 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,7.5,0.4212,0.8525 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,acceleration,7.75,0.3992,0.9055 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,0.25,0.2110,0.5414 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,0.5,0.2251,0.5731 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,0.75,0.2393,0.6085 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,1,0.2539,0.6456 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,1.25,0.2681,0.6833 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,1.5,0.2823,0.7198 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,1.75,0.2962,0.7528 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,2,0.3139,0.7821 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,2.25,0.3241,0.8086 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,2.5,0.3380,0.8305 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,2.75,0.3516,0.8468 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,3,0.3651,0.8615 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,3.25,0.3784,0.8779 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,3.5,0.3910,0.8931 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,3.75,0.4029,0.9052 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,4,0.4130,0.9192 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,4.25,0.4235,0.9346 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,4.5,0.4324,0.9430 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,4.75,0.4378,0.9479 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,5,0.4420,0.9554 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,5.25,0.4488,0.9584 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,5.5,0.4500,0.9622 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,5.75,0.4500,0.9718 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,6,0.4493,0.9739 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,6.25,0.4482,0.9779 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,6.5,0.4403,0.9752 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,6.75,0.4326,0.9769 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,7,0.4251,0.9764 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,7.25,0.4163,0.9759 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,7.5,0.4065,0.9681 +b1_ur7.9_tf0.3,b1,7.9,0.3,40,0.001,deceleration,7.75,0.3974,0.9504 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,0.25,0.0094,0.0623 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,0.5,0.0097,0.0597 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,0.75,0.0097,0.0598 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,1,0.0094,0.0537 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,1.25,0.0078,0.0504 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,1.5,0.0105,0.0485 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,1.75,0.0123,0.0385 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,2,0.0086,0.0391 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,2.25,0.0155,0.0346 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,2.5,0.0217,0.0210 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,2.75,0.0331,0.0325 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,3,0.0528,0.0349 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,3.25,0.0844,0.0256 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,3.5,0.1307,0.0378 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,3.75,0.1941,0.0690 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,acceleration,4,0.2576,0.1336 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,0.25,0.0138,0.0646 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,0.5,0.0140,0.0679 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,0.75,0.0146,0.0714 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,1,0.0152,0.0756 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,1.25,0.0170,0.0843 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,1.5,0.0183,0.0924 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,1.75,0.0181,0.1059 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,2,0.0199,0.1282 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,2.25,0.0228,0.1542 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,2.5,0.0320,0.1839 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,2.75,0.0467,0.2118 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,3,0.0588,0.2381 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,3.25,0.0880,0.2591 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,3.5,0.1305,0.2728 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,3.75,0.2108,0.2700 +wake_ur4_tf0.3,wake,4,0.3,40,0.001,deceleration,4,0.2863,0.2261 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,0.25,0.0998,0.2795 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,0.5,0.0975,0.2764 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,0.75,0.0945,0.2706 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,1,0.0914,0.2586 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,1.25,0.0888,0.2429 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,1.5,0.0866,0.2260 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,1.75,0.0840,0.2123 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,2,0.0819,0.2066 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,2.25,0.0792,0.2046 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,2.5,0.0779,0.2016 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,2.75,0.0766,0.1931 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,3,0.0766,0.1756 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,3.25,0.0823,0.1537 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,3.5,0.0875,0.1327 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,3.75,0.0983,0.1222 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,4,0.1128,0.1266 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,4.25,0.1303,0.1403 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,4.5,0.1608,0.1571 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,4.75,0.1920,0.1710 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,5,0.2341,0.1865 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,5.25,0.2808,0.2092 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,5.5,0.3281,0.2494 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,5.75,0.3811,0.3059 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,6,0.4333,0.3692 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,6.25,0.4535,0.4507 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,acceleration,6.5,0.4729,0.5425 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,0.25,0.1015,0.2936 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,0.5,0.1110,0.3074 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,0.75,0.1202,0.3245 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,1,0.1298,0.3405 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,1.25,0.1397,0.3566 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,1.5,0.1493,0.3723 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,1.75,0.1598,0.3875 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,2,0.1724,0.4062 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,2.25,0.1859,0.4263 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,2.5,0.1996,0.4458 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,2.75,0.2096,0.4655 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,3,0.2260,0.4833 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,3.25,0.2385,0.4989 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,3.5,0.2508,0.5130 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,3.75,0.2634,0.5279 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,4,0.2758,0.5432 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,4.25,0.2914,0.5582 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,4.5,0.3104,0.5724 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,4.75,0.3301,0.5791 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,5,0.3533,0.5893 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,5.25,0.3777,0.6001 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,5.5,0.3932,0.6117 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,5.75,0.4206,0.6150 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,6,0.4416,0.6210 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,6.25,0.4583,0.6211 +wake_ur6.5_tf0.3,wake,6.5,0.3,40,0.001,deceleration,6.5,0.4754,0.6029 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,0.25,0.1589,0.3400 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,0.5,0.1582,0.3418 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,0.75,0.1574,0.3443 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,1,0.1567,0.3421 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,1.25,0.1560,0.3324 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,1.5,0.1549,0.3170 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,1.75,0.1545,0.2972 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,2,0.1541,0.2736 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,2.25,0.1534,0.2490 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,2.5,0.1538,0.2303 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,2.75,0.1545,0.2211 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,3,0.1567,0.2187 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,3.25,0.1622,0.2191 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,3.5,0.1673,0.2203 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,3.75,0.1774,0.2185 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,4,0.1905,0.2087 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,4.25,0.2041,0.1906 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,4.5,0.2223,0.1669 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,4.75,0.2441,0.1394 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,5,0.2671,0.1207 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,5.25,0.2906,0.1217 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,5.5,0.3165,0.1339 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,5.75,0.3423,0.1552 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,6,0.3670,0.1819 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,6.25,0.3918,0.2121 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,6.5,0.4172,0.2483 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,6.75,0.4268,0.2904 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,7,0.4354,0.3299 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,7.25,0.4430,0.3794 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,7.5,0.4212,0.4663 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,acceleration,7.75,0.3992,0.5702 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,0.25,0.2110,0.3455 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,0.5,0.2251,0.3554 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,0.75,0.2393,0.3726 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,1,0.2539,0.3939 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,1.25,0.2681,0.4143 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,1.5,0.2823,0.4309 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,1.75,0.2962,0.4454 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,2,0.3139,0.4571 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,2.25,0.3241,0.4645 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,2.5,0.3380,0.4694 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,2.75,0.3516,0.4768 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,3,0.3651,0.4868 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,3.25,0.3784,0.4971 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,3.5,0.3910,0.5096 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,3.75,0.4029,0.5256 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,4,0.4130,0.5403 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,4.25,0.4235,0.5468 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,4.5,0.4324,0.5514 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,4.75,0.4378,0.5563 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,5,0.4420,0.5552 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,5.25,0.4488,0.5545 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,5.5,0.4500,0.5657 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,5.75,0.4500,0.5785 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,6,0.4493,0.5887 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,6.25,0.4482,0.5993 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,6.5,0.4403,0.5945 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,6.75,0.4326,0.5969 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,7,0.4251,0.6089 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,7.25,0.4163,0.6316 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,7.5,0.4065,0.6302 +wake_ur7.9_tf0.3,wake,7.9,0.3,40,0.001,deceleration,7.75,0.3974,0.6335 diff --git a/validation/experiments/fu_oscillatory/summary.json b/validation/experiments/fu_oscillatory/summary.json new file mode 100644 index 00000000..1fd022ac --- /dev/null +++ b/validation/experiments/fu_oscillatory/summary.json @@ -0,0 +1,909 @@ +{ + "sets": { + "uls19": "Ulveseter et al. (2019), Table 1, Chh 1.5", + "b1": "generic set (Delta Flume case)", + "wake": "Facchinetti et al. (2004) wake oscillator" + }, + "cases": { + "4": { + "period_s": 16.5, + "U_R_max_from_period": 4.02586 + }, + "6.5": { + "period_s": 10.2, + "U_R_max_from_period": 6.51242 + }, + "7.9": { + "period_s": 8.45, + "U_R_max_from_period": 7.86115 + } + }, + "amplitude_m": 0.68, + "KC": 178.024, + "statistics": { + "skip_periods": 2.0, + "cycles_after_ramp": 8, + "band_hz": [ + 0.5, + 25.0 + ], + "U_R_bin": 0.25, + "lock_in_level": 0.707107 + }, + "runs": { + "uls19_ur4": { + "set": "uls19", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "primary", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.0788772, + "mean_AD_bias": 0.00765377, + "mean_hysteresis_gap": -0.00544744, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.123633, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.0810909, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.189367, + "half_cycles": 13 + }, + "uls19_ur6.5": { + "set": "uls19", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "primary", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.340067, + "mean_AD_bias": 0.263446, + "mean_hysteresis_gap": 0.426298, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 1.00727, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.342745, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 1.12711, + "half_cycles": 13 + }, + "uls19_ur7.9": { + "set": "uls19", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "primary", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.338305, + "mean_AD_bias": 0.245528, + "mean_hysteresis_gap": 0.498221, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 1.04267, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.34447, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 1.17867, + "half_cycles": 13 + }, + "b1_ur4": { + "set": "b1", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "primary", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.137625, + "mean_AD_bias": 0.102541, + "mean_hysteresis_gap": 0.1231, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.472293, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.309296, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.482947, + "half_cycles": 13 + }, + "b1_ur6.5": { + "set": "b1", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "primary", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.339278, + "mean_AD_bias": 0.299516, + "mean_hysteresis_gap": 0.36381, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.874474, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.530498, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.904613, + "half_cycles": 13 + }, + "b1_ur7.9": { + "set": "b1", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "primary", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.345245, + "mean_AD_bias": 0.309066, + "mean_hysteresis_gap": 0.379695, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 0.937283, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.604788, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 0.964546, + "half_cycles": 13 + }, + "wake_ur4": { + "set": "wake", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "primary", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.0879641, + "mean_AD_bias": 0.0452111, + "mean_hysteresis_gap": 0.106011, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.279514, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.267375, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.28459, + "half_cycles": 13 + }, + "wake_ur6.5": { + "set": "wake", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "primary", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.176615, + "mean_AD_bias": 0.130339, + "mean_hysteresis_gap": 0.271196, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.608635, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.45543, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.620293, + "half_cycles": 13 + }, + "wake_ur7.9": { + "set": "wake", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "primary", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.131528, + "mean_AD_bias": 0.0634634, + "mean_hysteresis_gap": 0.254898, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 0.570131, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.503905, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 0.625361, + "half_cycles": 13 + }, + "uls19_ur6.5_dt": { + "set": "uls19", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "half the time step", + "segments": 40, + "dt_s": 0.0005, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.316883, + "mean_AD_bias": 0.250425, + "mean_hysteresis_gap": 0.392135, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.966459, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.362519, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 1.08026, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.0405203 + }, + "uls19_ur6.5_n80": { + "set": "uls19", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "twice the elements", + "segments": 80, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.323636, + "mean_AD_bias": 0.256055, + "mean_hysteresis_gap": 0.394048, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.965552, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.374706, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 1.0915, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.0414204 + }, + "b1_ur6.5_dt": { + "set": "b1", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "half the time step", + "segments": 40, + "dt_s": 0.0005, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.338854, + "mean_AD_bias": 0.299426, + "mean_hysteresis_gap": 0.362671, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.874751, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.532398, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.903954, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.00031708 + }, + "b1_ur6.5_n80": { + "set": "b1", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "twice the elements", + "segments": 80, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.339625, + "mean_AD_bias": 0.299721, + "mean_hysteresis_gap": 0.364601, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.875608, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.529744, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.906036, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.00129619 + }, + "wake_ur6.5_dt": { + "set": "wake", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "half the time step", + "segments": 40, + "dt_s": 0.0005, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.177265, + "mean_AD_bias": 0.125633, + "mean_hysteresis_gap": 0.278967, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.608002, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.451365, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.619543, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.00103976 + }, + "wake_ur6.5_n80": { + "set": "wake", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "twice the elements", + "segments": 80, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.2, + "rms_AD_error": 0.176991, + "mean_AD_bias": 0.127437, + "mean_hysteresis_gap": 0.276121, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.609057, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.451297, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.619529, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.000693311 + }, + "uls19_ur4_tf0": { + "set": "uls19", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.0, + "rms_AD_error": 0.0820423, + "mean_AD_bias": -0.00812544, + "mean_hysteresis_gap": 0.00226271, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.0800981, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.0806154, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.123786, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.352127 + }, + "uls19_ur6.5_tf0": { + "set": "uls19", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.0, + "rms_AD_error": 0.160241, + "mean_AD_bias": 0.0999241, + "mean_hysteresis_gap": 0.250929, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.73775, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.329759, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.813223, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.267578 + }, + "uls19_ur7.9_tf0": { + "set": "uls19", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.0, + "rms_AD_error": 0.196889, + "mean_AD_bias": 0.124572, + "mean_hysteresis_gap": 0.323853, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 0.824018, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.421193, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 0.907134, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.209702 + }, + "b1_ur4_tf0": { + "set": "b1", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.0, + "rms_AD_error": 0.0343016, + "mean_AD_bias": 0.0132018, + "mean_hysteresis_gap": 0.0315813, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.297304, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.233855, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.32682, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.370509 + }, + "b1_ur6.5_tf0": { + "set": "b1", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.0, + "rms_AD_error": 0.228682, + "mean_AD_bias": 0.165549, + "mean_hysteresis_gap": 0.339409, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.768917, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.408899, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.811643, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.12071 + }, + "b1_ur7.9_tf0": { + "set": "b1", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.0, + "rms_AD_error": 0.212091, + "mean_AD_bias": 0.148877, + "mean_hysteresis_gap": 0.345847, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 0.760413, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.511188, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 0.801707, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.188705 + }, + "wake_ur4_tf0": { + "set": "wake", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.0, + "rms_AD_error": 0.0958554, + "mean_AD_bias": -0.0585252, + "mean_hysteresis_gap": -4.14516e-06, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 8.99951e-05, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.13351, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 9.8576e-05, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.999678 + }, + "wake_ur6.5_tf0": { + "set": "wake", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.0, + "rms_AD_error": 0.251994, + "mean_AD_bias": -0.216078, + "mean_hysteresis_gap": -0.000128819, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.00072472, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.389382, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.000981183, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.998809 + }, + "wake_ur7.9_tf0": { + "set": "wake", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.0, + "rms_AD_error": 0.318582, + "mean_AD_bias": -0.298767, + "mean_hysteresis_gap": -0.00308337, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 0.0212659, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.406736, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 0.0247238, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.9627 + }, + "uls19_ur4_tf0.1": { + "set": "uls19", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.1, + "rms_AD_error": 0.0853034, + "mean_AD_bias": 0.0213453, + "mean_hysteresis_gap": 0.00292635, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.139273, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.103086, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.193378, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.126506 + }, + "uls19_ur6.5_tf0.1": { + "set": "uls19", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.1, + "rms_AD_error": 0.324662, + "mean_AD_bias": 0.254496, + "mean_hysteresis_gap": 0.41589, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.969439, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.349548, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 1.08099, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.0375622 + }, + "uls19_ur7.9_tf0.1": { + "set": "uls19", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.1, + "rms_AD_error": 0.363187, + "mean_AD_bias": 0.261685, + "mean_hysteresis_gap": 0.538112, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 1.09563, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.395339, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 1.15507, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.050796 + }, + "b1_ur4_tf0.1": { + "set": "b1", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.1, + "rms_AD_error": 0.103022, + "mean_AD_bias": 0.0768514, + "mean_hysteresis_gap": 0.095062, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.403817, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.293548, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.420583, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.144987 + }, + "b1_ur6.5_tf0.1": { + "set": "b1", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.1, + "rms_AD_error": 0.214, + "mean_AD_bias": 0.191197, + "mean_hysteresis_gap": 0.246774, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.709542, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.52638, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.729241, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.188607 + }, + "b1_ur7.9_tf0.1": { + "set": "b1", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.1, + "rms_AD_error": 0.195635, + "mean_AD_bias": 0.173085, + "mean_hysteresis_gap": 0.256602, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 0.738383, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.603477, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 0.771158, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.212209 + }, + "wake_ur4_tf0.1": { + "set": "wake", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.1, + "rms_AD_error": 0.0851965, + "mean_AD_bias": 0.0462243, + "mean_hysteresis_gap": 0.102614, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.284447, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.268821, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.289226, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.0176474 + }, + "wake_ur6.5_tf0.1": { + "set": "wake", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.1, + "rms_AD_error": 0.17402, + "mean_AD_bias": 0.136929, + "mean_hysteresis_gap": 0.254992, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.6065, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.466998, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.616336, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.0035063 + }, + "wake_ur7.9_tf0.1": { + "set": "wake", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.1, + "rms_AD_error": 0.139371, + "mean_AD_bias": 0.0556743, + "mean_hysteresis_gap": 0.275833, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 0.578643, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.536277, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 0.581555, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.0149307 + }, + "uls19_ur4_tf0.3": { + "set": "uls19", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.3, + "rms_AD_error": 0.0794995, + "mean_AD_bias": 0.00592252, + "mean_hysteresis_gap": -0.00228819, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.110277, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.0810443, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.165149, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.108026 + }, + "uls19_ur6.5_tf0.3": { + "set": "uls19", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.3, + "rms_AD_error": 0.308057, + "mean_AD_bias": 0.244263, + "mean_hysteresis_gap": 0.375534, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.945034, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.376214, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 1.06669, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.0617902 + }, + "uls19_ur7.9_tf0.3": { + "set": "uls19", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.3, + "rms_AD_error": 0.388234, + "mean_AD_bias": 0.275127, + "mean_hysteresis_gap": 0.565988, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 1.14149, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.368466, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 1.23159, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.0947802 + }, + "b1_ur4_tf0.3": { + "set": "b1", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.3, + "rms_AD_error": 0.152777, + "mean_AD_bias": 0.1135, + "mean_hysteresis_gap": 0.136328, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.511024, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.301128, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.524323, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.0820058 + }, + "b1_ur6.5_tf0.3": { + "set": "b1", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.3, + "rms_AD_error": 0.374055, + "mean_AD_bias": 0.326293, + "mean_hysteresis_gap": 0.409076, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.922071, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.523982, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.955006, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.0544294 + }, + "b1_ur7.9_tf0.3": { + "set": "b1", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.3, + "rms_AD_error": 0.384526, + "mean_AD_bias": 0.345527, + "mean_hysteresis_gap": 0.408467, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 0.977948, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.604479, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 1.01557, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.0433862 + }, + "wake_ur4_tf0.3": { + "set": "wake", + "U_R_max": 4.0, + "period_s": 16.5, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.3, + "rms_AD_error": 0.089563, + "mean_AD_bias": 0.0447917, + "mean_hysteresis_gap": 0.106592, + "measured_mean_hysteresis_gap": 0.00871875, + "largest_AD": 0.272812, + "measured_largest_AD": 0.2863, + "points": 32, + "lock_in_share": 0.265399, + "measured_lock_in_share": 0.17, + "half_cycle_peak_AD": 0.276674, + "half_cycles": 13, + "largest_AD_change_from_primary": -0.0239796 + }, + "wake_ur6.5_tf0.3": { + "set": "wake", + "U_R_max": 6.5, + "period_s": 10.2, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.3, + "rms_AD_error": 0.178124, + "mean_AD_bias": 0.143457, + "mean_hysteresis_gap": 0.253793, + "measured_mean_hysteresis_gap": 0.0885654, + "largest_AD": 0.621117, + "measured_largest_AD": 0.4754, + "points": 52, + "lock_in_share": 0.461885, + "measured_lock_in_share": 0.34, + "half_cycle_peak_AD": 0.634178, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.0205084 + }, + "wake_ur7.9_tf0.3": { + "set": "wake", + "U_R_max": 7.9, + "period_s": 8.45, + "role": "VIV FRAME sensitivity", + "segments": 40, + "dt_s": 0.001, + "viv_frame_Tf_s": 0.3, + "rms_AD_error": 0.139912, + "mean_AD_bias": 0.0765949, + "mean_hysteresis_gap": 0.25473, + "measured_mean_hysteresis_gap": 0.122548, + "largest_AD": 0.633482, + "measured_largest_AD": 0.45, + "points": 62, + "lock_in_share": 0.501502, + "measured_lock_in_share": 0.5, + "half_cycle_peak_AD": 0.661501, + "half_cycles": 13, + "largest_AD_change_from_primary": 0.111117 + } + }, + "executable_sha256": "1bf201677a1c4e5bb226cee10b732a48eec34997504868a8698d6ea3b68fc9db" +} From fea3c4e74e332b9fb1cd43602396a025fa71df97 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Tue, 17 Nov 2026 22:04:52 +0900 Subject: [PATCH 37/47] feat: stochastic VIV band centre (VIV STOCHASTIC, Ulveseter et al. 2017) (#179) An optional VIV STOCHASTIC section, rows TypeName sigma c [Nf [seed]], makes the centre cF of a line type's synchronisation band the slowly varying random process of Ulveseter, Thorsen, Saevik & Larsen (2017, Eq. 6 and Fig. 4): F0 = cF + sum_i a sin(p_i + 2 pi f_i theta), theta = integral U/D dt, Nf components (default 100) at the mid-points f_i = (i - 1/2) c cF/Nf of a flat spectrum over (0, c cF], amplitude a = sigma sqrt(2/Nf), so F0 has the mean cF and the standard deviation sigma. Each component advances at its non-dimensional frequency times U/D, as the shedding phase does (U the shedding speed of the phase rate). The start phases are uniform on [0, 2 pi), drawn per node from a minimal-standard stream that the seed, the node and the line select: the nodes are independent, as in the article, a run repeats its realisation and two lines of one type differ. The band half-width dF stays constant. theta is the one new state: one more row of each node's VIV motion statistics, so step recovery, snapshots, rollback and checkpoints (standalone and the OpenFAST mirror) carry it; the phases are rebuilt from the seed. The step advances theta by dt U/D at the mid-point and takes F0 at theta + dt U/(2D), the mid-point rule of the phase (#171). On EI = 0 lines and finite-EI cables, standalone and coupled, with or without in-line VIV; refused on a type without Cl > 0 or with a WAKE OSCILLATOR row. Checks (test_viv_stochastic, test_viv_coupled): - the process with the article's NDP values (cF 0.144, sigma 0.016, c 0.07, 100 components) over theta 0-4e6 has the mean cF to 2e-6, the standard deviation sigma to four digits and an excess kurtosis of -0.18; the phases repeat per seed and node and differ between them; - a sigma 0 row is the deck without it, bit for bit, on both cores; - with sigma 0.02 a run repeats bit for bit, another seed differs, and the taut cable stays locked in (A/D within 1 % of the constant centre's over 50-80 s on both cores); - the coupled checkpoint restart continues bit for bit with theta in both VIV blocks (one more value per node), a rebuild without the VIV state does not, and a rewound step repeats; - refusals: no Cl, a wake-oscillator type, c out of (0, 1], a non-integer Nf, a seed out of range. The EI = 0 model's explicit copy and move routines and its VIV row count (CD_Model_VIV_NMS) carry the new fields. Python reader and builder: the section, its native checks and a round trip. Driver format, theory (Stochastic band centre), capabilities, changelog and the reference (from the article's first page). Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 10 + CMakeLists.txt | 7 + doc/capabilities.rst | 5 + doc/driver_format.md | 43 +++- doc/references.rst | 6 + doc/theory.rst | 41 ++++ python/cabledyn/builder.py | 34 ++++ python/cabledyn/deck_file.py | 61 ++++++ python/tests/test_builder.py | 14 ++ python/tests/test_deck_file.py | 39 ++++ src/CableDyn_DeckDriver.f90 | 156 ++++++++++++++- src/CableDyn_HermiteCableDynamic.f90 | 143 +++++++++++++- src/CableDyn_Model.f90 | 153 ++++++++++++++- src/CableDyn_VIV.f90 | 49 +++++ tests/test_viv_coupled.f90 | 26 ++- tests/test_viv_stochastic.f90 | 284 +++++++++++++++++++++++++++ 16 files changed, 1043 insertions(+), 28 deletions(-) create mode 100644 tests/test_viv_stochastic.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 16c78a35..b9b55237 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,16 @@ All notable changes to CableDyn are recorded in this file. The format follows ### Added +- Stochastic VIV band centre: an optional `VIV STOCHASTIC` section, rows `TypeName sigma c + [Nf [seed]]`, makes the centre `cF` of a line type's synchronisation band the slowly varying + random process of Ulveseter et al. (2017): `Nf` (default 100) sinusoids of a flat spectrum up to + `c` times `cF` with standard deviation `sigma`, each advancing at its non-dimensional frequency + times `U/D` as the shedding phase does, from start phases the seed fixes per node and line (the + nodes independent). On `EI = 0` lines and finite-EI cables, standalone and coupled, with or + without in-line VIV. The node's travelled distance `integral U/D dt` is the one new state (step + recovery, snapshots, checkpoints); a run repeats its realisation, `sigma` 0 leaves runs unchanged + to the bit. With the article's NDP values the process has the mean `cF` to 2e-6 and the standard + deviation `sigma` to four digits. - Rayleigh damping of finite-EI cables: the LINE TYPES EI column takes `EI|-zeta|f1|f2`, the damping ratio `zeta` at the two frequencies `f1` and `f2` [Hz]. Beside the bending damping `Bb = zeta EI/(pi (f1 + f2))` it adds a mass-proportional transverse damping diff --git a/CMakeLists.txt b/CMakeLists.txt index f07b54ba..14e6a0f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1379,6 +1379,13 @@ add_executable(test_viv_frame_deck tests/test_viv_frame_deck.f90) target_link_libraries(test_viv_frame_deck PRIVATE cabledyn_core) add_test(NAME viv_frame_deck COMMAND test_viv_frame_deck WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_tests_properties(viv_frame_deck PROPERTIES LABELS "fortran;integration;dynamic;viv;driver") +# The VIV STOCHASTIC section (the stochastic band centre of Ulveseter et al. 2017): the process's +# mean, standard deviation, near-Gaussian shape and seeded phases; a sigma 0 row bit-identical to +# none, a seeded run repeatable and locked in, on both cores; and the refusals. +add_executable(test_viv_stochastic tests/test_viv_stochastic.f90) +target_link_libraries(test_viv_stochastic PRIVATE cabledyn_core) +add_test(NAME viv_stochastic COMMAND test_viv_stochastic WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(viv_stochastic PROPERTIES LABELS "fortran;integration;dynamic;viv;driver") # Amplitude-dependent VIV coefficients on a deck (VIV AMPLITUDE section), both line kinds: the # identity table, the amplitude channel against the response, self-limiting, drag amplification diff --git a/doc/capabilities.rst b/doc/capabilities.rst index 6cca977d..e5b74585 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -158,6 +158,11 @@ Line and constitutive capability row (``Tf``) takes the cable's filtered motion as the frame of its phases, amplitude estimate and cross-flow damping (a towed or floater-driven cable, :ref:`theory-viv-frame`) + * - Stochastic VIV band centre (``VIV STOCHASTIC`` section ``sigma``, ``c``, ``Nf``, ``seed``) + - Standalone and coupled + - the slowly varying random synchronisation centre of Ulveseter et al. (2017) on ``EI = 0`` + lines and finite-EI cables wherever the cross-flow lift runs, seeded and repeatable + (:ref:`theory-viv-stochastic`), its state in the checkpoint * - In-line VIV (``VIV`` section ``ClX``, ``alpha``) - Standalone and coupled - the in-line shedding force of Ulveseter et al. (2018) at twice the cross-flow frequency, and diff --git a/doc/driver_format.md b/doc/driver_format.md index b22b1fbf..9dec5de5 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -134,7 +134,8 @@ exist. A conventional layout is: LINE TYPES → BODIES → EXTERNAL LOADS → ROD TYPES → RODS → POINTS → TURBINES → LINES → SYROPE IC → SECTIONS → END CONNECTIONS / EQUIVALENT BUOYANCY / ATTACHMENTS / STIFFENERS / VIV / WAKE OSCILLATOR / -VIV AMPLITUDE / VIV DIAMETER / VIV DAMPING / VIV FRAME / FAILURE / CONTROL → OPTIONS → OUTPUTS +VIV AMPLITUDE / VIV DIAMETER / VIV DAMPING / VIV FRAME / VIV STOCHASTIC / FAILURE / CONTROL → OPTIONS → +OUTPUTS Within LINE TYPES, the header row must precede the data rows because it selects their column order. @@ -216,6 +217,7 @@ are collapsed. It must match one of the spellings below; any other name fails wi | VIV DIAMETER | `VIV DIAMETER`, `VIV DIAMETERS` | | VIV DAMPING | `VIV DAMPING` | | VIV FRAME | `VIV FRAME`, `VIV FRAMES` | +| VIV STOCHASTIC | `VIV STOCHASTIC` | | FAILURE | `FAILURE`, `FAILURES` | | CONTROL | `CONTROL`, `CONTROLS` | | TURBINES | `TURBINES`, `TURBINE` | @@ -1424,6 +1426,45 @@ Behaviour: named type or one without VIV (neither LINE TYPES `Cl > 0` nor a WAKE OSCILLATOR row), or holds a value out of range. +### VIV STOCHASTIC (optional) + +The stochastic synchronisation of Ulveseter et al. (2017): the centre `cF` of a line type's +synchronisation band becomes a slowly varying random process, so the response can wander between +modes as in long risers in shear (see [Stochastic band centre](theory.rst)). + +```text +--------------------- VIV STOCHASTIC ----------------------------------- +TypeName sigma c Nf seed +riser 0.016 0.07 100 1 +``` + +| Column | Meaning | +|--------|---------| +| `TypeName` | an existing LINE TYPES name (case-insensitive) with `Cl > 0` and no WAKE OSCILLATOR row, at most one row each | +| `sigma` | standard deviation of the band centre, 0 to 1e3 (0: the constant `cF`) | +| `c` | top of the centre's flat spectrum as a fraction of `cF`, 0 < `c` <= 1 | +| `Nf` | number of frequency components, an integer from 1 to 1000 (optional, default 100) | +| `seed` | seed of the components' start phases, an integer from 0 to 2147483646 (optional, default 0) | + +Behaviour: + +- At a lifting node the centre is `cF + sum_i a sin(p_i + 2 pi f_i theta)`, `theta` the + integral of `U/D` over time (`U` the shedding speed of the phase rate), with `Nf` components + at the mid-points `f_i = (i - 1/2) c cF/Nf` of a flat spectrum over `(0, c cF]` and amplitude + `a = sigma sqrt(2/Nf)`, so its standard deviation is `sigma`. Each component advances at its + non-dimensional frequency times `U/D`, as the shedding phase does, so the centre is slow + against the VIV for `c` well below 1 (Ulveseter et al. take `c` 0.07). The band half-width `dF` + stays constant. +- The start phases are uniform in `[0, 2 pi)`, drawn for each node from the seed, the node and + the line, so the nodes are independent (no spanwise correlation, as in the article), a run + repeats its realisation and two lines of one type differ. A different seed is another + realisation; report statistics over several. +- `theta` is part of the step-recovery, snapshot and checkpoint state (one value per node). A + row with `sigma = 0` leaves the run exactly as without it. It acts on `EI = 0` lines and + finite-EI cables, standalone and coupled, with or without in-line VIV. +- A row fails if it is not `TypeName sigma c [Nf [seed]]`, names an undefined or already named + type, one without `Cl > 0` or one with a WAKE OSCILLATOR row, or holds a value out of range. + ### VIV DAMPING (optional, finite-EI lines) Splits the normal Morison drag of a line type into an in-line and a cross-flow part in the frame diff --git a/doc/references.rst b/doc/references.rst index 715b4c44..c11f9a37 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -95,6 +95,12 @@ Hydrodynamics and ocean environment cross-flow vortex-induced vibrations. *Marine Structures* **51**, 134–151. https://doi.org/10.1016/j.marstruc.2016.10.007 +.. _ref-ulveseter2017: + +- **Ulveseter, J. V., Thorsen, M. J., Sævik, S. & Larsen, C. M. (2017).** Stochastic modelling of + cross-flow vortex-induced vibrations. *Marine Structures* **56**, 260–280. + https://doi.org/10.1016/j.marstruc.2017.08.001 + .. _ref-ulveseter2018: - **Ulveseter, J. V., Thorsen, M. J., Sævik, S. & Larsen, C. M. (2018).** Time domain diff --git a/doc/theory.rst b/doc/theory.rst index c483be99..9d74a3a7 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1682,6 +1682,47 @@ estimate, stay 0 without a table), so it is part of the step-recovery, snapshot state; an ``EI = 0`` line filters its smoothed node velocity. :math:`T_f` 0 or no row leaves the run unchanged to the bit. +.. _theory-viv-stochastic: + +Stochastic band centre +~~~~~~~~~~~~~~~~~~~~~~ + +The synchronisation band of :ref:`theory-viv` has a constant centre :math:`\hat f_0` (``cF``), so +a long cable in a steady current settles on one response. Measured high-mode responses wander in +amplitude and frequency. Ulveseter et al. (2017, Eq. 6) make the centre a slowly varying random +process; a ``VIV STOCHASTIC`` row gives a line type this centre: + +.. math:: + + \hat F_0(t) = \hat f_0 + \sum_{i=1}^{N_f} a\,\sin\bigl(p_i + 2\pi \hat f_i\,\theta(t)\bigr), + \qquad \theta(t) = \int_0^t \frac{U}{D}\,\mathrm d t , + +with :math:`U` the shedding speed of the phase rate. The spectrum is flat over +:math:`(0, c\,\hat f_0]` (their Fig. 4); its :math:`N_f` components sit at the mid-points +:math:`\hat f_i = (i - 1/2)\,c\,\hat f_0/N_f` of equal intervals with the amplitude +:math:`a = \sigma\sqrt{2/N_f}`, so :math:`\hat F_0` has the mean :math:`\hat f_0` and the standard +deviation :math:`\sigma`, and for many components it is close to Gaussian. Each component advances +at its non-dimensional frequency times :math:`U/D`, as the shedding phase does, which keeps the +process free of the fluctuation of :math:`U` that a time-based phase would carry (their Fig. 5); +for :math:`c \ll 1` it is slow against the VIV, so the response has time to build up before the band +moves. The half-width :math:`\Delta\hat f` (``dF``) stays constant. The start phases +:math:`p_i` are uniform on :math:`[0, 2\pi)` and independent between nodes, as in the article (no +spanwise correlation). Ulveseter et al. take :math:`N_f` 100, :math:`c` 0.07 and :math:`\sigma` +0.016 for the NDP riser, and 0.040 as an upper case. + +**Implementation.** Each lifting node carries :math:`\theta` as one more row of its motion +statistics. The step advances it by :math:`\Delta t\,U/D` with :math:`U` at the step's mid-point, +and the phase rate takes :math:`\hat F_0` at :math:`\theta + \Delta t\,U/(2D)`, so the centre follows +the mid-point rule of the phase (:ref:`theory-viv`). The phases :math:`p_i` come from a +minimal-standard generator seeded by the row's seed, the line and the node, so a run repeats its +realisation and needs no stored phases: :math:`\theta` alone is part of the step-recovery, +snapshot and checkpoint state. The process over :math:`\theta` = 0 to :math:`4\times 10^6` (about +200 periods of the lowest component) with the NDP values has the mean :math:`\hat f_0` to +:math:`2\times 10^{-6}`, the standard deviation :math:`\sigma` to four digits and an excess kurtosis of +-0.18. A row with :math:`\sigma` = 0 leaves the run unchanged to the bit; with :math:`\sigma` 0.02 the +taut cable of the flow-frame gates stays locked in (A/D within 1 % of the constant centre's over +50-80 s on both line kinds). A seed is one realisation: statistics of a response need several. + .. _theory-viv-coefficients: Published coefficient sets diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 672c70f2..19961304 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -240,6 +240,14 @@ class LineType: the phases, the amplitude estimate (and so the ``viv_amplitude`` coefficients) and the ``viv_damping`` split, so it needs ``cl > 0`` or ``wake_cl0``. ``None`` writes no row. + viv_stochastic : tuple[float, ...] | None + Optional stochastic band centre of a type's synchronisation model, a + ``VIV STOCHASTIC`` section row ``Name sigma c [Nf [seed]]`` as + ``(sigma, c)``, ``(sigma, c, Nf)`` or ``(sigma, c, Nf, seed)`` + (Ulveseter et al. 2017): the standard deviation of the centre, the top + of its flat spectrum as a fraction of ``cF``, the number of components + (default 100) and the seed of their start phases (default 0). It needs + ``cl > 0`` and no ``wake_cl0``. ``None`` writes no row. viv_amplitude : list of tuples | None Optional amplitude-dependent VIV coefficients of a type (Thorsen et al. 2016), the rows of a ``VIV AMPLITUDE`` section table ``Name AD Cv @@ -288,6 +296,7 @@ class LineType: viv_diameter: float | None = None viv_frame_tf: float | None = None viv_damping: tuple[float, ...] | None = None + viv_stochastic: tuple[float, ...] | None = None @dataclass(eq=False) @@ -1715,6 +1724,7 @@ def add_line_type( viv_diameter: float | None = None, viv_frame_tf: float | None = None, viv_damping: tuple[float, ...] | None = None, + viv_stochastic: tuple[float, ...] | None = None, ) -> LineType: """Add a ``LINE TYPES`` row; see :class:`LineType` for the fields. @@ -1759,6 +1769,7 @@ def add_line_type( viv_diameter, viv_frame_tf, None if viv_damping is None else tuple(viv_damping), + None if viv_stochastic is None else tuple(viv_stochastic), ) self._line_types.append(item) return item @@ -2654,6 +2665,7 @@ def to_text(self, *, validate: bool = True) -> str: _emit(out, "VIV AMPLITUDE", *self._viv_amp_table()) _emit(out, "VIV DIAMETER", *self._viv_diam_table()) _emit(out, "VIV FRAME", *self._viv_frame_table()) + _emit(out, "VIV STOCHASTIC", *self._viv_sto_table()) _emit(out, "VIV DAMPING", *self._viv_damp_table()) _emit(out, "FAILURE", *self._failure_table()) _emit(out, "CONTROL", *self._control_table()) @@ -3116,6 +3128,25 @@ def _viv_frame_table(self) -> tuple[str, str, list[list[str]]]: rows.append([_text(item.name, what), _num(item.viv_frame_tf, what)]) return "Name Tf", "(-) (s)", rows + def _viv_sto_table(self) -> tuple[str, str, list[list[str]]]: + rows: list[list[str]] = [] + for item in self._line_types: + if item.viv_stochastic is None: + continue + what = f"line type {item.name!r}" + if item.wake_cl0 is not None or not (item.cl is not None and item.cl > 0.0): + raise ValueError( + f"{what}: viv_stochastic varies the band centre of its synchronisation " + "model, set cl > 0 and no wake_cl0" + ) + if not 2 <= len(item.viv_stochastic) <= 4: + raise ValueError(f"{what}: viv_stochastic is (sigma, c[, Nf[, seed]])") + rows.append([_text(item.name, what)] + [_num(v, what) for v in item.viv_stochastic]) + width = max((len(r) for r in rows), default=3) + names = ["Name", "sigma", "c", "Nf", "seed"][:width] + units = ["(-)", "(-)", "(-)", "(-)", "(-)"][:width] + return " ".join(names), " ".join(units), rows + def _syrope_table(self) -> tuple[str, str, list[list[str]]]: rows = [ [_line_list(row.lines), _num(row.tmax0, "SYROPE IC"), _num(row.tmean0, "SYROPE IC")] @@ -3342,6 +3373,9 @@ def load(self) -> None: for row in self.rows("VIV FRAME"): t = row.tokens model.line_types[t[0]].viv_frame_tf = _f(t[1]) + for row in self.rows("VIV STOCHASTIC"): + t = row.tokens + model.line_types[t[0]].viv_stochastic = tuple(_f(v) for v in t[1:]) for row in self.rows("ATTACHMENTS"): t = row.tokens arc: float | tuple[float, float, float] diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index bec0fbb8..ce9675ed 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -89,6 +89,7 @@ "VIV DAMPING": "VIV DAMPING", "VIV FRAME": "VIV FRAME", "VIV FRAMES": "VIV FRAME", + "VIV STOCHASTIC": "VIV STOCHASTIC", } # Table sections whose rows the native reader takes through a Fortran # list-directed READ. Their descriptive and units rows are recognized by the @@ -123,6 +124,7 @@ "VIV DIAMETER", "VIV DAMPING", "VIV FRAME", + "VIV STOCHASTIC", } ) _TABLE_SECTIONS = _LIST_DIRECTED_SECTIONS | _WHITESPACE_TABLE_SECTIONS @@ -3426,6 +3428,64 @@ def _check_viv_frame_section(self, frame_type_names: set[str]) -> None: "VIV model: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row" ) + def _check_viv_sto_section(self, viv_type_names: set[str], wake_type_names: set[str]) -> None: + """Native ``apply_type_viv_sto`` for the VIV STOCHASTIC section. + + A row ``TypeName sigma c [Nf [seed]]`` makes the band centre of a line type's + synchronisation model a slowly varying random process (Ulveseter et al. 2017): standard + deviation ``0 <= sigma <= 1e3``, the top ``0 < c <= 1`` of its flat spectrum as a fraction + of ``cF``, ``Nf`` components (an integer from 1 to 1000, default 100) and the seed of their + start phases (an integer from 0 to 2147483646, default 0). The type needs LINE TYPES + ``Cl > 0`` (``viv_type_names``) and no WAKE OSCILLATOR row; a type takes one row. + """ + types = {row.tokens[0].lower(): row.tokens[0] for row in self.line_types} + named: set[str] = set() + for row in self._rows("VIV STOCHASTIC"): + where = self._at(row) + if not 3 <= len(row.tokens) <= 5: + raise DeckFormatError( + f"{where}: VIV STOCHASTIC rows must be: TypeName sigma c [Nf [seed]]" + ) + name = row.tokens[0].lower() + if name not in types: + raise DeckFormatError( + f'{where}: VIV STOCHASTIC row names undefined LINE TYPE "{row.tokens[0]}"' + ) + if name in named: + raise DeckFormatError( + f'{where}: VIV STOCHASTIC names LINE TYPE "{types[name]}" twice' + ) + named.add(name) + values = [0.0, 0.0, 100.0, 0.0] + for k, token in enumerate(row.tokens[1:]): + try: + values[k] = _native_float(token) + except ValueError as exc: + raise DeckFormatError( + f"{where}: VIV STOCHASTIC sigma, c, Nf and seed must be plain numbers" + ) from exc + sigma, c, nf, seed = values + if not ( + all(math.isfinite(v) for v in values) and 0.0 <= sigma <= 1.0e3 and 0.0 < c <= 1.0 + ): + raise DeckFormatError( + f"{where}: VIV STOCHASTIC needs 0 <= sigma <= 1e3 and 0 < c <= 1" + ) + if not (1.0 <= nf <= 1000.0 and nf == int(nf)): + raise DeckFormatError( + f"{where}: VIV STOCHASTIC Nf must be an integer from 1 to 1000" + ) + if not (0.0 <= seed <= 2147483646.0 and seed == int(seed)): + raise DeckFormatError( + f"{where}: VIV STOCHASTIC seed must be an integer from 0 to 2147483646" + ) + if name not in viv_type_names or name in wake_type_names: + raise DeckFormatError( + f'{where}: VIV STOCHASTIC of LINE TYPE "{types[name]}" varies the band ' + "centre of its synchronisation model: give the type LINE TYPES Cl > 0 and " + "no WAKE OSCILLATOR row" + ) + def _check_viv_damp_section(self, amp_type_names: set[str]) -> set[str]: """Native ``apply_type_viv_damp`` for the VIV DAMPING section; the types it names. @@ -4842,6 +4902,7 @@ def end_key(token: str) -> str: amp_type_names = self._check_viv_amp_section(viv_type_names) self._check_viv_diam_section(viv_type_names | wake_type_names) self._check_viv_frame_section(viv_type_names | wake_type_names) + self._check_viv_sto_section(viv_type_names, wake_type_names) damp_type_names = self._check_viv_damp_section(amp_type_names) amp_lines = { line_id diff --git a/python/tests/test_builder.py b/python/tests/test_builder.py index d1caf635..5332cabf 100644 --- a/python/tests/test_builder.py +++ b/python/tests/test_builder.py @@ -317,6 +317,20 @@ def test_viv_frame_rows_are_written(tmp_path: Path) -> None: model.to_text(validate=False) +def test_viv_stochastic_rows_are_written(tmp_path: Path) -> None: + model = _chain_model(tmp_path) + model.add_line_type( + "riser", diam=0.1, mass=10.0, ea=5.0e7, cl=0.8, viv_stochastic=(0.016, 0.07, 100, 3) + ) + deck = DeckFile.from_text(model.to_text(validate=False), path=tmp_path / "deck.dat") + assert [row.tokens for row in deck._rows("VIV STOCHASTIC")] == [ + ("riser", "0.016", "0.07", "100.0", "3.0") + ] + model.add_line_type("plain", diam=0.1, mass=10.0, ea=5.0e7, viv_stochastic=(0.016, 0.07)) + with pytest.raises(ValueError, match="set cl > 0 and no wake_cl0"): + model.to_text(validate=False) + + def test_viv_diameter_rows_are_written(tmp_path: Path) -> None: model = _chain_model(tmp_path) model.add_line_type( diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index 8646f138..981391ad 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -5177,3 +5177,42 @@ def test_as_laid_statics_refused_on_a_finite_ei_line_between_two_moving_points() with pytest.raises(DeckFormatError, match="has a moving End B"): DeckFile.from_text(deck) DeckFile.from_text(deck.replace("asLaid staticsFriction", "none staticsFriction")) + + +def test_viv_stochastic_rows_are_read_and_kept(tmp_path): + from cabledyn import DeckModel + + lift_only = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) + text = _with_section( + lift_only, "VIV STOCHASTIC", "TypeName sigma c Nf seed", "chain 0.016 0.07 100 3" + ) + DeckFile.from_text(text) + path = tmp_path / "sto.dat" + path.write_text(text, encoding="utf-8") + assert DeckModel.load(path).line_types["chain"].viv_stochastic == (0.016, 0.07, 100.0, 3.0) + saved = tmp_path / "saved.dat" + DeckModel.load(path).save(saved) + assert DeckModel.load(saved).line_types["chain"].viv_stochastic == (0.016, 0.07, 100.0, 3.0) + DeckFile.from_text(_with_section(lift_only, "VIV STOCHASTIC", "chain 0.016 0.07")) + + +@pytest.mark.parametrize( + "lift, wake, rows, message", + [ + (True, False, ("chain 0.016",), "rows must be: TypeName sigma c [Nf [seed]]"), + (True, False, ("cable 0.016 0.07",), 'undefined LINE TYPE "cable"'), + (True, False, ("chain 0.016 0.07", "chain 0.02 0.07"), 'names LINE TYPE "chain" twice'), + (True, False, ("chain 0.016 1.5",), "0 < c <= 1"), + (True, False, ("chain -0.1 0.07",), "0 <= sigma <= 1e3"), + (True, False, ("chain 0.016 0.07 10.5",), "Nf must be an integer from 1 to 1000"), + (True, False, ("chain 0.016 0.07 100 -1",), "seed must be an integer"), + (False, False, ("chain 0.016 0.07",), "give the type LINE TYPES Cl > 0 and no WAKE"), + (False, True, ("chain 0.016 0.07",), "give the type LINE TYPES Cl > 0 and no WAKE"), + ], +) +def test_viv_stochastic_rows_follow_the_native_checks(lift, wake, rows, message): + text = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) if lift else _DYNAMIC + if wake: + text = _with_section(text, "WAKE OSCILLATOR", "chain 0.3") + with pytest.raises(DeckFormatError, match=re.escape(message)): + DeckFile.from_text(_with_section(text, "VIV STOCHASTIC", *rows)) diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 4899abe6..bbb253bd 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -141,7 +141,8 @@ MODULE CableDyn_DeckDriver CD_HFMF_Set_Moving_End_B, CD_HFMF_GetEndBKinematics, & CD_HFMF_End, CD_HFMF_OK USE CableDyn_VIV, ONLY: CD_VIV_DEFAULT_DF, CD_VIV_DEFAULT_CF, CD_VIV_NM, CD_VIV_DEFAULT_IL_ALPHA, & - CD_VIV_WAKE_DEFAULT_ST, CD_VIV_WAKE_DEFAULT_EPS, CD_VIV_WAKE_DEFAULT_A, CD_VIV_AMP_MAXP + CD_VIV_WAKE_DEFAULT_ST, CD_VIV_WAKE_DEFAULT_EPS, CD_VIV_WAKE_DEFAULT_A, CD_VIV_AMP_MAXP, & + CD_VIV_STO_DEFAULT_NF, CD_VIV_STO_MAXF USE CableDyn_Hydro, ONLY: CD_Airy_Wave_Kinematics_Precomputed, CD_Component_Wave_Kinematics, & CD_Current_Profile_Velocity, CD_CurrentGridType, CD_Current_Grid_Resample, & CD_Current_Grid_Velocity, & @@ -472,6 +473,14 @@ MODULE CableDyn_DeckDriver ! (0: the ambient flow); has_vivf_row marks a type the section names. REAL(wp) :: viv_tf = CD_ZERO LOGICAL :: has_vivf_row = .FALSE. + ! The stochastic band centre of a line type (the optional VIV STOCHASTIC section, a row per type: + ! TypeName sigma c [Nf [seed]]; Ulveseter et al. 2017): the standard deviation sigma of the + ! synchronisation band centre (0: constant), the top c of its flat spectrum as a fraction of + ! the centre, the number of components Nf and the seed of their start phases; has_vivs_row + ! marks a type the section names. + REAL(wp) :: sto_sigma = CD_ZERO, sto_c = CD_ZERO + INTEGER :: sto_nf = CD_VIV_STO_DEFAULT_NF, sto_seed = 0 + LOGICAL :: has_vivs_row = .FALSE. LOGICAL :: has_wake_row = .FALSE. ! Amplitude-dependent VIV coefficients (the optional VIV AMPLITUDE section, rows TypeName AD Cv ! [CdAmp]): amp_n rows of (A/D, C_v, drag factor) in amp_tab, A/D increasing; amp_cols the @@ -1941,6 +1950,8 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :), viv_dva(:), cdy_a(:), cdy_b(:), cdy_c(:) INTEGER, ALLOCATABLE :: viv_ampn(:) REAL(wp), ALLOCATABLE :: wo_cl0(:), wo_st(:), wo_eps(:), wo_a(:), wo_tf(:) + ! the VIV STOCHASTIC (sigma, c, Nf, seed) per element (finite_viv_sto) + REAL(wp), ALLOCATABLE :: viv_sto(:, :) REAL(wp), ALLOCATABLE :: ba_raw(:), ba(:), dry_b(:), bb_el(:), ra_el(:) REAL(wp) :: mode1_omega REAL(wp), ALLOCATABLE :: contact_kn(:), contact_cn(:) @@ -3347,7 +3358,14 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, CALL finite_viv_diameters(ln, sections, types, viv_dva) ALLOCATE (cdy_a(SIZE(l0)), cdy_b(SIZE(l0)), cdy_c(SIZE(l0))) CALL finite_viv_cdy(ln, sections, types, cdy_a, cdy_b, cdy_c) + ALLOCATE (viv_sto(4, SIZE(l0))) + CALL finite_viv_sto(ln, sections, types, viv_sto) IF (SIZE(l0_am) /= SIZE(l0)) THEN + BLOCK + INTEGER, ALLOCATABLE :: parent(:) + CALL reference_arc_parents(l0, l0_am, parent) + viv_sto = viv_sto(:, parent) + END BLOCK CALL remap_elem_by_reference_arc(viv_tix, l0, l0_am) CALL remap_elem_by_reference_arc(viv_dva, l0, l0_am) CALL remap_elem_by_reference_arc(cdy_a, l0, l0_am) @@ -3754,7 +3772,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, tangent_reversed=.NOT. ln%ends_swapped, clx=viv_clx, il_alpha=viv_al, & chh=viv_hh, amp=viv_amp3, amp_n=viv_ampn, dviv=viv_dva, & cdy=RESHAPE([cdy_a, cdy_b, cdy_c], [3, SIZE(cdy_a)], ORDER=[2, 1]), & - tf=wo_tf) + tf=wo_tf, sto=viv_sto) ELSE CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, viv_cl, viv_cf, viv_df, & MERGE(opts%viv_rms_window, & @@ -3763,7 +3781,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, tangent_reversed=.NOT. ln%ends_swapped, amp=viv_amp3, amp_n=viv_ampn, & dviv=viv_dva, & cdy=RESHAPE([cdy_a, cdy_b, cdy_c], [3, SIZE(cdy_a)], ORDER=[2, 1]), & - tf=wo_tf) + tf=wo_tf, sto=viv_sto) END IF END BLOCK IF (es /= CD_HCDYN_OK) THEN @@ -10496,6 +10514,8 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er REAL(wp), ALLOCATABLE :: viv_wo(:, :) ! the VIV FRAME filter time per element (0 where none) REAL(wp), ALLOCATABLE :: viv_ftf(:) + ! the VIV STOCHASTIC (sigma, c, Nf, seed) per element (viv_sto_row; sigma 0 where none) + REAL(wp), ALLOCATABLE :: viv_sto(:, :) INTEGER, ALLOCATABLE :: viv_ampn(:) LOGICAL, ALLOCATABLE :: syr_el(:) REAL(wp) :: anchor(3), fairlead(3), mode1_omega @@ -10536,7 +10556,8 @@ 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_wo(5, SIZE(l0)), viv_ftf(SIZE(l0))) + viv_tix(SIZE(l0)), viv_dia(SIZE(l0)), viv_wo(5, SIZE(l0)), viv_ftf(SIZE(l0)), viv_sto(4, SIZE(l0))) + viv_sto = CD_ZERO viv_tix = CD_ZERO viv_wo = CD_ZERO viv_ftf = CD_ZERO @@ -10626,6 +10647,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er types(line_section_type(sections, ln%id, i))%viv_dv > CD_ZERO) syr_el(e) = types(line_section_type(sections, ln%id, i))%is_syrope viv_ftf(e) = types(line_section_type(sections, ln%id, i))%viv_tf + viv_sto(:, e) = viv_sto_row(types(line_section_type(sections, ln%id, i)), ln%id) END DO END DO syr_el = syr_el(SIZE(syr_el):1:-1) @@ -10639,6 +10661,7 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er viv_dia = viv_dia(SIZE(viv_dia):1:-1) viv_wo = viv_wo(:, SIZE(viv_wo, 2):1:-1) viv_ftf = viv_ftf(SIZE(viv_ftf):1:-1) + viv_sto = viv_sto(:, SIZE(viv_sto, 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 '// & @@ -10945,11 +10968,12 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er 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, tf=viv_ftf) + il_alpha=viv_al, chh=viv_hh, amp=viv_amp3, amp_n=viv_ampn, tf=viv_ftf, & + sto=viv_sto) ELSE 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, amp=viv_amp3, & - amp_n=viv_ampn, tf=viv_ftf) + amp_n=viv_ampn, tf=viv_ftf, sto=viv_sto) END IF END BLOCK IF (es == CD_MODEL_OK) CALL CD_Recompute_Model_Acceleration(model, es, em) @@ -14050,6 +14074,9 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti CHARACTER(DECK_RECLEN), ALLOCATABLE :: vfrm_rows(:) INTEGER, ALLOCATABLE :: vfrm_lines(:) INTEGER :: n_vfrm + CHARACTER(DECK_RECLEN), ALLOCATABLE :: vsto_rows(:) + INTEGER, ALLOCATABLE :: vsto_lines(:) + INTEGER :: n_vsto CHARACTER(2*NAMELEN), ALLOCATABLE :: channel_keys(:) LOGICAL :: ext_march, types_stock_cols, rodtypes_legacy_cols, turb_ok, static_finite_ok, tors_marched INTEGER :: unit, ios, section, nt, nb, nrt, nr, np, nlin, nsec, neq, nch, nfl, nct, nec, lineno @@ -14068,7 +14095,7 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti SEC_EQUIV = 10, SEC_FAILURE = 11, SEC_CONTROL = 12, SEC_SYROPE_IC = 13, & SEC_ENDCONN = 14, SEC_TURBINES = 15, SEC_EXTLOADS = 16, SEC_ATTACH = 17, & SEC_STIFF = 18, SEC_VIV = 19, SEC_WAKE = 20, SEC_VIVAMP = 21, SEC_VIVDIA = 22, & - SEC_VIVDAMP = 23, SEC_VIVFRAME = 25 + SEC_VIVDAMP = 23, SEC_VIVFRAME = 25, SEC_VIVSTO = 26 ErrStat = 0; ErrMsg = '' ext_march = .FALSE. @@ -14100,6 +14127,8 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti n_vdmp = 0 ALLOCATE (vfrm_rows(0), vfrm_lines(0)) n_vfrm = 0 + ALLOCATE (vsto_rows(0), vsto_lines(0)) + n_vsto = 0 n_vdia = 0 n_wake = 0 nt = 0; nb = 0; nrt = 0; nr = 0; np = 0; nlin = 0; nsec = 0; neq = 0; nch = 0; nfl = 0; nct = 0; nec = 0 @@ -14272,6 +14301,15 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti END IF vfrm_rows(n_vfrm) = line(1:MIN(LEN(line), DECK_RECLEN)) vfrm_lines(n_vfrm) = lineno + CASE (SEC_VIVSTO) + IF (.NOT. has_numeric_token(line)) CYCLE + n_vsto = n_vsto + 1 + IF (n_vsto > SIZE(vsto_rows)) THEN + vsto_rows = [vsto_rows, [(REPEAT(' ', DECK_RECLEN), i_ch=1, 8)]] + vsto_lines = [vsto_lines, [(0, i_ch=1, 8)]] + END IF + vsto_rows(n_vsto) = line(1:MIN(LEN(line), DECK_RECLEN)) + vsto_lines(n_vsto) = lineno CASE (SEC_VIVDIA) IF (.NOT. has_numeric_token(line)) CYCLE n_vdia = n_vdia + 1 @@ -14420,6 +14458,13 @@ SUBROUTINE parse_deck(path, types, bodies, rod_types, rods, points, lines, secti RETURN END IF END DO + DO i_ch = 1, n_vsto + CALL apply_type_viv_sto(vsto_rows(i_ch), types, ErrStat, ErrMsg) + IF (ErrStat /= 0) THEN + CALL add_row_context('deck', vsto_lines(i_ch), vsto_rows(i_ch), ErrMsg) + RETURN + END IF + END DO DO i_ch = 1, SIZE(types) IF (types(i_ch)%amp_n == 1) THEN CALL fail(ErrStat, ErrMsg, 'VIV AMPLITUDE gives LINE TYPE "'//TRIM(types(i_ch)%name)//'" one row: a '// & @@ -16103,6 +16148,8 @@ SUBROUTINE set_section(secname, section, ErrStat, ErrMsg) section = 23 CASE ('VIV FRAME', 'VIV FRAMES') section = 25 + CASE ('VIV STOCHASTIC') + section = 26 CASE ('WAKE OSCILLATOR', 'WAKE OSCILLATORS', 'WAKE') section = 20 CASE DEFAULT @@ -17998,6 +18045,101 @@ SUBROUTINE apply_type_viv_frame(row, types, ErrStat, ErrMsg) types(it)%has_vivf_row = .TRUE. END SUBROUTINE apply_type_viv_frame + SUBROUTINE apply_type_viv_sto(row, types, ErrStat, ErrMsg) + !! One VIV STOCHASTIC row: TypeName sigma c [Nf [seed]] -- the stochastic band centre of a line + !! type's synchronisation model (Ulveseter et al. 2017): the centre cF becomes a slowly varying + !! process of standard deviation sigma (0 <= sigma <= 1e3; 0 keeps it constant), the sum of Nf + !! (an integer, 1 to CD_VIV_STO_MAXF, default CD_VIV_STO_DEFAULT_NF) sinusoids of a flat spectrum + !! up to c times cF (0 < c <= 1) in non-dimensional frequency, each advancing at its frequency + !! times U/D as the shedding phase does, from start phases the integer seed (0 to 2147483646, + !! default 0) fixes per node. The type needs LINE TYPES Cl > 0 and no WAKE OSCILLATOR row. A type + !! takes one row. + CHARACTER(*), INTENT(IN) :: row + TYPE(DeckLineType), INTENT(INOUT) :: types(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + CHARACTER(DECK_RECLEN) :: tok + INTEGER :: it, n, k + REAL(wp) :: v(4) + LOGICAL :: found, ok + + ErrStat = 0; ErrMsg = '' + n = count_tokens(row) + IF (n < 3 .OR. n > 5) THEN + CALL fail(ErrStat, ErrMsg, 'VIV STOCHASTIC rows must be: TypeName sigma c [Nf [seed]]'); RETURN + END IF + CALL get_token(row, 1, tok, found) + it = find_type(types, TRIM(tok)) + IF (it == 0) THEN + CALL fail(ErrStat, ErrMsg, 'VIV STOCHASTIC row names undefined LINE TYPE "'//TRIM(tok)//'"'); RETURN + END IF + IF (types(it)%has_vivs_row) THEN + CALL fail(ErrStat, ErrMsg, 'VIV STOCHASTIC names LINE TYPE "'//TRIM(types(it)%name)//'" twice'); RETURN + END IF + v = [CD_ZERO, CD_ZERO, REAL(CD_VIV_STO_DEFAULT_NF, wp), CD_ZERO] + DO k = 2, n + CALL get_token(row, k, tok, found) + CALL parse_real_token(tok, v(k - 1), ok) + IF (.NOT. ok) THEN + CALL fail(ErrStat, ErrMsg, 'VIV STOCHASTIC sigma, c, Nf and seed must be plain numbers'); RETURN + END IF + END DO + IF (.NOT. (ALL(IEEE_IS_FINITE(v)) .AND. v(1) >= CD_ZERO .AND. v(1) <= 1.0e3_wp .AND. v(2) > CD_ZERO .AND. & + v(2) <= CD_ONE)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV STOCHASTIC needs 0 <= sigma <= 1e3 and 0 < c <= 1'); RETURN + END IF + IF (.NOT. (v(3) >= CD_ONE .AND. v(3) <= REAL(CD_VIV_STO_MAXF, wp) .AND. & + .NOT. (ABS(v(3) - AINT(v(3))) > CD_ZERO))) THEN + CALL fail(ErrStat, ErrMsg, 'VIV STOCHASTIC Nf must be an integer from 1 to '// & + TRIM(int_to_str(CD_VIV_STO_MAXF))); RETURN + END IF + IF (.NOT. (v(4) >= CD_ZERO .AND. v(4) <= 2147483646.0_wp .AND. & + .NOT. (ABS(v(4) - AINT(v(4))) > CD_ZERO))) THEN + CALL fail(ErrStat, ErrMsg, 'VIV STOCHASTIC seed must be an integer from 0 to 2147483646'); RETURN + END IF + IF (.NOT. (types(it)%cl > CD_ZERO) .OR. types(it)%wo_cl0 > CD_ZERO) THEN + CALL fail(ErrStat, ErrMsg, 'VIV STOCHASTIC of LINE TYPE "'//TRIM(types(it)%name)//'" varies the band '// & + 'centre of its synchronisation model: give the type LINE TYPES Cl > 0 and no WAKE OSCILLATOR row') + RETURN + END IF + types(it)%sto_sigma = v(1) + types(it)%sto_c = v(2) + types(it)%sto_nf = NINT(v(3)) + types(it)%sto_seed = NINT(v(4)) + types(it)%has_vivs_row = .TRUE. + END SUBROUTINE apply_type_viv_sto + + SUBROUTINE finite_viv_sto(ln, sections, types, sto) + !! The VIV STOCHASTIC (sigma, c, Nf, seed) of every element's line type (sigma 0 where the type has + !! none), in the element order of finite_hydro_arrays (the deck order reversed); the seed of a + !! line is the type's plus 7919 times the line ID (modulo 2147483647), so two lines of one type + !! take different realisations. + TYPE(DeckLine), INTENT(IN) :: ln + TYPE(DeckSection), INTENT(IN) :: sections(:) + TYPE(DeckLineType), INTENT(IN) :: types(:) + REAL(wp), INTENT(OUT) :: sto(:, :) + INTEGER :: i, j, e + e = 0 + DO i = 1, SIZE(sections) + IF (sections(i)%line_id /= ln%id) CYCLE + DO j = 1, sections(i)%nsegs + e = e + 1 + sto(:, e) = viv_sto_row(types(sections(i)%ltype), ln%id) + END DO + END DO + sto = sto(:, SIZE(sto, 2):1:-1) + END SUBROUTINE finite_viv_sto + + PURE FUNCTION viv_sto_row(t, line_id) RESULT(r) + !! A line type's VIV STOCHASTIC values (sigma, c, Nf, seed) on line line_id (finite_viv_sto). + TYPE(DeckLineType), INTENT(IN) :: t + INTEGER, INTENT(IN) :: line_id + REAL(wp) :: r(4) + INTEGER(INT64) :: sd + sd = MOD(INT(t%sto_seed, INT64) + 7919_INT64*INT(ABS(line_id), INT64), 2147483647_INT64) + r = [t%sto_sigma, t%sto_c, REAL(t%sto_nf, wp), REAL(sd, wp)] + END FUNCTION viv_sto_row + SUBROUTINE append_line_stiffener(row, lines, ErrStat, ErrMsg) !! One STIFFENERS row: LineID End Length RootOD TipOD InnerD E Density -- a conical segment of !! the bend stiffener sleeving End A or End B of a finite-EI line. The rows of one line end diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index 58bda2f7..c74a0f9f 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -70,7 +70,7 @@ MODULE CableDyn_HermiteCableDynamic CD_VIV_Inline_Phase_Rate, CD_VIV_Wake_Advance, CD_VIV_NMS, CD_VIV_NMS_AMP, & CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, CD_VIV_Check_Amp_Table, & CD_VIV_Ambient_Crossflow_Rate, CD_VIV_NMS_FRAME, CD_VIV_Mean_Square_Weight, & - CD_VIV_Filter_Linear + CD_VIV_Filter_Linear, CD_VIV_Sto_Node, CD_VIV_Sto_Centre, CD_VIV_STO_MAXF USE CableDyn_Hydro, ONLY: CD_Morison_Drag_Per_Length_Jac, CD_Airy_Wave_Kinematics_Precomputed, & CD_Morison_Drag_Split_Per_Length_Jac, & CD_Component_Wave_Kinematics, CD_Solve_Dispersion_Wavenumber, CD_HYDRO_OK @@ -407,6 +407,14 @@ MODULE CableDyn_HermiteCableDynamic ! the cross-flow damping (elem_frame_v, the mean over its end nodes). LOGICAL :: viv_frame = .FALSE. REAL(wp), ALLOCATABLE :: viv_ftf(:), viv_ftfe(:) + ! The stochastic band centre (Set_VIV sto; VIV STOCHASTIC section; CableDyn_VIV): with sigma > 0 + ! on some element (viv_sto) viv_ms has one more row, its last, the node's travelled + ! non-dimensional distance theta = integral U/D dt; node k's band centre is then + ! CD_VIV_Sto_Centre(viv_cf(k), viv_sto_a(k), viv_sto_f(1:n, k), viv_sto_p(1:n, k), theta) with + ! n = viv_sto_n(k) components (0: the constant viv_cf(k); viv_centre). + LOGICAL :: viv_sto = .FALSE. + REAL(wp), ALLOCATABLE :: viv_sto_a(:), viv_sto_f(:, :), viv_sto_p(:, :) + INTEGER, ALLOCATABLE :: viv_sto_n(:) REAL(wp), ALLOCATABLE :: Mgb(:, :) ! constant global mass (band) LOGICAL, ALLOCATABLE :: freemask(:), solve_mask(:) INTEGER, ALLOCATABLE :: fmap(:) ! free -> global DOF index @@ -1172,7 +1180,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial(model, mu_axial, ErrStat, ErrM END SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg, phase_seed, tangent_reversed, & - clx, il_alpha, chh, wake, amp, amp_n, dviv, cdy, tf) + clx, il_alpha, chh, wake, amp, amp_n, dviv, cdy, tf, sto) !! 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 @@ -1231,6 +1239,16 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! ambient flow relative to vbar; and the cross-flow damping takes its axes and blend from that !! flow. A cable moved through the water by a tow or its floater then sees that motion as flow. !! The shedding speed of the phase rate stays the relative normal speed. + !! + !! sto (optional, (4, ne); not with the wake oscillator), per element (sigma, c, N_f, seed) of the + !! stochastic band centre of Ulveseter et al. (2017; CD_VIV_Sto_Node): sigma >= 0 the standard + !! deviation of the centre (0: the constant cf on that element), and where sigma > 0 (only where + !! cl > 0) 0 < c <= 1 the top of its flat spectrum as a fraction of cf, the number of components + !! N_f (an integer, 1 to CD_VIV_STO_MAXF) and the seed of the start phases (an integer, 0 to + !! 2^31 - 2). A node takes the length-weighted sigma over its lifting elements, the + !! length-weighted c over those with sigma > 0, the most components and the seed of the first; + !! its centre advances with the node's travelled distance theta = integral U/D dt, U the + !! shedding speed of the phase rate, at the step's mid-point as the phase. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: cl(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -1247,9 +1265,12 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err REAL(wp), INTENT(IN), OPTIONAL :: dviv(:) REAL(wp), INTENT(IN), OPTIONAL :: cdy(:, :) REAL(wp), INTENT(IN), OPTIONAL :: tf(:) - INTEGER :: e, k, ne, nn, es, nms, nw - LOGICAL :: had_filter, had_frame, want_frame - REAL(wp) :: wsum, tw_old, rest_old + REAL(wp), INTENT(IN), OPTIONAL :: sto(:, :) + INTEGER :: e, k, ne, nn, es, nms, nw, nfm, nfk, seedk + LOGICAL :: had_filter, had_frame, want_frame, had_sto, want_sto + REAL(wp) :: wsum, tw_old, rest_old, ssum, csum, cw + REAL(wp), ALLOCATABLE :: s_a(:), s_f(:, :), s_p(:, :) + INTEGER, ALLOCATABLE :: s_n(:) LOGICAL :: had_viv, had_il, want_il, had_wake, want_wake, bad_band, had_amp, want_amp CHARACTER(LEN=1024) :: em REAL(wp), ALLOCATABLE :: p_amp(:, :, :) @@ -1458,12 +1479,48 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err END IF want_frame = ANY(tf > CD_ZERO) END IF + want_sto = .FALSE. + IF (PRESENT(sto)) THEN + IF (SIZE(sto, 1) /= 4 .OR. SIZE(sto, 2) /= ne) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: sto must have shape (4, ne)' + RETURN + END IF + IF (.NOT. CD_All_Finite(sto)) THEN + ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: sto must be finite'; RETURN + END IF + DO e = 1, ne + IF (sto(1, e) < CD_ZERO) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the stochastic band centre needs sigma >= 0' + RETURN + END IF + IF (.NOT. (sto(1, e) > CD_ZERO)) CYCLE + IF (.NOT. (cl(e) > CD_ZERO) .OR. want_wake) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: a stochastic band centre (sigma > 0) acts on the synchronisation '// & + 'model: only where cl > 0, and not with the wake oscillator' + RETURN + END IF + IF (.NOT. (sto(1, e) <= 1.0e3_wp .AND. sto(2, e) > CD_ZERO .AND. sto(2, e) <= CD_ONE .AND. & + sto(3, e) >= CD_ONE .AND. sto(3, e) <= REAL(CD_VIV_STO_MAXF, wp) .AND. & + .NOT. (ABS(sto(3, e) - AINT(sto(3, e))) > CD_ZERO) .AND. sto(4, e) >= CD_ZERO .AND. & + sto(4, e) <= 2147483646.0_wp .AND. .NOT. (ABS(sto(4, e) - AINT(sto(4, e))) > CD_ZERO))) THEN + ErrStat = CD_HCDYN_BADINPUT + WRITE (ErrMsg, '(A,I0,A)') 'CD_HermiteCable_Dyn_Set_VIV: the stochastic band centre needs sigma at '// & + 'most 1e3, 0 < c <= 1, an integer N_f from 1 to ', CD_VIV_STO_MAXF, & + ' and an integer seed from 0 to 2147483646' + RETURN + END IF + END DO + want_sto = ANY(sto(1, :) > CD_ZERO) + END IF ! the previous configuration and state, kept for a rollback had_viv = model%has_viv had_il = model%has_viv_il had_wake = model%viv_wake had_filter = model%wo_filter had_frame = model%viv_frame + had_sto = model%viv_sto had_amp = model%has_viv_amp tw_old = model%viv_tw rest_old = model%viv_phi_rest @@ -1482,6 +1539,8 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err IF (want_frame) nms = CD_VIV_NMS_FRAME ! the step predictor after the motion statistics (viv_pred_row; row 2 on a wake cable) IF (.NOT. want_wake) nms = nms + MERGE(2, 1, want_il) + ! the travelled distance of the stochastic band centre last (viv_theta) + IF (want_sto) nms = nms + 1 ALLOCATE (model%viv_cl(ne), model%viv_k(ne), model%viv_cf(nn), model%viv_df(nn), model%viv_dn(nn), & model%viv_phi(nn), & model%viv_phi_eval(nn), model%viv_rate(nn), model%viv_ms(nms, nn), model%viv_ms_next(nms, nn), & @@ -1547,6 +1606,35 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err END DO model%viv_frame = .TRUE. END IF + IF (want_sto) THEN + ! per node the length-weighted sigma over its lifting elements, the length-weighted c over + ! those with sigma > 0, their most components and the seed of the first; theta starts at 0 + nfm = NINT(MAXVAL(sto(3, :), MASK=sto(1, :) > CD_ZERO)) + ALLOCATE (model%viv_sto_a(nn), model%viv_sto_f(nfm, nn), model%viv_sto_p(nfm, nn), model%viv_sto_n(nn)) + model%viv_sto_a = CD_ZERO + model%viv_sto_f = CD_ZERO + model%viv_sto_p = CD_ZERO + model%viv_sto_n = 0 + DO k = 1, nn + IF (.NOT. model%viv_node(k)) CYCLE + wsum = CD_ZERO; ssum = CD_ZERO; csum = CD_ZERO; cw = CD_ZERO; nfk = 0; seedk = -1 + DO e = MAX(1, k - 1), MIN(ne, k) + IF (.NOT. (cl(e) > CD_ZERO)) CYCLE + wsum = wsum + model%l0(e) + ssum = ssum + model%l0(e)*sto(1, e) + IF (.NOT. (sto(1, e) > CD_ZERO)) CYCLE + cw = cw + model%l0(e) + csum = csum + model%l0(e)*sto(2, e) + nfk = MAX(nfk, NINT(sto(3, e))) + IF (seedk < 0) seedk = NINT(sto(4, e)) + END DO + IF (nfk < 1) CYCLE + CALL CD_VIV_Sto_Node(ssum/wsum, csum/cw, model%viv_cf(k), nfk, seedk, k, model%viv_sto_a(k), & + model%viv_sto_f(1:nfk, k), model%viv_sto_p(1:nfk, k)) + model%viv_sto_n(k) = nfk + END DO + model%viv_sto = .TRUE. + END IF IF (want_il) THEN ALLOCATE (model%vil_cx(ne), model%vil_k(ne), model%vil_alpha(nn), model%vil_phi(nn), model%vil_phi_eval(nn), & model%vil_rate(nn), model%vil_ms(2, nn), model%vil_ms_next(2, nn), model%ws_recovery_vil_phi(nn), & @@ -1659,6 +1747,7 @@ SUBROUTINE refresh_acceleration() model%viv_wake = had_wake model%wo_filter = had_filter model%viv_frame = had_frame + model%viv_sto = had_sto model%has_viv_amp = had_amp model%viv_tw = tw_old model%viv_phi_rest = rest_old @@ -1696,6 +1785,8 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(p_dv, model%viv_dv) CALL MOVE_ALLOC(p_cdy, model%viv_cdy) CALL MOVE_ALLOC(p_ftf, model%viv_ftf); CALL MOVE_ALLOC(p_ftfe, model%viv_ftfe) + CALL MOVE_ALLOC(s_a, model%viv_sto_a); CALL MOVE_ALLOC(s_f, model%viv_sto_f) + CALL MOVE_ALLOC(s_p, model%viv_sto_p); CALL MOVE_ALLOC(s_n, model%viv_sto_n) ELSE CALL MOVE_ALLOC(model%viv_cl, o_cl); CALL MOVE_ALLOC(model%viv_k, o_k) CALL MOVE_ALLOC(model%viv_cf, o_cf); CALL MOVE_ALLOC(model%viv_df, o_df) @@ -1722,6 +1813,8 @@ SUBROUTINE move_viv(back) CALL MOVE_ALLOC(model%viv_dv, p_dv) CALL MOVE_ALLOC(model%viv_cdy, p_cdy) CALL MOVE_ALLOC(model%viv_ftf, p_ftf); CALL MOVE_ALLOC(model%viv_ftfe, p_ftfe) + CALL MOVE_ALLOC(model%viv_sto_a, s_a); CALL MOVE_ALLOC(model%viv_sto_f, s_f) + CALL MOVE_ALLOC(model%viv_sto_p, s_p); CALL MOVE_ALLOC(model%viv_sto_n, s_n) END IF END SUBROUTINE move_viv END SUBROUTINE CD_HermiteCable_Dyn_Set_VIV @@ -1750,7 +1843,9 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%viv_cdy)) DEALLOCATE (model%viv_cdy) IF (ALLOCATED(model%viv_ftf)) DEALLOCATE (model%viv_ftf) IF (ALLOCATED(model%viv_ftfe)) DEALLOCATE (model%viv_ftfe) + IF (ALLOCATED(model%viv_sto_a)) DEALLOCATE (model%viv_sto_a, model%viv_sto_f, model%viv_sto_p, model%viv_sto_n) model%viv_frame = .FALSE. + model%viv_sto = .FALSE. model%has_viv_amp = .FALSE. model%has_viv = .FALSE. model%has_viv_il = .FALSE. @@ -1952,6 +2047,30 @@ SUBROUTINE viv_node_motion(model, k, yd, ydd, un, ok, xd, xdd) END IF END SUBROUTINE viv_node_motion + PURE REAL(wp) FUNCTION viv_theta(model, k) RESULT(theta) + !! Node k's travelled non-dimensional distance of the stochastic band centre (the last row of + !! viv_ms; 0 without it). + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: k + theta = CD_ZERO + IF (model%viv_sto) theta = model%viv_ms(SIZE(model%viv_ms, 1), k) + END FUNCTION viv_theta + + PURE REAL(wp) FUNCTION viv_centre(model, k, theta) RESULT(centre) + !! Node k's band centre: viv_cf(k), or with a stochastic band centre its process at the + !! travelled distance theta (CD_VIV_Sto_Centre). + TYPE(CD_HermiteCableDynType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: k + REAL(wp), INTENT(IN) :: theta + INTEGER :: n + centre = model%viv_cf(k) + IF (.NOT. model%viv_sto) RETURN + n = model%viv_sto_n(k) + IF (n < 1) RETURN + centre = CD_VIV_Sto_Centre(model%viv_cf(k), model%viv_sto_a(k), model%viv_sto_f(1:n, k), & + model%viv_sto_p(1:n, k), theta) + END FUNCTION viv_centre + PURE INTEGER FUNCTION viv_pred_row(model) RESULT(r) !! The row of viv_ms holding the step predictor (CableDyn_VIV): after the motion statistics on a !! synchronisation-model cable (the in-line rate in the row after it), row 2 on a wake cable. @@ -2013,7 +2132,8 @@ SUBROUTINE viv_seed_predictor(model) CYCLE END IF model%viv_ms(ir, k) = CD_VIV_Phase_Rate(yd, ydd, CD_ZERO, CD_ZERO, model%viv_phi(k), un, model%viv_dn(k), & - model%viv_cf(k), model%viv_df(k), phi_rest=model%viv_phi_rest) + viv_centre(model, k, viv_theta(model, k)), model%viv_df(k), & + phi_rest=model%viv_phi_rest) IF (.NOT. model%has_viv_il) CYCLE IF (.NOT. model%vil_node(k)) CYCLE model%viv_ms(ir + 1, k) = CD_VIV_Inline_Phase_Rate(xd, xdd, CD_ZERO, CD_ZERO, model%vil_phi(k), & @@ -2114,6 +2234,7 @@ SUBROUTINE viv_step_end(model, dt) REAL(wp), INTENT(IN) :: dt INTEGER :: k, ir, i0, ip REAL(wp) :: wf, wh, yd, ydd, un, ms1, ms2, rate_mid, xd, xdd, rate_mid_x, sw(2), st(4), yda, vf(3), om, ap + REAL(wp) :: th, dth, cfm LOGICAL :: ok, il ir = viv_pred_row(model) IF (model%viv_wake) THEN @@ -2187,16 +2308,24 @@ SUBROUTINE viv_step_end(model, dt) END IF END IF CALL viv_node_motion_mid(model, k, dt, vf, yd, ydd, un, ok, xd, xdd) + ! the stochastic band centre at the mid-point of the travelled distance; theta moves on with + ! the step's shedding speed only where the step gives a finite phase rate + th = viv_theta(model, k) + dth = CD_ZERO + IF (model%viv_sto) model%viv_ms_next(SIZE(model%viv_ms, 1), k) = th IF (ok) THEN + IF (model%viv_sto) dth = dt*un/model%viv_dn(k) + cfm = viv_centre(model, k, th + 0.5_wp*dth) ms1 = CD_VIV_Mean_Square(model%viv_ms(1, k), yd, wh) ms2 = CD_VIV_Mean_Square(model%viv_ms(2, k), ydd, wh) ! the implicit mid-point rule by one fixed-point pass: the mid-point phase from the ! predictor, then from the rate it gives DO ip = 1, 2 rate_mid = CD_VIV_Phase_Rate(yd, ydd, ms1, ms2, model%viv_phi(k) + 0.5_wp*dt*rate_mid, un, & - model%viv_dn(k), model%viv_cf(k), model%viv_df(k), phi_rest=model%viv_phi_rest) + model%viv_dn(k), cfm, model%viv_df(k), phi_rest=model%viv_phi_rest) END DO IF (CD_Is_Finite(rate_mid)) THEN + IF (model%viv_sto) model%viv_ms_next(SIZE(model%viv_ms, 1), k) = th + dth model%viv_ms_next(1, k) = CD_VIV_Mean_Square(model%viv_ms(1, k), yd, wf) model%viv_ms_next(2, k) = CD_VIV_Mean_Square(model%viv_ms(2, k), ydd, wf) ELSE diff --git a/src/CableDyn_Model.f90 b/src/CableDyn_Model.f90 index 8782e624..f593c0ff 100644 --- a/src/CableDyn_Model.f90 +++ b/src/CableDyn_Model.f90 @@ -60,7 +60,8 @@ MODULE CableDyn_Model CD_VIV_Wrap_Phase, CD_VIV_NM, CD_VIV_TWO_PI, CD_VIV_Node_Inline, CD_VIV_Inline_Phase_Rate, & CD_VIV_NMS, CD_VIV_NMS_AMP, CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, & CD_VIV_Check_Amp_Table, CD_VIV_Ambient_Crossflow_Rate, CD_VIV_Wake_Advance, & - CD_VIV_NMS_FRAME, CD_VIV_Mean_Square_Weight, CD_VIV_Filter_Linear + CD_VIV_NMS_FRAME, CD_VIV_Mean_Square_Weight, CD_VIV_Filter_Linear, & + CD_VIV_Sto_Node, CD_VIV_Sto_Centre, CD_VIV_STO_MAXF USE CableDyn_Dynamic, ONLY: GenAlphaConfig, CD_CableGenAlphaWorkspace, CD_Clear_GenAlpha_Workspace, & CD_Cable_Initial_Acceleration, CD_Cable_Gen_Alpha_Step, CD_Cable_Step_Loads, & CD_DYN_OK, CD_DYN_ALLOCFAIL, & @@ -451,6 +452,14 @@ MODULE CableDyn_Model ! velocity across the ambient flow both relative to it (frame_node). LOGICAL :: viv_frame = .FALSE. REAL(wp), ALLOCATABLE :: viv_ftf(:) + ! The stochastic band centre (CD_Set_Model_VIV sto; VIV STOCHASTIC section; CableDyn_VIV): with + ! sigma > 0 on some element (viv_sto) viv_ms has one more row, its last, the node's travelled + ! non-dimensional distance theta = integral U/D dt; node nd's band centre is then + ! CD_VIV_Sto_Centre(viv_cf(nd), viv_sto_a(nd), viv_sto_f(1:n, nd), viv_sto_p(1:n, nd), theta) + ! with n = viv_sto_n(nd) components (0: the constant viv_cf(nd); viv_centre). + LOGICAL :: viv_sto = .FALSE. + REAL(wp), ALLOCATABLE :: viv_sto_a(:), viv_sto_f(:, :), viv_sto_p(:, :) + INTEGER, ALLOCATABLE :: viv_sto_n(:) ! Wake-oscillator VIV (CD_Set_Model_VIV wake; Facchinetti et al. 2004): the van der Pol wake ! variable q = 2 C_L/C_L0 replaces the synchronisation phase of the whole line, the lift scale ! taking viv_cl = C_L0/2. Per node the Strouhal number, van der Pol eps and coupling A @@ -3972,7 +3981,7 @@ SUBROUTINE CD_Set_Model_Syrope_State(model, slow, tmax, ErrStat, ErrMsg) END SUBROUTINE CD_Set_Model_Syrope_State SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, ErrMsg, phase_seed, & - tangent_reversed, clx, il_alpha, chh, amp, amp_n, wake, tf) + tangent_reversed, clx, il_alpha, chh, amp, amp_n, wake, tf, sto) !! Install the cross-flow VIV model (CableDyn_VIV) on an initialised line. Per element: !! the lift coefficient cl (0 = no lift on that element), hydrodynamic diameter, and the !! synchronisation centre cf and half-range df of the non-dimensional shedding frequency; @@ -4026,9 +4035,16 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, INTEGER, INTENT(IN), OPTIONAL :: amp_n(:) REAL(wp), INTENT(IN), OPTIONAL :: wake(:, :) REAL(wp), INTENT(IN), OPTIONAL :: tf(:) - INTEGER :: n_nodes, n_elem, e, nd, istat, k, nms - REAL(wp) :: wsum - LOGICAL :: want_il, want_amp, want_wake, want_filter, want_frame + !! sto (optional, (4, n_elem); not with the wake oscillator), per element (sigma, c, N_f, seed) of + !! the stochastic band centre of Ulveseter et al. (2017; CD_VIV_Sto_Node), as the finite-EI model + !! takes it (CD_HermiteCable_Dyn_Set_VIV): sigma >= 0 (0: the constant cf), and where sigma > 0 + !! (only where cl > 0) 0 < c <= 1, an integer N_f from 1 to CD_VIV_STO_MAXF and an integer seed + !! from 0 to 2^31 - 2. A node takes the length-weighted sigma over its lifting elements, the + !! length-weighted c over those with sigma > 0, the most components and the seed of the first. + REAL(wp), INTENT(IN), OPTIONAL :: sto(:, :) + INTEGER :: n_nodes, n_elem, e, nd, istat, k, nms, nfm, nfk, seedk + REAL(wp) :: wsum, ssum, csum, cw + LOGICAL :: want_il, want_amp, want_wake, want_filter, want_frame, want_sto CHARACTER(160) :: amsg ErrStat = CD_MODEL_OK @@ -4175,6 +4191,35 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, END IF want_frame = ANY(tf > CD_ZERO) END IF + want_sto = .FALSE. + IF (PRESENT(sto)) THEN + IF (SIZE(sto, 1) /= 4 .OR. SIZE(sto, 2) /= n_elem .OR. .NOT. CD_All_Finite(sto)) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV stochastic band centre sto must be finite with shape (4, n_elem)') + RETURN + END IF + DO e = 1, n_elem + IF (sto(1, e) < CD_ZERO) THEN + CALL fail(ErrStat, ErrMsg, 'the VIV stochastic band centre needs sigma >= 0') + RETURN + END IF + IF (.NOT. (sto(1, e) > CD_ZERO)) CYCLE + IF (.NOT. (cl(e) > CD_ZERO) .OR. want_wake) THEN + CALL fail(ErrStat, ErrMsg, 'a VIV stochastic band centre (sigma > 0) acts on the synchronisation model: '// & + 'only where cl > 0, and not with the wake oscillator') + RETURN + END IF + IF (.NOT. (sto(1, e) <= 1.0e3_wp .AND. sto(2, e) > CD_ZERO .AND. sto(2, e) <= CD_ONE .AND. & + sto(3, e) >= CD_ONE .AND. sto(3, e) <= REAL(CD_VIV_STO_MAXF, wp) .AND. & + .NOT. (ABS(sto(3, e) - AINT(sto(3, e))) > CD_ZERO) .AND. sto(4, e) >= CD_ZERO .AND. & + sto(4, e) <= 2147483646.0_wp .AND. .NOT. (ABS(sto(4, e) - AINT(sto(4, e))) > CD_ZERO))) THEN + WRITE (amsg, '(A,I0,A)') 'the VIV stochastic band centre needs sigma at most 1e3, 0 < c <= 1, an '// & + 'integer N_f from 1 to ', CD_VIV_STO_MAXF, ' and an integer seed from 0 to 2147483646' + CALL fail(ErrStat, ErrMsg, TRIM(amsg)) + RETURN + END IF + END DO + want_sto = ANY(sto(1, :) > CD_ZERO) + END IF CALL clear_viv(model) IF (.NOT. ANY(cl > CD_ZERO)) RETURN IF (.NOT. (CD_Is_Finite(rho) .AND. rho > CD_ZERO)) THEN @@ -4204,6 +4249,8 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, IF (want_frame) nms = CD_VIV_NMS_FRAME ! the step predictor after the motion statistics (viv_pred_row; row 2 on a wake line) IF (.NOT. want_wake) nms = nms + MERGE(2, 1, want_il) + ! the travelled distance of the stochastic band centre last (viv_theta) + IF (want_sto) nms = nms + 1 ALLOCATE (model%viv_cl(n_elem), model%viv_d(n_elem), model%viv_node(n_nodes), model%viv_cf(n_nodes), & model%viv_df(n_nodes), model%viv_dn(n_nodes), model%viv_phi(n_nodes), model%viv_ms(nms, n_nodes), & model%viv_phi_rollback(n_nodes), model%viv_ms_rollback(nms, n_nodes), & @@ -4257,6 +4304,41 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, model%viv_phi(nd) = CD_VIV_Wrap_Phase(CD_VIV_TWO_PI*(REAL(n_nodes - nd, wp)/REAL(n_elem, wp) + 0.5_wp)) IF (PRESENT(phase_seed)) model%viv_phi(nd) = CD_VIV_TWO_PI*phase_seed(nd) END DO + IF (want_sto) THEN + ! per node the length-weighted sigma over its lifting elements, the length-weighted c over + ! those with sigma > 0, their most components and the seed of the first; theta starts at 0 + nfm = NINT(MAXVAL(sto(3, :), MASK=sto(1, :) > CD_ZERO)) + ALLOCATE (model%viv_sto_a(n_nodes), model%viv_sto_f(nfm, n_nodes), model%viv_sto_p(nfm, n_nodes), & + model%viv_sto_n(n_nodes), STAT=istat) + IF (istat /= 0) THEN + CALL clear_viv(model) + CALL alloc_fail(ErrStat, ErrMsg, 'VIV stochastic band centre allocation failed') + RETURN + END IF + model%viv_sto_a = CD_ZERO + model%viv_sto_f = CD_ZERO + model%viv_sto_p = CD_ZERO + model%viv_sto_n = 0 + DO nd = 2, n_nodes - 1 + IF (.NOT. model%viv_node(nd)) CYCLE + wsum = CD_ZERO; ssum = CD_ZERO; csum = CD_ZERO; cw = CD_ZERO; nfk = 0; seedk = -1 + DO k = nd - 1, nd + IF (.NOT. (cl(k) > CD_ZERO)) CYCLE + wsum = wsum + model%l0(k) + ssum = ssum + model%l0(k)*sto(1, k) + IF (.NOT. (sto(1, k) > CD_ZERO)) CYCLE + cw = cw + model%l0(k) + csum = csum + model%l0(k)*sto(2, k) + nfk = MAX(nfk, NINT(sto(3, k))) + IF (seedk < 0) seedk = NINT(sto(4, k)) + END DO + IF (nfk < 1) CYCLE + CALL CD_VIV_Sto_Node(ssum/wsum, csum/cw, model%viv_cf(nd), nfk, seedk, nd, model%viv_sto_a(nd), & + model%viv_sto_f(1:nfk, nd), model%viv_sto_p(1:nfk, nd)) + model%viv_sto_n(nd) = nfk + END DO + model%viv_sto = .TRUE. + END IF IF (want_frame) THEN ALLOCATE (model%viv_ftf(n_nodes), STAT=istat) IF (istat /= 0) THEN @@ -4713,11 +4795,13 @@ PURE INTEGER FUNCTION CD_Model_VIV_NMS(model) RESULT(n) !! CD_VIV_NMS_AMP with amplitude tables (the amplitude estimate after the mean squares) or the !! wake filter (the filtered velocity in rows 3:5), CD_VIV_NMS_FRAME with the flow frame, !! CD_VIV_NMS otherwise; on a synchronisation-model line one more, the step predictor (two - !! with in-line VIV; viv_pred_row). + !! with in-line VIV; viv_pred_row), and one more with a stochastic band centre (viv_theta). TYPE(CD_ModelType), INTENT(IN) :: model n = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp .OR. model%wo_filter) IF (model%viv_frame) n = CD_VIV_NMS_FRAME IF (model%has_viv .AND. .NOT. model%viv_wake) n = n + MERGE(2, 1, model%has_viv_il) + ! the travelled distance of a stochastic band centre last + IF (model%viv_sto) n = n + 1 END FUNCTION CD_Model_VIV_NMS SUBROUTINE CD_Get_Model_VIV_Amplitude(model, amp, ErrStat, ErrMsg) @@ -4821,6 +4905,30 @@ SUBROUTINE viv_node_coef(model, q, nd, coef, uu, coefx, coefh) IF (ALLOCATED(model%fluid_velocity)) uu = model%fluid_velocity(:, nd) END SUBROUTINE viv_node_coef + PURE REAL(wp) FUNCTION viv_theta(model, nd) RESULT(theta) + !! Node nd's travelled non-dimensional distance of the stochastic band centre (the last row of + !! viv_ms; 0 without it). + TYPE(CD_ModelType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: nd + theta = CD_ZERO + IF (model%viv_sto) theta = model%viv_ms(SIZE(model%viv_ms, 1), nd) + END FUNCTION viv_theta + + PURE REAL(wp) FUNCTION viv_centre(model, nd, theta) RESULT(centre) + !! Node nd's band centre: viv_cf(nd), or with a stochastic band centre its process at the + !! travelled distance theta (CD_VIV_Sto_Centre). + TYPE(CD_ModelType), INTENT(IN) :: model + INTEGER, INTENT(IN) :: nd + REAL(wp), INTENT(IN) :: theta + INTEGER :: n + centre = model%viv_cf(nd) + IF (.NOT. model%viv_sto) RETURN + n = model%viv_sto_n(nd) + IF (n < 1) RETURN + centre = CD_VIV_Sto_Centre(model%viv_cf(nd), model%viv_sto_a(nd), model%viv_sto_f(1:n, nd), & + model%viv_sto_p(1:n, nd), theta) + END FUNCTION viv_centre + PURE INTEGER FUNCTION viv_pred_row(model) RESULT(r) !! The row of viv_ms holding the step predictor (CableDyn_VIV): after the motion statistics on a !! synchronisation-model line (the in-line rate in the row after it), row 2 on a wake line. @@ -4866,7 +4974,8 @@ SUBROUTINE viv_seed_predictor(model) CYCLE END IF model%viv_ms(ir, nd) = CD_VIV_Phase_Rate(yd, ydd, CD_ZERO, CD_ZERO, model%viv_phi(nd), un, model%viv_dn(nd), & - model%viv_cf(nd), model%viv_df(nd), phi_rest=model%viv_phi_rest) + viv_centre(model, nd, viv_theta(model, nd)), model%viv_df(nd), & + phi_rest=model%viv_phi_rest) IF (.NOT. model%has_viv_il) CYCLE IF (.NOT. model%vil_node(nd)) CYCLE model%viv_ms(ir + 1, nd) = CD_VIV_Inline_Phase_Rate(xd, xdd, CD_ZERO, CD_ZERO, model%vil_phi(nd), & @@ -4968,7 +5077,7 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: nd, ia, ir, ip REAL(wp) :: wf, wh, yd, ydd, un, coef, uu(3), ms1, ms2, rate_mid, xd, xdd, rate_mid_x, st(4), sw(2), ap - REAL(wp) :: vs0(3), vs1(3), vf(3), qm(9), om + REAL(wp) :: vs0(3), vs1(3), vf(3), qm(9), om, th, dth, cfm LOGICAL :: ok ErrStat = CD_MODEL_OK ErrMsg = '' @@ -5047,6 +5156,16 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) END IF model%viv_ms_next(3:6, nd) = st END IF + ! the stochastic band centre at the mid-point of the travelled distance, which moves on with the + ! step's shedding speed + th = viv_theta(model, nd) + dth = CD_ZERO + IF (model%viv_sto) THEN + dth = dt*un/model%viv_dn(nd) + IF (.NOT. CD_Is_Finite(dth)) dth = CD_ZERO + model%viv_ms_next(SIZE(model%viv_ms, 1), nd) = th + dth + END IF + cfm = viv_centre(model, nd, th + 0.5_wp*dth) ms1 = CD_VIV_Mean_Square(model%viv_ms(1, nd), yd, wh) ms2 = CD_VIV_Mean_Square(model%viv_ms(2, nd), ydd, wh) ! the implicit mid-point rule by one fixed-point pass: the mid-point phase from the predictor, @@ -5054,7 +5173,7 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) rate_mid = model%viv_rate(nd) DO ip = 1, 2 rate_mid = CD_VIV_Phase_Rate(yd, ydd, ms1, ms2, model%viv_phi(nd) + 0.5_wp*dt*rate_mid, un, & - model%viv_dn(nd), model%viv_cf(nd), model%viv_df(nd), phi_rest=model%viv_phi_rest) + model%viv_dn(nd), cfm, model%viv_df(nd), phi_rest=model%viv_phi_rest) END DO model%viv_ms_next(1, nd) = CD_VIV_Mean_Square(model%viv_ms(1, nd), yd, wf) model%viv_ms_next(2, nd) = CD_VIV_Mean_Square(model%viv_ms(2, nd), ydd, wf) @@ -5168,6 +5287,8 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%wo_a)) DEALLOCATE (model%wo_a) IF (ALLOCATED(model%wo_tf)) DEALLOCATE (model%wo_tf) IF (ALLOCATED(model%viv_ftf)) DEALLOCATE (model%viv_ftf) + IF (ALLOCATED(model%viv_sto_a)) DEALLOCATE (model%viv_sto_a, model%viv_sto_f, model%viv_sto_p, model%viv_sto_n) + model%viv_sto = .FALSE. model%viv_frame = .FALSE. model%viv_wake = .FALSE. model%wo_filter = .FALSE. @@ -7942,6 +8063,15 @@ SUBROUTINE CD_Copy_Model(src, dst, ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN CALL copy_real1(src%viv_ftf, work%viv_ftf, 'viv_ftf', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real1(src%viv_sto_a, work%viv_sto_a, 'viv_sto_a', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real2(src%viv_sto_f, work%viv_sto_f, 'viv_sto_f', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_real2(src%viv_sto_p, work%viv_sto_p, 'viv_sto_p', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + CALL copy_int1(src%viv_sto_n, work%viv_sto_n, 'viv_sto_n', ErrStat, ErrMsg) + IF (ErrStat /= CD_MODEL_OK) RETURN + work%viv_sto = src%viv_sto work%wo_filter = src%wo_filter work%viv_frame = src%viv_frame work%has_viv_amp = src%has_viv_amp @@ -8141,6 +8271,11 @@ SUBROUTINE commit_model_copy(from, to) CALL MOVE_ALLOC(from%wo_tf, to%wo_tf) CALL MOVE_ALLOC(from%viv_ftf, to%viv_ftf) to%viv_frame = from%viv_frame + CALL MOVE_ALLOC(from%viv_sto_a, to%viv_sto_a) + CALL MOVE_ALLOC(from%viv_sto_f, to%viv_sto_f) + CALL MOVE_ALLOC(from%viv_sto_p, to%viv_sto_p) + CALL MOVE_ALLOC(from%viv_sto_n, to%viv_sto_n) + to%viv_sto = from%viv_sto to%wo_filter = from%wo_filter to%has_viv_amp = from%has_viv_amp CALL MOVE_ALLOC(from%viv_amp, to%viv_amp) diff --git a/src/CableDyn_VIV.f90 b/src/CableDyn_VIV.f90 index 801bd17c..8183c3a2 100644 --- a/src/CableDyn_VIV.f90 +++ b/src/CableDyn_VIV.f90 @@ -42,11 +42,22 @@ MODULE CableDyn_VIV !! phi_xd the phase of the in-line velocity x' = r'.v_n/U from x', x'' normalised by their !! running RMS values, as phi_y. !! + !! Stochastic synchronisation (Ulveseter, Thorsen, Saevik and Larsen, Mar. Struct. 56, 2017, + !! 260-280, Eq. 6 and Fig. 4): the band centre cF of a node becomes the slowly varying process + !! + !! F0(t) = cF + sum_i a sin(p_i + 2 pi f_i theta(t)), d theta/dt = U/D + !! + !! of N_f components with a flat spectrum up to c cF (f_i = (i - 1/2) c cF/N_f, a = sigma + !! sqrt(2/N_f), so F0 has the standard deviation sigma), each advancing at its non-dimensional + !! frequency times U/D as the shedding phase does, with random start phases p_i of the node + !! (CD_VIV_Sto_Node); the nodes are independent. + !! !! Load convention (CableDyn_Hydro, CD_Cable_Dynamic_Load_Proc): `force` is the external !! load; the Jacobians are residual contributions, -dF/d(node velocity) and !! -dF/d(neighbour positions) through the node tangent. The wetted-fraction factor in C is !! held at its current value in the Jacobians (it moves only for an element that crosses !! the waterline); the residual itself is exact. + USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: INT64 USE CableDyn_Precision, ONLY: wp, CD_ZERO, CD_ONE IMPLICIT NONE PRIVATE @@ -68,6 +79,8 @@ MODULE CableDyn_VIV PUBLIC :: CD_VIV_Table PUBLIC :: CD_VIV_Check_Amp_Table PUBLIC :: CD_VIV_Ambient_Crossflow_Rate + PUBLIC :: CD_VIV_Sto_Node + PUBLIC :: CD_VIV_Sto_Centre !> MoorDyn's running-RMS window in time steps (Line%n_m): each step updates the stored !> mean square as ((n_m - 1) old + new) / n_m. @@ -102,6 +115,10 @@ MODULE CableDyn_VIV REAL(wp), PARAMETER, PUBLIC :: CD_VIV_AMP_KDT = 0.1_wp !> The most rows of one line type's amplitude table. INTEGER, PARAMETER, PUBLIC :: CD_VIV_AMP_MAXP = 32 + !> The most frequency components of the stochastic band centre of a node (CD_VIV_Sto_Node), and + !> the number Ulveseter et al. (2017, Sec. 3) take. + INTEGER, PARAMETER, PUBLIC :: CD_VIV_STO_MAXF = 1000 + INTEGER, PARAMETER, PUBLIC :: CD_VIV_STO_DEFAULT_NF = 100 !> Chord below which a node tangent is undefined (a collapsed pair of neighbours). REAL(wp), PARAMETER :: TINY_CHORD = 1.0e-12_wp @@ -681,6 +698,38 @@ PURE REAL(wp) FUNCTION CD_VIV_Table(x, xs, ys) RESULT(y) y = ys(i - 1) + (ys(i) - ys(i - 1))*(x - xs(i - 1))/(xs(i) - xs(i - 1)) END FUNCTION CD_VIV_Table + PURE SUBROUTINE CD_VIV_Sto_Node(sigma, c, cf, nf, seed, node, a, fhat, p0) + !! The stochastic band centre of a node (Ulveseter et al. 2017, Eq. 6, Fig. 4): nf components of + !! a flat spectrum of variance sigma^2 over (0, c cf], at the mid-points f_i = (i - 1/2) c cf/nf + !! of its nf intervals, each of amplitude a = sigma sqrt(2/nf), with start phases p0 uniform in + !! [0, 2 pi) drawn from a minimal-standard (Park-Miller) stream that the integer seed (0 to + !! 2^31 - 2) and the node number select, so a run repeats its realisation and two nodes + !! differ. fhat and p0 are filled in 1:nf. + REAL(wp), INTENT(IN) :: sigma, c, cf + INTEGER, INTENT(IN) :: nf, seed, node + REAL(wp), INTENT(OUT) :: a, fhat(:), p0(:) + INTEGER(INT64), PARAMETER :: M = 2147483647_INT64, MUL = 48271_INT64 + INTEGER(INT64) :: state + INTEGER :: i + a = sigma*SQRT(2.0_wp/REAL(nf, wp)) + state = MOD(INT(seed, INT64)*69621_INT64 + INT(node, INT64)*16807_INT64 + 1_INT64, M - 1_INT64) + 1_INT64 + DO i = 1, 3 + state = MOD(MUL*state, M) + END DO + DO i = 1, nf + fhat(i) = (REAL(i, wp) - 0.5_wp)*c*cf/REAL(nf, wp) + state = MOD(MUL*state, M) + p0(i) = CD_VIV_TWO_PI*REAL(state - 1_INT64, wp)/REAL(M - 1_INT64, wp) + END DO + END SUBROUTINE CD_VIV_Sto_Node + + PURE REAL(wp) FUNCTION CD_VIV_Sto_Centre(cf, a, fhat, p0, theta) RESULT(centre) + !! The band centre cF + sum_i a sin(p0_i + 2 pi fhat_i theta) at the node's travelled + !! non-dimensional distance theta = integral U/D dt (CD_VIV_Sto_Node). + REAL(wp), INTENT(IN) :: cf, a, fhat(:), p0(:), theta + centre = cf + a*SUM(SIN(p0 + CD_VIV_TWO_PI*theta*fhat)) + END FUNCTION CD_VIV_Sto_Centre + ELEMENTAL REAL(wp) FUNCTION CD_VIV_Wrap_Phase(phi) RESULT(wrapped) !! The phase mapped to [0, 2 pi); the model only uses cos(phi) and sin(. - phi). REAL(wp), INTENT(IN) :: phi diff --git a/tests/test_viv_coupled.f90 b/tests/test_viv_coupled.f90 index 3376c49c..84db44db 100644 --- a/tests/test_viv_coupled.f90 +++ b/tests/test_viv_coupled.f90 @@ -45,6 +45,9 @@ PROGRAM test_viv_coupled !! statistics), with the same restart and rewind checks; !! * the flow frame on the lift alone (VIV FRAME Tf 5 s, no tables): both blocks carry the !! filtered velocity in rows 7-9 of 9 motion statistics (rows 3-6 unused), with the same restart + !! and rewind checks; + !! * a stochastic band centre (VIV STOCHASTIC sigma 0.02, c 0.07, 100 components on both types): + !! both blocks grow by the travelled distance of the centre (1 per node), with the same restart !! and rewind checks. USE CableDyn_Precision, ONLY: wp USE CableDyn_OpenFAST_Aggregate, ONLY: CD_AGG_ModuleType, CD_AGG_Init_From_Deck, CD_AGG_End, CD_AGG_OK, & @@ -66,7 +69,7 @@ PROGRAM test_viv_coupled ! the deck of the restart and rewind cases, and whether its lines carry in-line VIV CHARACTER(32) :: deck_name = 'viv_coupled.dat' LOGICAL :: il_case = .FALSE., wake_case = .FALSE., amp_case = .FALSE., wakef_case = .FALSE., ampf_case = .FALSE. - LOGICAL :: frame_case = .FALSE. + LOGICAL :: frame_case = .FALSE., sto_case = .FALSE. nfail = 0 CALL write_deck('viv_coupled.dat', 0.8_wp) @@ -77,6 +80,7 @@ PROGRAM test_viv_coupled CALL write_deck('viv_coupled_amp.dat', 0.8_wp, amp=.TRUE.) CALL write_deck('viv_coupled_ampf.dat', 0.8_wp, amp=.TRUE., wake_tf='5.0', damp=.TRUE.) CALL write_deck('viv_coupled_frame.dat', 0.8_wp, wake_tf='5.0') + CALL write_deck('viv_coupled_sto.dat', 0.8_wp, sto='0.02 0.07 100 3') CALL case_lockin() CALL case_restart() CALL case_rewind() @@ -112,6 +116,12 @@ PROGRAM test_viv_coupled ampf_case = .TRUE. CALL case_restart() CALL case_rewind() + deck_name = 'viv_coupled_sto.dat' + amp_case = .FALSE. + ampf_case = .FALSE. + sto_case = .TRUE. + CALL case_restart() + CALL case_rewind() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' coupled VIV check(s) failed' ERROR STOP 1 @@ -402,7 +412,7 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) ! per node the phases and mean squares, the further motion statistics and, on a ! synchronisation line, the step predictor (two rows with in-line VIV) ok = ok .AND. nv == (MERGE(6, 3, il_case) + MERGE(4, 0, amp_case .OR. wakef_case) + & - MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case) + & + MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case) + MERGE(1, 0, sto_case) + & MERGE(0, MERGE(2, 1, il_case), wake_case))*(ndof/3) + 1 IF (with_viv .AND. nv > 0) THEN ALLOCATE (buf(nv)) @@ -418,7 +428,7 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) nvc = CD_HFMF_VIVMirrorSize(a%cables(1)) ok = ok .AND. nvc == (MERGE(6, 3, il_case) + MERGE(MERGE(5, 2, wakef_case), 0, wake_case) + & MERGE(4, 0, amp_case) + MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case) + & - MERGE(0, MERGE(2, 1, il_case), wake_case))*a%cables(1)%line%nn + 1 + MERGE(1, 0, sto_case) + MERGE(0, MERGE(2, 1, il_case), wake_case))*a%cables(1)%line%nn + 1 IF (.NOT. with_viv) THEN ! the cable's VIV block as the fresh build has it (the torsion-free cable ends with it) CALL CD_HFMF_PackMirror(b%cables(1), fresh, es, em) @@ -490,7 +500,7 @@ SUBROUTINE response(z, ad, f) IF (n > 1) f = REAL(n - 1, wp)/(t1 - t0) END SUBROUTINE response - SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp, wake_tf, damp) + SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp, wake_tf, damp, sto) !! The EI = 0 riser (line 1) and the finite-EI cable (line 2), 20 m apart across the current; !! VIVrmsWindow 0.25 s unless window is given (0: none), and a deck dtM when dtm is given; !! inline adds the in-line VIV of both types (a VIV section, ClX 0.85); wake gives both types @@ -503,6 +513,8 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp, wa LOGICAL, INTENT(IN), OPTIONAL :: anchor_first, inline, wake, amp, damp ! the VIV FRAME filter time Tf of both types (no section without it) CHARACTER(*), INTENT(IN), OPTIONAL :: wake_tf + ! the VIV STOCHASTIC values (sigma c Nf seed) of both types (no section without them) + CHARACTER(*), INTENT(IN), OPTIONAL :: sto INTEGER :: u LOGICAL :: stock, wo REAL(wp) :: tw @@ -579,6 +591,12 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp, wa WRITE (u, '(A)') 'riser '//wake_tf WRITE (u, '(A)') 'cable '//wake_tf END IF + IF (PRESENT(sto)) THEN + WRITE (u, '(A)') '--------------------- VIV STOCHASTIC ---' + WRITE (u, '(A)') 'TypeName sigma c Nf seed' + WRITE (u, '(A)') 'riser '//sto + WRITE (u, '(A)') 'cable '//sto + END IF WRITE (u, '(A)') '--------------------- OPTIONS ---' WRITE (u, '(A)') '100.0 WtrDpth' WRITE (u, '(A)') '1025.0 rhoW' diff --git a/tests/test_viv_stochastic.f90 b/tests/test_viv_stochastic.f90 new file mode 100644 index 00000000..304e371a --- /dev/null +++ b/tests/test_viv_stochastic.f90 @@ -0,0 +1,284 @@ +! File: tests/test_viv_stochastic.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_stochastic + !! The stochastic band centre of the synchronisation model (VIV STOCHASTIC section; Ulveseter et + !! al. 2017, Eq. 6, Fig. 4): the centre cF of a node becomes cF + sum_i a sin(p_i + 2 pi f_i + !! theta), theta = integral U/D dt, of N_f components of a flat spectrum up to c cF. + !! S1 the process (CD_VIV_Sto_Node, CD_VIV_Sto_Centre) at their NDP values (cF 0.144, sigma 0.016, + !! c 0.07, 100 components) over theta 0-4e6 (about 200 periods of the lowest component) + !! sampled every 5: mean within 0.03 sigma of cF, standard deviation within 3 % of sigma (the + !! components' amplitudes give exactly sigma), excess kurtosis within 0.3 of a Gaussian's 0; + !! no component above c cF; the start phases repeat for the same seed and node and differ + !! between nodes and between seeds; + !! S2 a sigma 0 row is the deck without the section, bit for bit, on the finite-EI cable and on + !! the EI = 0 line (the taut cable of the VIV FRAME gates in a 0.15 m/s current); + !! S3 with sigma 0.02 (c 0.07, 100 components) the run repeats bit for bit, differs from the + !! constant centre and between seeds, and stays locked in (A/D over 50-80 s within 15 % of the + !! constant centre's), on both cores; + !! S4 refusals by name: a row on a type without Cl, on a wake-oscillator type, with c out of + !! (0, 1], with a non-integer Nf and with a seed out of range. + !! The checkpoint restart and rewind with the centre are in test_viv_coupled. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_VIV, ONLY: CD_VIV_Sto_Node, CD_VIV_Sto_Centre + USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp, D = 0.1_wp + REAL(wp), PARAMETER :: TMAX = 80.0_wp, T0 = 50.0_wp + INTEGER :: nfail = 0 + + CALL check_process() + CALL write_current('vsd_current.dat') + CALL check_deck('1.0', 'vsd_fe') + CALL check_deck('0.0', 'vsd_l') + CALL check_refusals() + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: VIV STOCHASTIC gates' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (cond) RETURN + nfail = nfail + 1 + WRITE (*, '(A)') 'FAIL: '//TRIM(label) + END SUBROUTINE require + + SUBROUTINE check_process() + REAL(wp), PARAMETER :: CF = 0.144_wp, SIG = 0.016_wp, C = 0.07_wp + INTEGER, PARAMETER :: NF = 100, NS = 800000 + REAL(wp) :: a, f(NF), p(NF), a2, f2(NF), p2(NF), x, s1, s2, s4, mean, sd, kurt + INTEGER :: k + CALL CD_VIV_Sto_Node(SIG, C, CF, NF, 7, 12, a, f, p) + s1 = 0.0_wp + s2 = 0.0_wp + s4 = 0.0_wp + DO k = 0, NS - 1 + x = CD_VIV_Sto_Centre(CF, a, f, p, 5.0_wp*REAL(k, wp)) - CF + s1 = s1 + x + END DO + mean = s1/REAL(NS, wp) + DO k = 0, NS - 1 + x = CD_VIV_Sto_Centre(CF, a, f, p, 5.0_wp*REAL(k, wp)) - CF - mean + s2 = s2 + x*x + s4 = s4 + x**4 + END DO + sd = SQRT(s2/REAL(NS, wp)) + kurt = (s4/REAL(NS, wp))/(s2/REAL(NS, wp))**2 - 3.0_wp + WRITE (*, '(A,3ES12.4)') 'S1 mean - cF, sd/sigma, excess kurtosis: ', mean, sd/SIG, kurt + CALL require(ABS(mean) <= 0.03_wp*SIG, 'S1: the process has the mean cF') + CALL require(ABS(sd/SIG - 1.0_wp) <= 0.03_wp, 'S1: the process has the standard deviation sigma') + CALL require(ABS(kurt) <= 0.3_wp, 'S1: the process is close to Gaussian') + CALL require(ABS(a*a*REAL(NF, wp)/2.0_wp - SIG*SIG) <= 1.0e-15_wp, 'S1: the amplitudes give sigma^2') + CALL require(MAXVAL(f) < C*CF .AND. MINVAL(f) > 0.0_wp, 'S1: the spectrum lies in (0, c cF]') + CALL require(ALL(p >= 0.0_wp .AND. p < 2.0_wp*PI), 'S1: the start phases lie in [0, 2 pi)') + CALL CD_VIV_Sto_Node(SIG, C, CF, NF, 7, 12, a2, f2, p2) + CALL require(ALL(.NOT. (ABS(p2 - p) > 0.0_wp)), 'S1: the same seed and node repeat the phases') + CALL CD_VIV_Sto_Node(SIG, C, CF, NF, 7, 13, a2, f2, p2) + CALL require(COUNT(.NOT. (ABS(p2 - p) > 0.0_wp)) == 0, 'S1: another node draws other phases') + CALL CD_VIV_Sto_Node(SIG, C, CF, NF, 8, 12, a2, f2, p2) + CALL require(COUNT(.NOT. (ABS(p2 - p) > 0.0_wp)) == 0, 'S1: another seed draws other phases') + END SUBROUTINE check_process + + SUBROUTINE write_current(path) + CHARACTER(*), INTENT(IN) :: path + INTEGER :: u + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') 'MoorDyn v2 water kinematics file' + WRITE (u, '(A)') 'uniform current along y for the VIV STOCHASTIC deck gate' + WRITE (u, '(A)') '--------------------------- WAVES -------------------------------------' + WRITE (u, '(A)') '0 WaveKinMod - type of wave input' + WRITE (u, '(A)') '"" WaveKinFile - file containing wave elevation time series' + WRITE (u, '(A)') '0.000000E+00 dtWave - time step to use in setting up wave kinematics grid (s)' + WRITE (u, '(A)') '0 WaveDir - wave heading (deg)' + WRITE (u, '(A)') '2 - X wave input type' + WRITE (u, '(A)') '-10, 110, 2 - X wave grid point data' + WRITE (u, '(A)') '2 - Y wave input type' + WRITE (u, '(A)') '-10, 10, 2 - Y wave grid point data' + WRITE (u, '(A)') '2 - Z wave input type' + WRITE (u, '(A)') '-100, 0, 2 - Z wave grid point data' + WRITE (u, '(A)') '--------------------------- CURRENT -------------------------------------' + WRITE (u, '(A)') '1 CurrentMod - type of current input' + WRITE (u, '(A)') 'z-depth x-current y-current' + WRITE (u, '(A)') '(m) (m/s) (m/s)' + WRITE (u, '(A)') '0.0 0.0 0.15' + WRITE (u, '(A)') '-100.0 0.0 0.15' + WRITE (u, '(A)') '--------------------- need this line ------------------' + CLOSE (u) + END SUBROUTINE write_current + + SUBROUTINE write_deck(path, ei, tmax_, sto_row, cl, wake) + !! The taut cable of EI ei in the current; sto_row: the VIV STOCHASTIC data row (no section + !! without it); cl the LINE TYPES Cl (default 0.8); wake: a WAKE OSCILLATOR row instead of the lift. + CHARACTER(*), INTENT(IN) :: path, ei + REAL(wp), INTENT(IN) :: tmax_ + CHARACTER(*), INTENT(IN), OPTIONAL :: sto_row, cl + LOGICAL, INTENT(IN), OPTIONAL :: wake + CHARACTER(8) :: cl_col + LOGICAL :: wo + INTEGER :: u + cl_col = '0.8' + IF (PRESENT(cl)) cl_col = cl + wo = .FALSE. + IF (PRESENT(wake)) wo = wake + IF (wo) cl_col = '0.0' + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' + WRITE (u, '(A)') 'VIV STOCHASTIC deck gate: taut cable in a uniform current' + WRITE (u, '(A)') '----------------------- LINE TYPES ------------------------------------------' + WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' + WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//ei//' 1.2 1.0 0.0 0.0 '// & + TRIM(cl_col)//' 0.08 0.18' + WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' + WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' + WRITE (u, '(A)') '1 Coupled 0.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '2 Fixed 100.0 0.0 -50.0 0 0 0 0' + WRITE (u, '(A)') '----------------------- LINES -----------------------------------------------' + WRITE (u, '(A)') 'ID NodeA NodeB Outputs' + WRITE (u, '(A)') '1 1 2 -' + WRITE (u, '(A)') '----------------------- SECTIONS --------------------------------------------' + WRITE (u, '(A)') 'LineID LineType Length NumSegs' + WRITE (u, '(A)') '1 riser 99.900100 50' + IF (wo) THEN + WRITE (u, '(A)') '--------------------- WAKE OSCILLATOR ----------------------------------' + WRITE (u, '(A)') 'TypeName CL0 St eps A' + WRITE (u, '(A)') 'riser 0.3 0.2 0.3 12' + END IF + IF (PRESENT(sto_row)) THEN + WRITE (u, '(A)') '--------------------- VIV STOCHASTIC -----------------------------------' + WRITE (u, '(A)') 'TypeName sigma c Nf seed' + WRITE (u, '(A)') sto_row + END IF + WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' + WRITE (u, '(A)') '0.01 dtM' + WRITE (u, '(A)') '100.0 WtrDpth' + WRITE (u, '(A)') '1025.0 rhoW' + WRITE (u, '(A)') '9.80665 g' + WRITE (u, '(A)') 'vsd_current.dat WaterKin' + WRITE (u, '(A,F8.3,A)') ' ', tmax_, ' TMax' + WRITE (u, '(A)') '---------------------- OUTPUTS -----------------------------------------------' + WRITE (u, '(A)') 'L1N25PZ' + WRITE (u, '(A)') 'END' + WRITE (u, '(A)') '------------------------- need this line --------------------------------------' + CLOSE (u) + END SUBROUTINE write_deck + + SUBROUTINE run(deck, root, ok, msg) + CHARACTER(*), INTENT(IN) :: deck, root + LOGICAL, INTENT(OUT) :: ok + CHARACTER(*), INTENT(OUT) :: msg + LOGICAL :: conv + INTEGER :: es + CALL CD_Run_Deck_Driver(deck, root, conv, es, msg) + ok = es == CD_DECKDRV_OK .AND. conv + END SUBROUTINE run + + REAL(wp) FUNCTION amplitude(root) RESULT(ad) + !! Half the peak-to-peak mid-span cross-flow excursion over D over T0-TMAX (0 without rows). + CHARACTER(*), INTENT(IN) :: root + CHARACTER(1024) :: rec + REAL(wp) :: row(2), zmin, zmax + INTEGER :: u, ios + ad = 0.0_wp + zmin = HUGE(1.0_wp) + zmax = -HUGE(1.0_wp) + OPEN (NEWUNIT=u, FILE=root//'.out', STATUS='OLD', ACTION='READ', IOSTAT=ios) + IF (ios /= 0) RETURN + READ (u, '(A)') rec + READ (u, '(A)') rec + DO + READ (u, '(A)', IOSTAT=ios) rec + IF (ios /= 0) EXIT + IF (LEN_TRIM(rec) == 0) CYCLE + READ (rec, *) row + IF (row(1) < T0) CYCLE + zmin = MIN(zmin, row(2)) + zmax = MAX(zmax, row(2)) + END DO + CLOSE (u) + IF (zmax > zmin) ad = 0.5_wp*(zmax - zmin)/D + END FUNCTION amplitude + + LOGICAL FUNCTION same_file(a, b) RESULT(same) + !! The two text files are the same, line for line. + CHARACTER(*), INTENT(IN) :: a, b + CHARACTER(1024) :: ra, rb + INTEGER :: ua, ub, ia, ib + same = .FALSE. + OPEN (NEWUNIT=ua, FILE=a, STATUS='OLD', ACTION='READ', IOSTAT=ia) + IF (ia /= 0) RETURN + OPEN (NEWUNIT=ub, FILE=b, STATUS='OLD', ACTION='READ', IOSTAT=ib) + IF (ib /= 0) THEN + CLOSE (ua); RETURN + END IF + DO + READ (ua, '(A)', IOSTAT=ia) ra + READ (ub, '(A)', IOSTAT=ib) rb + IF (ia /= 0 .OR. ib /= 0) EXIT + IF (ra /= rb) EXIT + END DO + same = ia /= 0 .AND. ib /= 0 + CLOSE (ua) + CLOSE (ub) + END FUNCTION same_file + + SUBROUTINE check_deck(ei, tag) + !! S2 and S3 on the cable of EI ei. + CHARACTER(*), INTENT(IN) :: ei, tag + LOGICAL :: ok, same + CHARACTER(1024) :: msg + CHARACTER(:), ALLOCATABLE :: lab + REAL(wp) :: ad0, ad1 + lab = ' (EI '//ei//')' + CALL write_deck(tag//'_none.dat', ei, TMAX) + CALL run(tag//'_none.dat', tag//'_none', ok, msg) + CALL require(ok, 'S2: the deck without the section runs'//lab//': '//TRIM(msg)) + CALL write_deck(tag//'_s0.dat', ei, TMAX, sto_row='riser 0 0.07 100 3') + CALL run(tag//'_s0.dat', tag//'_s0', ok, msg) + CALL require(ok, 'S2: the deck with sigma 0 runs'//lab//': '//TRIM(msg)) + CALL require(same_file(tag//'_none.out', tag//'_s0.out'), 'S2: a sigma 0 row is the deck without it, '// & + 'bit for bit'//lab) + CALL write_deck(tag//'_s1.dat', ei, TMAX, sto_row='riser 0.02 0.07 100 3') + CALL run(tag//'_s1.dat', tag//'_s1', ok, msg) + CALL require(ok, 'S3: the deck with sigma 0.02 runs'//lab//': '//TRIM(msg)) + CALL run(tag//'_s1.dat', tag//'_s1b', ok, msg) + same = same_file(tag//'_s1.out', tag//'_s1b.out') + CALL require(ok .AND. same, 'S3: the run repeats bit for bit'//lab) + CALL require(.NOT. same_file(tag//'_none.out', tag//'_s1.out'), 'S3: the centre moves the response'//lab) + CALL write_deck(tag//'_s2.dat', ei, TMAX, sto_row='riser 0.02 0.07 100 4') + CALL run(tag//'_s2.dat', tag//'_s2', ok, msg) + same = same_file(tag//'_s1.out', tag//'_s2.out') + CALL require(ok .AND. .NOT. same, 'S3: another seed, another run'//lab) + ad0 = amplitude(tag//'_none') + ad1 = amplitude(tag//'_s1') + WRITE (*, '(A,2F8.4)') 'S3'//lab//': A/D over 50-80 s with the constant and the stochastic centre ', ad0, ad1 + CALL require(ad0 > 0.2_wp .AND. ABS(ad1/ad0 - 1.0_wp) <= 0.15_wp, 'S3: the cable stays locked in'//lab) + END SUBROUTINE check_deck + + SUBROUTINE refuse(tag, sto_row, want, label, cl, wake) + CHARACTER(*), INTENT(IN) :: tag, sto_row, want, label + CHARACTER(*), INTENT(IN), OPTIONAL :: cl + LOGICAL, INTENT(IN), OPTIONAL :: wake + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck(tag//'.dat', '1.0', 1.0_wp, sto_row=sto_row, cl=cl, wake=wake) + CALL run(tag//'.dat', tag, ok, msg) + WRITE (*, '(A)') 'S4 '//label//': '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, want) > 0, 'S4: '//label//' is refused') + END SUBROUTINE refuse + + SUBROUTINE check_refusals() + CALL refuse('vsd_nocl', 'riser 0.02 0.07', 'give the type LINE TYPES Cl > 0 and no WAKE OSCILLATOR row', & + 'a type without Cl', cl='0.0') + CALL refuse('vsd_wake', 'riser 0.02 0.07', 'give the type LINE TYPES Cl > 0 and no WAKE OSCILLATOR row', & + 'a wake-oscillator type', wake=.TRUE.) + CALL refuse('vsd_c', 'riser 0.02 1.5', '0 < c <= 1', 'c above 1') + CALL refuse('vsd_nf', 'riser 0.02 0.07 10.5', 'Nf must be an integer', 'a non-integer Nf') + CALL refuse('vsd_seed', 'riser 0.02 0.07 100 -1', 'seed must be an integer', 'a negative seed') + END SUBROUTINE check_refusals + +END PROGRAM test_viv_stochastic From 9ab09f7554396d5c8644c6a65b33180a31233237 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Tue, 17 Nov 2026 23:51:48 +0900 Subject: [PATCH 38/47] ci: pull requests run the Debug tier without the slow-labelled tests (#181) The two Debug (-O0) jobs held every pull request for about 2 h 10 min against 30-50 min for the rest of CI. Their purpose is the -O0 fault class (an absent OPTIONAL reached through a non-short-circuited .AND./.OR.), which lives in code the fast tests already reach; most of their time went to the 18 tests labelled slow (the long lazy-wave, mooring and statics campaigns, about 6500 of 21900 CPU-s on the Windows Debug job). A pull request now runs the Debug tier with -LE slow (an estimated 64 min at four tests at once, in step with the Release jobs). The slow tests still run on every pull request in Release on both platforms and on the Prescott kernel, and every push to dev and main runs the full suite at -O0, so each merge stays hardened without holding the PR. Signed-off-by: Jae Hoon Seo --- .github/workflows/fortran.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fortran.yml b/.github/workflows/fortran.yml index 40e46d0f..57c40c79 100644 --- a/.github/workflows/fortran.yml +++ b/.github/workflows/fortran.yml @@ -85,10 +85,22 @@ jobs: # at once, so each runs single-threaded: OpenMP and OpenBLAS would otherwise start a # thread per core in every test and oversubscribe the runner. Tests that check # threading set their own thread counts. + # + # A pull request runs the Debug tier without the tests labelled slow (the long lazy-wave, + # mooring and statics campaigns, about 6500 CPU-s of a 21900 CPU-s Debug suite): the -O0 + # faults this tier exists for live in code the remaining tests reach, and the slow tests + # still run in Release on both platforms and on the Prescott kernel. Every push to dev + # and main runs the full suite at -O0, so each merge is hardened without holding the PR. env: OMP_NUM_THREADS: "1" OPENBLAS_NUM_THREADS: "1" - run: ctest --test-dir build --output-on-failure --parallel 4 + FAST_DEBUG: ${{ matrix.build_type == 'Debug' && github.event_name == 'pull_request' }} + run: | + if [ "$FAST_DEBUG" = "true" ]; then + ctest --test-dir build --output-on-failure --parallel 4 -LE slow + else + ctest --test-dir build --output-on-failure --parallel 4 + fi # Round-off fragility: a result that depends on the BLAS kernel fails here although every # job above, on the runner's own kernel, passes. Prescott, an SSE3 kernel of the conda-forge From a46d9970267d49b704578745f296662c7ca3531d Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Wed, 18 Nov 2026 00:48:59 +0900 Subject: [PATCH 39/47] validation: Southampton untensioned catenary riser VIV with touchdown (L3-K) (#182) Add validation/experiments/chaplin_catenary: the 5.36 m, 56 mm model riser of Chaplin & King (2018), EI 1.3 N m^2, pinned on the floor of a 2 m flume and 0.2 m above the surface, at both mass ratios in current of 0.2-1.4 m/s in both directions, against the measured mean top tension and its standard deviation (Figs. 10, 13), cross-flow spectral peak frequencies (Figs. 9, 15) and straight-part inclination (Fig. 12), read from the article's raster figures by extract_chaplin2018.py (frame and tick calibration, circle Hough markers, error-bar caps, checks on the drawn f d/U = 0.11 and W h lines). Three published coefficient sets, none fitted to these tests, and a run without VIV. Every set gives one frequency along the suspended span in positive current, as measured, at f d/U 0.121 (Ulveseter et al. 2019), 0.138 (generic set) and 0.17 (wake oscillator) against 0.111. The generic set's drag amplification gives the light riser's tension rise (9.8 % r.m.s.; 88.8 against 88.6 N to 1.4 m/s) and the heavy riser's inclination in negative current (5.0 deg r.m.s., implied Cd 2.55 against 2.47). The heavy riser's still-water tension is 37 % above the measured with the article's geometry, reported as a caveat; tensions are also compared as increments. Convergence, structural-damping and floor-friction runs are in the record; the default command reproduces it byte for byte. Update VALIDATION.md, the experiment lists, CHANGELOG.md and the references (ref-chaplin2018). Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 11 + README.md | 5 +- VALIDATION.md | 32 + doc/references.rst | 6 + validation/README.md | 2 +- validation/experiments/README.md | 5 +- .../experiments/chaplin_catenary/README.md | 331 ++++++ .../chaplin_catenary/chaplin_catenary_viv.py | 882 ++++++++++++++ .../chaplin_catenary/extract_chaplin2018.py | 493 ++++++++ .../chaplin_catenary/measured_chaplin2018.csv | 328 ++++++ .../chaplin_catenary/provenance.json | 36 + .../chaplin_catenary/response_comparison.csv | 295 +++++ .../experiments/chaplin_catenary/summary.json | 1013 +++++++++++++++++ 13 files changed, 3434 insertions(+), 5 deletions(-) create mode 100644 validation/experiments/chaplin_catenary/README.md create mode 100644 validation/experiments/chaplin_catenary/chaplin_catenary_viv.py create mode 100644 validation/experiments/chaplin_catenary/extract_chaplin2018.py create mode 100644 validation/experiments/chaplin_catenary/measured_chaplin2018.csv create mode 100644 validation/experiments/chaplin_catenary/provenance.json create mode 100644 validation/experiments/chaplin_catenary/response_comparison.csv create mode 100644 validation/experiments/chaplin_catenary/summary.json diff --git a/CHANGELOG.md b/CHANGELOG.md index b9b55237..294b5370 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -161,6 +161,17 @@ All notable changes to CableDyn are recorded in this file. The format follows U_R,max 4 the wake oscillator gives the measured largest A/D (0.280 against 0.286); at 6.5 and 7.9 every set holds the lock-in while the flow slows, the gap between the paths 2-5 times the measured one and the largest A/D 1.3-2.3 times the measured. +- Validation case L3-K (`validation/experiments/chaplin_catenary`): cross-flow VIV of the + untensioned catenary model riser of Chaplin & King (2018), 5.36 m long with EI 1.3 N m² and + floor touchdown, at both mass ratios in current of 0.2–1.4 m/s in both directions, with three + published coefficient sets none of which is fitted to these tests, against the measured mean + top tension, cross-flow frequencies and straight-part inclination (read from the article's + figures by `extract_chaplin2018.py`). Every set gives the measured single frequency along the + span in positive current, at f d/U 0.121 (Ulveseter et al. 2019), 0.138 (generic set) and + 0.17 (wake oscillator) against 0.111; the generic set's drag amplification gives the light + riser's tension rise (9.8 % r.m.s.) and the heavy riser's inclination in negative current + (5.0° r.m.s.). The heavy riser's still-water tension is 37 % above the measured with the + article's geometry, reported as a caveat of the data. - Theory manual, Published coefficient sets: the VIV coefficient sets of Thorsen et al. (2016, 2017), Ulveseter et al. (2018), Andersen et al. (2024a, b) and Facchinetti et al. (2004), each with its source, its test data and the line-type columns it maps to, and Thorsen et al.'s diff --git a/README.md b/README.md index 00fb2cae..39e876a3 100644 --- a/README.md +++ b/README.md @@ -171,9 +171,10 @@ layout is described in the architecture notes in the repository. ## Validation CableDyn is verified against analytical solutions and compared with MoorDyn, -OrcaFlex, eight published physical experiments (Holcombe lazy-wave, Bergdahl dynamic +OrcaFlex, nine published physical experiments (Holcombe lazy-wave, Bergdahl dynamic chain, Chaplin riser natural frequencies and stepped-current VIV, Wang catenary-riser VIV in -current and heave, NDP high-mode riser VIV, FLOTANT power-cable VIV, oscillatory-flow cylinder VIV), the IEA 15 MW VolturnUS-S reference systems, and coupled OpenFAST runs. Results, +current and heave, NDP high-mode riser VIV, FLOTANT power-cable VIV, oscillatory-flow cylinder VIV, Chaplin & King +untensioned catenary-riser VIV), the IEA 15 MW VolturnUS-S reference systems, and coupled OpenFAST runs. Results, acceptance criteria, and reproduction commands are in the [validation record](https://cabledyn.readthedocs.io/en/latest/validation.html); data and scripts are in [`validation/`](https://cabledyn.readthedocs.io/en/latest/validation.html). diff --git a/VALIDATION.md b/VALIDATION.md index 2702dc15..3b68fed2 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -89,6 +89,7 @@ article's methods, are compared in | **L3-N** | NDP 38 m high-mode riser in uniform flow, 0.3–2.4 m/s (22 tests), cross-flow VIV | measured maximum r.m.s. cross-flow strain, dominant frequency, spatial-mean σ/D | strain r.m.s. log error: Ulveseter et al. (2019) set 0.178, Andersen et al. (2024b) 0.186, generic set 0.277, Thorsen et al. (2016) 0.363 (their own simulation 0.187); f D/U 0.145 / 0.134 / 0.192 / 0.193 vs 0.143 measured | generic set blind; the other sets fitted by their authors to NDP tests (implementation check) | Pass measured | | **L3-F** | FLOTANT OD 48 mm power-cable specimen with a 200 kg clump, tow tests at 0.025–1.0 m/s (40 tests), cross-flow and in-line VIV | measured A/D_rms (σ/OD) at 1/2L, 3/4L and L (de Wilde et al. 2021, App. 3) | CF r.m.s. log error (Ur ≥ 3): Ulveseter et al. (2019) set 0.731, generic set 0.594, wake oscillator 1.208; first peak at 1/2L 0.755 / 0.483 / 0.296 vs 0.776 measured; release Ur 7.06 / 5.89 / 5.30 vs 5.88 | published VIV sets, none fitted to these tests; structure identified from the specimen's in-air and in-water RAOs | Pass measured | | **L3-O** | SJTU 4 m flexible cylinder moved harmonically through still water, KC 178 at U_R,max 4, 6.5 and 7.9, cross-flow VIV | measured A/D on the acceleration and deceleration paths at mid-span (Fu et al. 2014, Figs. 15–17); lock-in shares 17/34/50 % | A/D r.m.s. error: wake oscillator 0.088 / 0.177 / 0.132, generic set 0.138 / 0.339 / 0.345, Ulveseter et al. (2019) set 0.079 / 0.340 / 0.338; largest A/D at U_R,max 4: 0.280 / 0.472 / 0.124 vs 0.286; at 6.5 and 7.9 every set holds the lock-in while the flow slows: mean deceleration-acceleration gap 0.25–0.50 vs 0.09–0.12 measured | published VIV sets, none fitted to these tests; `VIV FRAME` Tf 0.2 s (sensitivity none, 0.1, 0.3 s) | Pass measured | +| **L3-K** | Southampton untensioned catenary riser with high curvature and floor touchdown, two mass ratios, current of 0.2–1.4 m/s in both directions (13 speeds each), cross-flow VIV | measured mean top tension and its standard deviation, cross-flow spectral peak frequencies, inclination of the straight part (Chaplin & King 2018, Figs. 9, 10, 12, 13, 15) | frequency uniform along the span in positive current (26/26 runs generic set, 22 wake oscillator, 20 Ulveseter et al. 2019) at f d/U 0.138 / 0.17 / 0.121 vs 0.111 measured; light-riser tension in positive current r.m.s. 9.8% with drag amplification (generic set), 17.8–24.5% without; heavy-riser straight-part inclination 5.0° r.m.s. (implied C_d 2.55 vs 2.47); still-water top tension 81.2 vs 59.1 N (m* 1.84) | published VIV sets, none fitted to these tests; floor friction and damping assumed, with sensitivity runs | Pass measured | | **L-fig** | Along-arc curvature overlay (CableDyn / OrcaFlex / MoorDyn-F ±4×) | 3-code committed record | CableDyn peak 0.11% from OrcaFlex | <0.5% | Pass | | **L4-1** | Coupled platform + mooring | synthetic reference | bit-for-bit | — | Pass | | **L4-1b** | VolturnUS-S coupled platform + power cable | OpenFAST v5.0.0 (CompMooring 5 vs 3) | platform DOFs <0.6% (3-seed DLC-1.1); fairlead and anchor <0.001% static | <3% platform | Pass | @@ -471,6 +472,37 @@ the tow tests it predicts). Inputs, reduction scripts, results, and source prove 21%, the wake oscillator's by up to 11%. Half the time step and 80 elements change the largest A/D by at most 0.1% (generic set, wake oscillator) and 4.1% (Ulveseter et al. set); the default run reproduces the committed record byte for byte. +- **L3-K Southampton untensioned catenary riser, cross-flow VIV with high curvature and + touchdown** + ([Chaplin & King, 2018](https://cabledyn.readthedocs.io/en/latest/references.html#ref-chaplin2018)): + the 5.36 m, 56 mm riser of very low bending stiffness (EI 1.3 N m²) pinned on the floor of a + 2 m flume and 0.2 m above the surface 4.30 m away, at both mass ratios (2.9 and 20.9 N/m + submerged) in current of 0.2–1.4 m/s in both directions, with floor contact (friction 0.5, + assumed) and 3% Rayleigh damping. The article measures one cross-flow frequency along the + whole riser in positive current, close to f d/U = 0.11 on the speed at the near-vertical top, + so that the local Strouhal number on the normal velocity runs from 0.11 to above 0.3. Three + published VIV sets, none fitted to these tests, and a run without VIV: + - all three give one frequency along the suspended span, the curved lower part included + (within 10% in 26 of 26 positive runs with the generic set, 22 with the wake oscillator of + Facchinetti et al. (2004), 20 with Ulveseter et al.'s (2019) set), at their own level: + f d/U 0.121 for Ulveseter et al.'s set (9% above the measured 0.111), 0.138 for the generic + set and 0.17 for the wake oscillator; + - in negative current the heavy riser's measured frequency stays at 1.05–1.16 Hz from 1.1 m/s; + Ulveseter et al.'s set levels off at 1.45–1.5 Hz (f d/(U sin ψ) 0.130 against 0.119), the + generic set gives 1.45–1.85 Hz and the wake oscillator 2.1–2.45 Hz; + - the mean top tension needs the drag amplification of the generic set (Chaplin et al. 2005, + Eq. 4): the light riser's tension in positive current within 9.8% r.m.s. and a rise to + 1.4 m/s of 88.8 N against 88.6 N measured (49.8 N without VIV, 60.1 and 51.4 N with the two + sets that keep C_d 1.2); the heavy riser's straight-line inclination in negative current + within 5.0° r.m.s., implying C_d 2.55 through the article's Eq. 9 against 2.47 measured. + + With the article's length, span and weights the heavy riser's still-water top tension is + 81.2 N against 59.1 and 61.8 N measured (light 15.1 against 13.4 and 11.5 N), a geometry the + article's numbers do not close, so the tension is also compared as its increment from still + water. Half the time step and twice the elements change the mean tension by at most 5.3% and + 2.9%; without structural damping or floor friction the mean tension moves by up to 15% and + 40% and its standard deviation by up to +296% and +412%. The default run reproduces the + committed record byte for byte. ## L4 coupled OpenFAST diff --git a/doc/references.rst b/doc/references.rst index c11f9a37..3c952ccb 100644 --- a/doc/references.rst +++ b/doc/references.rst @@ -306,6 +306,12 @@ Verification and validation references laboratory measurements of vortex-induced vibrations of a tension riser. *Journal of Fluids and Structures* **21**\ (1), 25–40. https://doi.org/10.1016/j.jfluidstructs.2005.05.016 +.. _ref-chaplin2018: + +- **Chaplin, J. R. & King, R. (2018).** Laboratory measurements of the vortex-induced vibrations + of an untensioned catenary riser with high curvature. *Journal of Fluids and Structures* + **79**, 26–38. https://doi.org/10.1016/j.jfluidstructs.2018.01.008 + .. _ref-trim2005: - **Trim, A. D., Braaten, H., Lie, H. & Tognarelli, M. A. (2005).** Experimental investigation diff --git a/validation/README.md b/validation/README.md index a22b4391..410d55c8 100644 --- a/validation/README.md +++ b/validation/README.md @@ -16,7 +16,7 @@ redistributed. | [`RELEASE_0_1_1.md`](RELEASE_0_1_1.md) | The same for v0.1.1 | | [`RELEASE_0_1_0.md`](RELEASE_0_1_0.md) | The same for v0.1.0 | | [`bodies/`](bodies/README.md) | Rigid-body, rod and shared-anchor cases with MoorDyn-C twins, stored references and pass limits | -| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, Wang et al. (2014) catenary-riser VIV in current and heave, Trim et al. (2005) NDP high-mode riser VIV, de Wilde et al. (2021) FLOTANT power-cable VIV and Fu et al. (2014) oscillatory-flow cylinder VIV comparisons | +| [`experiments/`](experiments/README.md) | Holcombe et al. (2025) static lazy-wave, Bergdahl et al. (2016) dynamic-chain, Chaplin et al. (2005) riser natural-frequency and stepped-current VIV, Wang et al. (2014) catenary-riser VIV in current and heave, Trim et al. (2005) NDP high-mode riser VIV, de Wilde et al. (2021) FLOTANT power-cable VIV, Fu et al. (2014) oscillatory-flow cylinder VIV and Chaplin & King (2018) untensioned catenary-riser VIV comparisons | | [`PERFORMANCE_0_1_0.md`](PERFORMANCE_0_1_0.md) | Wall time of CableDyn 0.1.0, MoorDyn-C and MoorDyn-F at equal accuracy on five mooring, cable, buoy and coupled cases | | [`performance/`](performance/README.md) | Same-host wall-clock records of the L5 cases: the resolved lazy-wave spans, the one-hour VolturnUS-S mooring and the tension-only chain | | [`PAPER_REPRODUCTION.md`](PAPER_REPRODUCTION.md) | Every CableDyn result in the journal article, re-run with the release defaults and in paper mode | diff --git a/validation/experiments/README.md b/validation/experiments/README.md index cc4668dc..8d718652 100644 --- a/validation/experiments/README.md +++ b/validation/experiments/README.md @@ -2,7 +2,7 @@ # Experimental comparisons -This directory lets reviewers reproduce CableDyn's comparisons with seven published physical +This directory lets reviewers reproduce CableDyn's comparisons with eight published physical experiments. Each subdirectory gives the data source, the translation of the published parameters into a CableDyn model, the assessed quantity, the reproduction commands and the committed results. @@ -17,5 +17,6 @@ committed results. | [`ndp_riser/`](ndp_riser/README.md) | Trim et al. (2005), NDP 38 m high-mode riser in uniform flow, cross-flow VIV with a generic and three published coefficient sets | Finite-EI riser, synchronisation VIV | | [`flotant/`](flotant/README.md) | de Wilde et al. (2021), FLOTANT OD 48 mm power-cable specimen with a clump weight, tow tests and forced-oscillation RAOs, cross-flow and in-line VIV with three published coefficient sets | Finite-EI cable, synchronisation and wake-oscillator VIV | | [`fu_oscillatory/`](fu_oscillatory/README.md) | Fu et al. (2014), SJTU 4 m flexible cylinder moved harmonically through still water, cross-flow VIV on the acceleration and deceleration paths with three published coefficient sets | Finite-EI cylinder, synchronisation and wake-oscillator VIV, `VIV FRAME` | +| [`chaplin_catenary/`](chaplin_catenary/README.md) | Chaplin & King (2018), 5.36 m untensioned catenary riser with high curvature and floor touchdown in current of both directions, two mass ratios: mean top tension, cross-flow frequency, inclination, with three published coefficient sets | Finite-EI riser with floor contact, synchronisation and wake-oscillator VIV | -The results are summarised as cases L3-H, L3-B, L3-C, L3-D, L3-W, L3-Wh, L3-N and L3-F in [`VALIDATION.md`](../../VALIDATION.md). +The results are summarised as cases L3-H, L3-B, L3-C, L3-D, L3-W, L3-Wh, L3-N, L3-F and L3-K in [`VALIDATION.md`](../../VALIDATION.md). diff --git a/validation/experiments/chaplin_catenary/README.md b/validation/experiments/chaplin_catenary/README.md new file mode 100644 index 00000000..66e269ca --- /dev/null +++ b/validation/experiments/chaplin_catenary/README.md @@ -0,0 +1,331 @@ + + +# Southampton untensioned catenary riser: VIV with high curvature and touchdown + +This directory compares CableDyn with the tests of Chaplin & King (2018), +: a 5.36 m, 56 mm model riser of very low +bending stiffness, pinned on the floor of a 2 m deep flume and 0.2 m above the surface 4.30 m +away, tensioned only by its weight and the drag, at two mass ratios in currents of 0.2-1.4 m/s in +both directions. Much of it lies on the floor, and the touchdown moves with the flow: a highly +curved, untensioned catenary with touchdown in VIV, the configuration of a free-hanging dynamic +cable near the seabed. Its frequencies test what a local time-domain VIV model does where the +normal velocity varies threefold along the span: the article measures one cross-flow frequency +along the whole riser, close to f = 0.11 U/d with U the flow speed, well below the Strouhal number +of about 0.2 of a stationary cylinder. No model parameter is fitted to these tests. + +In short: + +- **All three VIV models reproduce the uniform frequency along the span** in positive current + (within 10 % over the suspended stations in 26 of 26 runs with the generic set, 22 with the + wake oscillator, 20 with Ulveseter et al.'s set), **but at their own Strouhal number, not at + the measured 0.11:** f d/U 0.121 (Ulveseter et al. 2019, 9 % high), 0.138 (generic set, 24 % + high) and 0.17 (wake oscillator, St 0.2, 53 % high). The frequency follows the flow at the + near-vertical top, as measured, and the lower part follows it. +- **In negative current** the heavy riser's measured frequency stays at 1.05-1.16 Hz from + 1.1 m/s, where the straight part's normal velocity is constant; Ulveseter et al.'s set also + levels off, about 35 % higher at 1.45-1.5 Hz (f d/(U sin ψ) 0.130 against 0.119 measured), the + generic set gives 1.45-1.85 Hz and the wake oscillator 2.1-2.45 Hz. +- **The mean top tension needs the drag amplification:** with it (the generic set) the light + riser's tension in positive current is within 9.8 % r.m.s. and rises by 88.8 N to 1.4 m/s + against 88.6 N measured; with C_d 1.2 it rises by 49.8 N without VIV and by 60.1 and 51.4 N + with the two sets that keep C_d. The same set gives the heavy riser's straight-line inclination + in negative current to 5.0° r.m.s. (the drag coefficient it implies by the article's Eq. 9, + 2.55, against 2.47 measured), and overshoots its tension rise above 1.2 m/s. +- **The still-water tension of the heavy riser is 37 % above the measured one** (81.2 against + 59.1 N; light riser 15.1 against 13.4 N) with the article's length, span and weights, a + geometry the article's numbers do not close; the tension is therefore also compared as the + increment from still water. + +## The tests (Chaplin & King 2018) + +- **Riser (Table 1, Sec. 2):** a 4 mm wire rope through nylon bobbins (30 mm long, 10 mm apart) in + a silicone sheath, d 56 mm, 5.36 m between pinned ends; EI 1.3 N m² and EA 790 kN estimated from + the parts; structural damping about 3 % of critical in air (free decays, hanging vertically); + submerged weight 2.9 N/m (m* 1.12) and 20.9 N/m (m* 1.84, lead plugs; the twelve instrumented + bobbins have none), m* the mass with the internal water over the displaced mass. +- **Set-up:** a recirculating flume, 2.0 m deep; the lower pin on the floor, the upper pin 0.2 m + above the surface and 4.30 m away horizontally. Positive current: the upstream pin on the floor + (the profile concave to the flow); negative: the upstream pin at the surface, obtained in the + laboratory by swapping the pin elevations (Sec. 3). U from 0.2 to 1.4 m/s in 0.05 m/s steps, + Re up to 70 000. +- **Measured:** tension load cells at both ends; twelve 3-axis accelerometers 0.4 m apart; video + of up to three bobbins. The article reports the mean top tension with ±1 standard deviation + (Figs. 10 and 13), spectral peak frequencies of the cross-flow accelerations (Figs. 7-9, 15, 16), + the mean profile and the inclination of the straight part in negative current (Figs. 5, 11, 12), + and no amplitude statistics. +- **Findings the case tests:** in positive current the cross-flow frequency is uniform along the + riser and close to f = 0.11 U/d, U within 3 % of the normal velocity at the near-vertical top + (Fig. 9), so that the local Strouhal number on the normal velocity runs from 0.11 at the top + to above 0.3 lower down (Fig. 8); in negative current the riser takes a straight inclined + profile on which the normal drag balances the normal weight (their Eq. 9; C_d 2.0-2.8 bracket + the measured inclinations), U sin ψ tends to a constant, and the frequency follows + f = 0.13 U sin ψ/d (Fig. 15(b)) except where the response locks in. + +### Caveats of the data + +- **Still-water tension.** With the stated length, span, depth and weights the riser hangs as a + catenary whose top tension is 81.2 N (m* 1.84) and 15.1 N (m* 1.12), with the 0.2 m above the + surface in air. The article's still-water points are 59.1 and 61.8 N (Figs. 10 and 13, the + two rigs) and 13.4 and 11.5 N. A catenary of 5.36 m between the stated pins cannot hang that + slack; the touchdown in Fig. 5 is also further from the floor pin than the model's. A laid part + that is not straight (slack held by the floor friction) or a geometry other than Table 1's would + explain both; the article does not say. The comparison is made on the absolute tension and on + its increment from still water, each figure against its own still-water point. +- **The reference lines W h of Fig. 13** (41.8 and 5.8 N, Table 1's weight times the water + depth) leave out the in-air weight of the part above the surface, m g × 0.2 m, 9.0 and 5.4 N + in the model; the measured tensions in negative current sit on these lines. +- **Frequencies** are spectral peaks of accelerometer signals, which gravity contaminates at the + vibration frequency (Sec. 3); the article shows that the peaks agree with those of video + displacements (Fig. 4). Several peaks are given at some speeds (Fig. 15). +- **Not given:** the accelerometer positions (only the 0.4 m spacing; the profiles of Fig. 5 put + the first 0.5 m from the floor pin), the floor friction, the flume's water density, the spectral + method, and the scatter of the frequencies. + +## Model + +- **Line:** one finite-EI line of 54 elements (0.099 m), End A the upper pin at (4.30, 0, 0.2) m, + End B the lower pin on the floor at (0, 0, -2.0) m, both pinned. d 56 mm, EI 1.3 N m², EA + 790 kN, mass ρA + W/g (2.759 and 4.594 kg/m; Table 1's m* 1.84 gives 4.532 kg/m, 1.4 % less), + the same mass above the surface. Fresh water, 1000 kg/m³ (not stated; m* 1.12 and 2.9 N/m agree + at it). C_d 1.2, C_a 1. +- **Structural damping:** Rayleigh damping (`EI|-zeta|f1|f2`), 3 % at 0.3 and 3.0 Hz, the range of + the measured cross-flow frequencies; run without it as a sensitivity. +- **Floor:** the default penalty contact and a friction coefficient 0.5 (a silicone sheath on the + flume floor; not given). Without friction the laid part slides sideways under the suspended + part's motion; frictionless runs are a sensitivity. +- **Current:** uniform over the depth along the riser's plane, +x positive, -x negative, ramped + linearly from still water over 10 s (a static solve in the full current finds no equilibrium + for some light-riser cases in negative current, where the riser lifts off the floor; every run + starts from the same still-water state). The part above the surface is dry. +- **Runs:** dt 2.5 ms, 110 s, statistics over 30-110 s (80 s); without VIV 40 s, statistics over + 30-40 s. U = 0.2-1.4 m/s in 0.1 m/s steps for both mass ratios and directions (52 runs per set). + +### Coefficient sets + +The sets of the FLOTANT and NDP cases, none fitted to these tests, and a run +without VIV: + +| Set | Source | Values | Fitted to | +| --- | --- | --- | --- | +| `uls19` | Ulveseter et al. (2019), Table 1 | C_l 0.85, f̂0 0.144 ± 0.064; in-line C_x 0.75, α 0.15, C_hh 1.5 | the NDP riser in uniform flow: blind here | +| `b1` | The generic set of the Delta Flume case | C_l 0.8, f̂0 0.18 ± 0.08; in-line C_x 0.85, α 0.15 (Ulveseter et al. 2018, Table 3); `VIV AMPLITUDE` C_v 0.8 with the drag amplification of Chaplin et al. (2005, Eq. 4); `VIV DAMPING` `0 0 1` | nothing from these tests: blind | +| `wake` | Facchinetti et al. (2004) | `WAKE OSCILLATOR` C_L0 0.3, St 0.2, ε 0.3, A 12; cross-flow only | rigid-cylinder data: blind | +| `none` | | no VIV force, C_d 1.2 | | + +Only `b1` amplifies the drag with the response; `uls19` and `wake` keep C_d 1.2, so their mean +tension differs from `none` only by the dynamics. + +### Processing + +- **Tension:** mean and standard deviation of the tension at the upper pin (`FairTen1`); the + measured value of each figure at the same speed; the increment from still water, each against + its own still-water value. +- **Frequency:** the peak of the averaged spectrum (20 s Hann segments, half overlapping, + 0.05 Hz resolution) of the cross-flow (y) displacement within 0.3-6 Hz (the lowest measured + frequency is 0.34 Hz; below it some runs wander slowly sideways), the dominant frequency the + article shows to agree in its acceleration and video-displacement spectra (Fig. 4); the peak + of the same spectrum weighted by ω⁴, the acceleration spectrum, within 0.15-6 Hz, is in + `response_comparison.csv` (`model_f_acc_…`). Compared points, by their mean elevation: the two + dots of the inset of Fig. 9(a) (0.65 and 0.37 of the height between the pins; the mean of the + two) and the dot of Fig. 9(b) (0.19) in positive current, mid-depth (Fig. 15, "around + mid-depth") in negative current. The model's frequency is set against the nearest measured + peak at the same speed and mass ratio (`nearest_measured_…`) and against the median measured + f d/U. The spread along the span is (max - min)/median over the twelve accelerometer stations, + taken 0.48 m from each pin and 0.4 m apart, that are off the floor and under water. +- **Inclination:** of the mean profile to the horizontal at mid-depth; the drag coefficient it + implies by the article's Eq. 9, C_d = 2 W cos ψ / (ρ d U² sin² ψ), for the model and the + measurement, as a comparison only: nothing is fitted to it. + +### Measurements + +`extract_chaplin2018.py` reads the article's PDF (not distributed; PyMuPDF, NumPy, SciPy, Pillow) +into `measured_chaplin2018.csv`. The figures are greyscale raster images: + +- each panel is calibrated on its frame and the tick marks on both opposite sides of it (largest + residual 0.0010 m/s, 0.0036 Hz, 0.07°, 0.14 N); +- the markers are found by a circle Hough transform, classed solid or open by their fill and + snapped to the 0.05 m/s test grid (largest snap 0.012 m/s); peaks off the grid or between the + classes are dropped and listed by the script; the error bars are read from their caps; +- **checks:** the line f d/U = 0.11 drawn in Fig. 9 reads 0.105 and 0.108; the lines W h in + Fig. 13 read 41.9 and 5.65 N against Table 1's 41.8 and 5.8 N; +- **points read:** Fig. 10, 26 open and 24 solid (every marker; 46 standard deviations); Fig. 13, + 25 and 26 (one open marker lost where the series cross; 44 standard deviations); Fig. 12(a), + 20 and 25; Fig. 15(a), 26 and 47; Fig. 9(a), 12 and 40, Fig. 9(b), 22 and 34. Markers hidden + under others are lost, which in Fig. 9(a), where both series and both accelerometers fall on + one line, is most of the open ones; `--check DIR` draws what was read over each figure. + +The data are digitised from the article; its figures are not reproduced. + +## Reproduce + +From the repository root, with `path/to/cabledyn.exe` the release executable or a local build: + +```powershell +python validation/experiments/chaplin_catenary/extract_chaplin2018.py CHAPLIN2018.pdf +python validation/experiments/chaplin_catenary/chaplin_catenary_viv.py ` + path/to/cabledyn.exe validation/experiments/chaplin_catenary/work --jobs 4 ` + --summary validation/experiments/chaplin_catenary +``` + +The default is the committed record: 2 still-water runs, 208 primary runs, 12 convergence runs and +72 sensitivity runs, about an hour with 4 parallel runs. `--runs` selects runs by name; a run +whose folder holds the same input files and executable is not repeated; `--keep` keeps the output +tables (about 110 MB a run). `response_comparison.csv` holds every run, `summary.json` the scores +and the SHA-256 of the executable, `provenance.json` the sources and assumptions. + +## Results + +`response_comparison.csv` holds every run against the measured values at its speed; +`summary.json` the scores below. + +### Still water + +| m* | CableDyn (N) | Measured, Fig. 10 (N) | Measured, Fig. 13 (N) | +| --- | --- | --- | --- | +| 1.12 | 15.1 | 13.4 | 11.5 | +| 1.84 | 81.2 | 59.1 | 61.8 | + +The model's touchdown is 2.18 m (m* 1.84) and 1.99 m (m* 1.12) from the floor pin; Fig. 5 puts +the heavy riser's touchdown at the lowest speeds near 2.6 m (by eye). See the caveats above. + +### Mean top tension + +r.m.s. relative error of the mean tension over the 13 speeds (12 where Fig. 10 has no marker), +r.m.s. error of its increment from still water (N), and the median ratio of the standard +deviations (CableDyn over measured, where the error bar was read): + +| Set | Positive, m* 1.12 | Positive, m* 1.84 | Negative, m* 1.12 | Negative, m* 1.84 | +| --- | --- | --- | --- | --- | +| `none` (C_d 1.2) | 0.245; 19.6 N | 0.135; 18.4 N | 0.365; 11.5 N | 0.385; 22.8 N | +| `uls19` | 0.178; 14.5 N; sd 0.81 | 0.150; 12.2 N; sd 1.14 | 0.322; 6.9 N; sd 1.43 | 0.296; 14.3 N; sd 1.61 | +| `b1` | **0.098; 1.8 N**; sd 0.59 | 0.238; **4.9 N**; sd 0.69 | 0.301; **3.9 N**; sd 1.22 | 0.248; 13.7 N; sd 1.21 | +| `wake` | 0.234; 18.8 N; sd 0.19 | 0.139; 17.7 N; sd 0.42 | 0.351; 10.5 N; sd 0.42 | 0.316; 16.4 N; sd 0.76 | + +Tension at 1.4 m/s (N; the increment from still water in brackets): + +| | Positive, m* 1.12 | Positive, m* 1.84 | Negative, m* 1.12 | Negative, m* 1.84 | +| --- | --- | --- | --- | --- | +| Measured | 102.0 (+88.6) | 154.9 (+95.8) | 58.3 (+46.8) | 49.5 (−12.3) | +| `none` | 64.9 (+49.8) | 145.6 (+64.4) | 39.7 (+24.6) | 41.9 (−39.3) | +| `uls19` | 75.2 (+60.1) | 158.5 (+77.3) | 48.2 (+33.1) | 50.8 (−30.4) | +| `b1` | 103.8 (+88.8) | 188.8 (+107.6) | 70.7 (+55.7) | 68.4 (−12.8) | +| `wake` | 66.5 (+51.4) | 146.4 (+65.2) | 41.5 (+26.4) | 49.7 (−31.5) | + +- **Positive current:** the tension rises with the drag on the suspended part. Only the generic + set, whose drag grows with the response (Chaplin et al. 2005, Eq. 4), follows the light + riser's rise: within 5.6 N at every speed and within 1.8 N from 1.0 m/s (80.2 against + 80.2 N at 1.2 m/s). The sets that keep C_d 1.2 fall 13-36 N short at 1.0-1.4 m/s, close to + the run without VIV: Ulveseter et al.'s response adds 5-10 N to it, the wake oscillator's + 1-2 N. For the heavy riser the still-water offset dominates the absolute error; the generic + set's increment is 12 % above the measured at 1.4 m/s, the others 19-33 % below. +- **Negative current:** the heavy riser's tension falls from the still-water value as the drag + lifts it into a straight line whose top tension the article puts at W h (41.8 N): measured + 59 → 40 N at 0.2-0.65 m/s, then 41-49 N to 1.4 m/s. Every set reproduces the fall, at higher + speeds: the generic set reaches 40 N at 0.7 m/s, Ulveseter et al.'s and the wake oscillator + near 0.9 m/s. Above 1.2 m/s the generic set rises to 68 N where the measured stays below + 50 N. The light riser lifts off the floor entirely from 0.5-0.6 m/s in the model, as measured + (lifted at 0.6 m/s, Sec. 4.2); its tension rise to 1.4 m/s is 55.7 N with the generic set + against 46.8 N measured, 33.1 N with Ulveseter et al.'s. +- **Fluctuation:** the generic set's standard deviation is 0.59-0.69 of the measured in positive + current; Ulveseter et al.'s is 0.81-1.14; the wake oscillator's 0.19-0.42. + +### Cross-flow frequency + +Median f d/U of CableDyn at the points compared and of the measured points read (all speeds), +and the median ratio of CableDyn's frequency to the nearest measured point at the same speed: + +| Set | Positive, upper (Fig. 9(a)) | Positive, lower (Fig. 9(b)) | Negative, mid-depth (Fig. 15(a)) | Uniform along the span (positive / negative runs) | +| --- | --- | --- | --- | --- | +| Measured, m* 1.12 / 1.84 | 0.111 / 0.113 | 0.090 / 0.102 | 0.064 / 0.061 | uniform (Fig. 7) | +| `uls19` | 0.121; ratio 1.11 / 1.07 | 0.121; 1.37 / 1.08 | 0.090 / 0.103; 1.47 / 1.32 | 20 of 26 / 12 of 26 | +| `b1` | 0.138; 1.24 / 1.25 | 0.138; 1.52 / 1.28 | 0.128 / 0.098; 1.84 / 1.45 | 26 of 26 / 15 of 26 | +| `wake` | 0.173 / 0.168; 1.31 / 1.40 | 0.168; 1.83 / 1.47 | 0.074 / 0.128; 0.98 / 2.03 | 22 of 26 / 22 of 26 | + +Uniform: the spread of the frequency over the suspended stations under water within 10 % of its +median. + +- **Positive current: one frequency along the span.** In every set the cross-flow response of + the whole suspended span, the curved and nearly horizontal lower part included, is at one + frequency set by the flow at the near-vertical top; the local normal velocity there is within + 3 % of U, and further down the same frequency means a local f d/(U sin ψ) rising towards the + touchdown, as Fig. 8 measures. The lower part does not respond at the frequency of its own + normal velocity: its synchronisation or wake follows the motion the span imposes on it. The + level is each model's own: Ulveseter et al.'s set, whose band is centred at 0.144, settles at + 0.121, 9 % above the measured 0.11 (7 of 12 heavy-riser speeds within 10 % of a measured + peak); the generic set (centre 0.18) at 0.138; the wake oscillator at its Strouhal number, + 0.17. +- **Not reproduced in positive current:** the heavy riser's second branch at the lower + accelerometer, 0.67-0.83 Hz at 0.6-1.0 m/s (about half the dominant frequency, Fig. 9(b)), + and the light riser's frequency at the same point levelling at 1.57-1.81 Hz from 0.9 m/s; + CableDyn keeps the dominant frequency there. +- **Negative current, heavy riser:** the measured frequency at mid-depth rises to about 1.05 Hz + at 0.5-0.6 m/s, dips (the article attributes it to lock-in while the touchdown moves) and + stays at 1.05-1.16 Hz from 1.1 m/s, where U sin ψ is constant. Ulveseter et al.'s set has the + same plateau at 1.45-1.5 Hz from 1.0 m/s, f d/(U sin ψ) 0.130 on the model's own inclination + (measured 0.119 on the measured one, the article's line 0.13); the generic set 1.45-1.85 Hz; + the wake oscillator 2.1-2.45 Hz. +- **Negative current, light riser:** the measured spectra have a low branch at 0.34-0.45 Hz to + 0.85 m/s and a branch rising from 0.5 Hz at 0.6 m/s to 1.75 Hz at 1.3 m/s, which the article + attributes to lock-in under the rising tension; Ulveseter et al.'s and the generic set have + 0.5-0.85 Hz to 0.8 m/s and then mostly 2.2-3.6 Hz at mid-depth, above the measured branch; the + wake oscillator stays at 0.9-1.15 Hz. +- **Slow sideways wandering:** with Ulveseter et al.'s set the light riser at 0.4-0.5 m/s, where + it lifts off the floor, and the heavy riser at 1.0-1.3 m/s in negative current drift sideways + at under 0.3 Hz (A/D_rms 2-7.3 with the drift, 0.5-0.7 without); the article does not report + it. +- **The acceleration spectrum** (`model_f_acc_…`), the article's measured quantity, peaks at a + higher harmonic of the displacement's peak in 2-5 of the 13 runs of a point with Ulveseter et + al.'s set (its higher-harmonic force, C_hh 1.5) and in 8 of 13 with the wake oscillator in + light negative current, at most 2 with the generic set; the measured acceleration spectra + peak where the displacement's do (Fig. 4). + +### Inclination of the straight part in negative current + +r.m.s. difference of the inclination at mid-depth from Fig. 12(a), and the median drag +coefficient the inclination implies by Eq. 9 (measured: 1.84 for m* 1.12 and 2.47 for m* 1.84): + +| Set | m* 1.12 | m* 1.84 | +| --- | --- | --- | +| `none` (C_d 1.2) | 18.6°; C_d 0.80 | 10.1°; C_d 1.33 | +| `uls19` | 15.0°; 0.90 | 10.1°; 1.36 | +| `b1` | 14.7°; 0.94 | **5.0°; 2.55** | +| `wake` | 15.7°; 0.92 | 10.3°; 1.36 | + +- For the heavy riser the generic set's drag amplification gives the measured inclination and + drag: the article's C_d 2.0-2.8 follows from the response, not from an input. The sets with + C_d 1.2 differ by 10° r.m.s., steeper at the higher speeds (34° against 25° at 1.2 m/s). +- The light riser's model inclination at mid-depth is not a tension-free straight line: the run + without VIV, C_d 1.2 by input, reads 0.80 through Eq. 9. Its comparison is a profile check, + not a drag check; every set differs by 15-19° r.m.s., steeper on average. + +### Sensitivity and convergence + +- **Convergence** (`uls19`, `b1`, `wake` at m* 1.84, +0.8 m/s and m* 1.12, −1.2 m/s): half the + time step changes the mean tension by at most 0.6 % except one run (+5.3 %, `b1`, light, + −1.2 m/s, whose frequency moves by −11 %); the standard deviation by at most 5.5 % and the + largest A/D_rms by at most 7.9 %. Twice the elements change the mean + tension by at most 2.9 %, its standard deviation by at most 17 % (`uls19`, light, −1.2 m/s) + and the frequency by at most one bin. +- **Without structural damping** (36 runs at 0.4, 0.8 and 1.2 m/s): the mean tension changes by + −1.3 to +15.5 % (above 5 % in five runs, all in negative current); the standard deviation of + the tension by up to +296 % (the wake oscillator, light, +0.8 m/s), so the 3 % damping + matters for the fluctuation and not for the mean; 12 of the 54 compared frequencies change. +- **Frictionless floor** (36 runs): the mean tension changes by −3 to +40 % (above 5 % in five + runs, the largest the wake oscillator, light, −0.4 m/s, where the riser lifts off); the + standard deviation by up to +412 %, the laid part sliding sideways; 34 of the 54 frequencies + change, by −15 % to +150 %. The friction coefficient, not given, is the largest modelling + uncertainty of the case after the still-water geometry. +- The default command, run into a new work directory, reproduces `response_comparison.csv` and + `summary.json` byte for byte. + +## Limitations + +- The still-water top tension of the heavy riser is not reproduced (+37 %), so the absolute + tension carries that offset; the article's numbers do not close the geometry. +- The frequencies are read from raster figures in which many markers overlap: in Fig. 9(a) most + of the light riser's points are hidden (12 read), and the accelerometer positions are assumed. +- The floor friction and the representation of the 3 % structural damping are assumptions, and + the tension fluctuation depends on both. +- The current is uniform to the floor; the flume's boundary layer is not modelled, and the laid + part sees the full current. +- One 80 s record per speed; the article does not give the scatter of its frequencies. diff --git a/validation/experiments/chaplin_catenary/chaplin_catenary_viv.py b/validation/experiments/chaplin_catenary/chaplin_catenary_viv.py new file mode 100644 index 00000000..8088e888 --- /dev/null +++ b/validation/experiments/chaplin_catenary/chaplin_catenary_viv.py @@ -0,0 +1,882 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""VIV of the Southampton untensioned catenary model riser with high curvature in steady current. + +The tests of Chaplin & King (2018): a 5.36 m, 56 mm riser of very low bending stiffness, pinned +on the floor of a 2 m deep flume and 0.2 m above the surface 4.30 m away, tensioned only by its +weight and the drag, at two mass ratios (submerged weight 2.9 and 20.9 N/m) in currents up to +1.4 m/s in both directions: positive with the upstream end on the floor, negative with it at +the surface. Writes a deck per run, runs them in parallel (a run whose folder holds the same +input files and executable is reused) and compares with the measurements of the article (read +by extract_chaplin2018.py): + the mean top tension and its standard deviation against U (Figs. 10 and 13); + the dominant cross-flow frequency against U (Fig. 9, positive; Fig. 15(a), negative) and its + spread along the suspended span (uniform in the tests); + the inclination of the straight part in negative current (Fig. 12(a)) and the drag + coefficient it implies by the article's Eq. 9, as a comparison only; +for three published VIV coefficient sets and without VIV (C_d 1.2). + +The default runs are the committed record: every set at U = 0.2-1.4 m/s in steps of 0.1 m/s for +both mass ratios and directions, the still-water runs, and the convergence runs and the runs +without structural damping and without floor friction (README). + + python chaplin_catenary_viv.py path/to/cabledyn.exe WORKDIR [--runs NAME,...] [--jobs N] + [--keep] [--summary DIR] + +Sources: + J.R. Chaplin, R. King (2018), Laboratory measurements of the vortex-induced vibrations of an + untensioned catenary riser with high curvature, Journal of Fluids and Structures 79, 26-38, + https://doi.org/10.1016/j.jfluidstructs.2018.01.008 (Table 1; Secs. 2-4; Eqs. 9-10; + Figs. 9, 10, 12, 13 and 15) + J.V. Ulveseter, M.J. Thorsen, S. Saevik, C.M. Larsen (2019), Simulating fundamental and higher + harmonic VIV of slender structures, Applied Ocean Research 90, 101856, + https://doi.org/10.1016/j.apor.2019.101856 (Table 1) + J.V. Ulveseter, M.J. Thorsen, S. Saevik, C.M. Larsen (2018), Time domain simulation of riser + VIV in current and irregular waves, Marine Structures 60, 241-260, + https://doi.org/10.1016/j.marstruc.2018.04.001 (Table 3) + J.R. Chaplin, P.W. Bearman, F.J. Huera Huarte, R.J. Pattenden (2005), Laboratory measurements + of vortex-induced vibrations of a vertical tension riser in a stepped current, Journal of + Fluids and Structures 21(1), 3-24, https://doi.org/10.1016/j.jfluidstructs.2005.04.010 (Eq. 4) + M.L. Facchinetti, E. de Langre, F. Biolley (2004), Coupling of structure and wake oscillators + in vortex-induced vibrations, Journal of Fluids and Structures 19(2), 123-140, + https://doi.org/10.1016/j.jfluidstructs.2003.12.004 +""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import json +import math +import os +import shutil +import subprocess +from concurrent.futures import ThreadPoolExecutor +from pathlib import Path + +import numpy as np + +HERE = Path(__file__).resolve().parent +GRAVITY = 9.80665 # m/s^2 +RHO = 1000.0 # kg/m^3: fresh water (not stated; Table 1's W and m* agree at 1000 for m* 1.12) +# Chaplin & King (2018), Table 1 +LENGTH = 5.36 # m, between the pin ends +DIAMETER = 0.056 # m +EI = 1.3 # N m^2, estimated +EA = 7.9e5 # N, estimated +ZETA = 0.03 # structural damping in air, "about 3 % of critical" +WEIGHT = {"1.12": 2.9, "1.84": 20.9} # N/m submerged, by mass ratio m* +DEPTH = 2.0 # m, the lower pin on the floor +TOP = 0.2 # m, the upper pin above the surface +SPAN = 4.30 # m, horizontal distance between the pins +CD, CA = 1.2, 1.0 +FRICTION = ( + 0.5 # floor friction coefficient (not given: a silicone sheath on the flume floor) +) +SEGMENTS, DT = 54, 0.0025 # about 0.1 m elements +# The current is ramped up linearly from still water over RAMP s: a static solve in the full +# current finds no equilibrium for some light-riser cases in negative current, where the riser +# lifts off the floor, so every run starts from the same still-water state. +RAMP = 10.0 # s +TMAX, T0 = 110.0, 30.0 # s: run length, statistics from T0 +TMAX_NONE, T0_NONE = 40.0, 30.0 # s: the runs without VIV settle to a steady state +WELCH = 20.0 # s, the segment of the averaged spectra (0.05 Hz resolution) +# Hz, where the dominant cross-flow frequency is sought: in the displacement spectrum from 0.3 Hz +# (below the lowest measured frequency, 0.35 Hz; a light riser lifted in negative current also +# wanders slowly sideways), in the acceleration spectrum from 0.15 Hz +BAND = {0: (0.3, 6.0), 4: (0.15, 6.0)} +SPEEDS = [round(0.1 * k, 1) for k in range(2, 15)] # m/s +DIRECTIONS = {"pos": 1.0, "neg": -1.0} +# Rayleigh damping 3 % at the ends of the band of the measured cross-flow frequencies +RAYLEIGH = (0.3, 3.0) # Hz +# The points compared with the measured frequencies, by their mean elevation [m]: the dots of +# the insets of Fig. 9 (two near the top, (a); one low down, (b)), at their share of the height +# between the pins (0.65 and 0.37; 0.19), and mid-depth for Fig. 15 ("around mid-depth"). +PROBES = { + "upper_a": -DEPTH + 0.65 * (DEPTH + TOP), + "upper_b": -DEPTH + 0.37 * (DEPTH + TOP), + "lower": -DEPTH + 0.19 * (DEPTH + TOP), + "mid_depth": -0.5 * DEPTH, +} +ANALYSIS = "2" # part of the reuse key: bump when an analysis changes + + +def chaplin_amplification(ad: float) -> float: + """Chaplin et al. (2005, Eq. 4): Cd/Cd0 = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2).""" + s = ad / math.sqrt(2.0) + return 1.0 + 2.3 * s + 1.7 * s * s + + +# The coefficient sets of the FLOTANT, NDP and V701 cases: LINE TYPES Cl dF cF; VIV row (ClX, +# alpha, Chh); VIV AMPLITUDE with Chaplin's drag amplification; VIV DAMPING (a, b, c); WAKE +# OSCILLATOR (CL0, St, eps, A). none: no VIV, C_d 1.2. +SETS: dict[str, dict] = { + "uls19": { + "label": "Ulveseter et al. (2019), Table 1, Chh 1.5", + "cl": (0.85, 0.064, 0.144), + "viv": (0.75, 0.15, 1.5), + "amp": False, + "damping": None, + "wake": None, + }, + "b1": { + "label": "generic set (Delta Flume case)", + "cl": (0.8, 0.08, 0.18), + "viv": (0.85, 0.15, None), + "amp": True, + "damping": (0, 0, 1), + "wake": None, + }, + "wake": { + "label": "Facchinetti et al. (2004) wake oscillator", + "cl": (0, 0.08, 0.18), + "viv": None, + "amp": False, + "damping": None, + "wake": (0.3, 0.2, 0.3, 12), + }, + "none": { + "label": "no VIV, C_d 1.2", + "cl": (0, 0.08, 0.18), + "viv": None, + "amp": False, + "damping": None, + "wake": None, + }, +} + + +def viv_sections(hset: str) -> str: + s = SETS[hset] + text = "" + if s["viv"]: + clx, alpha, chh = s["viv"] + cols, vals = "ClX alpha", f"{clx} {alpha}" + if chh is not None: + cols, vals = cols + " Chh", vals + f" {chh}" + text += ( + "--------------------- VIV ----------------------------------------------\n" + f"TypeName {cols}\n(-){' (-)' * len(cols.split())}\nriser {vals}\n" + ) + if s["amp"]: + text += ( + "--------------------- VIV AMPLITUDE ------------------------------------\n" + "TypeName AD Cv CdAmp\n(-) (-) (-) (-)\n" + + "".join( + f"riser {0.1 * k:.2f} {s['cl'][0]} {chaplin_amplification(0.1 * k):.5f}\n" + for k in range(16) + ) + ) + if s["damping"]: + a, b, c = s["damping"] + text += ( + "--------------------- VIV DAMPING ------------------------------------\n" + f"TypeName a b c\n(-) (-) (-) (-)\nriser {a} {b} {c}\n" + ) + if s["wake"]: + text += ( + "--------------------- WAKE OSCILLATOR ----------------------------------\n" + "TypeName CL0 St eps A\n(-) (-) (-) (-) (-)\n" + f"riser {' '.join(f'{v:g}' for v in s['wake'])}\n" + ) + return text + + +def mass(mstar: str) -> float: + """Mass per metre with the internal water, from the submerged weight of Table 1.""" + return RHO * math.pi * DIAMETER**2 / 4.0 + WEIGHT[mstar] / GRAVITY + + +def deck_files( + hset: str, + mstar: str, + direction: str, + u: float, + segments: int, + dt: float, + damping: bool, + friction: float = FRICTION, +) -> dict[str, str]: + """The deck: End A the upper pin, End B the lower pin on the floor at x = 0; the current + along +x (positive: the upstream end on the floor) or -x (negative).""" + ux = DIRECTIONS[direction] * u + cl = " ".join(f"{v:g}" for v in SETS[hset]["cl"]) + ei = f"{EI}|-{ZETA}|{RAYLEIGH[0]}|{RAYLEIGH[1]}" if damping else f"{EI}" + outs = ["FairTen1"] + [f"L1N{j}p{c}" for j in range(1, segments + 2) for c in "xyz"] + tmax = TMAX_NONE if hset == "none" else TMAX + deck = f"""--------------------- CableDyn Input File --------------------------------- +Chaplin & King (2018) catenary riser, m* {mstar}, U {ux:+.2f} m/s, set {hset} +----------------------- LINE TYPES ------------------------------------------ +TypeName Diam Mass EA BA EI Cd_n Cd_t Ca_n Ca_t Cl dF cF +(-) (m) (kg/m) (N) (N-s) (N-m^2) (-) (-) (-) (-) (-) (-) (-) +riser {DIAMETER} {mass(mstar):.6f} {EA:.6e} 0.0 {ei} {CD} 0.0 {CA} 0.0 {cl} +----------------------- POINTS ---------------------------------------------- +ID Attachment X Y Z M V CdA CA +(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-) +1 Coupled {SPAN} 0.0 {TOP} 0 0 0 0 +2 Fixed 0.0 0.0 {-DEPTH} 0 0 0 0 +----------------------- LINES ----------------------------------------------- +ID LineType AttachA AttachB UnstrLen NumSegs Outputs +(-) (-) (-) (-) (m) (-) (-) +1 riser 1 2 {LENGTH} {segments} - +{viv_sections(hset)}---------------------- OPTIONS ---------------------------------------------- +{RHO} rhoW +{GRAVITY} g +{DEPTH} WtrDpth +{friction:g} frictionMu +{dt:.6f} dtM +{tmax:.6f} TMax +2 Currents +---------------------- OUTPUTS ----------------------------------------------- +{chr(10).join(outs)} +END +------------------------- need this line -------------------------------------- +""" + # a depth profile in time (Currents 2): uniform over the depth, zero at t = 0, U from RAMP + # on; the last row past the end of the run (the table repeats past its last sample) + profile = ( + "Chaplin & King (2018) flume current\n" + "uniform over the depth, ramped from still water\n\n" + "depths (m)\n" + f"{-DEPTH - 0.5:.2f} 0.00\n" + "t (s), ux at each depth (m/s)\n" + + "".join( + f"{t:g} {v:.4f} {v:.4f}\n" + for t, v in ( + (0.0, 0.0), + (RAMP, ux), + (RAMP * math.ceil(tmax / RAMP + 1.0), ux), + ) + ) + ) + return {"ck.dat": deck, "current_profile_dynamic.txt": profile} + + +def read_output(out: Path) -> tuple[list[str], np.ndarray]: + with open(out, encoding="utf-8") as fh: + fh.readline() + head = fh.readline().split() + fh.readline() + a = np.loadtxt(fh) + return head, a + + +def stations() -> list[float]: + """Arc lengths from the upper pin of the twelve accelerometers: 0.4 m apart (Sec. 2), taken + as centred on the line (0.48 m from each pin; the article gives no positions).""" + first = 0.5 * (LENGTH - 11 * 0.4) + return [first + 0.4 * k for k in range(12)] + + +def peak_frequency(y: np.ndarray, dt: float, power: int) -> float: + """The peak of the averaged spectrum (Hann segments of WELCH s, half overlapping) of y, + weighted by omega^power (4: the acceleration spectrum of a displacement), within its BAND.""" + n = int(round(WELCH / dt)) + win = np.hanning(n) + f = np.fft.rfftfreq(n, dt) + sp = np.zeros(len(f)) + for k in range(0, len(y) - n + 1, n // 2): + seg = y[k : k + n] - y[k : k + n].mean() + sp += np.abs(np.fft.rfft(seg * win)) ** 2 + sp *= (2.0 * np.pi * f) ** power + lo, hi = BAND[power] + m = (f >= lo) & (f <= hi) + return float(f[m][np.argmax(sp[m])]) + + +def highpassed_rms(y: np.ndarray, dt: float) -> float: + """r.m.s. of y above the lower edge of the displacement BAND (the vibration without the + slow sideways wandering).""" + f = np.fft.rfftfreq(len(y), dt) + sp = np.fft.rfft(y - y.mean()) + sp[f < BAND[0][0]] = 0.0 + return float(np.fft.irfft(sp, len(y)).std()) + + +def analyse(out: Path, hset: str, direction: str, u: float, segments: int) -> dict: + """Mean and standard deviation of the top tension; the mean profile; at each accelerometer + station and probe the cross-flow A/D_rms (all of it and above 0.3 Hz) and the peak + frequencies of its displacement and acceleration spectra; the inclination of the mean + profile at mid-depth.""" + head, a = read_output(out) + t = a[:, 0] + dt = float(t[1] - t[0]) + t0 = T0 if hset != "none" else T0_NONE + k = t > t0 + 1e-9 + nodes = range(1, segments + 2) + col = {h: i for i, h in enumerate(head)} + ten = a[k, col["FairTen1"]] + xm = np.array([a[k, col[f"L1N{j}px"]].mean() for j in nodes]) + zm = np.array([a[k, col[f"L1N{j}pz"]].mean() for j in nodes]) + s0 = np.linspace(0.0, LENGTH, segments + 1) # unstretched arc length of each node + grounded = zm < -DEPTH + 0.01 + res: dict = { + "mean_top_tension_N": float(ten.mean()), + "sd_top_tension_N": float(ten.std()), + "suspended_length_m": float(s0[~grounded].max()) if (~grounded).any() else 0.0, + "touchdown_x_m": float(xm[~grounded][-1]) if grounded.any() else None, + } + # inclination of the mean profile to the horizontal at mid-depth (z = -DEPTH/2) + j = int(np.argmin(np.abs(zm + 0.5 * DEPTH))) + dz = zm[j - 1] - zm[j + 1] + dx = abs(xm[j - 1] - xm[j + 1]) + res["psi_mid_depth_deg"] = float(math.degrees(math.atan2(abs(dz), dx))) + res["x_mid_depth_m"] = float(xm[j]) + st = [] + for s in stations(): + n = int(round(s / LENGTH * segments)) + 1 + y = a[k, col[f"L1N{n}py"]] + row = { + "s_m": round(s, 3), + "node": n, + "x_m": float(xm[n - 1]), + "z_m": float(zm[n - 1]), + "suspended": bool(not grounded[n - 1]), + "AD_rms": float(y.std() / DIAMETER), + "AD_rms_above_0p3hz": highpassed_rms(y, dt) / DIAMETER, + } + if hset != "none": + row["f_acc_hz"] = peak_frequency(y, dt, 4) + row["f_disp_hz"] = peak_frequency(y, dt, 0) + st.append(row) + res["stations"] = st + for name, zp in PROBES.items(): + free = np.where(~grounded)[0] + n = int(free[np.argmin(np.abs(zm[free] - zp))]) + 1 + y = a[k, col[f"L1N{n}py"]] + p = {"node": n, "x_m": float(xm[n - 1]), "z_m": float(zm[n - 1])} + p["AD_rms"] = float(y.std() / DIAMETER) + p["AD_rms_above_0p3hz"] = highpassed_rms(y, dt) / DIAMETER + if hset != "none": + p["f_acc_hz"] = peak_frequency(y, dt, 4) + p["f_disp_hz"] = peak_frequency(y, dt, 0) + res[name] = p + res["frequency_resolution_hz"] = 1.0 / WELCH + res["steps"] = int(len(t)) + return res + + +def run_case( + exe: Path, folder: Path, files: dict, analyse_fn, key: str, keep: bool, sha: str +) -> dict: + """Write the deck, run it and analyse it. A folder that holds the same input files run by + the same executable is not run again: its result is reused when the analysis key is also + the same, and its output is analysed again if it was kept.""" + folder.mkdir(parents=True, exist_ok=True) + result, out, ran = ( + folder / "result.json", + folder / "ck.out", + folder / "executable_sha256.txt", + ) + same = all( + (folder / n).is_file() and (folder / n).read_text(encoding="utf-8") == v + for n, v in files.items() + ) + if same and result.is_file(): + old = json.loads(result.read_text(encoding="utf-8")) + if old.pop("reuse_key", None) == f"{sha}:{key}": + return old + if not ( + same and out.is_file() and ran.is_file() and ran.read_text().strip() == sha + ): + # A run that fails or is interrupted must not leave the previous model's result next + # to the new inputs, where the next attempt would reuse it. + result.unlink(missing_ok=True) + ran.unlink(missing_ok=True) + out.unlink(missing_ok=True) + for n, v in files.items(): + (folder / n).write_text(v, encoding="utf-8", newline="\n") + proc = subprocess.run( + [str(exe), "ck.dat", "ck"], + cwd=folder, + capture_output=True, + text=True, + encoding="utf-8", + errors="replace", + env=dict(os.environ, OMP_NUM_THREADS="1"), + check=False, + ) + (folder / "console.txt").write_text(proc.stdout + proc.stderr, encoding="utf-8") + if proc.returncode != 0: + raise SystemExit(f"{folder}: CableDyn exited with {proc.returncode}") + ran.write_text(sha + "\n", encoding="utf-8") + res = analyse_fn(out) + result.write_text( + json.dumps({**res, "reuse_key": f"{sha}:{key}"}, indent=1) + "\n", + encoding="utf-8", + ) + if not keep: + out.unlink() + return res + + +# name -> (set, m*, direction, U, role, segments, dt, structural damping, floor friction) +RUNS: dict[str, tuple] = {} +for _m in WEIGHT: + RUNS[f"none_m{_m}_still"] = ( + "none", + _m, + "pos", + 0.0, + "still water", + SEGMENTS, + DT, + True, + FRICTION, + ) +for _s in SETS: + for _m in WEIGHT: + for _d in DIRECTIONS: + for _u in SPEEDS: + RUNS[f"{_s}_m{_m}_{_d}{_u:g}"] = ( + _s, + _m, + _d, + _u, + "primary", + SEGMENTS, + DT, + True, + FRICTION, + ) +CONVERGENCE = (("1.84", "pos", 0.8), ("1.12", "neg", 1.2)) +for _s in ("uls19", "b1", "wake"): + for _m, _d, _u in CONVERGENCE: + _base = f"{_s}_m{_m}_{_d}{_u:g}" + RUNS[_base + "_dt"] = ( + _s, + _m, + _d, + _u, + "half the time step", + SEGMENTS, + DT / 2, + True, + FRICTION, + ) + RUNS[_base + "_n108"] = ( + _s, + _m, + _d, + _u, + "twice the elements", + 2 * SEGMENTS, + DT, + True, + FRICTION, + ) +for _s in ("uls19", "b1", "wake"): + for _m in WEIGHT: + for _d in DIRECTIONS: + for _u in (0.4, 0.8, 1.2): + _base = f"{_s}_m{_m}_{_d}{_u:g}" + RUNS[_base + "_undamped"] = ( + _s, + _m, + _d, + _u, + "no structural damping", + SEGMENTS, + DT, + False, + FRICTION, + ) + RUNS[_base + "_frictionless"] = ( + _s, + _m, + _d, + _u, + "frictionless floor", + SEGMENTS, + DT, + True, + 0.0, + ) + + +def measured() -> dict: + """{(figure, m*): {U: [(value, sd), ...]}} of the extracted points (extract_chaplin2018.py).""" + data: dict = {} + with open(HERE / "measured_chaplin2018.csv", encoding="utf-8") as fh: + for r in csv.DictReader(fh): + key = (r["figure"], r["m_star"]) + sd = float(r["sd"]) if r["sd"] else None + data.setdefault(key, {}).setdefault(round(float(r["U_mps"]), 2), []).append( + (float(r["value"]), sd) + ) + return data + + +def implied_cd(psi_deg: float, u: float, w: float) -> float | None: + """The drag coefficient of a straight line at the inclination psi by the article's Eq. 9, + 0.5 rho Cd d (U sin psi)^2 = W cos psi.""" + p = math.radians(psi_deg) + if u <= 0.0 or p <= 0.0: + return None + return 2.0 * w * math.cos(p) / (RHO * DIAMETER * (u * math.sin(p)) ** 2) + + +def rounded(x): + """Six significant digits, so the record does not carry the last bits of the arithmetic.""" + if isinstance(x, float): + return float(f"{x:.6g}") + if isinstance(x, dict): + return {k: rounded(v) for k, v in x.items()} + if isinstance(x, list): + return [rounded(v) for v in x] + return x + + +def fmt(value: float | None, spec: str = ".3f") -> str: + """A score for the console; n/a when the selection holds nothing for it.""" + return "n/a" if value is None else format(value, spec) + + +def nearest(values: list[float], v: float) -> float | None: + return min(values, key=lambda q: abs(q - v)) if values else None + + +def compare_run(name: str, res: dict, meas: dict, still: dict) -> dict: + """One run against the measured points at its speed.""" + hset, mstar, direction, u, role, segments, dt, damp, mu = RUNS[name] + fig_t = "10" if direction == "pos" else "13" + row: dict = { + "run": name, + "set": hset, + "role": role, + "m_star": mstar, + "direction": direction, + "U_mps": u, + "segments": segments, + "dt_s": dt, + "structural_damping": int(damp), + "floor_friction": mu, + "model_mean_T_N": res["mean_top_tension_N"], + "model_sd_T_N": res["sd_top_tension_N"], + "model_still_T_N": still[mstar], + } + t = meas.get((fig_t, mstar), {}).get(round(u, 2), []) + row["measured_mean_T_N"] = t[0][0] if t else None + row["measured_sd_T_N"] = t[0][1] if t else None + t0 = meas.get((fig_t, mstar), {}).get(0.0, []) + row["measured_still_T_N"] = t0[0][0] if t0 else None + row["model_psi_mid_depth_deg"] = res["psi_mid_depth_deg"] + row["model_cd_eq9"] = implied_cd(res["psi_mid_depth_deg"], u, WEIGHT[mstar]) + p = meas.get(("12a", mstar), {}).get(round(u, 2), []) if direction == "neg" else [] + row["measured_psi_deg"] = p[0][0] if p else None + row["measured_cd_eq9"] = implied_cd(p[0][0], u, WEIGHT[mstar]) if p else None + if hset != "none": + if direction == "pos": + probes = {"upper": ("upper_a", "upper_b"), "lower": ("lower",)} + figs = {"upper": "9a", "lower": "9b"} + else: + probes, figs = {"mid": ("mid_depth",)}, {"mid": "15a"} + for where, names in probes.items(): + # the dominant frequency: the peak of the displacement spectrum (the article's + # acceleration and video-displacement peaks agree, its Fig. 4); the acceleration + # spectrum's peak as a second value + row[f"model_f_{where}_hz"] = float( + np.mean([res[q]["f_disp_hz"] for q in names]) + ) + row[f"model_f_acc_{where}_hz"] = float( + np.mean([res[q]["f_acc_hz"] for q in names]) + ) + pts = [ + v for v, _ in meas.get((figs[where], mstar), {}).get(round(u, 2), []) + ] + row[f"measured_f_{where}_hz"] = ";".join(f"{v:.3f}" for v in sorted(pts)) + row[f"nearest_measured_f_{where}_hz"] = nearest( + pts, row[f"model_f_{where}_hz"] + ) + fs = [ + s["f_disp_hz"] for s in res["stations"] if s["suspended"] and s["z_m"] < 0.0 + ] + row["model_f_span_min_hz"] = min(fs) if fs else None + row["model_f_span_median_hz"] = float(np.median(fs)) if fs else None + row["model_f_span_max_hz"] = max(fs) if fs else None + row["model_AD_rms_max"] = max(s["AD_rms"] for s in res["stations"]) + row["model_AD_rms_above_0p3hz_max"] = max( + s["AD_rms_above_0p3hz"] for s in res["stations"] + ) + return row + + +def scores(rows: list[dict]) -> dict: + """Scores of a set at one mass ratio and direction over the primary speeds.""" + out: dict = {} + t = [ + (r["model_mean_T_N"], r["measured_mean_T_N"]) + for r in rows + if r["measured_mean_T_N"] + ] + if t: + e = np.array([m / x - 1.0 for m, x in t]) + out["T_rms_rel_error"] = float(np.sqrt(np.mean(e**2))) + out["T_mean_rel_error"] = float(np.mean(e)) + out["T_points"] = len(t) + inc = [ + ( + r["model_mean_T_N"] - r["model_still_T_N"], + r["measured_mean_T_N"] - r["measured_still_T_N"], + ) + for r in rows + if r["measured_mean_T_N"] and r["measured_still_T_N"] + ] + if inc: + out["dT_rms_error_N"] = float(np.sqrt(np.mean([(m - x) ** 2 for m, x in inc]))) + out["dT_mean_error_N"] = float(np.mean([m - x for m, x in inc])) + sd = [ + r["model_sd_T_N"] / r["measured_sd_T_N"] for r in rows if r["measured_sd_T_N"] + ] + if sd: + out["sd_T_ratio_median"] = float(np.median(sd)) + out["sd_T_points"] = len(sd) + psi = [ + r["model_psi_mid_depth_deg"] - r["measured_psi_deg"] + for r in rows + if r["measured_psi_deg"] is not None + ] + if psi: + out["psi_rms_error_deg"] = float(np.sqrt(np.mean(np.square(psi)))) + out["psi_mean_error_deg"] = float(np.mean(psi)) + out["cd_eq9_model_median"] = float( + np.median([r["model_cd_eq9"] for r in rows if r["model_cd_eq9"]]) + ) + out["cd_eq9_measured_median"] = float( + np.median([r["measured_cd_eq9"] for r in rows if r["measured_cd_eq9"]]) + ) + for where in ("upper", "lower", "mid"): + k = f"model_f_{where}_hz" + if not rows or k not in rows[0]: + continue + # runs whose acceleration spectrum peaks at a higher harmonic of the displacement's + out[f"f_{where}_acc_peak_at_harmonic"] = int( + sum(r[f"model_f_acc_{where}_hz"] >= 1.5 * r[k] for r in rows) + ) + out[f"f_{where}_model_fd_over_U_median"] = float( + np.median([r[k] * DIAMETER / r["U_mps"] for r in rows]) + ) + meas_fd = [ + float(v) * DIAMETER / r["U_mps"] + for r in rows + for v in r[f"measured_f_{where}_hz"].split(";") + if v + ] + if meas_fd: + out[f"f_{where}_measured_fd_over_U_median"] = float(np.median(meas_fd)) + out[f"f_{where}_measured_points"] = len(meas_fd) + if where == "mid": + # on the normal velocity U sin(psi) of the straight part (Fig. 15(b)): the model's + # inclination at mid-depth, the measured one of Fig. 12(a) + out["f_mid_model_fd_over_Un_median"] = float( + np.median( + [ + r[k] + * DIAMETER + / ( + r["U_mps"] + * math.sin(math.radians(r["model_psi_mid_depth_deg"])) + ) + for r in rows + ] + ) + ) + mn = [ + float(v) + * DIAMETER + / (r["U_mps"] * math.sin(math.radians(r["measured_psi_deg"]))) + for r in rows + if r["measured_psi_deg"] + for v in r["measured_f_mid_hz"].split(";") + if v + ] + if mn: + out["f_mid_measured_fd_over_Un_median"] = float(np.median(mn)) + sel = [r for r in rows if r[f"nearest_measured_f_{where}_hz"]] + if sel: + ratio = [r[k] / r[f"nearest_measured_f_{where}_hz"] for r in sel] + out[f"f_{where}_ratio_to_nearest_measured_median"] = float(np.median(ratio)) + out[f"f_{where}_within_10pct"] = int( + sum(abs(q - 1.0) <= 0.1 for q in ratio) + ) + out[f"f_{where}_points"] = len(sel) + sp = [ + (r["model_f_span_max_hz"] - r["model_f_span_min_hz"]) + / r["model_f_span_median_hz"] + for r in rows + if r.get("model_f_span_median_hz") + ] + if sp: + out["f_span_spread_median"] = float(np.median(sp)) + return out + + +def change(r: dict, base: dict) -> dict: + """Relative change of a sensitivity or convergence run from its primary run.""" + + def rel(k): + if r.get(k) is None or not base.get(k): + return None + return r[k] / base[k] - 1.0 + + ch = { + "role": r["role"], + "mean_T": rel("model_mean_T_N"), + "sd_T": rel("model_sd_T_N"), + } + ch["AD_rms_max"] = rel("model_AD_rms_max") + for w in ("upper", "lower", "mid"): + if f"model_f_{w}_hz" in r: + ch[f"f_{w}"] = rel(f"model_f_{w}_hz") + return ch + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0]) + ap.add_argument("exe") + ap.add_argument("workdir") + ap.add_argument( + "--runs", default="all", help="comma list of run names (see RUNS), or all" + ) + ap.add_argument("--jobs", type=int, default=os.cpu_count() or 1) + ap.add_argument("--keep", action="store_true", help="keep the output tables") + ap.add_argument( + "--summary", + default=None, + help="directory for the comparison CSV and summary JSON", + ) + a = ap.parse_args() + found = a.exe if Path(a.exe).is_file() else shutil.which(a.exe) + if found is None: + raise SystemExit(f"CableDyn executable not found: {a.exe}") + exe = Path(found).resolve() + sha = hashlib.sha256(exe.read_bytes()).hexdigest() + names = ( + list(RUNS) + if a.runs == "all" + else [n.strip() for n in a.runs.split(",") if n.strip()] + ) + if not names or any(n not in RUNS for n in names): + raise SystemExit(f"--runs: choose from {', '.join(RUNS)}, got {a.runs!r}") + # the still-water runs are the reference of the tension increments: always run + names = [n for n in RUNS if n.endswith("_still") and n not in names] + names + work = Path(a.workdir).resolve() + + def one(name: str) -> dict: + hset, mstar, direction, u, _, segments, dt, damp, mu = RUNS[name] + folder = work / ( + f"{hset}_m{mstar}_{direction}{u:g}_n{segments}_dt{dt:g}_mu{mu:g}" + + ("" if damp else "_undamped") + ) + return run_case( + exe, + folder, + deck_files(hset, mstar, direction, u, segments, dt, damp, mu), + lambda out: analyse(out, hset, direction, u, segments), + f"{segments}:{ANALYSIS}", + a.keep, + sha, + ) + + with ThreadPoolExecutor(max_workers=max(1, min(a.jobs, len(names)))) as pool: + results = dict(zip(names, pool.map(one, names), strict=True)) + + meas = measured() + still = { + RUNS[n][1]: results[n]["mean_top_tension_N"] + for n in results + if n.endswith("_still") + } + rows = [compare_run(n, results[n], meas, still) for n in RUNS if n in results] + by = {r["run"]: r for r in rows} + groups: dict = {} + for r in rows: + if r["role"] == "primary": + groups.setdefault(f"{r['set']}_m{r['m_star']}_{r['direction']}", []).append( + r + ) + summary_scores = {k: scores(v) for k, v in groups.items()} + for k, sc in summary_scores.items(): + freq = "; ".join( + f"f_{w} fd/U {fmt(sc.get(f'f_{w}_model_fd_over_U_median'))} [nearest measured " + f"ratio {fmt(sc.get(f'f_{w}_ratio_to_nearest_measured_median'), '.2f')}]" + for w in ("upper", "lower", "mid") + if f"f_{w}_model_fd_over_U_median" in sc + ) + print( + f"{k:18s} T r.m.s. rel. error {fmt(sc.get('T_rms_rel_error'))} " + f"(mean {fmt(sc.get('T_mean_rel_error'), '+.3f')}); increment r.m.s. " + f"{fmt(sc.get('dT_rms_error_N'), '.2f')} N; sd ratio " + f"{fmt(sc.get('sd_T_ratio_median'), '.2f')}; {freq}" + ) + changes = { + r["run"]: change(r, by[r["run"].rsplit("_", 1)[0]]) + for r in rows + if r["role"] not in ("primary", "still water") + and r["run"].rsplit("_", 1)[0] in by + } + summary = rounded( + { + "sets": {k: v["label"] for k, v in SETS.items()}, + "model": { + "length_m": LENGTH, + "diameter_m": DIAMETER, + "EI_Nm2": EI, + "EA_N": EA, + "mass_kg_per_m": {m: mass(m) for m in WEIGHT}, + "submerged_weight_N_per_m": WEIGHT, + "rayleigh_damping": { + "zeta": ZETA, + "f1_hz": RAYLEIGH[0], + "f2_hz": RAYLEIGH[1], + }, + "floor_friction": FRICTION, + "segments": SEGMENTS, + "dt_s": DT, + "tmax_s": TMAX, + "statistics_from_s": T0, + "current_ramp_s": RAMP, + "welch_segment_s": WELCH, + "probe_elevations_m": PROBES, + }, + "still_water_top_tension_N": { + m: { + "model": still[m], + "measured_fig10": meas.get(("10", m), {}).get(0.0, [(None,)])[0][0], + "measured_fig13": meas.get(("13", m), {}).get(0.0, [(None,)])[0][0], + } + for m in still + }, + "scores": summary_scores, + "sensitivity_and_convergence": changes, + "executable_sha256": sha, + } + ) + if a.summary: + out = Path(a.summary) + out.mkdir(parents=True, exist_ok=True) + fields = list(dict.fromkeys(k for r in rows for k in r)) + + def cell(v): + if v is None: + return "" + if isinstance(v, float): + return f"{v:.6g}" + return v + + with open( + out / "response_comparison.csv", "w", newline="", encoding="utf-8" + ) as fh: + w = csv.DictWriter(fh, fieldnames=fields, lineterminator="\n") + w.writeheader() + for r in rows: + w.writerow({k: cell(r.get(k)) for k in fields}) + (out / "summary.json").write_text( + json.dumps(summary, indent=2) + "\n", encoding="utf-8", newline="\n" + ) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/chaplin_catenary/extract_chaplin2018.py b/validation/experiments/chaplin_catenary/extract_chaplin2018.py new file mode 100644 index 00000000..201d534e --- /dev/null +++ b/validation/experiments/chaplin_catenary/extract_chaplin2018.py @@ -0,0 +1,493 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +"""Read the measured points of Chaplin & King (2018), Figs. 9, 10, 12(a), 13 and 15(a), from the PDF. + +The figures are embedded greyscale raster images. Each panel is calibrated on its plot frame and +its tick marks: the frame's left and bottom lines are the zero of each axis (printed there), the +marks found on both opposite sides of the frame give the tick spacing (a mark on one side only, +or a reference line drawn across the frame, is not a tick), and the axis is the least-squares +line through the origin and the ticks; its largest residual is reported. + +The markers are circles of one radius per kind (open, m* 1.12; solid, m* 1.84). Each is a peak of +the share of dark pixels among the dark and white ones on a circle about the point (a circle +Hough transform: grey pixels, an error bar drawn over the outline, count neither way), classed +by the share of dark pixels inside it (less its centre column, where a frame line can pass) as +solid or open; one between the classes is reported and dropped, and so is a peak off the +0.05 m/s grid of the tested speeds by more than a quarter step (two overlapping markers make +such a peak). A marker hidden under another is lost. The speeds are snapped to the grid. + +The error bars of Figs. 10 and 13 (one standard deviation of the top tension each way) end in +caps, grey rows at least a marker radius wide through the marker's column: the bar is the +nearest pair of caps about equally far above and below the marker, its half-length the +standard deviation and its centre the mean (the bar is drawn about it). A bar hidden by its +marker (shorter than the radius), or among the overlapping bars of the two series, is not read +(`sd` blank). Two lines drawn in the figures check the reading: f d/U = 0.11 in Fig. 9 (read +where no marker or tick is near it) and the total submerged weight times the water depth, W h, +in Fig. 13 (Table 1: 41.8 and 5.8 N). + + python extract_chaplin2018.py CHAPLIN2018.pdf [--out measured_chaplin2018.csv] [--check DIR] + +Source: + J.R. Chaplin, R. King (2018), Laboratory measurements of the vortex-induced vibrations of an + untensioned catenary riser with high curvature, Journal of Fluids and Structures 79, 26-38, + https://doi.org/10.1016/j.jfluidstructs.2018.01.008 (Figs. 9, 10, 12, 13 and 15) +""" + +from __future__ import annotations + +import argparse +import csv +import io +import json +from pathlib import Path + +import numpy as np +import pymupdf +from PIL import Image, ImageDraw +from scipy import ndimage + +HERE = Path(__file__).resolve().parent +U_GRID = 0.05 # m/s, the speed step of the tests +DIAMETER = 0.056 # m (Table 1), for the slope of the line f d/U = 0.11 in Fig. 9 +DEPTH = 2.0 # m (Table 1), for the lines W h in Fig. 13 + +# Panel: figure label, page index (from 0), image index on the page, panel (0 the left frame, 1 +# the right), quantity, current direction, the point on the riser, x and y tick steps, the grey +# level below which a pixel is dark, marker radii (open, solid) in pixels, masked boxes +# (x0, y0, x1, y1) in pixels (insets, legends, panel labels, notes), and the grey levels of the +# error bars or None. +PANELS = ( + { + "figure": "9a", + "page": 8, + "image": 1, + "panel": 0, + "quantity": "f_cf_hz", + "current": "positive", + "where": "upper (two points of the inset)", + "x_step": 0.25, + "y_step": 0.5, + "black": 128, + "radius": (7.5, 7.5), + "masks": ((150, 18, 340, 125), (265, 312, 470, 378), (455, 325, 516, 380)), + "bars": None, + }, + { + "figure": "9b", + "page": 8, + "image": 1, + "panel": 1, + "quantity": "f_cf_hz", + "current": "positive", + "where": "lower (the point of the inset)", + "x_step": 0.25, + "y_step": 0.5, + "black": 128, + "radius": (7.5, 7.5), + "masks": ((585, 18, 790, 125), (655, 318, 880, 378), (890, 325, 951, 380)), + "bars": None, + }, + { + "figure": "10", + "page": 8, + "image": 2, + "panel": 0, + "quantity": "mean_top_tension_N", + "current": "positive", + "where": "top", + "x_step": 0.25, + "y_step": 50.0, + "black": 70, + "radius": (9.5, 9.5), + "masks": (), + "bars": (75, 140), + }, + { + "figure": "12a", + "page": 9, + "image": 3, + "panel": 0, + "quantity": "psi_deg", + "current": "negative", + "where": "straight part", + "x_step": 0.25, + "y_step": 15.0, + "black": 128, + "radius": (7.0, 7.0), + "masks": ((330, 8, 556, 120), (142, 270, 200, 328)), + "bars": None, + }, + { + "figure": "13", + "page": 10, + "image": 0, + "panel": 0, + "quantity": "mean_top_tension_N", + "current": "negative", + "where": "top", + "x_step": 0.25, + "y_step": 25.0, + "black": 110, + "radius": (10.0, 10.0), + "masks": ((390, 40, 720, 160),), + "bars": (140, 225), + }, + { + "figure": "15a", + "page": 11, + "image": 0, + "panel": 0, + "quantity": "f_cf_hz", + "current": "negative", + "where": "around mid-depth", + "x_step": 0.4, + "y_step": 0.5, + "black": 128, + "radius": (7.5, 4.5), + "masks": ((165, 17, 225, 70),), + "bars": None, + }, +) + + +def image(doc, page: int, index: int) -> np.ndarray: + xref = doc[page].get_images(full=True)[index][0] + return np.asarray( + Image.open(io.BytesIO(doc.extract_image(xref)["image"])).convert("L") + ).astype(int) + + +def groups(idx: np.ndarray) -> list[float]: + if not len(idx): + return [] + return [float(g.mean()) for g in np.split(idx, np.where(np.diff(idx) > 1)[0] + 1)] + + +def frames(dark: np.ndarray) -> list[tuple[float, float, float, float]]: + """The plot frames of the image, left to right: (left, right, top, bottom) centre lines.""" + h, w = dark.shape + rows = groups(np.where(dark.sum(axis=1) > 0.35 * w)[0]) + top, bottom = rows[0], rows[-1] + t, b = int(top) + 3, int(bottom) - 2 + cols = groups(np.where(dark[t:b].sum(axis=0) > 0.9 * (b - t))[0]) + return [(cols[i], cols[i + 1], top, bottom) for i in range(0, len(cols) - 1, 2)] + + +def axis( + dark: np.ndarray, frame: tuple, horizontal: bool, step: float +) -> tuple[float, float, float, int]: + """Origin pixel and pixels per unit of one axis from the frame and its tick marks, the + largest residual of the ticks (in axis units) and their number.""" + left, right, top, bottom = (int(round(v)) for v in frame) + if horizontal: + near = groups( + np.where(dark[bottom - 13 : bottom - 3, left + 4 : right - 3].sum(0) >= 7)[ + 0 + ] + + left + + 4 + ) + far = groups( + np.where(dark[top + 3 : top + 13, left + 4 : right - 3].sum(0) >= 7)[0] + + left + + 4 + ) + origin = frame[0] + else: + near = groups( + np.where(dark[top + 4 : bottom - 3, left + 3 : left + 13].sum(1) >= 7)[0] + + top + + 4 + ) + far = groups( + np.where(dark[top + 4 : bottom - 3, right - 13 : right - 3].sum(1) >= 7)[0] + + top + + 4 + ) + origin = frame[3] + ticks = [p for p in near if any(abs(p - q) <= 1.5 for q in far)] + # the spacing that puts marks on the most whole steps from the origin, less the steps + # without a mark (a reference line drawn across the frame is not on a step) + cands = [abs(p - origin) / k for p in ticks for k in range(1, 11)] + + def score(s: float) -> int: + steps = [abs(p - origin) / s for p in ticks] + on = {round(k) for k in steps if abs(k - round(k)) < 0.1 and round(k) > 0} + return 2 * len(on) - max(on, default=0) + + spacing = max(cands, key=lambda s: (score(s), s)) + pix, val = [origin], [0.0] + for p in ticks: + k = (p - origin) / spacing * (1 if horizontal else -1) + if abs(k - round(k)) < 0.15 and round(k) > 0: + pix.append(p) + val.append(round(k) * step) + slope, icept = np.polyfit(val, pix, 1) + resid = max(abs((p - icept) / slope - v) for p, v in zip(pix, val, strict=True)) + return icept, slope, float(resid), len(pix) - 1 + + +def ring_votes(black: np.ndarray, white: np.ndarray, radius: float) -> np.ndarray: + """The share of dark pixels among the dark and white ones on the circle of the radius about + each pixel (a grey pixel, an error bar drawn over the outline, is no evidence either way); + zero where under half the circle is dark or white.""" + h, w = black.shape + pad = int(radius) + 3 + pb, pw = np.pad(black.astype(float), pad), np.pad(white.astype(float), pad) + ang = np.linspace(0.0, 2.0 * np.pi, 96, endpoint=False) + offs = {(round(radius * np.sin(a)), round(radius * np.cos(a))) for a in ang} + nb, nw = np.zeros((h, w)), np.zeros((h, w)) + for dy, dx in offs: + nb += pb[pad + dy : pad + dy + h, pad + dx : pad + dx + w] + nw += pw[pad + dy : pad + dy + h, pad + dx : pad + dx + w] + seen = nb + nw + return np.where(seen >= 0.5 * len(offs), nb / np.maximum(seen, 1.0), 0.0) + + +def disc_fill(black: np.ndarray, white: np.ndarray, radius: float) -> np.ndarray: + """The share of dark pixels among the dark and white ones in the disc of the radius, less + its centre column on a large disc (where a frame line passes through a marker).""" + r = int(np.ceil(radius)) + yy, xx = np.mgrid[-r : r + 1, -r : r + 1] + k = ( + (xx * xx + yy * yy <= radius * radius) + & (np.abs(xx) > (2 if radius > 4.0 else -1)) + ).astype(float) + nb = ndimage.convolve(black.astype(float), k, mode="constant") + nw = ndimage.convolve(white.astype(float), k, mode="constant") + return nb / np.maximum(nb + nw, 1.0) + + +def markers( + black: np.ndarray, white: np.ndarray, r_open: float, r_solid: float, vote: float +) -> list[tuple]: + """(x, y, kind, ring share, fill share) of the circles found: a peak of the share of dark + pixels on the circle (the largest of four radii, the outline being anti-aliased), classed + by the share of dark pixels inside it.""" + found = [] + for kind, r in (("open", r_open), ("solid", r_solid)): + v = np.max( + [ring_votes(black, white, r - d) for d in (0.0, 0.5, 1.0, 1.5)], axis=0 + ) + fill = disc_fill(black, white, max(r - 4.0, 1.5) if kind == "open" else r - 2.0) + size = int(2 * round(0.7 * r) + 1) + peak = (v == ndimage.maximum_filter(v, size=size)) & (v >= vote) + for y, x in zip(*np.where(peak), strict=True): + f = float(fill[y, x]) + if kind == "open" and r_open == r_solid: + k = "solid" if f > 0.7 else ("open" if f < 0.3 else "unclassified") + elif kind == "open": + k = "open" if f < 0.3 else None + else: + k = "solid" if f > 0.7 else None + if k: + found.append((float(x), float(y), k, float(v[y, x]), f)) + if r_open == r_solid: + break + # one marker per cluster of peaks (a plateau or an anti-aliased edge gives several) + found.sort(key=lambda m: -m[3]) + out: list[tuple] = [] + for m in found: + r = r_open if m[2] == "open" else r_solid + if all((m[0] - o[0]) ** 2 + (m[1] - o[1]) ** 2 > (0.9 * r) ** 2 for o in out): + out.append(m) + return out + + +def error_bar( + grey: np.ndarray, x: float, y: float, r: float +) -> tuple[float, float] | None: + """The centre row and half-length in pixels of the error bar of the marker at (x, y), or + None when the bar is hidden by the marker. + + The bar ends in caps, grey rows at least a marker radius wide through the marker's column; + the bar is the nearest pair of caps about equally far (within half a radius) above and below + the marker's centre. The bar is drawn about the mean, so its centre refines the marker's.""" + c = int(round(x)) + caps = [] + for row in range(grey.shape[0]): + if not grey[row, c - 1 : c + 2].any(): + continue + a = b = c + while a > 0 and grey[row, a - 1]: + a -= 1 + while b < grey.shape[1] - 1 and grey[row, b + 1]: + b += 1 + if b - a + 1 >= r: + caps.append(row) + centres = groups(np.array(caps, dtype=int)) + pairs = [ + (0.5 * (d - u), 0.5 * (u + d)) + for u in centres + if u < y + for d in centres + if d > y and abs((y - u) - (d - y)) <= 0.5 * r + ] + return min(pairs, key=lambda q: q[0])[::-1] if pairs else None + + +def extract(pdf: Path, check: Path | None) -> tuple[list[dict], dict]: + doc = pymupdf.open(pdf) + rows, report = [], {} + for p in PANELS: + g = image(doc, p["page"], p["image"]) + dark = g < 110 + fr = frames(dark)[p["panel"]] + x0, sx, rx, nx = axis(dark, fr, True, p["x_step"]) + y0, sy, ry, ny = axis(dark, fr, False, p["y_step"]) + black = g < p["black"] + left, right, top, bottom = (int(round(v)) for v in fr) + inner = np.zeros_like(black) + inner[top + 3 : bottom - 2, left - 12 : right + 12] = True + if p["figure"] not in ("10", "13"): # no marker on the side lines + inner[:, : left + 3] = False + inner[:, right - 2 :] = False + for a, b, c, d in p["masks"]: + inner[b:d, a:c] = False + black &= inner + white = (g > 215) & inner + # reference lines drawn across the frame are no evidence for or against a marker + h, w = g.shape + for q in groups(np.where(dark.sum(axis=1) > 0.35 * w)[0])[1:-1]: + black[int(q) - 2 : int(q) + 3] = False + white[int(q) - 2 : int(q) + 3] = False + found = markers(black, white, *p["radius"], p.get("vote", 0.8)) + grey = None + if p["bars"]: + lo, hi = p["bars"] + grey = (g >= lo) & (g <= hi) & inner + snaps, dropped, off_grid, shifts, panel_rows = [], [], [], [], [] + for x, y, kind, vote, fill in sorted(found): + u = (x - x0) / sx + val = (y - y0) / sy + ug = round(u / U_GRID) * U_GRID + if kind == "unclassified": + dropped.append( + {"U": round(u, 3), "value": round(val, 3), "fill": round(fill, 2)} + ) + continue + if abs(u - ug) > 0.25 * U_GRID: # between two tested speeds: not a marker + off_grid.append( + {"U": round(u, 3), "value": round(val, 3), "kind": kind} + ) + continue + snaps.append(abs(u - ug)) + row = { + "figure": p["figure"], + "quantity": p["quantity"], + "current": p["current"], + "where": p["where"], + "m_star": "1.84" if kind == "solid" else "1.12", + "U_mps": f"{ug:.2f}", + "value": round(float(val), 4), + "sd": "", + } + bar = None if grey is None else error_bar(grey, x, y, p["radius"][0]) + if bar is not None: + shifts.append(abs(bar[0] - y)) + row["value"] = round(float((bar[0] - y0) / sy), 4) + row["sd"] = round(abs(bar[1] / sy), 3) + panel_rows.append(row) + panel_rows.sort(key=lambda q: (q["m_star"], float(q["U_mps"]), q["value"])) + rows += panel_rows + anchor = {} + if p["figure"] in ("9a", "9b"): + # the line f = 0.11 U/d drawn in the panel, read where no marker or tick mark is + # near it (below the markers, and in (b) above them at the higher speeds), as the + # slope through the origin + us, fs = [], [] + for c in range(left + 4, right - 3): + u = (c - x0) / sx + if not ( + 0.07 <= u <= 0.15 or (p["figure"] == "9b" and 1.1 <= u <= 1.45) + ): + continue + rr = np.where(dark[top + 14 : bottom - 14, c])[0] + top + 14 + if len(rr) and np.ptp(rr) < 6: + us.append(u) + fs.append((float(np.mean(rr)) - y0) / sy) + us_a, fs_a = np.array(us), np.array(fs) + anchor = { + "line_fd_over_U": round( + float(us_a @ fs_a / (us_a @ us_a)) * DIAMETER, 4 + ), + "line_columns": len(us), + "stated": 0.11, + } + if p["figure"] == "13": + # the lines of the total submerged weight times the water depth, W h + h, w = g.shape + lines = groups(np.where(dark.sum(axis=1) > 0.35 * w)[0])[1:-1] + anchor = { + "W_h_lines_N": [round(float((q - y0) / sy), 3) for q in lines], + "table_1_W_h_N": [round(wt * DEPTH, 3) for wt in (20.9, 2.9)], + } + report[p["figure"]] = { + **({"anchor": anchor} if anchor else {}), + "x_ticks": nx, + "x_residual": round(rx, 4), + "y_ticks": ny, + "y_residual": round(ry, 4), + "points": { + m: int(sum(q["m_star"] == m for q in panel_rows)) + for m in ("1.12", "1.84") + }, + "sd_read": { + m: int(sum(q["m_star"] == m and q["sd"] != "" for q in panel_rows)) + for m in ("1.12", "1.84") + } + if grey is not None + else None, + "unclassified": dropped, + "off_grid": off_grid, + "largest_U_snap": round(max(snaps), 4) if snaps else None, + "largest_bar_centre_shift": round(max(shifts) / abs(sy), 4) + if shifts + else None, + } + if check is not None: + check.mkdir(parents=True, exist_ok=True) + vis = Image.fromarray(g.astype(np.uint8)).convert("RGB") + dr = ImageDraw.Draw(vis) + for x, y, kind, _v, _f in found: + r = p["radius"][0] if kind == "open" else p["radius"][1] + col = {"open": (0, 90, 255), "solid": (230, 0, 0)}.get( + kind, (255, 160, 0) + ) + dr.ellipse((x - r, y - r, x + r, y + r), outline=col, width=2) + bar = None if grey is None else error_bar(grey, x, y, p["radius"][0]) + if bar is not None: + yc, half = bar + dr.line( + (x + 3, yc - half, x + 3, yc + half), fill=(0, 180, 0), width=1 + ) + for k in range(0, 40): + xx = x0 + k * p["x_step"] * sx + if left - 1 <= xx <= right + 1: + dr.line((xx, bottom - 20, xx, bottom), fill=(255, 0, 255)) + yy = y0 + k * p["y_step"] * sy + if top - 1 <= yy <= bottom + 1: + dr.line((left, yy, left + 20, yy), fill=(255, 0, 255)) + vis.save(check / f"fig{p['figure']}_check.png") + return rows, report + + +def main() -> None: + ap = argparse.ArgumentParser() + ap.add_argument("pdf", type=Path) + ap.add_argument("--out", type=Path, default=HERE / "measured_chaplin2018.csv") + ap.add_argument( + "--check", type=Path, help="write the markers found over each figure into DIR" + ) + a = ap.parse_args() + rows, report = extract(a.pdf, a.check) + with open(a.out, "w", encoding="utf-8", newline="\n") as fh: + w = csv.DictWriter(fh, fieldnames=list(rows[0]), lineterminator="\n") + w.writeheader() + w.writerows(rows) + print(json.dumps(report, indent=1)) + + +if __name__ == "__main__": + main() diff --git a/validation/experiments/chaplin_catenary/measured_chaplin2018.csv b/validation/experiments/chaplin_catenary/measured_chaplin2018.csv new file mode 100644 index 00000000..490d2c74 --- /dev/null +++ b/validation/experiments/chaplin_catenary/measured_chaplin2018.csv @@ -0,0 +1,328 @@ +figure,quantity,current,where,m_star,U_mps,value,sd +9a,f_cf_hz,positive,upper (two points of the inset),1.12,0.25,0.6065, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,0.30,0.8144, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,0.35,0.8944, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,0.40,0.8064, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,0.50,1.1104, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,0.55,1.1424, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,1.20,2.1183, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,1.20,2.3503, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,1.25,2.4383, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,1.35,2.2703, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,1.35,2.5503, +9a,f_cf_hz,positive,upper (two points of the inset),1.12,1.40,2.3023, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.25,0.5425, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.30,0.6625, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.30,0.7184, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.35,0.7504, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.35,0.9984, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.40,0.9504, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.40,1.0064, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.45,0.9024, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.45,0.9584, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.45,1.0944, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.50,0.9824, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.55,1.0464, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.60,1.2784, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.60,1.3344, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.65,1.3504, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.70,1.3904, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.70,1.4464, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.75,1.4544, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.75,1.5424, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.80,1.5824, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.80,1.6384, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.80,1.6944, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.85,1.7743, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.90,1.7344, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.90,1.8223, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,0.95,1.9423, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.00,1.9583, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.00,2.0143, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.05,2.0463, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.10,2.0463, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.15,2.1503, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.15,2.2063, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.20,2.2783, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.25,2.2943, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.30,2.3103, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.30,2.4223, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.30,2.4863, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.35,2.4943, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.40,2.4543, +9a,f_cf_hz,positive,upper (two points of the inset),1.84,1.40,2.5743, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.20,0.5268, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.45,0.9097, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.50,0.8698, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.60,0.9894, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.65,0.9575, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.65,1.3883, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.70,1.125, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.75,1.2527, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.75,1.5637, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.80,1.2766, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.85,1.2925, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.90,1.5717, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,0.95,1.6515, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,1.00,1.6435, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,1.05,1.6993, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,1.10,1.7472, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,1.15,1.6515, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,1.20,1.7392, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,1.25,1.6674, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,1.30,1.6993, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,1.35,1.7791, +9b,f_cf_hz,positive,lower (the point of the inset),1.12,1.40,1.811, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.25,0.5826, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.30,0.6784, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.35,0.798, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.40,0.8219, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.45,0.7661, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.50,0.9815, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.55,1.0453, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.60,0.6704, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.60,1.2846, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.65,0.7182, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.65,1.3165, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.70,0.7023, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.70,1.4042, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.70,1.46, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.75,0.6624, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.75,1.5079, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.80,0.8219, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.80,1.6116, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.85,0.7661, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.85,1.7312, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.90,0.7661, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.90,1.827, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.95,0.9416, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,0.95,1.8429, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,1.00,0.8299, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,1.00,1.9466, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,1.05,1.9147, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,1.10,1.9945, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,1.15,2.0104, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,1.20,2.0503, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,1.25,2.146, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,1.30,2.2337, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,1.35,2.2816, +9b,f_cf_hz,positive,lower (the point of the inset),1.84,1.40,2.3454, +10,mean_top_tension_N,positive,top,1.12,0.00,13.3836, +10,mean_top_tension_N,positive,top,1.12,0.20,15.2686, +10,mean_top_tension_N,positive,top,1.12,0.25,16.2111,1.178 +10,mean_top_tension_N,positive,top,1.12,0.30,17.6249,1.414 +10,mean_top_tension_N,positive,top,1.12,0.35,19.5099,1.885 +10,mean_top_tension_N,positive,top,1.12,0.40,21.3949,2.356 +10,mean_top_tension_N,positive,top,1.12,0.45,23.5156,2.592 +10,mean_top_tension_N,positive,top,1.12,0.50,25.8718,3.534 +10,mean_top_tension_N,positive,top,1.12,0.55,28.5815,3.417 +10,mean_top_tension_N,positive,top,1.12,0.60,31.5269,4.477 +10,mean_top_tension_N,positive,top,1.12,0.65,34.59,5.184 +10,mean_top_tension_N,positive,top,1.12,0.70,36.9463,6.126 +10,mean_top_tension_N,positive,top,1.12,0.75,40.9519,7.304 +10,mean_top_tension_N,positive,top,1.12,0.80,45.311,7.893 +10,mean_top_tension_N,positive,top,1.12,0.85,49.0811,8.6 +10,mean_top_tension_N,positive,top,1.12,0.90,53.2045,10.132 +10,mean_top_tension_N,positive,top,1.12,0.95,56.3855,11.192 +10,mean_top_tension_N,positive,top,1.12,1.00,60.7446,12.017 +10,mean_top_tension_N,positive,top,1.12,1.05,65.9284,13.431 +10,mean_top_tension_N,positive,top,1.12,1.10,69.2271,14.373 +10,mean_top_tension_N,positive,top,1.12,1.15,75.1178,16.023 +10,mean_top_tension_N,positive,top,1.12,1.20,80.1838,16.612 +10,mean_top_tension_N,positive,top,1.12,1.25,85.4854,17.908 +10,mean_top_tension_N,positive,top,1.12,1.30,90.9048,18.615 +10,mean_top_tension_N,positive,top,1.12,1.35,96.7955,20.264 +10,mean_top_tension_N,positive,top,1.12,1.40,101.9793,21.678 +10,mean_top_tension_N,positive,top,1.84,0.00,59.0952, +10,mean_top_tension_N,positive,top,1.84,0.20,67.1065, +10,mean_top_tension_N,positive,top,1.84,0.25,66.9887,1.06 +10,mean_top_tension_N,positive,top,1.84,0.30,68.2846,1.178 +10,mean_top_tension_N,positive,top,1.84,0.35,69.934,1.414 +10,mean_top_tension_N,positive,top,1.84,0.40,71.1122,1.885 +10,mean_top_tension_N,positive,top,1.84,0.45,73.5862,2.945 +10,mean_top_tension_N,positive,top,1.84,0.60,82.6579,5.655 +10,mean_top_tension_N,positive,top,1.84,0.65,85.9566,6.598 +10,mean_top_tension_N,positive,top,1.84,0.70,89.0198,6.833 +10,mean_top_tension_N,positive,top,1.84,0.75,93.968,8.483 +10,mean_top_tension_N,positive,top,1.84,0.80,95.7352,9.072 +10,mean_top_tension_N,positive,top,1.84,0.85,100.8011,10.132 +10,mean_top_tension_N,positive,top,1.84,0.90,104.8068,11.781 +10,mean_top_tension_N,positive,top,1.84,0.95,109.0481,12.253 +10,mean_top_tension_N,positive,top,1.84,1.00,111.8756,13.195 +10,mean_top_tension_N,positive,top,1.84,1.05,119.8869,14.609 +10,mean_top_tension_N,positive,top,1.84,1.10,123.8926,16.258 +10,mean_top_tension_N,positive,top,1.84,1.15,126.7201,16.258 +10,mean_top_tension_N,positive,top,1.84,1.20,133.082,18.379 +10,mean_top_tension_N,positive,top,1.84,1.25,138.9727,20.971 +10,mean_top_tension_N,positive,top,1.84,1.30,144.0386,19.675 +10,mean_top_tension_N,positive,top,1.84,1.35,150.8718,23.68 +10,mean_top_tension_N,positive,top,1.84,1.40,154.8775,23.68 +12a,psi_deg,negative,straight part,1.12,0.25,56.599, +12a,psi_deg,negative,straight part,1.12,0.30,44.7277, +12a,psi_deg,negative,straight part,1.12,0.35,38.1864, +12a,psi_deg,negative,straight part,1.12,0.40,33.0988, +12a,psi_deg,negative,straight part,1.12,0.45,28.4956, +12a,psi_deg,negative,straight part,1.12,0.50,25.3461, +12a,psi_deg,negative,straight part,1.12,0.55,21.9543, +12a,psi_deg,negative,straight part,1.12,0.60,19.5316, +12a,psi_deg,negative,straight part,1.12,0.65,16.8666, +12a,psi_deg,negative,straight part,1.12,0.75,13.9594, +12a,psi_deg,negative,straight part,1.12,0.80,13.4749, +12a,psi_deg,negative,straight part,1.12,0.85,12.748, +12a,psi_deg,negative,straight part,1.12,0.95,12.5058, +12a,psi_deg,negative,straight part,1.12,1.00,12.0212, +12a,psi_deg,negative,straight part,1.12,1.10,12.2635, +12a,psi_deg,negative,straight part,1.12,1.20,12.2635, +12a,psi_deg,negative,straight part,1.12,1.25,11.779, +12a,psi_deg,negative,straight part,1.12,1.30,11.5367, +12a,psi_deg,negative,straight part,1.12,1.35,11.2944, +12a,psi_deg,negative,straight part,1.12,1.40,11.5367, +12a,psi_deg,negative,straight part,1.84,0.20,66.2898, +12a,psi_deg,negative,straight part,1.84,0.25,65.3207, +12a,psi_deg,negative,straight part,1.84,0.30,64.8362, +12a,psi_deg,negative,straight part,1.84,0.35,62.1712, +12a,psi_deg,negative,straight part,1.84,0.40,58.2949, +12a,psi_deg,negative,straight part,1.84,0.45,58.2949, +12a,psi_deg,negative,straight part,1.84,0.50,59.0217, +12a,psi_deg,negative,straight part,1.84,0.55,57.5681, +12a,psi_deg,negative,straight part,1.84,0.60,54.1763, +12a,psi_deg,negative,straight part,1.84,0.65,49.3309, +12a,psi_deg,negative,straight part,1.84,0.70,46.4236, +12a,psi_deg,negative,straight part,1.84,0.75,42.305, +12a,psi_deg,negative,straight part,1.84,0.80,38.671, +12a,psi_deg,negative,straight part,1.84,0.85,37.2174, +12a,psi_deg,negative,straight part,1.84,0.90,35.2792, +12a,psi_deg,negative,straight part,1.84,0.95,33.5833, +12a,psi_deg,negative,straight part,1.84,1.00,30.4338, +12a,psi_deg,negative,straight part,1.84,1.05,30.1915, +12a,psi_deg,negative,straight part,1.84,1.10,28.0111, +12a,psi_deg,negative,straight part,1.84,1.15,27.042, +12a,psi_deg,negative,straight part,1.84,1.20,25.1038, +12a,psi_deg,negative,straight part,1.84,1.25,25.1038, +12a,psi_deg,negative,straight part,1.84,1.30,23.1657, +12a,psi_deg,negative,straight part,1.84,1.35,22.4389, +12a,psi_deg,negative,straight part,1.84,1.40,22.1966, +13,mean_top_tension_N,negative,top,1.12,0.00,11.4975, +13,mean_top_tension_N,negative,top,1.12,0.20,7.7903,0.992 +13,mean_top_tension_N,negative,top,1.12,0.25,7.6337,0.835 +13,mean_top_tension_N,negative,top,1.12,0.30,6.3283,0.783 +13,mean_top_tension_N,negative,top,1.12,0.35,6.2761, +13,mean_top_tension_N,negative,top,1.12,0.40,6.6938, +13,mean_top_tension_N,negative,top,1.12,0.45,6.9549,0.992 +13,mean_top_tension_N,negative,top,1.12,0.50,7.216,0.835 +13,mean_top_tension_N,negative,top,1.12,0.55,7.6337,0.835 +13,mean_top_tension_N,negative,top,1.12,0.60,8.3124,0.783 +13,mean_top_tension_N,negative,top,1.12,0.65,11.132,1.41 +13,mean_top_tension_N,negative,top,1.12,0.70,13.2728,1.253 +13,mean_top_tension_N,negative,top,1.12,0.75,15.3613,1.462 +13,mean_top_tension_N,negative,top,1.12,0.80,16.249,2.036 +13,mean_top_tension_N,negative,top,1.12,0.85,18.0764,2.924 +13,mean_top_tension_N,negative,top,1.12,0.90,22.9845,4.073 +13,mean_top_tension_N,negative,top,1.12,0.95,25.282,4.177 +13,mean_top_tension_N,negative,top,1.12,1.00,28.0493,4.229 +13,mean_top_tension_N,negative,top,1.12,1.05,31.7565,5.013 +13,mean_top_tension_N,negative,top,1.12,1.10,34.4716,5.326 +13,mean_top_tension_N,negative,top,1.12,1.15,37.8133, +13,mean_top_tension_N,negative,top,1.12,1.20,41.5205,6.736 +13,mean_top_tension_N,negative,top,1.12,1.30,49.8747,8.72 +13,mean_top_tension_N,negative,top,1.12,1.35,52.7464,8.354 +13,mean_top_tension_N,negative,top,1.12,1.40,58.2811, +13,mean_top_tension_N,negative,top,1.84,0.00,61.7794,1.514 +13,mean_top_tension_N,negative,top,1.84,0.20,58.8555,1.827 +13,mean_top_tension_N,negative,top,1.84,0.25,58.0723,1.88 +13,mean_top_tension_N,negative,top,1.84,0.30,55.6182,2.036 +13,mean_top_tension_N,negative,top,1.84,0.35,55.1483, +13,mean_top_tension_N,negative,top,1.84,0.40,51.2322,3.185 +13,mean_top_tension_N,negative,top,1.84,0.45,49.1959,3.133 +13,mean_top_tension_N,negative,top,1.84,0.50,47.8383, +13,mean_top_tension_N,negative,top,1.84,0.55,44.0267,4.334 +13,mean_top_tension_N,negative,top,1.84,0.60,41.6771,4.177 +13,mean_top_tension_N,negative,top,1.84,0.65,40.3195,3.551 +13,mean_top_tension_N,negative,top,1.84,0.70,40.685,3.812 +13,mean_top_tension_N,negative,top,1.84,0.75,40.8939,4.334 +13,mean_top_tension_N,negative,top,1.84,0.80,40.9461,4.908 +13,mean_top_tension_N,negative,top,1.84,0.85,41.7293,5.9 +13,mean_top_tension_N,negative,top,1.84,0.90,42.6692,6.422 +13,mean_top_tension_N,negative,top,1.84,0.95,42.3559,6.109 +13,mean_top_tension_N,negative,top,1.84,1.00,42.1992,6.161 +13,mean_top_tension_N,negative,top,1.84,1.05,43.6612,6.892 +13,mean_top_tension_N,negative,top,1.84,1.10,44.1312,6.109 +13,mean_top_tension_N,negative,top,1.84,1.15,44.2356,6.213 +13,mean_top_tension_N,negative,top,1.84,1.20,46.1153,6.109 +13,mean_top_tension_N,negative,top,1.84,1.25,46.4808,7.519 +13,mean_top_tension_N,negative,top,1.84,1.30,47.0551,5.9 +13,mean_top_tension_N,negative,top,1.84,1.35,47.7339,6.37 +13,mean_top_tension_N,negative,top,1.84,1.40,49.457,6.944 +15a,f_cf_hz,negative,around mid-depth,1.12,0.40,0.344, +15a,f_cf_hz,negative,around mid-depth,1.12,0.45,0.3865, +15a,f_cf_hz,negative,around mid-depth,1.12,0.50,0.3759, +15a,f_cf_hz,negative,around mid-depth,1.12,0.55,0.3546, +15a,f_cf_hz,negative,around mid-depth,1.12,0.60,0.344, +15a,f_cf_hz,negative,around mid-depth,1.12,0.60,0.5354, +15a,f_cf_hz,negative,around mid-depth,1.12,0.65,0.3971, +15a,f_cf_hz,negative,around mid-depth,1.12,0.65,0.7002, +15a,f_cf_hz,negative,around mid-depth,1.12,0.70,0.445, +15a,f_cf_hz,negative,around mid-depth,1.12,0.70,0.8756, +15a,f_cf_hz,negative,around mid-depth,1.12,0.75,0.4609, +15a,f_cf_hz,negative,around mid-depth,1.12,0.75,0.8969, +15a,f_cf_hz,negative,around mid-depth,1.12,0.80,0.3918, +15a,f_cf_hz,negative,around mid-depth,1.12,0.80,0.9075, +15a,f_cf_hz,negative,around mid-depth,1.12,0.85,0.3918, +15a,f_cf_hz,negative,around mid-depth,1.12,0.85,0.9872, +15a,f_cf_hz,negative,around mid-depth,1.12,0.90,1.1308, +15a,f_cf_hz,negative,around mid-depth,1.12,0.95,1.1733, +15a,f_cf_hz,negative,around mid-depth,1.12,1.00,1.2956, +15a,f_cf_hz,negative,around mid-depth,1.12,1.05,1.3806, +15a,f_cf_hz,negative,around mid-depth,1.12,1.10,1.4498, +15a,f_cf_hz,negative,around mid-depth,1.12,1.15,1.5455, +15a,f_cf_hz,negative,around mid-depth,1.12,1.20,1.5986, +15a,f_cf_hz,negative,around mid-depth,1.12,1.25,1.673, +15a,f_cf_hz,negative,around mid-depth,1.12,1.30,1.7528, +15a,f_cf_hz,negative,around mid-depth,1.12,1.35,1.7847, +15a,f_cf_hz,negative,around mid-depth,1.84,0.20,0.3759, +15a,f_cf_hz,negative,around mid-depth,1.84,0.20,0.445, +15a,f_cf_hz,negative,around mid-depth,1.84,0.25,0.5832, +15a,f_cf_hz,negative,around mid-depth,1.84,0.25,0.6045, +15a,f_cf_hz,negative,around mid-depth,1.84,0.30,0.5991, +15a,f_cf_hz,negative,around mid-depth,1.84,0.30,0.647, +15a,f_cf_hz,negative,around mid-depth,1.84,0.30,0.6523, +15a,f_cf_hz,negative,around mid-depth,1.84,0.35,0.647, +15a,f_cf_hz,negative,around mid-depth,1.84,0.35,0.6683, +15a,f_cf_hz,negative,around mid-depth,1.84,0.35,0.8278, +15a,f_cf_hz,negative,around mid-depth,1.84,0.40,0.8596, +15a,f_cf_hz,negative,around mid-depth,1.84,0.45,0.8437, +15a,f_cf_hz,negative,around mid-depth,1.84,0.45,0.865, +15a,f_cf_hz,negative,around mid-depth,1.84,0.50,0.8596, +15a,f_cf_hz,negative,around mid-depth,1.84,0.50,1.067, +15a,f_cf_hz,negative,around mid-depth,1.84,0.55,0.95, +15a,f_cf_hz,negative,around mid-depth,1.84,0.55,0.9713, +15a,f_cf_hz,negative,around mid-depth,1.84,0.60,1.0564, +15a,f_cf_hz,negative,around mid-depth,1.84,0.60,1.0776, +15a,f_cf_hz,negative,around mid-depth,1.84,0.65,0.4769, +15a,f_cf_hz,negative,around mid-depth,1.84,0.65,1.0298, +15a,f_cf_hz,negative,around mid-depth,1.84,0.70,0.7321, +15a,f_cf_hz,negative,around mid-depth,1.84,0.70,0.9872, +15a,f_cf_hz,negative,around mid-depth,1.84,0.75,0.95, +15a,f_cf_hz,negative,around mid-depth,1.84,0.75,1.051, +15a,f_cf_hz,negative,around mid-depth,1.84,0.80,0.8703, +15a,f_cf_hz,negative,around mid-depth,1.84,0.85,0.8331, +15a,f_cf_hz,negative,around mid-depth,1.84,0.85,0.8543, +15a,f_cf_hz,negative,around mid-depth,1.84,0.90,0.8384, +15a,f_cf_hz,negative,around mid-depth,1.84,0.95,0.7959, +15a,f_cf_hz,negative,around mid-depth,1.84,1.00,0.7693, +15a,f_cf_hz,negative,around mid-depth,1.84,1.00,0.7905, +15a,f_cf_hz,negative,around mid-depth,1.84,1.05,0.7852, +15a,f_cf_hz,negative,around mid-depth,1.84,1.05,1.1361, +15a,f_cf_hz,negative,around mid-depth,1.84,1.10,1.0989, +15a,f_cf_hz,negative,around mid-depth,1.84,1.10,1.1201, +15a,f_cf_hz,negative,around mid-depth,1.84,1.10,1.1574, +15a,f_cf_hz,negative,around mid-depth,1.84,1.15,0.9872, +15a,f_cf_hz,negative,around mid-depth,1.84,1.15,1.1414, +15a,f_cf_hz,negative,around mid-depth,1.84,1.20,1.0829, +15a,f_cf_hz,negative,around mid-depth,1.84,1.25,1.0989, +15a,f_cf_hz,negative,around mid-depth,1.84,1.30,1.0457, +15a,f_cf_hz,negative,around mid-depth,1.84,1.30,1.067, +15a,f_cf_hz,negative,around mid-depth,1.84,1.35,1.0776, +15a,f_cf_hz,negative,around mid-depth,1.84,1.40,1.0989, +15a,f_cf_hz,negative,around mid-depth,1.84,1.40,1.1148, +15a,f_cf_hz,negative,around mid-depth,1.84,1.40,1.1361, diff --git a/validation/experiments/chaplin_catenary/provenance.json b/validation/experiments/chaplin_catenary/provenance.json new file mode 100644 index 00000000..79a46a6a --- /dev/null +++ b/validation/experiments/chaplin_catenary/provenance.json @@ -0,0 +1,36 @@ +{ + "source": "Chaplin & King (2018), Laboratory measurements of the vortex-induced vibrations of an untensioned catenary riser with high curvature, Journal of Fluids and Structures 79, 26-38 (Table 1; Secs. 2, 3, 4.1, 4.2; Eqs. 9-10; Figs. 3, 5, 9, 10, 12, 13, 15 and their captions); Ulveseter, Thorsen, Saevik & Larsen (2019), Applied Ocean Research 90, 101856 (Table 1); Ulveseter, Thorsen, Saevik & Larsen (2018), Marine Structures 60, 241-260 (Table 3); Chaplin, Bearman, Huera Huarte & Pattenden (2005), Journal of Fluids and Structures 21(1), 3-24 (Eq. 4); Facchinetti, de Langre & Biolley (2004), Journal of Fluids and Structures 19(2), 123-140 (Secs. 2-3)", + "doi": [ + "10.1016/j.jfluidstructs.2018.01.008", + "10.1016/j.apor.2019.101856", + "10.1016/j.marstruc.2018.04.001", + "10.1016/j.jfluidstructs.2005.04.010", + "10.1016/j.jfluidstructs.2003.12.004" + ], + "article_pdf_sha256": "0903b21f16eacc374135408e5473d5c48cc20a041fd0f63621187a7032a42984", + "bibliographic_data": "Chaplin & King (2018): authors, title, journal, volume, year, pages and DOI from the article's first page; the other articles as in the FLOTANT case", + "data_used": "the riser (Table 1: d 56 mm, 5.36 m between the pin ends, EI 1.3 N m^2 and EA 790 kN estimated, structural damping in air about 3 % of critical, submerged weight 2.9 and 20.9 N/m at m* 1.12 and 1.84, water depth 2.0 m, lower pin on the floor, upper pin 200 mm above the surface, 4.30 m between the pins horizontally, U 0 to +-1.4 m/s); the current directions (Sec. 3: positive with the upstream pin on the floor); twelve accelerometers 400 mm apart (Sec. 2); mean top tension and its standard deviation against U (Fig. 10, positive; Fig. 13, negative); cross-flow spectral peak frequencies against U (Fig. 9(a), two accelerometers near the top, and 9(b), one lower down, positive; Fig. 15(a), around mid-depth, negative); the inclination of the straight part in negative current (Fig. 12(a)); Eq. 9 (the straight-line balance of normal drag and weight) for the implied drag coefficient; the statements f d/U about 0.11 (positive, Sec. 4.1) and f d/(U sin psi) about 0.13 (negative, Sec. 4.2); the mean profiles (Fig. 5) for the touchdown, by eye", + "extraction": "extract_chaplin2018.py: Figs. 9, 10, 12, 13 and 15 are embedded greyscale raster images; each panel calibrated on its frame and the tick marks found on both opposite sides of it (largest tick residual 0.0010 m/s, 0.0036 Hz, 0.07 deg, 0.14 N); markers found by a circle Hough transform and classed solid (m* 1.84) or open (m* 1.12) by their fill; speeds snapped to the 0.05 m/s test grid (largest snap 0.012 m/s); peaks off the grid by more than 0.0125 m/s or with a fill between the classes dropped and reported; error bars read from their caps (the bar centre moves the marker's by at most 0.59 N); points read (open/solid): Fig. 9(a) 12/40, 9(b) 22/34, 10 26/24 (46 standard deviations), 12(a) 20/25, 13 25/26 (44 standard deviations), 15(a) 26/47; checks: the line f d/U = 0.11 drawn in Fig. 9 reads 0.105 and 0.108, the lines W h drawn in Fig. 13 read 41.9 and 5.65 N against Table 1's 41.8 and 5.8 N", + "assumptions": "fresh water 1000 kg/m^3 (not stated; m* 1.12 and W 2.9 N/m agree at it); mass per metre with the internal water from the submerged weight, rho A + W/g (for m* 1.84 Table 1's m* gives 1.4 % less mass); the 0.2 m above the surface in air with the same mass; pinned ends at (0, 0, -2.0) and (4.30, 0, 0.2); uniform current over the depth, in the riser's plane, ramped linearly from still water over 10 s (a static solve in the full current finds no equilibrium for some light-riser cases in negative current); Cd 1.2 and Ca 1; floor contact with the default penalty stiffness and damping and friction coefficient 0.5 (not given; a silicone sheath on the flume floor; frictionless as sensitivity); structural damping as Rayleigh damping, 3 % at 0.3 and 3.0 Hz (the range of the measured cross-flow frequencies; none as sensitivity); the accelerometers 0.48 m from each pin, 0.4 m apart (positions not given); the compared points by their mean elevation, at the share of the height between the pins of the dots of the insets of Fig. 9 (0.65 and 0.37 for (a), 0.19 for (b)) and mid-depth for Fig. 15", + "coefficients": { + "uls19": "Ulveseter et al. (2019), Table 1, fitted by them to the NDP riser in uniform flow (Sec. 4.1, Chh 1.5): Cd 1.2, CM 2, Cl 0.85, cF 0.144, dF 0.064; VIV ClX 0.75, alpha 0.15, Chh 1.5; blind here", + "b1": "the generic set of the Delta Flume case, nothing fitted to these tests: Cl 0.8, cF 0.18, dF 0.08, Cd 1.2; VIV ClX 0.85, alpha 0.15 (Ulveseter et al. 2018, Table 3); VIV AMPLITUDE Cv 0.8 with CdAmp = 1 + 2.3 s + 1.7 s^2, s = (A/D)/sqrt(2), at A/D 0-1.5 (Chaplin et al. 2005, Eq. 4); VIV DAMPING 0 0 1", + "wake": "Facchinetti et al. (2004): WAKE OSCILLATOR CL0 0.3, St 0.2, eps 0.3, A 12, LINE TYPES Cl 0, Cd 1.2; cross-flow only", + "none": "no VIV force, Cd 1.2: the drag of the static solution" + }, + "processing": "statistics over 30-110 s (30-40 s of 40 s runs without VIV); mean and standard deviation of the tension at the upper pin (FairTen1); the mean profile from the mean node positions; the inclination to the horizontal at mid-depth from the neighbouring nodes; the dominant cross-flow frequency as the peak of the averaged spectrum (20 s Hann segments, half overlapping, 0.05 Hz resolution) of the horizontal cross-flow displacement within 0.3-6 Hz, and the peak of the same spectrum times omega^4 (the acceleration spectrum) within 0.15-6 Hz as a second value; A/D_rms of the cross-flow displacement, all of it and above 0.3 Hz; the spread along the span over the assumed accelerometer stations that are suspended and below the surface; the model's frequency compared with the nearest measured point at the same speed and mass ratio (the figures give several spectral peaks at some speeds) and as median f d/U; the tension also as the increment from the still-water value of each figure and of the model; the drag coefficient implied by an inclination through Eq. 9, Cd = 2 W cos psi / (rho d U^2 sin^2 psi)", + "CableDyn_commit": "15b5ebc (dev)", + "validation_date": "2026-11-17", + "executable_name": "cabledyn.exe", + "executable_sha256": "see summary.json", + "compiler": "GNU Fortran 16.2.0", + "build_type": "Release", + "platform": "Windows 11 x86-64", + "segments": 54, + "dt_s": 0.0025, + "tmax_s": 110.0, + "statistics_after_s": 30.0, + "reproduction": "the default command, run into a new work directory with the executable of summary.json, reproduces response_comparison.csv and summary.json byte for byte", + "current_ramp_s": 10.0, + "runs": "2 still water, 208 primary (4 sets x 2 mass ratios x 2 directions x 13 speeds), 12 convergence, 72 sensitivity" +} diff --git a/validation/experiments/chaplin_catenary/response_comparison.csv b/validation/experiments/chaplin_catenary/response_comparison.csv new file mode 100644 index 00000000..b236f23e --- /dev/null +++ b/validation/experiments/chaplin_catenary/response_comparison.csv @@ -0,0 +1,295 @@ +run,set,role,m_star,direction,U_mps,segments,dt_s,structural_damping,floor_friction,model_mean_T_N,model_sd_T_N,model_still_T_N,measured_mean_T_N,measured_sd_T_N,measured_still_T_N,model_psi_mid_depth_deg,model_cd_eq9,measured_psi_deg,measured_cd_eq9,model_f_upper_hz,model_f_acc_upper_hz,measured_f_upper_hz,nearest_measured_f_upper_hz,model_f_lower_hz,model_f_acc_lower_hz,measured_f_lower_hz,nearest_measured_f_lower_hz,model_f_span_min_hz,model_f_span_median_hz,model_f_span_max_hz,model_AD_rms_max,model_AD_rms_above_0p3hz_max,model_f_mid_hz,model_f_acc_mid_hz,measured_f_mid_hz,nearest_measured_f_mid_hz +none_m1.12_still,none,still water,1.12,pos,0,54,0.0025,1,0.5,15.0821,7.40696e-07,15.0821,13.3836,,13.3836,52.9723,,,,,,,,,,,,,,,,,,,, +none_m1.84_still,none,still water,1.84,pos,0,54,0.0025,1,0.5,81.1893,4.70667e-06,81.1893,59.0952,,59.0952,53.2598,,,,,,,,,,,,,,,,,,,, +uls19_m1.12_pos0.2,uls19,primary,1.12,pos,0.2,54,0.0025,1,0.5,16.7982,0.505064,15.0821,15.2686,,13.3836,51.6608,2.61078,,,0.4,0.8,,,0.4,1.1,0.527,0.5268,0.4,0.4,0.4,0.290581,0.279148,,,, +uls19_m1.12_pos0.3,uls19,primary,1.12,pos,0.3,54,0.0025,1,0.5,19.0259,0.987133,15.0821,17.6249,1.414,13.3836,50.1694,1.24989,,,0.65,1.85,0.814,0.8144,0.65,0.65,,,0.65,0.65,0.65,0.297955,0.295891,,,, +uls19_m1.12_pos0.4,uls19,primary,1.12,pos,0.4,54,0.0025,1,0.5,21.291,1.72297,15.0821,21.3949,2.356,13.3836,48.9137,0.748849,,,0.9,0.9,0.806,0.8064,0.9,0.9,,,0.9,0.9,0.9,0.244977,0.235142,,,, +uls19_m1.12_pos0.5,uls19,primary,1.12,pos,0.5,54,0.0025,1,0.5,24.7421,3.2214,15.0821,25.8718,3.534,13.3836,49.4818,0.465748,,,1.125,2.2,1.110,1.1104,1.15,1.15,0.870,0.8698,1.1,1.15,1.15,0.285731,0.280606,,,, +uls19_m1.12_pos0.6,uls19,primary,1.12,pos,0.6,54,0.0025,1,0.5,28.5592,4.74229,15.0821,31.5269,4.477,13.3836,48.245,0.34427,,,1.3,2.525,,,1.3,1.3,0.989,0.9894,1.15,1.3,1.3,0.298055,0.292083,,,, +uls19_m1.12_pos0.7,uls19,primary,1.12,pos,0.7,54,0.0025,1,0.5,32.45,5.92764,15.0821,36.9463,6.126,13.3836,46.9257,0.270537,,,1.425,1.65,,,1.45,1.65,1.125,1.125,1.4,1.65,1.65,0.281958,0.273706,,,, +uls19_m1.12_pos0.8,uls19,primary,1.12,pos,0.8,54,0.0025,1,0.5,36.3536,6.68757,15.0821,45.311,7.893,13.3836,46.3414,0.213451,,,1.75,3.45,,,1.75,1.75,1.277,1.2766,1.75,1.75,1.75,0.293301,0.287427,,,, +uls19_m1.12_pos0.9,uls19,primary,1.12,pos,0.9,54,0.0025,1,0.5,42.4833,9.49256,15.0821,53.2045,10.132,13.3836,41.5234,0.217833,,,1.9,1.9,,,1.9,1.9,1.572,1.5717,1.9,1.9,1.9,0.326064,0.316025,,,, +uls19_m1.12_pos1,uls19,primary,1.12,pos,1,54,0.0025,1,0.5,47.7699,10.0317,15.0821,60.7446,12.017,13.3836,40.3932,0.187839,,,2.3,2.3,,,2.3,2.3,1.643,1.6435,2.3,2.3,2.3,0.316676,0.312013,,,, +uls19_m1.12_pos1.1,uls19,primary,1.12,pos,1.1,54,0.0025,1,0.5,53.7868,10.1786,15.0821,69.2271,14.373,13.3836,39.5243,0.16302,,,2.45,2.45,,,2.45,2.45,1.747,1.7472,2.45,2.45,2.45,0.338084,0.332129,,,, +uls19_m1.12_pos1.2,uls19,primary,1.12,pos,1.2,54,0.0025,1,0.5,60.3426,11.2162,15.0821,80.1838,16.612,13.3836,38.883,0.142085,,,2.6,2.6,2.118;2.350,2.3503,2.6,2.6,1.739,1.7392,2.6,2.6,2.6,0.336076,0.332256,,,, +uls19_m1.12_pos1.3,uls19,primary,1.12,pos,1.3,54,0.0025,1,0.5,67.5869,12.428,15.0821,90.9048,18.615,13.3836,38.1945,0.125975,,,2.75,2.75,,,2.75,2.75,1.699,1.6993,0.6,2.75,2.75,0.335948,0.331869,,,, +uls19_m1.12_pos1.4,uls19,primary,1.12,pos,1.4,54,0.0025,1,0.5,75.2104,16.9342,15.0821,101.979,21.678,13.3836,37.4696,0.113327,,,3.075,3.075,2.302,2.3023,2.85,2.85,1.811,1.811,0.65,2.95,3.2,0.334496,0.329498,,,, +uls19_m1.12_neg0.2,uls19,primary,1.12,neg,0.2,54,0.0025,1,0.5,13.207,0.48489,15.0821,7.7903,0.992,11.4975,54.5352,2.26468,,,,,,,,,,,0.4,0.4,0.4,0.401757,0.39923,0.4,1.15,, +uls19_m1.12_neg0.3,uls19,primary,1.12,neg,0.3,54,0.0025,1,0.5,10.64,1.46672,15.0821,6.3283,0.783,11.4975,56.5974,0.909037,44.7277,1.65088,,,,,,,,,0.6,0.6,0.6,0.358314,0.355103,0.6,0.6,, +uls19_m1.12_neg0.4,uls19,primary,1.12,neg,0.4,54,0.0025,1,0.5,8.91868,1.48389,15.0821,6.6938,,11.4975,45.3003,0.901194,33.0988,1.81846,,,,,,,,,0.55,0.6,0.7,4.84122,0.587544,0.6,0.6,0.344,0.344 +uls19_m1.12_neg0.5,uls19,primary,1.12,neg,0.5,54,0.0025,1,0.5,9.18885,1.64364,15.0821,7.216,0.835,11.4975,29.1746,1.52223,25.3461,2.04307,,,,,,,,,0.3,0.65,0.8,7.29032,0.659966,0.8,0.8,0.376,0.3759 +uls19_m1.12_neg0.6,uls19,primary,1.12,neg,0.6,54,0.0025,1,0.5,10.7976,1.70681,15.0821,8.3124,0.783,11.4975,24.9233,1.46921,19.5316,2.42581,,,,,,,,,0.7,0.7,0.7,0.657846,0.383439,0.7,0.7,0.344;0.535,0.5354 +uls19_m1.12_neg0.7,uls19,primary,1.12,neg,0.7,54,0.0025,1,0.5,12.8915,2.66935,15.0821,13.2728,1.253,11.4975,7.81918,11.3138,,,,,,,,,,,0.7,0.75,0.75,0.481963,0.336565,0.75,4.25,0.445;0.876,0.8756 +uls19_m1.12_neg0.8,uls19,primary,1.12,neg,0.8,54,0.0025,1,0.5,15.9706,3.90666,15.0821,16.249,2.036,11.4975,13.771,2.77387,13.4749,2.89837,,,,,,,,,0.65,0.65,1.8,0.352379,0.331739,0.65,1.8,0.392;0.907,0.9075 +uls19_m1.12_neg0.9,uls19,primary,1.12,neg,0.9,54,0.0025,1,0.5,20.0349,5.14278,15.0821,22.9845,4.073,11.4975,21.4405,0.890744,,,,,,,,,,,0.7,0.725,1.95,0.42938,0.394161,0.7,1.95,1.131,1.1308 +uls19_m1.12_neg1,uls19,primary,1.12,neg,1,54,0.0025,1,0.5,24.7594,6.02741,15.0821,28.0493,4.229,11.4975,27.8851,0.418507,12.0212,2.33529,,,,,,,,,0.7,0.7,2.15,0.3942,0.37677,2.15,2.15,1.296,1.2956 +uls19_m1.12_neg1.1,uls19,primary,1.12,neg,1.1,54,0.0025,1,0.5,29.5512,6.50701,15.0821,34.4716,5.326,11.4975,30.2918,0.290497,12.2635,1.85391,,,,,,,,,0.75,0.75,2.4,0.431732,0.419519,0.75,2.4,1.450,1.4498 +uls19_m1.12_neg1.2,uls19,primary,1.12,neg,1.2,54,0.0025,1,0.5,35.5558,8.34394,15.0821,41.5205,6.736,11.4975,31.7633,0.220681,12.2635,1.5578,,,,,,,,,0.8,0.8,2.7,0.402902,0.395627,2.7,2.7,1.599,1.5986 +uls19_m1.12_neg1.3,uls19,primary,1.12,neg,1.3,54,0.0025,1,0.5,41.9534,8.93749,15.0821,49.8747,8.72,11.4975,33.2026,0.171007,11.5367,1.50123,,,,,,,,,0.85,0.9,2.85,0.377392,0.371633,2.85,2.85,1.753,1.7528 +uls19_m1.12_neg1.4,uls19,primary,1.12,neg,1.4,54,0.0025,1,0.5,48.1665,10.0241,15.0821,58.2811,,11.4975,33.5734,0.143967,11.5367,1.29443,,,,,,,,,0.8,0.8,3,0.334655,0.3307,3,3,, +uls19_m1.84_pos0.2,uls19,primary,1.84,pos,0.2,54,0.0025,1,0.5,83.5018,0.562486,81.1893,67.1065,,59.0952,53.0688,17.5476,,,0.4,0.4,,,0.4,0.4,,,0.4,0.4,0.4,0.576817,0.575521,,,, +uls19_m1.84_pos0.3,uls19,primary,1.84,pos,0.3,54,0.0025,1,0.5,85.3707,1.77032,81.1893,68.2846,1.178,59.0952,52.6434,7.96481,,,0.7,1.375,0.662;0.718,0.7184,0.7,0.7,0.678,0.6784,0.7,0.7,0.7,0.29515,0.294309,,,, +uls19_m1.84_pos0.4,uls19,primary,1.84,pos,0.4,54,0.0025,1,0.5,88.0966,2.08189,81.1893,71.1122,1.885,59.0952,52.4136,4.53148,,,0.8,0.8,0.950;1.006,0.9504,0.8,2.55,0.822,0.8219,0.8,0.8,0.8,0.2599,0.258093,,,, +uls19_m1.84_pos0.5,uls19,primary,1.84,pos,0.5,54,0.0025,1,0.5,92.1167,5.58529,81.1893,,,59.0952,51.8191,2.98693,,,1.15,3.4,0.982,0.9824,1.15,3.4,0.982,0.9815,1.15,1.15,1.15,0.257071,0.255393,,,, +uls19_m1.84_pos0.6,uls19,primary,1.84,pos,0.6,54,0.0025,1,0.5,97.2255,6.35024,81.1893,82.6579,5.655,59.0952,51.2613,2.13256,,,1.25,2.375,1.278;1.334,1.2784,1.15,1.25,0.670;1.285,1.2846,1.15,1.25,1.25,0.308735,0.305862,,,, +uls19_m1.84_pos0.7,uls19,primary,1.84,pos,0.7,54,0.0025,1,0.5,102.06,9.24732,81.1893,89.0198,6.833,59.0952,50.6741,1.61331,,,1.55,1.55,1.390;1.446,1.4464,1.55,1.55,0.702;1.404;1.460,1.46,1.55,1.55,1.55,0.271429,0.267213,,,, +uls19_m1.84_pos0.8,uls19,primary,1.84,pos,0.8,54,0.0025,1,0.5,108.387,11.8418,81.1893,95.7352,9.072,59.0952,49.9678,1.27959,,,1.65,1.65,1.582;1.638;1.694,1.6384,1.65,4.8,0.822;1.612,1.6116,1.65,1.65,1.65,0.274848,0.26973,,,, +uls19_m1.84_pos0.9,uls19,primary,1.84,pos,0.9,54,0.0025,1,0.5,114.847,12.9385,81.1893,104.807,11.781,59.0952,49.4142,1.03951,,,2,2,1.734;1.822,1.8223,2,2,0.766;1.827,1.827,2,2,2,0.281236,0.277281,,,, +uls19_m1.84_pos1,uls19,primary,1.84,pos,1,54,0.0025,1,0.5,121.545,15.0978,81.1893,111.876,13.195,59.0952,48.8015,0.868404,,,2.05,2.05,1.958;2.014,2.0143,2.05,2.05,0.830;1.947,1.9466,2.05,2.05,2.05,0.266045,0.263599,,,, +uls19_m1.84_pos1.1,uls19,primary,1.84,pos,1.1,54,0.0025,1,0.5,130.096,18.0775,81.1893,123.893,16.258,59.0952,47.7316,0.7577,,,2.45,2.45,2.046,2.0463,2.45,2.45,1.994,1.9945,2.45,2.45,2.45,0.284093,0.27958,,,, +uls19_m1.84_pos1.2,uls19,primary,1.84,pos,1.2,54,0.0025,1,0.5,138.99,20.5616,81.1893,133.082,18.379,59.0952,47.0828,0.658131,,,2.6,2.6,2.278,2.2783,2.6,2.6,2.050,2.0503,2.5,2.6,2.6,0.297519,0.29508,,,, +uls19_m1.84_pos1.3,uls19,primary,1.84,pos,1.3,54,0.0025,1,0.5,148.038,23.082,81.1893,144.039,19.675,59.0952,46.4481,0.579362,,,2.65,2.9,2.310;2.422;2.486,2.4863,2.6,2.9,2.234,2.2337,2.5,2.6,2.9,0.304974,0.302497,,,, +uls19_m1.84_pos1.4,uls19,primary,1.84,pos,1.4,54,0.0025,1,0.5,158.499,28.4721,81.1893,154.877,23.68,59.0952,45.6708,0.520058,,,3.1,3.1,2.454;2.574,2.5743,3.1,3.1,2.345,2.3454,2.7,3.1,3.1,0.31863,0.316677,,,, +uls19_m1.84_neg0.2,uls19,primary,1.84,neg,0.2,54,0.0025,1,0.5,78.9164,0.688175,81.1893,58.8555,1.827,61.7794,53.4022,17.2606,66.2898,8.95099,,,,,,,,,0.4,0.4,0.4,0.630941,0.629787,0.4,0.4,0.376;0.445,0.3759 +uls19_m1.84_neg0.3,uls19,primary,1.84,neg,0.3,54,0.0025,1,0.5,76.9682,1.85657,81.1893,55.6182,2.036,61.7794,53.8297,7.51106,64.8362,4.30484,,,,,,,,,0.7,0.7,0.7,0.380995,0.380378,0.7,0.7,0.599;0.647;0.652,0.6523 +uls19_m1.84_neg0.4,uls19,primary,1.84,neg,0.4,54,0.0025,1,0.5,73.618,2.70573,81.1893,51.2322,3.185,61.7794,54.133,4.16217,58.2949,3.38736,,,,,,,,,0.75,0.75,0.75,0.429528,0.427898,0.75,0.75,0.860,0.8596 +uls19_m1.84_neg0.5,uls19,primary,1.84,neg,0.5,54,0.0025,1,0.5,69.2553,7.26376,81.1893,47.8383,,61.7794,54.6664,2.59456,59.0217,2.09067,,,,,,,,,1.05,1.05,1.05,0.359293,0.356198,1.05,3.25,0.860;1.067,1.067 +uls19_m1.84_neg0.6,uls19,primary,1.84,neg,0.6,54,0.0025,1,0.5,64.4232,7.776,81.1893,41.6771,4.177,61.7794,55.0391,1.76893,54.1763,1.8459,,,,,,,,,1.1,1.1,1.1,0.38279,0.380068,1.1,3.3,1.056;1.078,1.0776 +uls19_m1.84_neg0.7,uls19,primary,1.84,neg,0.7,54,0.0025,1,0.5,57.104,11.6844,81.1893,40.685,3.812,61.7794,55.2549,1.28584,46.4236,2.00074,,,,,,,,,1.35,1.35,1.35,0.42465,0.422203,1.35,1.35,0.732;0.987,0.9872 +uls19_m1.84_neg0.8,uls19,primary,1.84,neg,0.8,54,0.0025,1,0.5,46.6838,11.7027,81.1893,40.9461,4.908,61.7794,54.9516,0.999326,38.671,2.33222,,,,,,,,,1.35,1.35,1.35,0.51698,0.513608,1.35,1.35,0.870,0.8703 +uls19_m1.84_neg0.9,uls19,primary,1.84,neg,0.9,54,0.0025,1,0.5,41.5531,10.1871,81.1893,42.6692,6.422,61.7794,51.8108,0.922272,35.2792,2.25518,,,,,,,,,1.7,1.7,1.7,0.620772,0.387479,1.7,1.7,0.838,0.8384 +uls19_m1.84_neg1,uls19,primary,1.84,neg,1,54,0.0025,1,0.5,40.9581,9.43808,81.1893,42.1992,6.161,61.7794,40.0715,1.37836,30.4338,2.50826,,,,,,,,,1.35,1.475,1.5,2.05317,0.510681,1.5,1.5,0.769;0.790,0.7905 +uls19_m1.84_neg1.1,uls19,primary,1.84,neg,1.1,54,0.0025,1,0.5,43.7696,10.2278,81.1893,44.1312,6.109,61.7794,37.1388,1.3491,28.0111,2.46921,,,,,,,,,0.3,1.45,1.7,4.22466,0.517487,1.45,1.45,1.099;1.120;1.157,1.1574 +uls19_m1.84_neg1.2,uls19,primary,1.84,neg,1.2,54,0.0025,1,0.5,44.481,10.067,81.1893,46.1153,6.109,61.7794,34.1723,1.35935,25.1038,2.60778,,,,,,,,,1.35,1.5,1.6,4.92323,0.535254,1.5,1.6,1.083,1.0829 +uls19_m1.84_neg1.3,uls19,primary,1.84,neg,1.3,54,0.0025,1,0.5,45.6169,8.97161,81.1893,47.0551,5.9,61.7794,32.0176,1.33227,23.1657,2.62387,,,,,,,,,0.3,1.45,1.45,2.32614,0.594189,1.45,1.45,1.046;1.067,1.067 +uls19_m1.84_neg1.4,uls19,primary,1.84,neg,1.4,54,0.0025,1,0.5,50.8233,11.3919,81.1893,49.457,6.944,61.7794,30.0477,1.31481,22.1966,2.4706,,,,,,,,,1.25,1.5,1.5,0.720432,0.685319,1.5,1.5,1.099;1.115;1.136,1.1361 +b1_m1.12_pos0.2,b1,primary,1.12,pos,0.2,54,0.0025,1,0.5,17.8442,0.462354,15.0821,15.2686,,13.3836,51.0541,2.69076,,,0.45,0.45,,,0.45,0.45,0.527,0.5268,0.45,0.45,0.45,0.335692,0.335062,,,, +b1_m1.12_pos0.3,b1,primary,1.12,pos,0.3,54,0.0025,1,0.5,20.617,0.894396,15.0821,17.6249,1.414,13.3836,49.5317,1.2905,,,0.7,0.7,0.814,0.8144,0.7,0.7,,,0.7,0.7,0.7,0.256612,0.255881,,,, +b1_m1.12_pos0.4,b1,primary,1.12,pos,0.4,54,0.0025,1,0.5,23.8264,1.08904,15.0821,21.3949,2.356,13.3836,50.587,0.688543,,,1,1,0.806,0.8064,1,1,,,1,1,1,0.205427,0.202575,,,, +b1_m1.12_pos0.5,b1,primary,1.12,pos,0.5,54,0.0025,1,0.5,28.1924,1.98308,15.0821,25.8718,3.534,13.3836,49.1511,0.473562,,,1.3,1.3,1.110,1.1104,1.3,1.3,0.870,0.8698,1.3,1.3,1.3,0.221766,0.2184,,,, +b1_m1.12_pos0.6,b1,primary,1.12,pos,0.6,54,0.0025,1,0.5,34.9741,4.49274,15.0821,31.5269,4.477,13.3836,46.8139,0.370351,,,1.5,1.5,,,1.5,1.5,0.989,0.9894,1.5,1.5,1.5,0.272664,0.272337,,,, +b1_m1.12_pos0.7,b1,primary,1.12,pos,0.7,54,0.0025,1,0.5,42.4771,6.1477,15.0821,36.9463,6.126,13.3836,42.0844,0.34922,,,1.6,1.6,,,1.6,1.6,1.125,1.125,1.6,1.6,1.6,0.344173,0.343541,,,, +b1_m1.12_pos0.8,b1,primary,1.12,pos,0.8,54,0.0025,1,0.5,49.0168,7.01484,15.0821,45.311,7.893,13.3836,40.4558,0.292474,,,1.75,1.75,,,1.75,1.75,1.277,1.2766,1.75,1.75,1.75,0.341887,0.341488,,,, +b1_m1.12_pos0.9,b1,primary,1.12,pos,0.9,54,0.0025,1,0.5,57.239,7.69997,15.0821,53.2045,10.132,13.3836,38.6426,0.25611,,,1.9,1.9,,,1.9,1.9,1.572,1.5717,1.9,1.9,1.9,0.377248,0.376985,,,, +b1_m1.12_pos1,b1,primary,1.12,pos,1,54,0.0025,1,0.5,60.2975,7.40786,15.0821,60.7446,12.017,13.3836,38.338,0.211133,,,2.65,2.65,,,2.65,2.65,1.643,1.6435,2.65,2.65,2.65,0.235408,0.231654,,,, +b1_m1.12_pos1.1,b1,primary,1.12,pos,1.1,54,0.0025,1,0.5,69.6399,8.0892,15.0821,69.2271,14.373,13.3836,37.3617,0.184743,,,2.85,2.85,,,2.85,2.85,1.747,1.7472,2.85,2.85,2.85,0.246849,0.245344,,,, +b1_m1.12_pos1.2,b1,primary,1.12,pos,1.2,54,0.0025,1,0.5,80.1743,8.78522,15.0821,80.1838,16.612,13.3836,36.5842,0.162587,,,3.05,3.05,2.118;2.350,2.3503,3.05,3.05,1.739,1.7392,3.05,3.05,3.05,0.257829,0.255474,,,, +b1_m1.12_pos1.3,b1,primary,1.12,pos,1.3,54,0.0025,1,0.5,91.9598,9.62496,15.0821,90.9048,18.615,13.3836,36.0306,0.143241,,,3.2,3.2,,,3.2,3.2,1.699,1.6993,3.2,3.2,3.2,0.271682,0.269195,,,, +b1_m1.12_pos1.4,b1,primary,1.12,pos,1.4,54,0.0025,1,0.5,103.84,10.6626,15.0821,101.979,21.678,13.3836,35.4957,0.127608,,,3.4,3.4,2.302,2.3023,3.4,3.4,1.811,1.811,3.4,3.4,3.4,0.278058,0.275187,,,, +b1_m1.12_neg0.2,b1,primary,1.12,neg,0.2,54,0.0025,1,0.5,11.8077,0.331512,15.0821,7.7903,0.992,11.4975,55.8476,2.12258,,,,,,,,,,,0.4,0.4,0.4,0.361508,0.360993,0.4,0.4,, +b1_m1.12_neg0.3,b1,primary,1.12,neg,0.3,54,0.0025,1,0.5,6.97933,0.896034,15.0821,6.3283,0.783,11.4975,55.9692,0.937718,44.7277,1.65088,,,,,,,,,0.6,0.6,0.65,2.88907,0.443817,0.6,0.65,, +b1_m1.12_neg0.4,b1,primary,1.12,neg,0.4,54,0.0025,1,0.5,8.64443,1.17382,15.0821,6.6938,,11.4975,29.2802,2.36044,33.0988,1.81846,,,,,,,,,0.65,0.65,0.65,6.33725,0.392525,0.5,0.65,0.344,0.344 +b1_m1.12_neg0.5,b1,primary,1.12,neg,0.5,54,0.0025,1,0.5,9.62771,1.21886,15.0821,7.216,0.835,11.4975,27.2191,1.76096,25.3461,2.04307,,,,,,,,,0.8,0.8,0.8,1.59474,0.306817,0.8,0.85,0.376,0.3759 +b1_m1.12_neg0.6,b1,primary,1.12,neg,0.6,54,0.0025,1,0.5,12.7133,1.62156,15.0821,8.3124,0.783,11.4975,12.3059,6.18799,19.5316,2.42581,,,,,,,,,0.85,1.4,1.4,0.301397,0.275481,0.85,1.4,0.344;0.535,0.5354 +b1_m1.12_neg0.7,b1,primary,1.12,neg,0.7,54,0.0025,1,0.5,16.4408,2.35539,15.0821,13.2728,1.253,11.4975,9.57303,7.53607,,,,,,,,,,,0.85,1.6,1.6,0.295568,0.287685,1.6,1.6,0.445;0.876,0.8756 +b1_m1.12_neg0.8,b1,primary,1.12,neg,0.8,54,0.0025,1,0.5,20.9937,3.72381,15.0821,16.249,2.036,11.4975,20.6909,1.2127,13.4749,2.89837,,,,,,,,,0.8,0.8,2,0.317085,0.303612,0.8,2,0.392;0.907,0.9075 +b1_m1.12_neg0.9,b1,primary,1.12,neg,0.9,54,0.0025,1,0.5,27.6884,4.66769,15.0821,22.9845,4.073,11.4975,27.4542,0.533813,,,,,,,,,,,0.9,2.2,2.2,0.309022,0.302846,2.2,2.2,1.131,1.1308 +b1_m1.12_neg1,b1,primary,1.12,neg,1,54,0.0025,1,0.5,34.5055,5.42344,15.0821,28.0493,4.229,11.4975,29.372,0.375184,12.0212,2.33529,,,,,,,,,0.85,2.4,2.4,0.299756,0.292745,2.4,2.4,1.296,1.2956 +b1_m1.12_neg1.1,b1,primary,1.12,neg,1.1,54,0.0025,1,0.5,42.7488,6.50108,15.0821,34.4716,5.326,11.4975,30.6859,0.282643,12.2635,1.85391,,,,,,,,,0.95,2.6,2.6,0.293857,0.291643,2.6,2.6,1.450,1.4498 +b1_m1.12_neg1.2,b1,primary,1.12,neg,1.2,54,0.0025,1,0.5,49.6299,8.06837,15.0821,41.5205,6.736,11.4975,31.5836,0.223367,12.2635,1.5578,,,,,,,,,0.95,3.15,3.15,0.288318,0.282889,3.15,3.15,1.599,1.5986 +b1_m1.12_neg1.3,b1,primary,1.12,neg,1.3,54,0.0025,1,0.5,60.5516,10.4315,15.0821,49.8747,8.72,11.4975,32.6386,0.177415,11.5367,1.50123,,,,,,,,,1.1,3.35,3.35,0.30644,0.302574,3.35,3.35,1.753,1.7528 +b1_m1.12_neg1.4,b1,primary,1.12,neg,1.4,54,0.0025,1,0.5,70.7403,11.0166,15.0821,58.2811,,11.4975,32.826,0.151108,11.5367,1.29443,,,,,,,,,1.05,3.55,3.55,0.286056,0.28236,3.55,3.55,, +b1_m1.84_pos0.2,b1,primary,1.84,pos,0.2,54,0.0025,1,0.5,84.5959,0.315659,81.1893,67.1065,,59.0952,53.0472,17.5663,,,0.4,0.4,,,0.4,0.4,,,0.4,0.4,0.4,0.414209,0.413506,,,, +b1_m1.84_pos0.3,b1,primary,1.84,pos,0.3,54,0.0025,1,0.5,87.2795,1.30437,81.1893,68.2846,1.178,59.0952,52.4095,8.05763,,,0.8,0.8,0.662;0.718,0.7184,0.8,0.8,0.678,0.6784,0.8,0.8,0.8,0.299691,0.299448,,,, +b1_m1.84_pos0.4,b1,primary,1.84,pos,0.4,54,0.0025,1,0.5,91.8078,1.65316,81.1893,71.1122,1.885,59.0952,51.9078,4.64658,,,0.85,0.875,0.950;1.006,0.9504,0.85,2.65,0.822,0.8219,0.85,0.85,0.85,0.294024,0.293808,,,, +b1_m1.84_pos0.5,b1,primary,1.84,pos,0.5,54,0.0025,1,0.5,97.206,3.99897,81.1893,,,59.0952,51.4993,3.03475,,,1.25,1.25,0.982,0.9824,1.25,1.25,0.982,0.9815,1.25,1.25,1.25,0.278779,0.278422,,,, +b1_m1.84_pos0.6,b1,primary,1.84,pos,0.6,54,0.0025,1,0.5,102.611,6.28011,81.1893,82.6579,5.655,59.0952,51.1333,2.14619,,,1.65,1.65,1.278;1.334,1.3344,1.65,1.65,0.670;1.285,1.2846,1.65,1.65,1.65,0.232829,0.232134,,,, +b1_m1.84_pos0.7,b1,primary,1.84,pos,0.7,54,0.0025,1,0.5,111.354,6.58642,81.1893,89.0198,6.833,59.0952,50.4149,1.63432,,,1.7,1.7,1.390;1.446,1.4464,1.7,1.7,0.702;1.404;1.460,1.46,1.7,1.7,1.7,0.254988,0.254675,,,, +b1_m1.84_pos0.8,b1,primary,1.84,pos,0.8,54,0.0025,1,0.5,117.248,5.44981,81.1893,95.7352,9.072,59.0952,49.7613,1.2929,,,2.15,2.15,1.582;1.638;1.694,1.6944,2.15,2.15,0.822;1.612,1.6116,2.15,2.15,2.15,0.202551,0.200234,,,, +b1_m1.84_pos0.9,b1,primary,1.84,pos,0.9,54,0.0025,1,0.5,128.23,5.4304,81.1893,104.807,11.781,59.0952,51.3579,0.943261,,,2.2,2.25,1.734;1.822,1.8223,2.2,2.25,0.766;1.827,1.827,2.2,2.2,2.2,0.223181,0.221544,,,, +b1_m1.84_pos1,b1,primary,1.84,pos,1,54,0.0025,1,0.5,138.562,7.35885,81.1893,111.876,13.195,59.0952,50.6823,0.790197,,,2.4,2.4,1.958;2.014,2.0143,2.4,2.4,0.830;1.947,1.9466,2.4,2.4,2.4,0.230163,0.228669,,,, +b1_m1.84_pos1.1,b1,primary,1.84,pos,1.1,54,0.0025,1,0.5,148.977,11.1622,81.1893,123.893,16.258,59.0952,49.9679,0.676799,,,2.7,2.7,2.046,2.0463,2.7,2.7,1.994,1.9945,2.7,2.7,2.7,0.228494,0.227725,,,, +b1_m1.84_pos1.2,b1,primary,1.84,pos,1.2,54,0.0025,1,0.5,161.442,12.2877,81.1893,133.082,18.379,59.0952,49.2552,0.589421,,,2.9,2.9,2.278,2.2783,2.9,2.9,2.050,2.0503,2.9,2.9,2.9,0.236213,0.234689,,,, +b1_m1.84_pos1.3,b1,primary,1.84,pos,1.3,54,0.0025,1,0.5,172.672,13.2286,81.1893,144.039,19.675,59.0952,48.5104,0.521466,,,3.35,3.35,2.310;2.422;2.486,2.4863,3.35,3.35,2.234,2.2337,3.35,3.35,3.35,0.233991,0.231738,,,, +b1_m1.84_pos1.4,b1,primary,1.84,pos,1.4,54,0.0025,1,0.5,188.787,16.9118,81.1893,154.877,23.68,59.0952,47.7798,0.466616,,,3.55,3.55,2.454;2.574,2.5743,3.55,3.55,2.345,2.3454,3.55,3.55,3.55,0.248269,0.245969,,,, +b1_m1.84_neg0.2,b1,primary,1.84,neg,0.2,54,0.0025,1,0.5,77.5835,0.380754,81.1893,58.8555,1.827,61.7794,53.4401,17.2283,66.2898,8.95099,,,,,,,,,0.4,0.4,0.4,0.452471,0.451603,0.4,0.4,0.376;0.445,0.3759 +b1_m1.84_neg0.3,b1,primary,1.84,neg,0.3,54,0.0025,1,0.5,74.351,1.25332,81.1893,55.6182,2.036,61.7794,54.1917,7.378,64.8362,4.30484,,,,,,,,,0.75,0.75,0.75,0.364583,0.364234,0.75,0.75,0.599;0.647;0.652,0.6523 +b1_m1.84_neg0.4,b1,primary,1.84,neg,0.4,54,0.0025,1,0.5,66.3728,1.82298,81.1893,51.2322,3.185,61.7794,55.1275,3.96276,58.2949,3.38736,,,,,,,,,0.75,0.75,0.75,0.51534,0.515239,0.75,0.8,0.860,0.8596 +b1_m1.84_neg0.5,b1,primary,1.84,neg,0.5,54,0.0025,1,0.5,61.3014,3.739,81.1893,47.8383,,61.7794,54.4635,2.62067,59.0217,2.09067,,,,,,,,,1.1,1.1,1.1,0.361778,0.361137,1.1,1.1,0.860;1.067,1.067 +b1_m1.84_neg0.6,b1,primary,1.84,neg,0.6,54,0.0025,1,0.5,45.2312,3.60092,81.1893,41.6771,4.177,61.7794,52.1771,2.03774,54.1763,1.8459,,,,,,,,,1.1,1.1,1.1,0.412343,0.41208,1.1,1.1,1.056;1.078,1.0776 +b1_m1.84_neg0.7,b1,primary,1.84,neg,0.7,54,0.0025,1,0.5,39.7423,6.25808,81.1893,40.685,3.812,61.7794,47.9008,1.85501,46.4236,2.00074,,,,,,,,,1.2,1.2,1.7,1.50073,0.353537,1.2,1.75,0.732;0.987,0.9872 +b1_m1.84_neg0.8,b1,primary,1.84,neg,0.8,54,0.0025,1,0.5,36.3453,5.99557,81.1893,40.9461,4.908,61.7794,36.4359,2.66003,38.671,2.33222,,,,,,,,,1.4,1.4,1.4,0.625166,0.458806,1.4,1.4,0.870,0.8703 +b1_m1.84_neg0.9,b1,primary,1.84,neg,0.9,54,0.0025,1,0.5,39.4287,8.51141,81.1893,42.6692,6.422,61.7794,35.0859,2.2823,35.2792,2.25518,,,,,,,,,1.75,1.75,1.75,0.487621,0.401164,1.75,1.75,0.838,0.8384 +b1_m1.84_neg1,b1,primary,1.84,neg,1,54,0.0025,1,0.5,46.0085,8.90145,81.1893,42.1992,6.161,61.7794,30.2035,2.54896,30.4338,2.50826,,,,,,,,,1.45,1.45,1.45,0.640768,0.633602,1.45,1.45,0.769;0.790,0.7905 +b1_m1.84_neg1.1,b1,primary,1.84,neg,1.1,54,0.0025,1,0.5,47.0611,8.11609,81.1893,44.1312,6.109,61.7794,28.2051,2.43371,28.0111,2.46921,,,,,,,,,1.7,1.7,1.7,0.460818,0.457059,1.7,1.7,1.099;1.120;1.157,1.1574 +b1_m1.84_neg1.2,b1,primary,1.84,neg,1.2,54,0.0025,1,0.5,54.2003,7.26079,81.1893,46.1153,6.109,61.7794,25.3593,2.55351,25.1038,2.60778,,,,,,,,,1.7,1.7,1.7,0.478409,0.475229,1.7,1.7,1.083,1.0829 +b1_m1.84_neg1.3,b1,primary,1.84,neg,1.3,54,0.0025,1,0.5,68.1528,7.23587,81.1893,47.0551,5.9,61.7794,22.4299,2.80432,23.1657,2.62387,,,,,,,,,1.55,1.55,1.55,0.712186,0.708497,1.55,1.55,1.046;1.067,1.067 +b1_m1.84_neg1.4,b1,primary,1.84,neg,1.4,54,0.0025,1,0.5,68.3621,7.80477,81.1893,49.457,6.944,61.7794,22.0258,2.51016,22.1966,2.4706,,,,,,,,,1.45,1.85,1.85,0.60034,0.596298,1.85,1.85,1.099;1.115;1.136,1.1361 +wake_m1.12_pos0.2,wake,primary,1.12,pos,0.2,54,0.0025,1,0.5,16.661,0.170801,15.0821,15.2686,,13.3836,51.822,2.58997,,,0.65,0.65,,,0.65,0.65,0.527,0.5268,0.65,0.65,0.65,0.115981,0.115959,,,, +wake_m1.12_pos0.3,wake,primary,1.12,pos,0.3,54,0.0025,1,0.5,18.4945,0.246897,15.0821,17.6249,1.414,13.3836,50.6199,1.22207,,,0.75,0.75,0.814,0.8144,0.75,0.75,,,0.75,0.75,0.75,0.141841,0.141796,,,, +wake_m1.12_pos0.4,wake,primary,1.12,pos,0.4,54,0.0025,1,0.5,20.849,0.409665,15.0821,21.3949,2.356,13.3836,51.506,0.657736,,,1.05,1.05,0.806,0.8064,1.05,1.05,,,1.05,1.05,1.05,0.100873,0.100827,,,, +wake_m1.12_pos0.5,wake,primary,1.12,pos,0.5,54,0.0025,1,0.5,23.6381,0.42611,15.0821,25.8718,3.534,13.3836,50.2137,0.448967,,,1.45,1.45,1.110,1.1104,1.45,1.45,0.870,0.8698,1.45,1.45,1.45,0.0723722,0.0723298,,,, +wake_m1.12_pos0.6,wake,primary,1.12,pos,0.6,54,0.0025,1,0.5,26.8303,0.45461,15.0821,31.5269,4.477,13.3836,48.8897,0.333224,,,1.8,1.8,,,1.8,1.8,0.989,0.9894,1.8,1.8,1.8,0.0665012,0.0664786,,,, +wake_m1.12_pos0.7,wake,primary,1.12,pos,0.7,54,0.0025,1,0.5,30.406,0.461556,15.0821,36.9463,6.126,13.3836,47.5924,0.261468,,,2.2,2.2,,,2.2,2.2,1.125,1.125,2.2,2.2,2.2,0.061609,0.0615921,,,, +wake_m1.12_pos0.8,wake,primary,1.12,pos,0.8,54,0.0025,1,0.5,34.2969,0.752786,15.0821,45.311,7.893,13.3836,46.4124,0.212671,,,2.7,2.7,,,2.7,2.7,1.277,1.2766,2.7,2.7,2.7,0.0551598,0.0551403,,,, +wake_m1.12_pos0.9,wake,primary,1.12,pos,0.9,54,0.0025,1,0.5,38.9532,3.94744,15.0821,53.2045,10.132,13.3836,45.1656,0.17927,,,2.8,2.8,,,2.8,2.8,1.572,1.5717,2.8,2.8,2.8,0.0924481,0.0924292,,,, +wake_m1.12_pos1,wake,primary,1.12,pos,1,54,0.0025,1,0.5,43.5717,4.18102,15.0821,60.7446,12.017,13.3836,41.1332,0.180275,,,3,3,,,3,3,1.643,1.6435,3,3,3,0.0904283,0.0904264,,,, +wake_m1.12_pos1.1,wake,primary,1.12,pos,1.1,54,0.0025,1,0.5,48.5331,4.22874,15.0821,69.2271,14.373,13.3836,40.1994,0.156932,,,3.5,3.5,,,3.5,3.5,1.747,1.7472,1.2,3.5,3.5,0.0908766,0.0908747,,,, +wake_m1.12_pos1.2,wake,primary,1.12,pos,1.2,54,0.0025,1,0.5,54.1453,4.47332,15.0821,80.1838,16.612,13.3836,39.3656,0.138222,,,3.7,3.7,2.118;2.350,2.3503,3.7,3.7,1.739,1.7392,1.3,3.7,3.7,0.0955076,0.0955059,,,, +wake_m1.12_pos1.3,wake,primary,1.12,pos,1.3,54,0.0025,1,0.5,59.9828,4.30422,15.0821,90.9048,18.615,13.3836,38.6897,0.122419,,,3.9,3.9,,,3.9,3.9,1.699,1.6993,1.35,3.9,3.9,0.08576,0.0857565,,,, +wake_m1.12_pos1.4,wake,primary,1.12,pos,1.4,54,0.0025,1,0.5,66.5193,4.3679,15.0821,101.979,21.678,13.3836,38.1281,0.109042,,,4.45,4.45,2.302,2.3023,1.5,4.45,1.811,1.811,1.5,4.45,4.45,0.0895442,0.0895351,,,, +wake_m1.12_neg0.2,wake,primary,1.12,neg,0.2,54,0.0025,1,0.5,13.382,0.159206,15.0821,7.7903,0.992,11.4975,54.2897,2.29229,,,,,,,,,,,0.65,0.65,0.65,0.145324,0.145322,0.65,0.65,, +wake_m1.12_neg0.3,wake,primary,1.12,neg,0.3,54,0.0025,1,0.5,10.908,0.381385,15.0821,6.3283,0.783,11.4975,56.311,0.922007,44.7277,1.65088,,,,,,,,,0.75,0.75,0.75,0.19522,0.195196,0.75,0.75,, +wake_m1.12_neg0.4,wake,primary,1.12,neg,0.4,54,0.0025,1,0.5,6.60157,0.618627,15.0821,6.6938,,11.4975,60.0522,0.430415,33.0988,1.81846,,,,,,,,,1.1,1.1,1.1,2.17459,0.330561,1.05,1.1,0.344,0.344 +wake_m1.12_neg0.5,wake,primary,1.12,neg,0.5,54,0.0025,1,0.5,8.96422,1.04159,15.0821,7.216,0.835,11.4975,33.3284,1.14665,25.3461,2.04307,,,,,,,,,0.3,1,1,5.84594,0.477238,1,1.05,0.376,0.3759 +wake_m1.12_neg0.6,wake,primary,1.12,neg,0.6,54,0.0025,1,0.5,9.46979,0.337079,15.0821,8.3124,0.783,11.4975,28.5169,1.1091,19.5316,2.42581,,,,,,,,,0.95,0.95,0.95,0.503508,0.171016,0.95,0.95,0.344;0.535,0.5354 +wake_m1.12_neg0.7,wake,primary,1.12,neg,0.7,54,0.0025,1,0.5,11.7779,0.494708,15.0821,13.2728,1.253,11.4975,15.8764,2.71667,,,,,,,,,,,1.05,1.05,1.05,0.375011,0.128873,1.05,2.25,0.445;0.876,0.8756 +wake_m1.12_neg0.8,wake,primary,1.12,neg,0.8,54,0.0025,1,0.5,13.9601,1.06802,15.0821,16.249,2.036,11.4975,6.55674,12.3303,13.4749,2.89837,,,,,,,,,1.05,1.05,2.35,0.132718,0.129969,1.05,2.35,0.392;0.907,0.9075 +wake_m1.12_neg0.9,wake,primary,1.12,neg,0.9,54,0.0025,1,0.5,16.9286,1.22128,15.0821,22.9845,4.073,11.4975,14.8527,1.88097,,,,,,,,,,,0.9,0.9,0.9,0.181414,0.181246,0.9,2.85,1.131,1.1308 +wake_m1.12_neg1,wake,primary,1.12,neg,1,54,0.0025,1,0.5,20.804,1.93042,15.0821,28.0493,4.229,11.4975,21.4908,0.71804,12.0212,2.33529,,,,,,,,,1,1,1,0.229624,0.229614,1,3.05,1.296,1.2956 +wake_m1.12_neg1.1,wake,primary,1.12,neg,1.1,54,0.0025,1,0.5,25.1048,2.2469,15.0821,34.4716,5.326,11.4975,27.4711,0.356885,12.2635,1.85391,,,,,,,,,1.1,1.1,1.1,0.215837,0.215836,1.1,3.25,1.450,1.4498 +wake_m1.12_neg1.2,wake,primary,1.12,neg,1.2,54,0.0025,1,0.5,29.935,2.70359,15.0821,41.5205,6.736,11.4975,29.4392,0.259292,12.2635,1.5578,,,,,,,,,0.95,0.95,0.95,0.272134,0.271988,0.95,3.8,1.599,1.5986 +wake_m1.12_neg1.3,wake,primary,1.12,neg,1.3,54,0.0025,1,0.5,35.507,3.48301,15.0821,49.8747,8.72,11.4975,30.9032,0.199355,11.5367,1.50123,,,,,,,,,1.05,1.05,1.05,0.260566,0.26054,1.05,4,1.753,1.7528 +wake_m1.12_neg1.4,wake,primary,1.12,neg,1.4,54,0.0025,1,0.5,41.5115,4.09762,15.0821,58.2811,,11.4975,31.9795,0.159801,11.5367,1.29443,,,,,,,,,1.15,1.15,4.2,0.241753,0.24172,1.15,4.25,, +wake_m1.84_pos0.2,wake,primary,1.84,pos,0.2,54,0.0025,1,0.5,82.8629,0.0687709,81.1893,67.1065,,59.0952,53.0689,17.5475,,,0.4,0.45,,,0.4,0.45,,,0.4,0.4,0.4,0.16757,0.167172,,,, +wake_m1.84_pos0.3,wake,primary,1.84,pos,0.3,54,0.0025,1,0.5,85.0724,0.672893,81.1893,68.2846,1.178,59.0952,52.7721,7.91423,,,0.8,0.8,0.662;0.718,0.7184,0.8,0.8,0.678,0.6784,0.8,0.8,0.8,0.22153,0.2215,,,, +wake_m1.84_pos0.4,wake,primary,1.84,pos,0.4,54,0.0025,1,0.5,87.844,1.44613,81.1893,71.1122,1.885,59.0952,52.4521,4.52285,,,1.2,1.2,0.950;1.006,1.0064,1.2,1.2,0.822,0.8219,1.2,1.2,1.2,0.157132,0.157128,,,, +wake_m1.84_pos0.5,wake,primary,1.84,pos,0.5,54,0.0025,1,0.5,91.4428,2.03103,81.1893,,,59.0952,52.0287,2.95603,,,1.25,1.25,0.982,0.9824,1.25,1.25,0.982,0.9815,1.25,1.25,1.25,0.182603,0.182547,,,, +wake_m1.84_pos0.6,wake,primary,1.84,pos,0.6,54,0.0025,1,0.5,95.5815,3.47034,81.1893,82.6579,5.655,59.0952,51.5628,2.10083,,,1.7,1.7,1.278;1.334,1.3344,1.7,1.7,0.670;1.285,1.2846,1.7,1.7,1.7,0.143667,0.143664,,,, +wake_m1.84_pos0.7,wake,primary,1.84,pos,0.7,54,0.0025,1,0.5,100.171,3.55503,81.1893,89.0198,6.833,59.0952,51.0453,1.58372,,,1.8,1.8,1.390;1.446,1.4464,1.8,1.8,0.702;1.404;1.460,1.46,1.8,1.8,1.8,0.13306,0.13306,,,, +wake_m1.84_pos0.8,wake,primary,1.84,pos,0.8,54,0.0025,1,0.5,105.591,4.94124,81.1893,95.7352,9.072,59.0952,50.4405,1.24968,,,2.25,2.25,1.582;1.638;1.694,1.6944,2.25,2.25,0.822;1.612,1.6116,2.25,2.25,2.25,0.116867,0.116857,,,, +wake_m1.84_pos0.9,wake,primary,1.84,pos,0.9,54,0.0025,1,0.5,111.216,5.00462,81.1893,104.807,11.781,59.0952,49.8015,1.01949,,,2.7,2.75,1.734;1.822,1.8223,2.7,2.75,0.766;1.827,1.827,2.7,2.7,2.7,0.0901874,0.0901867,,,, +wake_m1.84_pos1,wake,primary,1.84,pos,1,54,0.0025,1,0.5,117.097,4.40724,81.1893,111.876,13.195,59.0952,49.1796,0.852003,,,3.25,3.25,1.958;2.014,2.0143,3.25,3.25,0.830;1.947,1.9466,3.25,3.25,3.25,0.0654489,0.0654455,,,, +wake_m1.84_pos1.1,wake,primary,1.84,pos,1.1,54,0.0025,1,0.5,124.076,3.9978,81.1893,123.893,16.258,59.0952,48.5429,0.727131,,,3.35,3.35,2.046,2.0463,3.35,3.35,1.994,1.9945,3.35,3.35,3.35,0.0775094,0.0775043,,,, +wake_m1.84_pos1.2,wake,primary,1.84,pos,1.2,54,0.0025,1,0.5,130.962,2.65824,81.1893,133.082,18.379,59.0952,50.2617,0.560397,,,3.85,3.85,2.278,2.2783,3.85,3.85,2.050,2.0503,3.85,3.85,3.85,0.0603488,0.060347,,,, +wake_m1.84_pos1.3,wake,primary,1.84,pos,1.3,54,0.0025,1,0.5,138.232,1.64084,81.1893,144.039,19.675,59.0952,49.751,0.48987,,,4.35,4.35,2.310;2.422;2.486,2.4863,4.35,4.35,2.234,2.2337,4.35,4.35,4.35,0.0469925,0.0469611,,,, +wake_m1.84_pos1.4,wake,primary,1.84,pos,1.4,54,0.0025,1,0.5,146.368,1.67264,81.1893,154.877,23.68,59.0952,49.1593,0.435141,,,4.6,4.6,2.454;2.574,2.5743,4.6,4.6,2.345,2.3454,4.6,4.6,4.6,0.0555173,0.055509,,,, +wake_m1.84_neg0.2,wake,primary,1.84,neg,0.2,54,0.0025,1,0.5,79.5154,0.030973,81.1893,58.8555,1.827,61.7794,53.4513,17.2188,66.2898,8.95099,,,,,,,,,0.45,0.45,0.45,0.139498,0.138974,0.45,0.45,0.376;0.445,0.445 +wake_m1.84_neg0.3,wake,primary,1.84,neg,0.3,54,0.0025,1,0.5,77.2669,0.240443,81.1893,55.6182,2.036,61.7794,53.732,7.54741,64.8362,4.30484,,,,,,,,,0.75,0.75,0.75,0.222992,0.222692,0.75,0.75,0.599;0.647;0.652,0.6523 +wake_m1.84_neg0.4,wake,primary,1.84,neg,0.4,54,0.0025,1,0.5,74.2509,1.44239,81.1893,51.2322,3.185,61.7794,54.0402,4.18129,58.2949,3.38736,,,,,,,,,1.15,1.15,1.15,0.208451,0.208451,1.15,1.15,0.860,0.8596 +wake_m1.84_neg0.5,wake,primary,1.84,neg,0.5,54,0.0025,1,0.5,70.2035,1.43578,81.1893,47.8383,,61.7794,54.4837,2.61807,59.0217,2.09067,,,,,,,,,1.2,1.2,1.2,0.196587,0.196575,1.2,1.2,0.860;1.067,1.067 +wake_m1.84_neg0.6,wake,primary,1.84,neg,0.6,54,0.0025,1,0.5,64.8811,3.65972,81.1893,41.6771,4.177,61.7794,54.8751,1.78331,54.1763,1.8459,,,,,,,,,1.6,1.6,1.6,0.191176,0.191176,1.6,1.6,1.056;1.078,1.0776 +wake_m1.84_neg0.7,wake,primary,1.84,neg,0.7,54,0.0025,1,0.5,58.317,4.84428,81.1893,40.685,3.812,61.7794,54.8843,1.30959,46.4236,2.00074,,,,,,,,,2,2,2,0.155515,0.155451,2,2,0.732;0.987,0.9872 +wake_m1.84_neg0.8,wake,primary,1.84,neg,0.8,54,0.0025,1,0.5,49.3009,4.47424,81.1893,40.9461,4.908,61.7794,54.7239,1.01063,38.671,2.33222,,,,,,,,,2.05,2.05,2.05,0.202368,0.20236,2.05,2.05,0.870,0.8703 +wake_m1.84_neg0.9,wake,primary,1.84,neg,0.9,54,0.0025,1,0.5,37.3182,4.25987,81.1893,42.6692,6.422,61.7794,52.5411,0.889474,35.2792,2.25518,,,,,,,,,2.05,2.05,2.05,0.193915,0.193915,2.05,2.05,0.838,0.8384 +wake_m1.84_neg1,wake,primary,1.84,neg,1,54,0.0025,1,0.5,37.4836,4.76732,81.1893,42.1992,6.161,61.7794,40.8471,1.31996,30.4338,2.50826,,,,,,,,,2.2,2.2,2.35,3.2332,0.211639,2.2,2.2,0.769;0.790,0.7905 +wake_m1.84_neg1.1,wake,primary,1.84,neg,1.1,54,0.0025,1,0.5,39.0213,5.38894,81.1893,44.1312,6.109,61.7794,37.0466,1.3565,28.0111,2.46921,,,,,,,,,2.1,2.1,2.1,0.368666,0.245915,2.1,2.1,1.099;1.120;1.157,1.1574 +wake_m1.84_neg1.2,wake,primary,1.84,neg,1.2,54,0.0025,1,0.5,39.1552,8.37672,81.1893,46.1153,6.109,61.7794,34.1276,1.3632,25.1038,2.60778,,,,,,,,,0.3,2.25,2.35,2.30002,0.381694,2.35,2.35,1.083,1.0829 +wake_m1.84_neg1.3,wake,primary,1.84,neg,1.3,54,0.0025,1,0.5,44.7781,4.40543,81.1893,47.0551,5.9,61.7794,32.5513,1.28597,23.1657,2.62387,,,,,,,,,2.35,2.35,2.35,0.79893,0.241826,2.35,2.35,1.046;1.067,1.067 +wake_m1.84_neg1.4,wake,primary,1.84,neg,1.4,54,0.0025,1,0.5,49.7178,4.63371,81.1893,49.457,6.944,61.7794,30.6402,1.2615,22.1966,2.4706,,,,,,,,,2.45,2.45,2.45,0.239212,0.237978,2.45,2.45,1.099;1.115;1.136,1.1361 +none_m1.12_pos0.2,none,primary,1.12,pos,0.2,54,0.0025,1,0.5,16.6043,3.23758e-06,15.0821,15.2686,,13.3836,51.8709,2.58369,,,,,,,,,,,,,,,,,,, +none_m1.12_pos0.3,none,primary,1.12,pos,0.3,54,0.0025,1,0.5,18.3818,3.17243e-06,15.0821,17.6249,1.414,13.3836,50.6819,1.21829,,,,,,,,,,,,,,,,,,, +none_m1.12_pos0.4,none,primary,1.12,pos,0.4,54,0.0025,1,0.5,20.6968,2.86669e-06,15.0821,21.3949,2.356,13.3836,51.5577,0.656047,,,,,,,,,,,,,,,,,,, +none_m1.12_pos0.5,none,primary,1.12,pos,0.5,54,0.0025,1,0.5,23.469,2.72735e-06,15.0821,25.8718,3.534,13.3836,50.2748,0.447596,,,,,,,,,,,,,,,,,,, +none_m1.12_pos0.6,none,primary,1.12,pos,0.6,54,0.0025,1,0.5,26.6401,2.51769e-06,15.0821,31.5269,4.477,13.3836,48.9658,0.331948,,,,,,,,,,,,,,,,,,, +none_m1.12_pos0.7,none,primary,1.12,pos,0.7,54,0.0025,1,0.5,30.1751,2.20194e-06,15.0821,36.9463,6.126,13.3836,47.6875,0.260204,,,,,,,,,,,,,,,,,,, +none_m1.12_pos0.8,none,primary,1.12,pos,0.8,54,0.0025,1,0.5,34.0521,2.77975e-06,15.0821,45.311,7.893,13.3836,46.4745,0.211992,,,,,,,,,,,,,,,,,,, +none_m1.12_pos0.9,none,primary,1.12,pos,0.9,54,0.0025,1,0.5,38.2471,2.29357e-06,15.0821,53.2045,10.132,13.3836,45.3418,0.177628,,,,,,,,,,,,,,,,,,, +none_m1.12_pos1,none,primary,1.12,pos,1,54,0.0025,1,0.5,42.6878,2.03627e-06,15.0821,60.7446,12.017,13.3836,41.2962,0.178663,,,,,,,,,,,,,,,,,,, +none_m1.12_pos1.1,none,primary,1.12,pos,1.1,54,0.0025,1,0.5,47.5589,1.85755e-06,15.0821,69.2271,14.373,13.3836,40.3255,0.155827,,,,,,,,,,,,,,,,,,, +none_m1.12_pos1.2,none,primary,1.12,pos,1.2,54,0.0025,1,0.5,52.8881,7.71361e-07,15.0821,80.1838,16.612,13.3836,39.4965,0.137199,,,,,,,,,,,,,,,,,,, +none_m1.12_pos1.3,none,primary,1.12,pos,1.3,54,0.0025,1,0.5,58.6774,7.68674e-07,15.0821,90.9048,18.615,13.3836,38.7926,0.121696,,,,,,,,,,,,,,,,,,, +none_m1.12_pos1.4,none,primary,1.12,pos,1.4,54,0.0025,1,0.5,64.9281,1.52201e-06,15.0821,101.979,21.678,13.3836,38.1962,0.108611,,,,,,,,,,,,,,,,,,, +none_m1.12_neg0.2,none,primary,1.12,neg,0.2,54,0.0025,1,0.5,13.4376,7.40944e-07,15.0821,7.7903,0.992,11.4975,54.2478,2.29705,,,,,,,,,,,,,,,,,,, +none_m1.12_neg0.3,none,primary,1.12,neg,0.3,54,0.0025,1,0.5,11.1065,4.48659e-06,15.0821,6.3283,0.783,11.4975,56.1727,0.928331,44.7277,1.65088,,,,,,,,,,,,,,,,, +none_m1.12_neg0.4,none,primary,1.12,neg,0.4,54,0.0025,1,0.5,6.81533,0.00863582,15.0821,6.6938,,11.4975,61.5378,0.399159,33.0988,1.81846,,,,,,,,,,,,,,,,, +none_m1.12_neg0.5,none,primary,1.12,neg,0.5,54,0.0025,1,0.5,6.23557,0.573704,15.0821,7.216,0.835,11.4975,61.1706,0.260294,25.3461,2.04307,,,,,,,,,,,,,,,,, +none_m1.12_neg0.6,none,primary,1.12,neg,0.6,54,0.0025,1,0.5,7.28736,1.79831,15.0821,8.3124,0.783,11.4975,21.7193,1.9517,19.5316,2.42581,,,,,,,,,,,,,,,,, +none_m1.12_neg0.7,none,primary,1.12,neg,0.7,54,0.0025,1,0.5,11.4101,8.93115e-05,15.0821,13.2728,1.253,11.4975,17.1159,2.33225,,,,,,,,,,,,,,,,,,, +none_m1.12_neg0.8,none,primary,1.12,neg,0.8,54,0.0025,1,0.5,13.6453,4.28707e-05,15.0821,16.249,2.036,11.4975,6.55053,12.3538,13.4749,2.89837,,,,,,,,,,,,,,,,, +none_m1.12_neg0.9,none,primary,1.12,neg,0.9,54,0.0025,1,0.5,16.4367,1.2183e-05,15.0821,22.9845,4.073,11.4975,13.9295,2.1416,,,,,,,,,,,,,,,,,,, +none_m1.12_neg1,none,primary,1.12,neg,1,54,0.0025,1,0.5,19.8921,1.57349e-06,15.0821,28.0493,4.229,11.4975,20.3341,0.80427,12.0212,2.33529,,,,,,,,,,,,,,,,, +none_m1.12_neg1.1,none,primary,1.12,neg,1.1,54,0.0025,1,0.5,23.9958,7.10543e-15,15.0821,34.4716,5.326,11.4975,23.2415,0.505089,12.2635,1.85391,,,,,,,,,,,,,,,,, +none_m1.12_neg1.2,none,primary,1.12,neg,1.2,54,0.0025,1,0.5,28.6936,0,15.0821,41.5205,6.736,11.4975,28.5876,0.275833,12.2635,1.5578,,,,,,,,,,,,,,,,, +none_m1.12_neg1.3,none,primary,1.12,neg,1.3,54,0.0025,1,0.5,33.9438,0,15.0821,49.8747,8.72,11.4975,30.177,0.20967,11.5367,1.50123,,,,,,,,,,,,,,,,, +none_m1.12_neg1.4,none,primary,1.12,neg,1.4,54,0.0025,1,0.5,39.7142,7.10543e-15,15.0821,58.2811,,11.4975,31.401,0.166147,11.5367,1.29443,,,,,,,,,,,,,,,,, +none_m1.84_pos0.2,none,primary,1.84,pos,0.2,54,0.0025,1,0.5,82.7919,4.68702e-06,81.1893,67.1065,,59.0952,53.0657,17.5503,,,,,,,,,,,,,,,,,,, +none_m1.84_pos0.3,none,primary,1.84,pos,0.3,54,0.0025,1,0.5,84.7097,4.61432e-06,81.1893,68.2846,1.178,59.0952,52.83,7.89158,,,,,,,,,,,,,,,,,,, +none_m1.84_pos0.4,none,primary,1.84,pos,0.4,54,0.0025,1,0.5,87.3875,4.32533e-06,81.1893,71.1122,1.885,59.0952,52.5027,4.51154,,,,,,,,,,,,,,,,,,, +none_m1.84_pos0.5,none,primary,1.84,pos,0.5,54,0.0025,1,0.5,90.7894,4.47444e-06,81.1893,,,59.0952,52.0927,2.94665,,,,,,,,,,,,,,,,,,, +none_m1.84_pos0.6,none,primary,1.84,pos,0.6,54,0.0025,1,0.5,94.7686,4.32785e-06,81.1893,82.6579,5.655,59.0952,51.6158,2.09531,,,,,,,,,,,,,,,,,,, +none_m1.84_pos0.7,none,primary,1.84,pos,0.7,54,0.0025,1,0.5,99.4023,4.4944e-06,81.1893,89.0198,6.833,59.0952,51.08,1.58098,,,,,,,,,,,,,,,,,,, +none_m1.84_pos0.8,none,primary,1.84,pos,0.8,54,0.0025,1,0.5,104.564,4.99424e-06,81.1893,95.7352,9.072,59.0952,50.5018,1.24585,,,,,,,,,,,,,,,,,,, +none_m1.84_pos0.9,none,primary,1.84,pos,0.9,54,0.0025,1,0.5,110.246,4.97856e-06,81.1893,104.807,11.781,59.0952,49.8938,1.01478,,,,,,,,,,,,,,,,,,, +none_m1.84_pos1,none,primary,1.84,pos,1,54,0.0025,1,0.5,116.446,4.62493e-06,81.1893,111.876,13.195,59.0952,49.2686,0.848194,,,,,,,,,,,,,,,,,,, +none_m1.84_pos1.1,none,primary,1.84,pos,1.1,54,0.0025,1,0.5,123.102,4.82939e-06,81.1893,123.893,16.258,59.0952,48.6363,0.723703,,,,,,,,,,,,,,,,,,, +none_m1.84_pos1.2,none,primary,1.84,pos,1.2,54,0.0025,1,0.5,130.17,4.93996e-06,81.1893,133.082,18.379,59.0952,50.3481,0.557981,,,,,,,,,,,,,,,,,,, +none_m1.84_pos1.3,none,primary,1.84,pos,1.3,54,0.0025,1,0.5,137.673,4.58367e-06,81.1893,144.039,19.675,59.0952,49.7942,0.48881,,,,,,,,,,,,,,,,,,, +none_m1.84_pos1.4,none,primary,1.84,pos,1.4,54,0.0025,1,0.5,145.589,4.9991e-06,81.1893,154.877,23.68,59.0952,49.2458,0.433248,,,,,,,,,,,,,,,,,,, +none_m1.84_neg0.2,none,primary,1.84,neg,0.2,54,0.0025,1,0.5,79.5571,4.94942e-06,81.1893,58.8555,1.827,61.7794,53.4565,17.2144,66.2898,8.95099,,,,,,,,,,,,,,,,, +none_m1.84_neg0.3,none,primary,1.84,neg,0.3,54,0.0025,1,0.5,77.5119,4.69369e-06,81.1893,55.6182,2.036,61.7794,53.7009,7.55902,64.8362,4.30484,,,,,,,,,,,,,,,,, +none_m1.84_neg0.4,none,primary,1.84,neg,0.4,54,0.0025,1,0.5,74.6379,4.15719e-06,81.1893,51.2322,3.185,61.7794,54.0336,4.18265,58.2949,3.38736,,,,,,,,,,,,,,,,, +none_m1.84_neg0.5,none,primary,1.84,neg,0.5,54,0.0025,1,0.5,70.6578,4.34354e-06,81.1893,47.8383,,61.7794,54.4668,2.62024,59.0217,2.09067,,,,,,,,,,,,,,,,, +none_m1.84_neg0.6,none,primary,1.84,neg,0.6,54,0.0025,1,0.5,65.6525,4.30444e-06,81.1893,41.6771,4.177,61.7794,54.9187,1.77947,54.1763,1.8459,,,,,,,,,,,,,,,,, +none_m1.84_neg0.7,none,primary,1.84,neg,0.7,54,0.0025,1,0.5,59.2085,4.2832e-06,81.1893,40.685,3.812,61.7794,54.9252,1.30695,46.4236,2.00074,,,,,,,,,,,,,,,,, +none_m1.84_neg0.8,none,primary,1.84,neg,0.8,54,0.0025,1,0.5,50.6914,4.0385e-06,81.1893,40.9461,4.908,61.7794,55.0849,0.992776,38.671,2.33222,,,,,,,,,,,,,,,,, +none_m1.84_neg0.9,none,primary,1.84,neg,0.9,54,0.0025,1,0.5,38.7879,0.000180165,81.1893,42.6692,6.422,61.7794,51.9741,0.914828,35.2792,2.25518,,,,,,,,,,,,,,,,, +none_m1.84_neg1,none,primary,1.84,neg,1,54,0.0025,1,0.5,24.3491,0.0250707,81.1893,42.1992,6.161,61.7794,26.3547,3.39395,30.4338,2.50826,,,,,,,,,,,,,,,,, +none_m1.84_neg1.1,none,primary,1.84,neg,1.1,54,0.0025,1,0.5,29.1183,6.4681,81.1893,44.1312,6.109,61.7794,39.3439,1.18697,28.0111,2.46921,,,,,,,,,,,,,,,,, +none_m1.84_neg1.2,none,primary,1.84,neg,1.2,54,0.0025,1,0.5,28.2123,5.17866,81.1893,46.1153,6.109,61.7794,34.8255,1.30473,25.1038,2.60778,,,,,,,,,,,,,,,,, +none_m1.84_neg1.3,none,primary,1.84,neg,1.3,54,0.0025,1,0.5,29.2292,5.51833,81.1893,47.0551,5.9,61.7794,32.0851,1.32629,23.1657,2.62387,,,,,,,,,,,,,,,,, +none_m1.84_neg1.4,none,primary,1.84,neg,1.4,54,0.0025,1,0.5,41.8815,3.14293e-05,81.1893,49.457,6.944,61.7794,30.1839,1.30228,22.1966,2.4706,,,,,,,,,,,,,,,,, +uls19_m1.84_pos0.8_dt,uls19,half the time step,1.84,pos,0.8,54,0.00125,1,0.5,108.364,12.49,81.1893,95.7352,9.072,59.0952,49.9582,1.2802,,,1.65,1.675,1.582;1.638;1.694,1.6384,1.65,4.85,0.822;1.612,1.6116,1.65,1.65,1.65,0.29644,0.291208,,,, +uls19_m1.84_pos0.8_n108,uls19,twice the elements,1.84,pos,0.8,108,0.0025,1,0.5,108.237,12.439,81.1893,95.7352,9.072,59.0952,50.9688,1.21717,,,1.65,1.65,1.582;1.638;1.694,1.6384,1.65,1.65,0.822;1.612,1.6116,1.65,1.65,1.65,0.304494,0.302059,,,, +uls19_m1.12_neg1.2_dt,uls19,half the time step,1.12,neg,1.2,54,0.00125,1,0.5,35.7748,8.03099,15.0821,41.5205,6.736,11.4975,31.9474,0.217974,12.2635,1.5578,,,,,,,,,0.8,0.8,2.65,0.413355,0.407282,2.65,2.65,1.599,1.5986 +uls19_m1.12_neg1.2_n108,uls19,twice the elements,1.12,neg,1.2,108,0.0025,1,0.5,34.5143,6.895,15.0821,41.5205,6.736,11.4975,31.6511,0.222353,12.2635,1.5578,,,,,,,,,0.8,0.8,2.65,0.367172,0.363668,2.65,2.65,1.599,1.5986 +b1_m1.84_pos0.8_dt,b1,half the time step,1.84,pos,0.8,54,0.00125,1,0.5,117.209,5.58544,81.1893,95.7352,9.072,59.0952,49.7453,1.29394,,,2.15,2.15,1.582;1.638;1.694,1.6944,2.15,2.15,0.822;1.612,1.6116,2.15,2.15,2.15,0.201511,0.200155,,,, +b1_m1.84_pos0.8_n108,b1,twice the elements,1.84,pos,0.8,108,0.0025,1,0.5,117.213,5.46316,81.1893,95.7352,9.072,59.0952,50.8827,1.2224,,,2.15,2.15,1.582;1.638;1.694,1.6944,2.15,2.15,0.822;1.612,1.6116,2.15,2.15,2.15,0.200439,0.199432,,,, +b1_m1.12_neg1.2_dt,b1,half the time step,1.12,neg,1.2,54,0.00125,1,0.5,52.2549,8.25416,15.0821,41.5205,6.736,11.4975,31.6051,0.223043,12.2635,1.5578,,,,,,,,,0.95,2.8,2.8,0.304001,0.301326,2.8,2.8,1.599,1.5986 +b1_m1.12_neg1.2_n108,b1,twice the elements,1.12,neg,1.2,108,0.0025,1,0.5,50.1123,8.11487,15.0821,41.5205,6.736,11.4975,31.5557,0.223789,12.2635,1.5578,,,,,,,,,1.05,3.15,3.15,0.286081,0.283416,3.15,3.15,1.599,1.5986 +wake_m1.84_pos0.8_dt,wake,half the time step,1.84,pos,0.8,54,0.00125,1,0.5,105.59,4.93216,81.1893,95.7352,9.072,59.0952,50.4404,1.24968,,,2.25,2.25,1.582;1.638;1.694,1.6944,2.25,2.25,0.822;1.612,1.6116,2.25,2.25,2.25,0.116859,0.11685,,,, +wake_m1.84_pos0.8_n108,wake,twice the elements,1.84,pos,0.8,108,0.0025,1,0.5,105.61,4.94639,81.1893,95.7352,9.072,59.0952,51.4551,1.18806,,,2.25,2.25,1.582;1.638;1.694,1.6944,2.25,2.25,0.822;1.612,1.6116,2.25,2.25,2.25,0.118043,0.118035,,,, +wake_m1.12_neg1.2_dt,wake,half the time step,1.12,neg,1.2,54,0.00125,1,0.5,29.9379,2.69443,15.0821,41.5205,6.736,11.4975,29.4387,0.2593,12.2635,1.5578,,,,,,,,,0.95,0.95,0.95,0.272119,0.271972,0.95,3.8,1.599,1.5986 +wake_m1.12_neg1.2_n108,wake,twice the elements,1.12,neg,1.2,108,0.0025,1,0.5,29.9925,2.88835,15.0821,41.5205,6.736,11.4975,29.3614,0.260743,12.2635,1.5578,,,,,,,,,0.95,0.95,0.95,0.271317,0.27114,0.95,3.8,1.599,1.5986 +uls19_m1.12_pos0.4_undamped,uls19,no structural damping,1.12,pos,0.4,54,0.0025,0,0.5,21.3928,1.88607,15.0821,21.3949,2.356,13.3836,48.8433,0.751513,,,0.9,0.9,0.806,0.8064,0.9,2.45,,,0.9,0.9,0.9,0.247629,0.240026,,,, +uls19_m1.12_pos0.4_frictionless,uls19,frictionless floor,1.12,pos,0.4,54,0.0025,1,0,21.8555,3.45141,15.0821,21.3949,2.356,13.3836,48.5353,0.763303,,,0.9,0.9,0.806,0.8064,0.9,2.6,,,0.9,0.9,0.9,0.313907,0.311185,,,, +uls19_m1.12_pos0.8_undamped,uls19,no structural damping,1.12,pos,0.8,54,0.0025,0,0.5,37.3481,10.3058,15.0821,45.311,7.893,13.3836,43.0174,0.254224,,,1.75,1.75,,,1.75,1.75,1.277,1.2766,1.75,1.75,1.75,0.322832,0.311009,,,, +uls19_m1.12_pos0.8_frictionless,uls19,frictionless floor,1.12,pos,0.8,54,0.0025,1,0,36.4663,6.64358,15.0821,45.311,7.893,13.3836,43.55,0.247081,,,1.75,3.45,,,1.75,1.75,1.277,1.2766,1.75,1.75,1.75,0.319515,0.316068,,,, +uls19_m1.12_pos1.2_undamped,uls19,no structural damping,1.12,pos,1.2,54,0.0025,0,0.5,61.0498,18.9067,15.0821,80.1838,16.612,13.3836,39.1846,0.139654,,,2.6,2.6,2.118;2.350,2.3503,2.6,2.6,1.739,1.7392,2.6,2.6,2.6,0.331161,0.324869,,,, +uls19_m1.12_pos1.2_frictionless,uls19,frictionless floor,1.12,pos,1.2,54,0.0025,1,0,60.5594,10.8583,15.0821,80.1838,16.612,13.3836,38.8029,0.14274,,,2.6,2.6,2.118;2.350,2.3503,2.6,2.6,1.739,1.7392,0.55,2.6,2.6,0.341742,0.33617,,,, +uls19_m1.12_neg0.4_undamped,uls19,no structural damping,1.12,neg,0.4,54,0.0025,0,0.5,8.8567,1.656,15.0821,6.6938,,11.4975,46.3584,0.853058,33.0988,1.81846,,,,,,,,,0.6,0.75,0.75,4.64363,0.503556,0.6,2.15,0.344,0.344 +uls19_m1.12_neg0.4_frictionless,uls19,frictionless floor,1.12,neg,0.4,54,0.0025,1,0,9.26392,1.459,15.0821,6.6938,,11.4975,44.8655,0.921923,33.0988,1.81846,,,,,,,,,0.6,0.6,0.6,6.60654,0.467369,0.6,0.6,0.344,0.344 +uls19_m1.12_neg0.8_undamped,uls19,no structural damping,1.12,neg,0.8,54,0.0025,0,0.5,16.7678,6.73279,15.0821,16.249,2.036,11.4975,14.9658,2.34433,13.4749,2.89837,,,,,,,,,0.75,1.275,1.8,0.402196,0.338631,1.8,1.8,0.392;0.907,0.9075 +uls19_m1.12_neg0.8_frictionless,uls19,frictionless floor,1.12,neg,0.8,54,0.0025,1,0,15.8226,4.00728,15.0821,16.249,2.036,11.4975,11.4976,3.99136,13.4749,2.89837,,,,,,,,,0.75,0.75,1.8,0.362042,0.324763,0.75,1.8,0.392;0.907,0.9075 +uls19_m1.12_neg1.2_undamped,uls19,no structural damping,1.12,neg,1.2,54,0.0025,0,0.5,37.9354,22.0635,15.0821,41.5205,6.736,11.4975,32.2106,0.214185,12.2635,1.5578,,,,,,,,,0.75,0.85,2.75,0.327546,0.317727,2.7,2.75,1.599,1.5986 +uls19_m1.12_neg1.2_frictionless,uls19,frictionless floor,1.12,neg,1.2,54,0.0025,1,0,35.6849,8.18804,15.0821,41.5205,6.736,11.4975,31.8084,0.220013,12.2635,1.5578,,,,,,,,,0.8,0.8,2.7,0.392115,0.385611,2.7,2.7,1.599,1.5986 +uls19_m1.84_pos0.4_undamped,uls19,no structural damping,1.84,pos,0.4,54,0.0025,0,0.5,88.3884,2.78453,81.1893,71.1122,1.885,59.0952,52.3557,4.54451,,,0.8,0.8,0.950;1.006,0.9504,0.8,2.5,0.822,0.8219,0.8,0.8,0.8,0.3143,0.312724,,,, +uls19_m1.84_pos0.4_frictionless,uls19,frictionless floor,1.84,pos,0.4,54,0.0025,1,0,88.3486,3.35209,81.1893,71.1122,1.885,59.0952,52.2918,4.55893,,,0.95,2.75,0.950;1.006,0.9504,0.95,0.95,0.822,0.8219,0.8,0.95,0.95,0.269728,0.267262,,,, +uls19_m1.84_pos0.8_undamped,uls19,no structural damping,1.84,pos,0.8,54,0.0025,0,0.5,108.521,15.074,81.1893,95.7352,9.072,59.0952,50.065,1.27337,,,1.65,1.65,1.582;1.638;1.694,1.6384,1.65,4.85,0.822;1.612,1.6116,1.65,1.65,1.65,0.307563,0.303991,,,, +uls19_m1.84_pos0.8_frictionless,uls19,frictionless floor,1.84,pos,0.8,54,0.0025,1,0,110.13,18.1144,81.1893,95.7352,9.072,59.0952,49.9047,1.28363,,,1.7,1.7,1.582;1.638;1.694,1.6944,1.7,1.7,0.822;1.612,1.6116,1.7,1.7,1.7,0.35277,0.351192,,,, +uls19_m1.84_pos1.2_undamped,uls19,no structural damping,1.84,pos,1.2,54,0.0025,0,0.5,140.248,28.3793,81.1893,133.082,18.379,59.0952,47.2078,0.65393,,,2.5,2.5,2.278,2.2783,2.35,2.5,2.050,2.0503,2.35,2.5,2.5,0.312138,0.308185,,,, +uls19_m1.84_pos1.2_frictionless,uls19,frictionless floor,1.84,pos,1.2,54,0.0025,1,0,138.66,21.53,81.1893,133.082,18.379,59.0952,47.5795,0.641633,,,2.4,2.4,2.278,2.2783,2.4,2.4,2.050,2.0503,2.4,2.4,2.4,0.390628,0.388757,,,, +uls19_m1.84_neg0.4_undamped,uls19,no structural damping,1.84,neg,0.4,54,0.0025,0,0.5,73.5966,2.86567,81.1893,51.2322,3.185,61.7794,54.1093,4.16705,58.2949,3.38736,,,,,,,,,0.75,0.75,0.75,0.420917,0.41867,0.75,0.75,0.860,0.8596 +uls19_m1.84_neg0.4_frictionless,uls19,frictionless floor,1.84,neg,0.4,54,0.0025,1,0,73.6683,5.37917,81.1893,51.2322,3.185,61.7794,54.1395,4.16084,58.2949,3.38736,,,,,,,,,0.8,0.8,0.8,0.424085,0.423612,0.8,2.45,0.860,0.8596 +uls19_m1.84_neg0.8_undamped,uls19,no structural damping,1.84,neg,0.8,54,0.0025,0,0.5,46.0778,14.5493,81.1893,40.9461,4.908,61.7794,54.8792,1.00291,38.671,2.33222,,,,,,,,,1.35,1.35,1.35,0.529936,0.522378,1.35,1.35,0.870,0.8703 +uls19_m1.84_neg0.8_frictionless,uls19,frictionless floor,1.84,neg,0.8,54,0.0025,1,0,48.6101,13.6689,81.1893,40.9461,4.908,61.7794,53.0172,1.09952,38.671,2.33222,,,,,,,,,1.4,1.4,1.45,0.634717,0.633678,1.4,4.25,0.870,0.8703 +uls19_m1.84_neg1.2_undamped,uls19,no structural damping,1.84,neg,1.2,54,0.0025,0,0.5,44.1958,11.9873,81.1893,46.1153,6.109,61.7794,34.0096,1.37345,25.1038,2.60778,,,,,,,,,1.35,1.6,1.7,4.6224,0.603239,1.55,1.7,1.083,1.0829 +uls19_m1.84_neg1.2_frictionless,uls19,frictionless floor,1.84,neg,1.2,54,0.0025,1,0,46.4164,11.9361,81.1893,46.1153,6.109,61.7794,34.3262,1.34621,25.1038,2.60778,,,,,,,,,1.45,1.5,1.5,5.51625,1.01513,1.5,1.5,1.083,1.0829 +b1_m1.12_pos0.4_undamped,b1,no structural damping,1.12,pos,0.4,54,0.0025,0,0.5,23.9067,1.21375,15.0821,21.3949,2.356,13.3836,50.6311,0.687031,,,1,1,0.806,0.8064,1,1,,,1,1,1,0.217719,0.214648,,,, +b1_m1.12_pos0.4_frictionless,b1,frictionless floor,1.12,pos,0.4,54,0.0025,1,0,25.0863,3.2076,15.0821,21.3949,2.356,13.3836,50.1993,0.702017,,,1,1,0.806,0.8064,1,1,,,1,1,1,0.330186,0.327051,,,, +b1_m1.12_pos0.8_undamped,b1,no structural damping,1.12,pos,0.8,54,0.0025,0,0.5,48.4038,7.64849,15.0821,45.311,7.893,13.3836,40.4445,0.292659,,,2.05,2.05,,,2.05,2.05,1.277,1.2766,2.05,2.05,2.05,0.312905,0.311972,,,, +b1_m1.12_pos0.8_frictionless,b1,frictionless floor,1.12,pos,0.8,54,0.0025,1,0,47.5073,6.78456,15.0821,45.311,7.893,13.3836,40.383,0.293666,,,2.05,2.05,,,2.05,2.05,1.277,1.2766,2.05,2.05,2.05,0.29501,0.292828,,,, +b1_m1.12_pos1.2_undamped,b1,no structural damping,1.12,pos,1.2,54,0.0025,0,0.5,81.9444,11.0669,15.0821,80.1838,16.612,13.3836,36.6912,0.161548,,,3.05,3.05,2.118;2.350,2.3503,3.05,3.05,1.739,1.7392,3.05,3.05,3.05,0.268219,0.264878,,,, +b1_m1.12_pos1.2_frictionless,b1,frictionless floor,1.12,pos,1.2,54,0.0025,1,0,80.3038,8.90782,15.0821,80.1838,16.612,13.3836,36.5813,0.162615,,,3.05,3.05,2.118;2.350,2.3503,3.05,3.05,1.739,1.7392,3.05,3.05,3.05,0.25997,0.2572,,,, +b1_m1.12_neg0.4_undamped,b1,no structural damping,1.12,neg,0.4,54,0.0025,0,0.5,8.84126,1.15085,15.0821,6.6938,,11.4975,29.0706,2.39648,33.0988,1.81846,,,,,,,,,0.3,0.55,0.65,6.88438,0.348482,0.5,0.55,0.344,0.344 +b1_m1.12_neg0.4_frictionless,b1,frictionless floor,1.12,neg,0.4,54,0.0025,1,0,8.94046,1.40754,15.0821,6.6938,,11.4975,25.9909,3.02979,33.0988,1.81846,,,,,,,,,0.3,0.3,0.6,8.18006,0.515789,0.6,0.65,0.344,0.344 +b1_m1.12_neg0.8_undamped,b1,no structural damping,1.12,neg,0.8,54,0.0025,0,0.5,22.1587,5.44904,15.0821,16.249,2.036,11.4975,21.9267,1.0766,13.4749,2.89837,,,,,,,,,0.8,1.425,2.05,0.323273,0.313989,0.8,2.05,0.392;0.907,0.9075 +b1_m1.12_neg0.8_frictionless,b1,frictionless floor,1.12,neg,0.8,54,0.0025,1,0,20.7895,3.57533,15.0821,16.249,2.036,11.4975,20.3292,1.2573,13.4749,2.89837,,,,,,,,,0.8,2,2,0.293837,0.284045,2,2,0.392;0.907,0.9075 +b1_m1.12_neg1.2_undamped,b1,no structural damping,1.12,neg,1.2,54,0.0025,0,0.5,52.5927,14.3716,15.0821,41.5205,6.736,11.4975,32.2527,0.213587,12.2635,1.5578,,,,,,,,,1.05,3.2,3.2,0.314244,0.310337,3.2,3.2,1.599,1.5986 +b1_m1.12_neg1.2_frictionless,b1,frictionless floor,1.12,neg,1.2,54,0.0025,1,0,49.7568,8.06323,15.0821,41.5205,6.736,11.4975,31.6245,0.222752,12.2635,1.5578,,,,,,,,,0.95,3.15,3.15,0.284886,0.279459,3.15,3.15,1.599,1.5986 +b1_m1.84_pos0.4_undamped,b1,no structural damping,1.84,pos,0.4,54,0.0025,0,0.5,92.5261,1.81579,81.1893,71.1122,1.885,59.0952,51.789,4.67407,,,0.85,0.85,0.950;1.006,0.9504,0.85,2.6,0.822,0.8219,0.85,0.85,0.85,0.338679,0.33842,,,, +b1_m1.84_pos0.4_frictionless,b1,frictionless floor,1.84,pos,0.4,54,0.0025,1,0,92.1989,4.21346,81.1893,71.1122,1.885,59.0952,51.9429,4.63848,,,1.05,1.05,0.950;1.006,1.0064,1.05,1.05,0.822,0.8219,1.05,1.05,1.05,0.294694,0.294391,,,, +b1_m1.84_pos0.8_undamped,b1,no structural damping,1.84,pos,0.8,54,0.0025,0,0.5,117.263,7.23403,81.1893,95.7352,9.072,59.0952,49.7841,1.29142,,,2.15,2.15,1.582;1.638;1.694,1.6944,2.15,2.15,0.822;1.612,1.6116,2.15,2.15,2.15,0.20473,0.202495,,,, +b1_m1.84_pos0.8_frictionless,b1,frictionless floor,1.84,pos,0.8,54,0.0025,1,0,120.568,16.5165,81.1893,95.7352,9.072,59.0952,49.1584,1.33268,,,2.25,2.25,1.582;1.638;1.694,1.6944,2.25,2.25,0.822;1.612,1.6116,2.25,2.25,2.25,0.264153,0.263435,,,, +b1_m1.84_pos1.2_undamped,b1,no structural damping,1.84,pos,1.2,54,0.0025,0,0.5,161.575,19.2895,81.1893,133.082,18.379,59.0952,49.295,0.588242,,,2.9,2.9,2.278,2.2783,2.9,2.9,2.050,2.0503,2.9,2.9,2.9,0.236138,0.233984,,,, +b1_m1.84_pos1.2_frictionless,b1,frictionless floor,1.84,pos,1.2,54,0.0025,1,0,163.109,21.6435,81.1893,133.082,18.379,59.0952,48.8547,0.601439,,,2.85,3.55,2.278,2.2783,2.85,2.85,2.050,2.0503,2.8,2.85,3.55,0.247303,0.245265,,,, +b1_m1.84_neg0.4_undamped,b1,no structural damping,1.84,neg,0.4,54,0.0025,0,0.5,65.9575,1.87311,81.1893,51.2322,3.185,61.7794,55.2026,3.94809,58.2949,3.38736,,,,,,,,,0.75,0.75,0.75,0.538117,0.537645,0.75,0.75,0.860,0.8596 +b1_m1.84_neg0.4_frictionless,b1,frictionless floor,1.84,neg,0.4,54,0.0025,1,0,70.2627,5.46864,81.1893,51.2322,3.185,61.7794,54.2595,4.13625,58.2949,3.38736,,,,,,,,,1.05,1.05,1.05,0.314109,0.313703,1.05,1.05,0.860,0.8596 +b1_m1.84_neg0.8_undamped,b1,no structural damping,1.84,neg,0.8,54,0.0025,0,0.5,41.9767,7.40718,81.1893,40.9461,4.908,61.7794,37.762,2.45865,38.671,2.33222,,,,,,,,,1.5,1.5,1.5,0.500742,0.401845,1.5,1.5,0.870,0.8703 +b1_m1.84_neg0.8_frictionless,b1,frictionless floor,1.84,neg,0.8,54,0.0025,1,0,46.5736,6.10507,81.1893,40.9461,4.908,61.7794,39.6981,2.19949,38.671,2.33222,,,,,,,,,1.55,1.55,1.55,0.40078,0.397824,1.55,1.55,0.870,0.8703 +b1_m1.84_neg1.2_undamped,b1,no structural damping,1.84,neg,1.2,54,0.0025,0,0.5,53.789,12.298,81.1893,46.1153,6.109,61.7794,25.9709,2.43005,25.1038,2.60778,,,,,,,,,1.95,1.95,1.95,0.454551,0.434966,1.95,1.95,1.083,1.0829 +b1_m1.84_neg1.2_frictionless,b1,frictionless floor,1.84,neg,1.2,54,0.0025,1,0,54.0654,7.73406,81.1893,46.1153,6.109,61.7794,25.4029,2.54441,25.1038,2.60778,,,,,,,,,1.65,1.65,1.65,0.476203,0.468212,1.65,1.7,1.083,1.0829 +wake_m1.12_pos0.4_undamped,wake,no structural damping,1.12,pos,0.4,54,0.0025,0,0.5,20.8637,0.462776,15.0821,21.3949,2.356,13.3836,51.5039,0.657804,,,1.05,1.05,0.806,0.8064,1.05,1.05,,,1.05,1.05,1.05,0.107187,0.10718,,,, +wake_m1.12_pos0.4_frictionless,wake,frictionless floor,1.12,pos,0.4,54,0.0025,1,0,21.0146,2.00897,15.0821,21.3949,2.356,13.3836,49.1265,0.740858,,,1.2,1.2,0.806,0.8064,1.2,1.2,,,1.2,1.2,1.2,0.143736,0.143724,,,, +wake_m1.12_pos0.8_undamped,wake,no structural damping,1.12,pos,0.8,54,0.0025,0,0.5,34.5019,2.98042,15.0821,45.311,7.893,13.3836,46.3506,0.21335,,,2.7,2.7,,,2.7,2.7,1.277,1.2766,2.7,2.7,2.7,0.0820627,0.0820357,,,, +wake_m1.12_pos0.8_frictionless,wake,frictionless floor,1.12,pos,0.8,54,0.0025,1,0,34.7256,3.83871,15.0821,45.311,7.893,13.3836,46.3244,0.213638,,,2.3,2.35,,,2.3,2.35,1.277,1.2766,2.3,2.3,2.3,0.109985,0.109959,,,, +wake_m1.12_pos1.2_undamped,wake,no structural damping,1.12,pos,1.2,54,0.0025,0,0.5,54.8616,7.51264,15.0821,80.1838,16.612,13.3836,39.3467,0.138371,,,3.6,3.6,2.118;2.350,2.3503,3.6,3.6,1.739,1.7392,3.6,3.6,3.6,0.122887,0.122884,,,, +wake_m1.12_pos1.2_frictionless,wake,frictionless floor,1.12,pos,1.2,54,0.0025,1,0,54.1415,4.4719,15.0821,80.1838,16.612,13.3836,39.3645,0.138231,,,3.7,3.7,2.118;2.350,2.3503,3.7,3.7,1.739,1.7392,1.3,3.7,3.7,0.0953627,0.0953615,,,, +wake_m1.12_neg0.4_undamped,wake,no structural damping,1.12,neg,0.4,54,0.0025,0,0.5,6.81629,0.792442,15.0821,6.6938,,11.4975,60.3128,0.424791,33.0988,1.81846,,,,,,,,,1,1.05,1.05,2.76999,0.343145,1.05,1.05,0.344,0.344 +wake_m1.12_neg0.4_frictionless,wake,frictionless floor,1.12,neg,0.4,54,0.0025,1,0,9.24269,1.14357,15.0821,6.6938,,11.4975,49.1094,0.741494,33.0988,1.81846,,,,,,,,,0.95,0.95,0.95,5.96691,0.208535,0.95,0.95,0.344,0.344 +wake_m1.12_neg0.8_undamped,wake,no structural damping,1.12,neg,0.8,54,0.0025,0,0.5,14.1123,2.20211,15.0821,16.249,2.036,11.4975,6.79152,11.4907,13.4749,2.89837,,,,,,,,,1.05,1.05,2.35,0.141191,0.140656,1.05,2.35,0.392;0.907,0.9075 +wake_m1.12_neg0.8_frictionless,wake,frictionless floor,1.12,neg,0.8,54,0.0025,1,0,13.96,1.06779,15.0821,16.249,2.036,11.4975,6.55685,12.33,13.4749,2.89837,,,,,,,,,1.05,1.05,2.35,0.130275,0.130031,1.05,2.35,0.392;0.907,0.9075 +wake_m1.12_neg1.2_undamped,wake,no structural damping,1.12,neg,1.2,54,0.0025,0,0.5,30.6227,8.07547,15.0821,41.5205,6.736,11.4975,29.7946,0.252801,12.2635,1.5578,,,,,,,,,1,1,3.8,0.257774,0.257767,1,3.8,1.599,1.5986 +wake_m1.12_neg1.2_frictionless,wake,frictionless floor,1.12,neg,1.2,54,0.0025,1,0,29.9349,2.70363,15.0821,41.5205,6.736,11.4975,29.4392,0.259291,12.2635,1.5578,,,,,,,,,0.95,0.95,0.95,0.272183,0.272003,0.95,3.8,1.599,1.5986 +wake_m1.84_pos0.4_undamped,wake,no structural damping,1.84,pos,0.4,54,0.0025,0,0.5,87.8978,1.62124,81.1893,71.1122,1.885,59.0952,52.4475,4.52388,,,1.2,1.2,0.950;1.006,1.0064,1.2,1.2,0.822,0.8219,1.2,1.2,1.2,0.168256,0.168239,,,, +wake_m1.84_pos0.4_frictionless,wake,frictionless floor,1.84,pos,0.4,54,0.0025,1,0,87.9091,1.86603,81.1893,71.1122,1.885,59.0952,52.4265,4.52859,,,1.05,1.05,0.950;1.006,1.0064,1.05,1.05,0.822,0.8219,1.05,1.05,1.05,0.18901,0.188996,,,, +wake_m1.84_pos0.8_undamped,wake,no structural damping,1.84,pos,0.8,54,0.0025,0,0.5,105.654,5.16498,81.1893,95.7352,9.072,59.0952,50.4433,1.2495,,,2.25,2.25,1.582;1.638;1.694,1.6944,2.25,2.25,0.822;1.612,1.6116,2.25,2.25,2.25,0.120572,0.120567,,,, +wake_m1.84_pos0.8_frictionless,wake,frictionless floor,1.84,pos,0.8,54,0.0025,1,0,106.025,10.8638,81.1893,95.7352,9.072,59.0952,50.4143,1.25132,,,2.2,2.2,1.582;1.638;1.694,1.6944,2.2,2.2,0.822;1.612,1.6116,2.2,2.2,2.2,0.145151,0.145134,,,, +wake_m1.84_pos1.2_undamped,wake,no structural damping,1.84,pos,1.2,54,0.0025,0,0.5,130.912,1.7041,81.1893,133.082,18.379,59.0952,50.272,0.56011,,,3.85,3.85,2.278,2.2783,3.85,3.85,2.050,2.0503,3.85,3.85,3.85,0.0574786,0.0574738,,,, +wake_m1.84_pos1.2_frictionless,wake,frictionless floor,1.84,pos,1.2,54,0.0025,1,0,132.078,13.6087,81.1893,133.082,18.379,59.0952,50.2041,0.562014,,,3.8,3.8,2.278,2.2783,3.8,3.8,2.050,2.0503,3.8,3.8,3.8,0.102251,0.102249,,,, +wake_m1.84_neg0.4_undamped,wake,no structural damping,1.84,neg,0.4,54,0.0025,0,0.5,74.2177,1.60284,81.1893,51.2322,3.185,61.7794,54.0396,4.1814,58.2949,3.38736,,,,,,,,,1.15,1.15,1.15,0.219606,0.219573,1.15,3.4,0.860,0.8596 +wake_m1.84_neg0.4_frictionless,wake,frictionless floor,1.84,neg,0.4,54,0.0025,1,0,74.3323,2.27551,81.1893,51.2322,3.185,61.7794,54.0191,4.18563,58.2949,3.38736,,,,,,,,,1.15,1.15,1.15,0.189865,0.189849,1.15,1.15,0.860,0.8596 +wake_m1.84_neg0.8_undamped,wake,no structural damping,1.84,neg,0.8,54,0.0025,0,0.5,49.2291,4.34995,81.1893,40.9461,4.908,61.7794,54.6958,1.01203,38.671,2.33222,,,,,,,,,2.05,2.05,2.05,0.212875,0.212869,2.05,2.05,0.870,0.8703 +wake_m1.84_neg0.8_frictionless,wake,frictionless floor,1.84,neg,0.8,54,0.0025,1,0,48.9572,8.74131,81.1893,40.9461,4.908,61.7794,54.5013,1.02179,38.671,2.33222,,,,,,,,,1.95,1.95,1.95,0.211699,0.211698,1.95,1.95,0.870,0.8703 +wake_m1.84_neg1.2_undamped,wake,no structural damping,1.84,neg,1.2,54,0.0025,0,0.5,44.6578,7.46844,81.1893,46.1153,6.109,61.7794,34.9048,1.29831,25.1038,2.60778,,,,,,,,,2.35,2.35,2.4,4.40156,0.335287,2.35,2.35,1.083,1.0829 +wake_m1.84_neg1.2_frictionless,wake,frictionless floor,1.84,neg,1.2,54,0.0025,1,0,46.064,7.63729,81.1893,46.1153,6.109,61.7794,35.0392,1.28752,25.1038,2.60778,,,,,,,,,0.4,2.35,2.35,5.62834,0.953313,2.35,2.35,1.083,1.0829 diff --git a/validation/experiments/chaplin_catenary/summary.json b/validation/experiments/chaplin_catenary/summary.json new file mode 100644 index 00000000..1e01644a --- /dev/null +++ b/validation/experiments/chaplin_catenary/summary.json @@ -0,0 +1,1013 @@ +{ + "sets": { + "uls19": "Ulveseter et al. (2019), Table 1, Chh 1.5", + "b1": "generic set (Delta Flume case)", + "wake": "Facchinetti et al. (2004) wake oscillator", + "none": "no VIV, C_d 1.2" + }, + "model": { + "length_m": 5.36, + "diameter_m": 0.056, + "EI_Nm2": 1.3, + "EA_N": 790000.0, + "mass_kg_per_m": { + "1.12": 2.75873, + "1.84": 4.59422 + }, + "submerged_weight_N_per_m": { + "1.12": 2.9, + "1.84": 20.9 + }, + "rayleigh_damping": { + "zeta": 0.03, + "f1_hz": 0.3, + "f2_hz": 3.0 + }, + "floor_friction": 0.5, + "segments": 54, + "dt_s": 0.0025, + "tmax_s": 110.0, + "statistics_from_s": 30.0, + "current_ramp_s": 10.0, + "welch_segment_s": 20.0, + "probe_elevations_m": { + "upper_a": -0.57, + "upper_b": -1.186, + "lower": -1.582, + "mid_depth": -1.0 + } + }, + "still_water_top_tension_N": { + "1.12": { + "model": 15.0821, + "measured_fig10": 13.3836, + "measured_fig13": 11.4975 + }, + "1.84": { + "model": 81.1893, + "measured_fig10": 59.0952, + "measured_fig13": 61.7794 + } + }, + "scores": { + "uls19_m1.12_pos": { + "T_rms_rel_error": 0.178227, + "T_mean_rel_error": -0.129766, + "T_points": 13, + "dT_rms_error_N": 14.5405, + "dT_mean_error_N": -11.2207, + "sd_T_ratio_median": 0.80798, + "sd_T_points": 12, + "f_upper_acc_peak_at_harmonic": 5, + "f_upper_model_fd_over_U_median": 0.121333, + "f_upper_measured_fd_over_U_median": 0.111253, + "f_upper_measured_points": 6, + "f_upper_ratio_to_nearest_measured_median": 1.10624, + "f_upper_within_10pct": 1, + "f_upper_points": 5, + "f_lower_acc_peak_at_harmonic": 1, + "f_lower_model_fd_over_U_median": 0.121333, + "f_lower_measured_fd_over_U_median": 0.09, + "f_lower_measured_points": 11, + "f_lower_ratio_to_nearest_measured_median": 1.37083, + "f_lower_within_10pct": 0, + "f_lower_points": 11, + "f_span_spread_median": 0.0 + }, + "uls19_m1.12_neg": { + "T_rms_rel_error": 0.322249, + "T_mean_rel_error": 0.105473, + "T_points": 13, + "dT_rms_error_N": 6.87095, + "dT_mean_error_N": -5.07762, + "sd_T_ratio_median": 1.42526, + "sd_T_points": 11, + "psi_rms_error_deg": 14.9851, + "psi_mean_error_deg": 13.0682, + "cd_eq9_model_median": 0.901194, + "cd_eq9_measured_median": 1.83619, + "f_mid_acc_peak_at_harmonic": 5, + "f_mid_model_fd_over_U_median": 0.0896, + "f_mid_measured_fd_over_U_median": 0.06349, + "f_mid_measured_points": 13, + "f_mid_model_fd_over_Un_median": 0.183805, + "f_mid_measured_fd_over_Un_median": 0.210911, + "f_mid_ratio_to_nearest_measured_median": 1.4667, + "f_mid_within_10pct": 0, + "f_mid_points": 10, + "f_span_spread_median": 1.72414 + }, + "uls19_m1.84_pos": { + "T_rms_rel_error": 0.150491, + "T_mean_rel_error": 0.126341, + "T_points": 12, + "dT_rms_error_N": 12.2279, + "dT_mean_error_N": -11.2468, + "sd_T_ratio_median": 1.14421, + "sd_T_points": 11, + "f_upper_acc_peak_at_harmonic": 3, + "f_upper_model_fd_over_U_median": 0.121333, + "f_upper_measured_fd_over_U_median": 0.1112, + "f_upper_measured_points": 23, + "f_upper_ratio_to_nearest_measured_median": 1.06873, + "f_upper_within_10pct": 7, + "f_upper_points": 12, + "f_lower_acc_peak_at_harmonic": 3, + "f_lower_model_fd_over_U_median": 0.121333, + "f_lower_measured_fd_over_U_median": 0.105272, + "f_lower_measured_points": 18, + "f_lower_ratio_to_nearest_measured_median": 1.07817, + "f_lower_within_10pct": 6, + "f_lower_points": 12, + "f_span_spread_median": 0.0 + }, + "uls19_m1.84_neg": { + "T_rms_rel_error": 0.296105, + "T_mean_rel_error": 0.199745, + "T_points": 13, + "dT_rms_error_N": 14.3201, + "dT_mean_error_N": -9.74128, + "sd_T_ratio_median": 1.61341, + "sd_T_points": 12, + "psi_rms_error_deg": 10.1491, + "psi_mean_error_deg": 4.20246, + "cd_eq9_model_median": 1.35935, + "cd_eq9_measured_median": 2.4706, + "f_mid_acc_peak_at_harmonic": 2, + "f_mid_model_fd_over_U_median": 0.102667, + "f_mid_measured_fd_over_U_median": 0.0589018, + "f_mid_measured_points": 25, + "f_mid_model_fd_over_Un_median": 0.129569, + "f_mid_measured_fd_over_Un_median": 0.119125, + "f_mid_ratio_to_nearest_measured_median": 1.32031, + "f_mid_within_10pct": 4, + "f_mid_points": 13, + "f_span_spread_median": 0.0 + }, + "b1_m1.12_pos": { + "T_rms_rel_error": 0.0982925, + "T_mean_rel_error": 0.0759066, + "T_points": 13, + "dT_rms_error_N": 1.75874, + "dT_mean_error_N": 0.602227, + "sd_T_ratio_median": 0.589627, + "sd_T_points": 12, + "f_upper_acc_peak_at_harmonic": 0, + "f_upper_model_fd_over_U_median": 0.137846, + "f_upper_measured_fd_over_U_median": 0.111253, + "f_upper_measured_points": 6, + "f_upper_ratio_to_nearest_measured_median": 1.24008, + "f_upper_within_10pct": 0, + "f_upper_points": 5, + "f_lower_acc_peak_at_harmonic": 0, + "f_lower_model_fd_over_U_median": 0.137846, + "f_lower_measured_fd_over_U_median": 0.09, + "f_lower_measured_points": 11, + "f_lower_ratio_to_nearest_measured_median": 1.51607, + "f_lower_within_10pct": 0, + "f_lower_points": 11, + "f_span_spread_median": 0.0 + }, + "b1_m1.12_neg": { + "T_rms_rel_error": 0.301008, + "T_mean_rel_error": 0.277109, + "T_points": 13, + "dT_rms_error_N": 3.88365, + "dT_mean_error_N": 1.95593, + "sd_T_ratio_median": 1.22063, + "sd_T_points": 11, + "psi_rms_error_deg": 14.7002, + "psi_mean_error_deg": 10.6771, + "cd_eq9_model_median": 0.937718, + "cd_eq9_measured_median": 1.83619, + "f_mid_acc_peak_at_harmonic": 2, + "f_mid_model_fd_over_U_median": 0.128, + "f_mid_measured_fd_over_U_median": 0.06349, + "f_mid_measured_points": 13, + "f_mid_model_fd_over_Un_median": 0.261949, + "f_mid_measured_fd_over_Un_median": 0.210911, + "f_mid_ratio_to_nearest_measured_median": 1.83987, + "f_mid_within_10pct": 0, + "f_mid_points": 10, + "f_span_spread_median": 0.590909 + }, + "b1_m1.84_pos": { + "T_rms_rel_error": 0.23847, + "T_mean_rel_error": 0.236845, + "T_points": 12, + "dT_rms_error_N": 4.92599, + "dT_mean_error_N": 1.829, + "sd_T_ratio_median": 0.686568, + "sd_T_points": 11, + "f_upper_acc_peak_at_harmonic": 0, + "f_upper_model_fd_over_U_median": 0.137455, + "f_upper_measured_fd_over_U_median": 0.1112, + "f_upper_measured_points": 23, + "f_upper_ratio_to_nearest_measured_median": 1.2527, + "f_upper_within_10pct": 0, + "f_upper_points": 12, + "f_lower_acc_peak_at_harmonic": 1, + "f_lower_model_fd_over_U_median": 0.137455, + "f_lower_measured_fd_over_U_median": 0.105272, + "f_lower_measured_points": 18, + "f_lower_ratio_to_nearest_measured_median": 1.279, + "f_lower_within_10pct": 1, + "f_lower_points": 12, + "f_span_spread_median": 0.0 + }, + "b1_m1.84_neg": { + "T_rms_rel_error": 0.24774, + "T_mean_rel_error": 0.17449, + "T_points": 13, + "dT_rms_error_N": 13.745, + "dT_mean_error_N": -10.5128, + "sd_T_ratio_median": 1.20507, + "sd_T_points": 12, + "psi_rms_error_deg": 4.97044, + "psi_mean_error_deg": -2.68136, + "cd_eq9_model_median": 2.55351, + "cd_eq9_measured_median": 2.4706, + "f_mid_acc_peak_at_harmonic": 0, + "f_mid_model_fd_over_U_median": 0.098, + "f_mid_measured_fd_over_U_median": 0.0589018, + "f_mid_measured_points": 25, + "f_mid_model_fd_over_Un_median": 0.165005, + "f_mid_measured_fd_over_Un_median": 0.119125, + "f_mid_ratio_to_nearest_measured_median": 1.45267, + "f_mid_within_10pct": 3, + "f_mid_points": 13, + "f_span_spread_median": 0.0 + }, + "wake_m1.12_pos": { + "T_rms_rel_error": 0.23445, + "T_mean_rel_error": -0.184807, + "T_points": 13, + "dT_rms_error_N": 18.8472, + "dT_mean_error_N": -14.5683, + "sd_T_ratio_median": 0.188049, + "sd_T_points": 12, + "f_upper_acc_peak_at_harmonic": 0, + "f_upper_model_fd_over_U_median": 0.172667, + "f_upper_measured_fd_over_U_median": 0.111253, + "f_upper_measured_points": 6, + "f_upper_ratio_to_nearest_measured_median": 1.30584, + "f_upper_within_10pct": 1, + "f_upper_points": 5, + "f_lower_acc_peak_at_harmonic": 1, + "f_lower_model_fd_over_U_median": 0.168, + "f_lower_measured_fd_over_U_median": 0.09, + "f_lower_measured_points": 11, + "f_lower_ratio_to_nearest_measured_median": 1.82537, + "f_lower_within_10pct": 0, + "f_lower_points": 11, + "f_span_spread_median": 0.0 + }, + "wake_m1.12_neg": { + "T_rms_rel_error": 0.351188, + "T_mean_rel_error": -0.00712777, + "T_points": 13, + "dT_rms_error_N": 10.4983, + "dT_mean_error_N": -7.90692, + "sd_T_ratio_median": 0.421873, + "sd_T_points": 11, + "psi_rms_error_deg": 15.6904, + "psi_mean_error_deg": 13.0248, + "cd_eq9_model_median": 0.922007, + "cd_eq9_measured_median": 1.83619, + "f_mid_acc_peak_at_harmonic": 8, + "f_mid_model_fd_over_U_median": 0.0735, + "f_mid_measured_fd_over_U_median": 0.06349, + "f_mid_measured_points": 13, + "f_mid_model_fd_over_Un_median": 0.169652, + "f_mid_measured_fd_over_Un_median": 0.210911, + "f_mid_ratio_to_nearest_measured_median": 0.976461, + "f_mid_within_10pct": 0, + "f_mid_points": 10, + "f_span_spread_median": 0.0 + }, + "wake_m1.84_pos": { + "T_rms_rel_error": 0.13919, + "T_mean_rel_error": 0.0915524, + "T_points": 12, + "dT_rms_error_N": 17.7077, + "dT_mean_error_N": -15.5452, + "sd_T_ratio_median": 0.424804, + "sd_T_points": 11, + "f_upper_acc_peak_at_harmonic": 0, + "f_upper_model_fd_over_U_median": 0.168, + "f_upper_measured_fd_over_U_median": 0.1112, + "f_upper_measured_points": 23, + "f_upper_ratio_to_nearest_measured_median": 1.40477, + "f_upper_within_10pct": 0, + "f_upper_points": 12, + "f_lower_acc_peak_at_harmonic": 0, + "f_lower_model_fd_over_U_median": 0.168, + "f_lower_measured_fd_over_U_median": 0.105272, + "f_lower_measured_points": 18, + "f_lower_ratio_to_nearest_measured_median": 1.46893, + "f_lower_within_10pct": 0, + "f_lower_points": 12, + "f_span_spread_median": 0.0 + }, + "wake_m1.84_neg": { + "T_rms_rel_error": 0.316394, + "T_mean_rel_error": 0.177252, + "T_points": 13, + "dT_rms_error_N": 16.4008, + "dT_mean_error_N": -10.7383, + "sd_T_ratio_median": 0.760237, + "sd_T_points": 12, + "psi_rms_error_deg": 10.3235, + "psi_mean_error_deg": 4.31082, + "cd_eq9_model_median": 1.3565, + "cd_eq9_measured_median": 2.4706, + "f_mid_acc_peak_at_harmonic": 0, + "f_mid_model_fd_over_U_median": 0.127556, + "f_mid_measured_fd_over_U_median": 0.0589018, + "f_mid_measured_points": 25, + "f_mid_model_fd_over_Un_median": 0.182582, + "f_mid_measured_fd_over_Un_median": 0.119125, + "f_mid_ratio_to_nearest_measured_median": 2.02593, + "f_mid_within_10pct": 1, + "f_mid_points": 13, + "f_span_spread_median": 0.0 + }, + "none_m1.12_pos": { + "T_rms_rel_error": 0.244553, + "T_mean_rel_error": -0.194729, + "T_points": 13, + "dT_rms_error_N": 19.638, + "dT_mean_error_N": -15.1741, + "sd_T_ratio_median": 2.89274e-07, + "sd_T_points": 12 + }, + "none_m1.12_neg": { + "T_rms_rel_error": 0.365008, + "T_mean_rel_error": -0.0683198, + "T_points": 13, + "dT_rms_error_N": 11.4584, + "dT_mean_error_N": -8.8485, + "sd_T_ratio_median": 2.99115e-06, + "sd_T_points": 11, + "psi_rms_error_deg": 18.6388, + "psi_mean_error_deg": 14.5091, + "cd_eq9_model_median": 0.80427, + "cd_eq9_measured_median": 1.83619 + }, + "none_m1.84_pos": { + "T_rms_rel_error": 0.135055, + "T_mean_rel_error": 0.0849025, + "T_points": 12, + "dT_rms_error_N": 18.367, + "dT_mean_error_N": -16.2307, + "sd_T_ratio_median": 4.22593e-07, + "sd_T_points": 11 + }, + "none_m1.84_neg": { + "T_rms_rel_error": 0.385349, + "T_mean_rel_error": 0.0902642, + "T_points": 13, + "dT_rms_error_N": 22.8256, + "dT_mean_error_N": -14.7163, + "sd_T_ratio_median": 3.61758e-06, + "sd_T_points": 12, + "psi_rms_error_deg": 10.1204, + "psi_mean_error_deg": 3.34231, + "cd_eq9_model_median": 1.32629, + "cd_eq9_measured_median": 2.4706 + } + }, + "sensitivity_and_convergence": { + "uls19_m1.84_pos0.8_dt": { + "role": "half the time step", + "mean_T": -0.000213727, + "sd_T": 0.0547442, + "AD_rms_max": 0.0785622, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "uls19_m1.84_pos0.8_n108": { + "role": "twice the elements", + "mean_T": -0.00138539, + "sd_T": 0.0504323, + "AD_rms_max": 0.107866, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "uls19_m1.12_neg1.2_dt": { + "role": "half the time step", + "mean_T": 0.00615787, + "sd_T": -0.0375066, + "AD_rms_max": 0.0259441, + "f_mid": -0.0185185 + }, + "uls19_m1.12_neg1.2_n108": { + "role": "twice the elements", + "mean_T": -0.0292937, + "sd_T": -0.173652, + "AD_rms_max": -0.0886828, + "f_mid": -0.0185185 + }, + "b1_m1.84_pos0.8_dt": { + "role": "half the time step", + "mean_T": -0.000333733, + "sd_T": 0.0248872, + "AD_rms_max": -0.00513647, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "b1_m1.84_pos0.8_n108": { + "role": "twice the elements", + "mean_T": -0.000293523, + "sd_T": 0.00244924, + "AD_rms_max": -0.0104285, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "b1_m1.12_neg1.2_dt": { + "role": "half the time step", + "mean_T": 0.0528912, + "sd_T": 0.0230265, + "AD_rms_max": 0.0543951, + "f_mid": -0.111111 + }, + "b1_m1.12_neg1.2_n108": { + "role": "twice the elements", + "mean_T": 0.00971889, + "sd_T": 0.00576302, + "AD_rms_max": -0.00775592, + "f_mid": 0.0 + }, + "wake_m1.84_pos0.8_dt": { + "role": "half the time step", + "mean_T": -1.14851e-05, + "sd_T": -0.00183678, + "AD_rms_max": -7.15033e-05, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "wake_m1.84_pos0.8_n108": { + "role": "twice the elements", + "mean_T": 0.000176472, + "sd_T": 0.00104338, + "AD_rms_max": 0.0100616, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "wake_m1.12_neg1.2_dt": { + "role": "half the time step", + "mean_T": 9.78408e-05, + "sd_T": -0.00338539, + "AD_rms_max": -5.35361e-05, + "f_mid": 0.0 + }, + "wake_m1.12_neg1.2_n108": { + "role": "twice the elements", + "mean_T": 0.00192069, + "sd_T": 0.0683398, + "AD_rms_max": -0.00300082, + "f_mid": 0.0 + }, + "uls19_m1.12_pos0.4_undamped": { + "role": "no structural damping", + "mean_T": 0.00478151, + "sd_T": 0.0946651, + "AD_rms_max": 0.0108269, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "uls19_m1.12_pos0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0265117, + "sd_T": 1.00318, + "AD_rms_max": 0.281374, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "uls19_m1.12_pos0.8_undamped": { + "role": "no structural damping", + "mean_T": 0.0273574, + "sd_T": 0.541039, + "AD_rms_max": 0.100682, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "uls19_m1.12_pos0.8_frictionless": { + "role": "frictionless floor", + "mean_T": 0.00310262, + "sd_T": -0.0065773, + "AD_rms_max": 0.0893733, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "uls19_m1.12_pos1.2_undamped": { + "role": "no structural damping", + "mean_T": 0.011719, + "sd_T": 0.685669, + "AD_rms_max": -0.0146251, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "uls19_m1.12_pos1.2_frictionless": { + "role": "frictionless floor", + "mean_T": 0.00359373, + "sd_T": -0.0319049, + "AD_rms_max": 0.0168571, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "uls19_m1.12_neg0.4_undamped": { + "role": "no structural damping", + "mean_T": -0.00695026, + "sd_T": 0.115984, + "AD_rms_max": -0.040814, + "f_mid": 0.0 + }, + "uls19_m1.12_neg0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0387092, + "sd_T": -0.0167714, + "AD_rms_max": 0.364643, + "f_mid": 0.0 + }, + "uls19_m1.12_neg0.8_undamped": { + "role": "no structural damping", + "mean_T": 0.0499191, + "sd_T": 0.723415, + "AD_rms_max": 0.141373, + "f_mid": 1.76923 + }, + "uls19_m1.12_neg0.8_frictionless": { + "role": "frictionless floor", + "mean_T": -0.00926855, + "sd_T": 0.0257577, + "AD_rms_max": 0.0274219, + "f_mid": 0.153846 + }, + "uls19_m1.12_neg1.2_undamped": { + "role": "no structural damping", + "mean_T": 0.0669251, + "sd_T": 1.64425, + "AD_rms_max": -0.187033, + "f_mid": 0.0 + }, + "uls19_m1.12_neg1.2_frictionless": { + "role": "frictionless floor", + "mean_T": 0.00363012, + "sd_T": -0.0186852, + "AD_rms_max": -0.0267742, + "f_mid": 0.0 + }, + "uls19_m1.84_pos0.4_undamped": { + "role": "no structural damping", + "mean_T": 0.00331159, + "sd_T": 0.337498, + "AD_rms_max": 0.209312, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "uls19_m1.84_pos0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.00286032, + "sd_T": 0.610118, + "AD_rms_max": 0.0378133, + "f_upper": 0.1875, + "f_lower": 0.1875 + }, + "uls19_m1.84_pos0.8_undamped": { + "role": "no structural damping", + "mean_T": 0.00124073, + "sd_T": 0.272957, + "AD_rms_max": 0.119029, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "uls19_m1.84_pos0.8_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0160846, + "sd_T": 0.529706, + "AD_rms_max": 0.283511, + "f_upper": 0.030303, + "f_lower": 0.030303 + }, + "uls19_m1.84_pos1.2_undamped": { + "role": "no structural damping", + "mean_T": 0.00905076, + "sd_T": 0.380209, + "AD_rms_max": 0.0491352, + "f_upper": -0.0384615, + "f_lower": -0.0961538 + }, + "uls19_m1.84_pos1.2_frictionless": { + "role": "frictionless floor", + "mean_T": -0.00237351, + "sd_T": 0.0470997, + "AD_rms_max": 0.312951, + "f_upper": -0.0769231, + "f_lower": -0.0769231 + }, + "uls19_m1.84_neg0.4_undamped": { + "role": "no structural damping", + "mean_T": -0.000291763, + "sd_T": 0.0591125, + "AD_rms_max": -0.0200486, + "f_mid": 0.0 + }, + "uls19_m1.84_neg0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.000682553, + "sd_T": 0.988066, + "AD_rms_max": -0.0126726, + "f_mid": 0.0666667 + }, + "uls19_m1.84_neg0.8_undamped": { + "role": "no structural damping", + "mean_T": -0.0129811, + "sd_T": 0.24324, + "AD_rms_max": 0.0250626, + "f_mid": 0.0 + }, + "uls19_m1.84_neg0.8_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0412617, + "sd_T": 0.168008, + "AD_rms_max": 0.22774, + "f_mid": 0.037037 + }, + "uls19_m1.84_neg1.2_undamped": { + "role": "no structural damping", + "mean_T": -0.00641234, + "sd_T": 0.190758, + "AD_rms_max": -0.0611028, + "f_mid": 0.0333333 + }, + "uls19_m1.84_neg1.2_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0435104, + "sd_T": 0.18567, + "AD_rms_max": 0.120453, + "f_mid": 0.0 + }, + "b1_m1.12_pos0.4_undamped": { + "role": "no structural damping", + "mean_T": 0.00337188, + "sd_T": 0.11451, + "AD_rms_max": 0.0598356, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "b1_m1.12_pos0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0528784, + "sd_T": 1.94534, + "AD_rms_max": 0.607314, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "b1_m1.12_pos0.8_undamped": { + "role": "no structural damping", + "mean_T": -0.0125056, + "sd_T": 0.0903299, + "AD_rms_max": -0.0847705, + "f_upper": 0.171429, + "f_lower": 0.171429 + }, + "b1_m1.12_pos0.8_frictionless": { + "role": "frictionless floor", + "mean_T": -0.0307946, + "sd_T": -0.0328283, + "AD_rms_max": -0.137113, + "f_upper": 0.171429, + "f_lower": 0.171429 + }, + "b1_m1.12_pos1.2_undamped": { + "role": "no structural damping", + "mean_T": 0.0220779, + "sd_T": 0.259716, + "AD_rms_max": 0.0402986, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "b1_m1.12_pos1.2_frictionless": { + "role": "frictionless floor", + "mean_T": 0.00161545, + "sd_T": 0.0139552, + "AD_rms_max": 0.00830583, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "b1_m1.12_neg0.4_undamped": { + "role": "no structural damping", + "mean_T": 0.0227695, + "sd_T": -0.0195736, + "AD_rms_max": 0.0863363, + "f_mid": 0.0 + }, + "b1_m1.12_neg0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0342446, + "sd_T": 0.19911, + "AD_rms_max": 0.29079, + "f_mid": 0.2 + }, + "b1_m1.12_neg0.8_undamped": { + "role": "no structural damping", + "mean_T": 0.0554924, + "sd_T": 0.463296, + "AD_rms_max": 0.0195141, + "f_mid": 0.0 + }, + "b1_m1.12_neg0.8_frictionless": { + "role": "frictionless floor", + "mean_T": -0.00972576, + "sd_T": -0.0398738, + "AD_rms_max": -0.0733204, + "f_mid": 1.5 + }, + "b1_m1.12_neg1.2_undamped": { + "role": "no structural damping", + "mean_T": 0.0596978, + "sd_T": 0.781224, + "AD_rms_max": 0.0899233, + "f_mid": 0.015873 + }, + "b1_m1.12_neg1.2_frictionless": { + "role": "frictionless floor", + "mean_T": 0.00255669, + "sd_T": -0.000636848, + "AD_rms_max": -0.0119029, + "f_mid": 0.0 + }, + "b1_m1.84_pos0.4_undamped": { + "role": "no structural damping", + "mean_T": 0.00782454, + "sd_T": 0.0983797, + "AD_rms_max": 0.151877, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "b1_m1.84_pos0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0042603, + "sd_T": 1.54874, + "AD_rms_max": 0.00227848, + "f_upper": 0.235294, + "f_lower": 0.235294 + }, + "b1_m1.84_pos0.8_undamped": { + "role": "no structural damping", + "mean_T": 0.000127782, + "sd_T": 0.32739, + "AD_rms_max": 0.0107553, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "b1_m1.84_pos0.8_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0283157, + "sd_T": 2.03065, + "AD_rms_max": 0.304132, + "f_upper": 0.0465116, + "f_lower": 0.0465116 + }, + "b1_m1.84_pos1.2_undamped": { + "role": "no structural damping", + "mean_T": 0.000824041, + "sd_T": 0.569817, + "AD_rms_max": -0.00031999, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "b1_m1.84_pos1.2_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0103245, + "sd_T": 0.761389, + "AD_rms_max": 0.0469476, + "f_upper": -0.0172414, + "f_lower": -0.0172414 + }, + "b1_m1.84_neg0.4_undamped": { + "role": "no structural damping", + "mean_T": -0.00625667, + "sd_T": 0.0274971, + "AD_rms_max": 0.0441987, + "f_mid": 0.0 + }, + "b1_m1.84_neg0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.058606, + "sd_T": 1.99983, + "AD_rms_max": -0.390481, + "f_mid": 0.4 + }, + "b1_m1.84_neg0.8_undamped": { + "role": "no structural damping", + "mean_T": 0.154942, + "sd_T": 0.235442, + "AD_rms_max": -0.199025, + "f_mid": 0.0714286 + }, + "b1_m1.84_neg0.8_frictionless": { + "role": "frictionless floor", + "mean_T": 0.281418, + "sd_T": 0.018263, + "AD_rms_max": -0.358921, + "f_mid": 0.107143 + }, + "b1_m1.84_neg1.2_undamped": { + "role": "no structural damping", + "mean_T": -0.0075888, + "sd_T": 0.693758, + "AD_rms_max": -0.0498695, + "f_mid": 0.147059 + }, + "b1_m1.84_neg1.2_frictionless": { + "role": "frictionless floor", + "mean_T": -0.00248897, + "sd_T": 0.0651826, + "AD_rms_max": -0.00460963, + "f_mid": -0.0294118 + }, + "wake_m1.12_pos0.4_undamped": { + "role": "no structural damping", + "mean_T": 0.00070455, + "sd_T": 0.129646, + "AD_rms_max": 0.062596, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "wake_m1.12_pos0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.00794549, + "sd_T": 3.90394, + "AD_rms_max": 0.424917, + "f_upper": 0.142857, + "f_lower": 0.142857 + }, + "wake_m1.12_pos0.8_undamped": { + "role": "no structural damping", + "mean_T": 0.00597687, + "sd_T": 2.95918, + "AD_rms_max": 0.487728, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "wake_m1.12_pos0.8_frictionless": { + "role": "frictionless floor", + "mean_T": 0.0124979, + "sd_T": 4.09934, + "AD_rms_max": 0.993938, + "f_upper": -0.148148, + "f_lower": -0.148148 + }, + "wake_m1.12_pos1.2_undamped": { + "role": "no structural damping", + "mean_T": 0.0132288, + "sd_T": 0.679432, + "AD_rms_max": 0.286669, + "f_upper": -0.027027, + "f_lower": -0.027027 + }, + "wake_m1.12_pos1.2_frictionless": { + "role": "frictionless floor", + "mean_T": -6.98416e-05, + "sd_T": -0.000317822, + "AD_rms_max": -0.00151722, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "wake_m1.12_neg0.4_undamped": { + "role": "no structural damping", + "mean_T": 0.032525, + "sd_T": 0.280969, + "AD_rms_max": 0.273797, + "f_mid": 0.0 + }, + "wake_m1.12_neg0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.400073, + "sd_T": 0.848568, + "AD_rms_max": 1.74392, + "f_mid": -0.0952381 + }, + "wake_m1.12_neg0.8_undamped": { + "role": "no structural damping", + "mean_T": 0.0109013, + "sd_T": 1.06185, + "AD_rms_max": 0.0638437, + "f_mid": 0.0 + }, + "wake_m1.12_neg0.8_frictionless": { + "role": "frictionless floor", + "mean_T": -7.78067e-06, + "sd_T": -0.00021671, + "AD_rms_max": -0.0184043, + "f_mid": 0.0 + }, + "wake_m1.12_neg1.2_undamped": { + "role": "no structural damping", + "mean_T": 0.0229739, + "sd_T": 1.98694, + "AD_rms_max": -0.0527667, + "f_mid": 0.0526316 + }, + "wake_m1.12_neg1.2_frictionless": { + "role": "frictionless floor", + "mean_T": -4.41773e-06, + "sd_T": 1.74642e-05, + "AD_rms_max": 0.000181606, + "f_mid": 0.0 + }, + "wake_m1.84_pos0.4_undamped": { + "role": "no structural damping", + "mean_T": 0.000612241, + "sd_T": 0.12109, + "AD_rms_max": 0.0707901, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "wake_m1.84_pos0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.000741443, + "sd_T": 0.290359, + "AD_rms_max": 0.202874, + "f_upper": -0.125, + "f_lower": -0.125 + }, + "wake_m1.84_pos0.8_undamped": { + "role": "no structural damping", + "mean_T": 0.000594474, + "sd_T": 0.0452808, + "AD_rms_max": 0.0317005, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "wake_m1.84_pos0.8_frictionless": { + "role": "frictionless floor", + "mean_T": 0.00410578, + "sd_T": 1.1986, + "AD_rms_max": 0.242015, + "f_upper": -0.0222222, + "f_lower": -0.0222222 + }, + "wake_m1.84_pos1.2_undamped": { + "role": "no structural damping", + "mean_T": -0.000385042, + "sd_T": -0.358935, + "AD_rms_max": -0.047561, + "f_upper": 0.0, + "f_lower": 0.0 + }, + "wake_m1.84_pos1.2_frictionless": { + "role": "frictionless floor", + "mean_T": 0.00851441, + "sd_T": 4.11944, + "AD_rms_max": 0.69433, + "f_upper": -0.012987, + "f_lower": -0.012987 + }, + "wake_m1.84_neg0.4_undamped": { + "role": "no structural damping", + "mean_T": -0.000446763, + "sd_T": 0.111242, + "AD_rms_max": 0.0535107, + "f_mid": 0.0 + }, + "wake_m1.84_neg0.4_frictionless": { + "role": "frictionless floor", + "mean_T": 0.00109584, + "sd_T": 0.5776, + "AD_rms_max": -0.0891654, + "f_mid": 0.0 + }, + "wake_m1.84_neg0.8_undamped": { + "role": "no structural damping", + "mean_T": -0.00145667, + "sd_T": -0.0277809, + "AD_rms_max": 0.051921, + "f_mid": 0.0 + }, + "wake_m1.84_neg0.8_frictionless": { + "role": "frictionless floor", + "mean_T": -0.00697171, + "sd_T": 0.953695, + "AD_rms_max": 0.0461086, + "f_mid": -0.0487805 + }, + "wake_m1.84_neg1.2_undamped": { + "role": "no structural damping", + "mean_T": 0.140531, + "sd_T": -0.108429, + "AD_rms_max": 0.913708, + "f_mid": 0.0 + }, + "wake_m1.84_neg1.2_frictionless": { + "role": "frictionless floor", + "mean_T": 0.176446, + "sd_T": -0.0882717, + "AD_rms_max": 1.44709, + "f_mid": 0.0 + } + }, + "executable_sha256": "2cb307b11eab738867274a994d1364f75b9d79fd4562c00de82df59d946b7426" +} From 5f1db71ef523e38f00d9abff1ca8e5d544c36990 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Wed, 18 Nov 2026 00:58:18 +0900 Subject: [PATCH 40/47] ci: pull-request Debug tier also skips the tests over 200 CPU-s at -O0 (#183) #181 took the slow-labelled tests out of the pull-request Debug tier, but its own run still held the Debug jobs for about 1 h 45 min: the remaining 414 tests cost 18,700 CPU-s at -O0 on the Windows runner, and 27 of them (the VIV deck gates, the coupled and threaded C API runs, the azimuth and graded-mesh statics, among others) take 200-1030 CPU-s each, about two thirds of the total. CMakeLists.txt gives those 27 tests the label debug_long (only where the test exists in the build), and a pull request's Debug tier runs ctest -LE 'slow|debug_long': 387 of 432 tests, about 25 minutes of tests at four at once. The skipped tests still run on every pull request in Release on both platforms and on the Prescott kernel, and the full suite runs at -O0 on every push to dev and main. Signed-off-by: Jae Hoon Seo --- .github/workflows/fortran.yml | 9 +++++---- CMakeLists.txt | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fortran.yml b/.github/workflows/fortran.yml index 57c40c79..15d96379 100644 --- a/.github/workflows/fortran.yml +++ b/.github/workflows/fortran.yml @@ -87,9 +87,10 @@ jobs: # threading set their own thread counts. # # A pull request runs the Debug tier without the tests labelled slow (the long lazy-wave, - # mooring and statics campaigns, about 6500 CPU-s of a 21900 CPU-s Debug suite): the -O0 - # faults this tier exists for live in code the remaining tests reach, and the slow tests - # still run in Release on both platforms and on the Prescott kernel. Every push to dev + # mooring and statics campaigns) or debug_long (tests over about 200 CPU-s at -O0, listed in + # CMakeLists.txt): the -O0 faults this tier exists for live in code the remaining tests + # reach, and the skipped tests still run in Release on both platforms and on the Prescott + # kernel. Every push to dev # and main runs the full suite at -O0, so each merge is hardened without holding the PR. env: OMP_NUM_THREADS: "1" @@ -97,7 +98,7 @@ jobs: FAST_DEBUG: ${{ matrix.build_type == 'Debug' && github.event_name == 'pull_request' }} run: | if [ "$FAST_DEBUG" = "true" ]; then - ctest --test-dir build --output-on-failure --parallel 4 -LE slow + ctest --test-dir build --output-on-failure --parallel 4 -LE 'slow|debug_long' else ctest --test-dir build --output-on-failure --parallel 4 fi diff --git a/CMakeLists.txt b/CMakeLists.txt index 14e6a0f7..fff0998f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3791,3 +3791,41 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") endif() endforeach() endif() + +# Tests over about 200 CPU-s at -O0 on the Windows Debug runner (the CI run of #181). A pull +# request's Debug tier skips them with the slow tests (fortran.yml); Release runs them on every +# pull request and the Debug tier on every push to dev and main. +set(CABLEDYN_DEBUG_LONG_TESTS + viv_coupled + viv_inline_deck + viv_frame_deck + viv_wake_deck + python_package + graded_mesh_statics + viv_riser + viv_step_order + coupled_cable_tolerance + static_current_balance + bending_damping_deck + viv_amplitude_deck + hermite_static_azimuth + ei0_slack_dynamics + arclength_rigid_end + viv_lockin + viv_diameter_deck + torsion_current_start + body_rod_physics + c_api_threads_exit + load_power_deck + driver_axial_damping_ratio + example_lazy_wave_vessel_rao + torsion_orcaflex + monolithic_gates + driver_graded_cross_current + attachment_polish_floor +) +foreach(_t IN LISTS CABLEDYN_DEBUG_LONG_TESTS) + if(TEST ${_t}) + set_property(TEST ${_t} APPEND PROPERTY LABELS debug_long) + endif() +endforeach() From 3aec0cbc908a71e260e5a8a7691bce42389ca9d6 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Thu, 19 Nov 2026 21:50:56 +0900 Subject: [PATCH 41/47] perf: evaluate a cable's line-wide channel values once per output row (#184) Every TwistN channel of a finite-EI cable re-evaluated the twist of every element of the line (CD_HermiteCable_Dyn_Element_Twist, with the twist reference and its Hessian per element), and every TorqN, CurvX/CurvY and VIV amplitude channel re-evaluated its own line-wide array. On the coupled OpenFAST route the channels are evaluated in every CalcOutput (about two per step) and again for the committed-step row of the .CD.out, so a deck with a few twist channels spent most of its CalcOutput time on them. The channels of one output row now share these values: CD_ChannelRow (the former load-power row cache) also carries the torsion state, the element and end twists, the node torques, the section curvature and the VIV amplitude of a cable. The first channel of a row that needs a value evaluates it with the same call the channel made before, and the cable's other channels of the row read it, so every value is bit-identical. A row is valid for one state only: CD_AGG_EvalChannels (new) clears it at the start and the end of every row, the standalone routes per row. - CD_CalcOutput, its committed-step row and lin_eval evaluate the channels with CD_AGG_EvalChannels. A supercycled module's row takes the channels the same call has just evaluated on the committed state (the re-evaluation repeated them bit for bit). - The standalone mixed route (write_mixed_row), the multibody march and the cubic-Hermite writer pass the row through CD_Eval_Aggregate_Channel / eval_cable_channel. - A channel that fails still ends the row after the channels before it. On the IEA-15MW UMaine model with a 600-element lazy-wave cable restrained in torsion (nine Twist and nine BendMom channels, DT 0.01 s), CalcOutput takes 12.3 ms per step instead of 26.6 ms (channels 1.0 ms instead of 9.9 ms, the .CD.out row 0.6 ms instead of 5.1 ms). The coupled cases, restarts, linearization files, FAST.Farm and the example decks are bit-identical to dev. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 12 ++ CMakeLists.txt | 8 + app/cabledyn.f90 | 19 +- src/CableDyn_DeckDriver.f90 | 194 ++++++++++++++++++-- src/CableDyn_OpenFAST_Aggregate.f90 | 97 +++++++++- src/openfast/CableDyn_OF.f90 | 67 ++++--- tests/test_channel_row.f90 | 266 ++++++++++++++++++++++++++++ 7 files changed, 611 insertions(+), 52 deletions(-) create mode 100644 tests/test_channel_row.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 294b5370..8bb5b77d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -222,6 +222,18 @@ All notable changes to CableDyn are recorded in this file. The format follows `EI = 0` lines and line systems. Outputs are unchanged to the bit; with the three line totals the VIV examples run about 11 % faster (`viv_taut_cable_inline.dat` 2.39 s to 2.14 s; the same line with 200 elements at 100 steps per cycle 18.1 s to 16.1 s). +- The output channels of one row evaluate the line-wide values a finite-EI cable's channels + share once per row instead of once per channel: the element twists and torsion state behind + every `TwistN`, the node torques of `TorqN`, the section curvature of + `CurvX`/`CurvY` and the VIV amplitude. This applies to every `CalcOutput` of the OpenFAST + module (`CompMooring = 5`) and FAST.Farm, their committed-step `.CD.out` row and + linearization, and to the standalone mixed, multibody and cubic-Hermite routes. A supercycled + module's `.CD.out` row also takes the channels the same call has just evaluated on the + committed state. Outputs, `.CD.out`, linearization files and restarts are unchanged to the + bit. On the IEA-15MW UMaine model with the three chains and a 600-element lazy-wave cable + restrained in torsion (nine `Twist` and nine `BendMom` channels, `DT = 0.01 s`), `CalcOutput` + takes 12.3 ms per step instead of 26.6 ms (the channels 1.0 ms instead of 9.9 ms, the `.CD.out` + row 0.6 ms instead of 5.1 ms), and CableDyn as a whole 26 ms instead of 42 ms. - The bending damping of a finite-EI cable (`EI|Bb`, `EI|-zeta|f`) evaluates the second derivatives of the curvature only where the position Jacobian needs them, not in every residual evaluation. Results are unchanged to the bit; the Delta Flume case 9 deck of diff --git a/CMakeLists.txt b/CMakeLists.txt index fff0998f..9865b3f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2785,6 +2785,14 @@ target_link_libraries(test_coupled_torsion PRIVATE cabledyn_core) add_test(NAME coupled_torsion COMMAND test_coupled_torsion WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_tests_properties(coupled_torsion PROPERTIES LABELS "fortran;unit;static;dynamic;openfast") +# The channels of one output row evaluated together (CD_AGG_EvalChannels, the line-wide twists +# and torques once per row) against one at a time, bit for bit, through a rolling march and a +# probe transfer: a row value kept from another state would fail. +add_executable(test_channel_row tests/test_channel_row.f90) +target_link_libraries(test_channel_row PRIVATE cabledyn_core) +add_test(NAME channel_row COMMAND test_channel_row WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_tests_properties(channel_row PROPERTIES LABELS "fortran;unit;dynamic;openfast") + # OpenFAST linearisation of a line restrained in torsion, by the shell's lin_eval recipe on the # aggregate: the twist modes of A against n pi/L sqrt(GJ/Irn), the reduced roll stiffness GJ/L # (nodal twist and condensed), the damping and inertia columns of the platform's angular rates. diff --git a/app/cabledyn.f90 b/app/cabledyn.f90 index 750a3fcf..16ddf99b 100644 --- a/app/cabledyn.f90 +++ b/app/cabledyn.f90 @@ -29,7 +29,7 @@ PROGRAM cabledyn CD_AGG_NMovingPoints, CD_AGG_GetMovingPointMesh, & CD_AGG_Step_Moving, CD_AGG_CalcOutput, CD_AGG_End, & CD_AGG_NumChannels, CD_AGG_ChannelHeader, & - CD_AGG_EvalChannel, CD_AGG_WriteStaticProfile, & + CD_AGG_EvalChannels, CD_AGG_WriteStaticProfile, & CD_AGG_GetInitMetadata, CD_AGG_GetInitLine, & CD_AGG_Range_Sample, CD_AGG_Range_Write, CD_AGG_OK, CD_AGG_BADINPUT, & CD_AGG_UpdateStates_Moving, CD_AGG_MotionKinematics, & @@ -854,22 +854,27 @@ SUBROUTINE write_mixed_row(unit, time, aggregate, stat, msg) TYPE(CD_AGG_ModuleType), INTENT(INOUT) :: aggregate INTEGER, INTENT(OUT) :: stat CHARACTER(*), INTENT(OUT) :: msg - INTEGER :: i, ios - REAL(wp) :: value + INTEGER :: i, ios, n_done, eval_stat + REAL(wp) :: values(CD_AGG_NumChannels(aggregate)) + CHARACTER(LEN(msg)) :: eval_msg ! full-precision time column (the deck-driver writers use the same format) WRITE (unit, '(ES25.16E3)', ADVANCE='NO', IOSTAT=ios) time IF (ios /= 0) THEN stat = CD_AGG_BADINPUT; msg = 'cannot write mixed output row'; RETURN END IF - DO i = 1, CD_AGG_NumChannels(aggregate) - CALL CD_AGG_EvalChannel(aggregate, i, value, stat, msg) - IF (stat /= CD_AGG_OK) RETURN - WRITE (unit, CD_CHANNEL_FMT, ADVANCE='NO', IOSTAT=ios) CHAR(9), value + ! the row's channels in one evaluation (their shared line-wide values once); a failed channel + ! ends the row after the channels before it, as a channel-by-channel loop would + CALL CD_AGG_EvalChannels(aggregate, values, n_done, eval_stat, eval_msg) + DO i = 1, n_done + WRITE (unit, CD_CHANNEL_FMT, ADVANCE='NO', IOSTAT=ios) CHAR(9), values(i) IF (ios /= 0) THEN stat = CD_AGG_BADINPUT; msg = 'cannot write mixed output row'; RETURN END IF END DO + IF (eval_stat /= CD_AGG_OK) THEN + stat = eval_stat; msg = eval_msg; RETURN + END IF WRITE (unit, '(A)', IOSTAT=ios) '' IF (ios /= 0) THEN stat = CD_AGG_BADINPUT; msg = 'cannot write mixed output row'; RETURN diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index bbb253bd..58ea9445 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -268,6 +268,9 @@ MODULE CableDyn_DeckDriver ! Both reuse the same private evaluators the standalone .out writers use, so a coupled run ! and the standalone driver report identical channel values on a shared configuration. PUBLIC :: CD_Eval_Aggregate_Channel, CD_Channel_Unit + ! The line-wide values one output row of channels shares per finite-EI cable (the rows argument + ! of CD_Eval_Aggregate_Channel), cleared before each row. + PUBLIC :: CD_ChannelRow, CD_Channel_Row_Reset ! The deck node of a node of a finite-EI cable's final mesh (the static-profile DeckNode column). PUBLIC :: CD_Cable_Deck_Node ! In-process object queries of the C API (CableDyn_CAPI): segment tensions in the .t.out @@ -925,12 +928,33 @@ MODULE CableDyn_DeckDriver REAL(wp), ALLOCATABLE :: line_pv(:), line_pd(:), line_pm(:) END TYPE - TYPE :: LoadPowerRow - !! The node load powers of one finite-EI cable at the committed state of one output row - !! (CD_HermiteCable_Dyn_Load_Power): the row's first load power channel of the cable - !! evaluates them and its other load power channels reuse them. + TYPE :: CD_ChannelRow + !! The line-wide values of one finite-EI cable at the state of one output row: the row's + !! first channel of the cable that needs one evaluates it, and the cable's other channels of + !! the row read it, so a row costs one line-wide evaluation per kind of value, not one per + !! channel. Each value is the one the channel would evaluate itself, bit for bit. A row is + !! valid for one state only: CD_Channel_Row_Reset clears it before every row. + !! valid: the node load powers (CD_HermiteCable_Dyn_Load_Power) LOGICAL :: valid = .FALSE. REAL(wp), ALLOCATABLE :: pv(:), pd(:), pm(:) + ! the torsion state Theta and torque (CD_HermiteCable_Dyn_Torsion_State) + LOGICAL :: tors_valid = .FALSE. + REAL(wp) :: theta = CD_ZERO, torque = CD_ZERO + ! the element twists (CD_HermiteCable_Dyn_Element_Twist) + LOGICAL :: etw_valid = .FALSE. + REAL(wp), ALLOCATABLE :: etw(:) + ! the twists of the torsional end springs (CD_HermiteCable_Dyn_End_Twist) + LOGICAL :: etw2_valid = .FALSE. + REAL(wp) :: etw2(2) = CD_ZERO + ! the node torques (CD_HermiteCable_Dyn_Node_Torque) + LOGICAL :: ntq_valid = .FALSE. + REAL(wp), ALLOCATABLE :: ntq(:) + ! the section curvature components (CD_HFMF_Section_Curvature) + LOGICAL :: sc_valid = .FALSE. + REAL(wp), ALLOCATABLE :: kxa(:), kya(:) + ! the smoothed VIV amplitude estimates (CD_HermiteCable_Dyn_VIV_Amplitude) + LOGICAL :: amp_valid = .FALSE. + REAL(wp), ALLOCATABLE :: amp(:) END TYPE TYPE :: LineStepWorkspace @@ -24007,6 +24031,8 @@ SUBROUTINE write_multibody_dynamic_out(deck_path, out_root, channels, types, bod TYPE(ModelOutputWorkspace) :: output_work TYPE(DriverProgress) :: progress TYPE(CD_RangeSet) :: mb_ranges + ! the cables' line-wide values one output row of channels shares (reset per row) + TYPE(CD_ChannelRow), ALLOCATABLE :: mb_rows(:) converged = .FALSE. ErrStat = CD_DECKDRV_OK @@ -24621,6 +24647,14 @@ SUBROUTINE mb_outputs(time) CALL CD_Deck_Range_Sample_Aggregate(mb_ranges, mb%has_sys, mb%system, mb%cables, mb%line_is_cable, & mb%line_obj_index, time, ErrStat, ErrMsg) IF (ErrStat /= CD_DECKDRV_OK) RETURN + IF (.NOT. ALLOCATED(mb_rows)) THEN + IF (ALLOCATED(mb%cables)) THEN + ALLOCATE (mb_rows(SIZE(mb%cables))) + ELSE + ALLOCATE (mb_rows(0)) + END IF + END IF + CALL CD_Channel_Row_Reset(mb_rows) DO j = 1, SIZE(channels) IF (is_object_channel(to_lower(channels(j)))) THEN CALL mb_object_channel(mb, points, opts, time, channels(j), vals(j), found, ErrStat, ErrMsg, bathymetry) @@ -24632,7 +24666,7 @@ SUBROUTINE mb_outputs(time) CALL mb_point_force(mb, channels(j), vals(j), ErrStat, ErrMsg) ELSE CALL CD_Eval_Aggregate_Channel(channels(j), mb%has_sys, mb%system, mb%cables, mb%line_is_cable, & - mb%line_obj_index, vals(j), ErrStat, ErrMsg, ranges=mb_ranges) + mb%line_obj_index, vals(j), ErrStat, ErrMsg, ranges=mb_ranges, rows=mb_rows) END IF IF (ErrStat /= CD_DECKDRV_OK) RETURN IF (.NOT. IEEE_IS_FINITE(vals(j))) THEN @@ -34311,8 +34345,9 @@ SUBROUTINE write_hermite_model_row(unit, time, channels, lines, points, cables, REAL(wp) :: val, f(3), fl(3) CHARACTER(NAMELEN) :: lo CHARACTER(1024) :: em - ! the cables' load powers at this row's state, shared by their load power channels - TYPE(LoadPowerRow) :: powers(SIZE(cables)) + ! the cables' line-wide values at this row's state (load powers, twists, torques, ...), shared by + ! their channels of the row + TYPE(CD_ChannelRow) :: powers(SIZE(cables)) ErrStat = CD_DECKDRV_OK; ErrMsg = '' IF (PRESENT(ranges)) THEN DO li = 1, SIZE(lines) @@ -39702,12 +39737,14 @@ END SUBROUTINE aggregate_tdp_value ! -------------------------------------------------------------------------- ! SUBROUTINE CD_Eval_Aggregate_Channel(ch, has_sys, system, cables, line_is_cable, line_obj_index, val, ErrStat, & - ErrMsg, cable_points, rigid_rt, rod_rt, ranges, mesh_node) + ErrMsg, cable_points, rigid_rt, rod_rt, ranges, mesh_node, rows) !! Evaluate ONE deck OUTPUTS channel token against a built aggregate. The token's deck line !! id is resolved through the map to either an EI=0 system line (eval_system_line_channel) or !! a finite-EI cable (eval_cable_channel); Point

channels read the EI=0 system point state. !! The channel is assumed already validated (parse_deck -> check_channel); an internally - !! inconsistent token or a failed state query still fails closed here. + !! inconsistent token or a failed state query still fails closed here. rows (optional, one + !! per cable): the line-wide values the channels of one output row share (CD_ChannelRow), + !! reset by the caller before the row; the value is the same with or without them. CHARACTER(*), INTENT(IN) :: ch LOGICAL, INTENT(IN) :: has_sys TYPE(CD_SystemType), INTENT(IN) :: system @@ -39730,6 +39767,7 @@ SUBROUTINE CD_Eval_Aggregate_Channel(ch, has_sys, system, cables, line_is_cable, ! A node channel names a deck node; mesh_node = .TRUE. reads it as a node of the line's final ! mesh instead (eval_cable_channel), as the static profile and the C API line arrays do LOGICAL, INTENT(IN), OPTIONAL :: mesh_node + TYPE(CD_ChannelRow), INTENT(INOUT), OPTIONAL :: rows(:) CHARACTER(NAMELEN) :: lo LOGICAL :: found @@ -39884,7 +39922,14 @@ SUBROUTINE CD_Eval_Aggregate_Channel(ch, has_sys, system, cables, line_is_cable, IF (line_obj_index(line_id) > SIZE(cables)) THEN CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": cable index out of range'); RETURN END IF - CALL eval_cable_channel(cables(line_obj_index(line_id)), ch, val, ErrStat, ErrMsg, mesh_node=mesh_node) + c = line_obj_index(line_id) + IF (PRESENT(rows)) THEN + IF (c <= SIZE(rows)) THEN + CALL eval_cable_channel(cables(c), ch, val, ErrStat, ErrMsg, mesh_node=mesh_node, power=rows(c)) + RETURN + END IF + END IF + CALL eval_cable_channel(cables(c), ch, val, ErrStat, ErrMsg, mesh_node=mesh_node) ELSE IF (.NOT. has_sys) THEN CALL fail(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": line maps to the EI=0 system but no system '// & @@ -40404,16 +40449,17 @@ SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node, power) !! names a deck node (1 + the total NumSegs of the line's sections, End A first), read at its !! node of the final mesh on a refined line (cable%deck_node); mesh_node = .TRUE. reads the !! token's node as a node of the final mesh instead (the static profile and the C API line - !! arrays list every mesh node). power (optional), the cable's load powers at its present - !! state: a load power channel takes them when they are valid and stores them otherwise, so - !! the load power channels of one output row evaluate them once. + !! arrays list every mesh node). power (optional), the cable's line-wide values at its present + !! state (CD_ChannelRow: load powers, torsion state, element, end and node twists and + !! torques, section curvature, VIV amplitude): a channel takes a value when it is valid and + !! stores it otherwise, so the channels of one output row evaluate each kind once. TYPE(CD_HFMF_ModuleType), INTENT(INOUT) :: cable CHARACTER(*), INTENT(IN) :: ch REAL(wp), INTENT(OUT) :: val INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg LOGICAL, INTENT(IN), OPTIONAL :: mesh_node - TYPE(LoadPowerRow), INTENT(INOUT), OPTIONAL :: power + TYPE(CD_ChannelRow), INTENT(INOUT), OPTIONAL :: power CHARACTER(NAMELEN) :: lo INTEGER :: line_id, node, kind, comp, nnode, nelem, inode, es @@ -40522,6 +40568,19 @@ SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node, power) END IF END BLOCK CASE (21) ! the smoothed VIV amplitude estimate of the node (VIV AMPLITUDE) + IF (PRESENT(power)) THEN + IF (.NOT. power%amp_valid) THEN + CALL row_array(power%amp, nnode) + CALL CD_HermiteCable_Dyn_VIV_Amplitude(cable%line, power%amp, es, em) + IF (es /= CD_HCDYN_OK) THEN + CALL fail_solve(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": finite-EI VIV amplitude recovery failed: '// & + TRIM(em)); RETURN + END IF + power%amp_valid = .TRUE. + END IF + val = power%amp(inode) + RETURN + END IF BLOCK REAL(wp) :: amp(nnode) CALL CD_HermiteCable_Dyn_VIV_Amplitude(cable%line, amp, es, em) @@ -40549,6 +40608,19 @@ SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node, power) CALL fail_solve(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": '//TRIM(em)); RETURN END IF CASE (13, 14) ! the curvature vector on the section axes x, y (CD_HFMF_Section_Curvature) + IF (PRESENT(power)) THEN + IF (.NOT. power%sc_valid) THEN + CALL row_array(power%kxa, cable%line%nn) + CALL row_array(power%kya, cable%line%nn) + CALL CD_HFMF_Section_Curvature(cable, power%kxa, power%kya, es, em) + IF (es /= CD_HFMF_OK) THEN + CALL fail_solve(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": '//TRIM(em)); RETURN + END IF + power%sc_valid = .TRUE. + END IF + val = MERGE(power%kxa(inode), power%kya(inode), kind == 13) + RETURN + END IF BLOCK REAL(wp) :: kxa(cable%line%nn), kya(cable%line%nn) CALL CD_HFMF_Section_Curvature(cable, kxa, kya, es, em) @@ -40558,6 +40630,10 @@ SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node, power) val = MERGE(kxa(inode), kya(inode), kind == 13) END BLOCK CASE (9, 10, 11) ! condensed torsion: torque [N m], twist from End A to node J, total twist [deg] + IF (PRESENT(power)) THEN + CALL row_torsion_value(cable, power, kind, inode, ch, val, ErrStat, ErrMsg) + RETURN + END IF BLOCK REAL(wp) :: th, mt CALL CD_HermiteCable_Dyn_Torsion_State(cable%line, th, mt, es, em) @@ -40611,6 +40687,96 @@ SUBROUTINE eval_cable_channel(cable, ch, val, ErrStat, ErrMsg, mesh_node, power) END SELECT END SUBROUTINE eval_cable_channel + SUBROUTINE row_torsion_value(cable, row, kind, inode, ch, val, ErrStat, ErrMsg) + !! The torsion channels of eval_cable_channel (kind 9 torque, 10 twist from End A to the node, + !! 11 total twist) from the line-wide torsion values of the output row: each is evaluated once + !! per row by the first channel that needs it, the same calls in the same order as the + !! channel's own evaluation, so the value is bit for bit the one eval_cable_channel computes + !! without a row. + TYPE(CD_HFMF_ModuleType), INTENT(IN) :: cable + TYPE(CD_ChannelRow), INTENT(INOUT) :: row + INTEGER, INTENT(IN) :: kind, inode + CHARACTER(*), INTENT(IN) :: ch + REAL(wp), INTENT(OUT) :: val + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + INTEGER :: es, nelem + CHARACTER(1024) :: em + + ErrStat = CD_DECKDRV_OK + ErrMsg = '' + val = CD_ZERO + nelem = cable%line%ne + IF (.NOT. row%tors_valid) THEN + CALL CD_HermiteCable_Dyn_Torsion_State(cable%line, row%theta, row%torque, es, em) + IF (es /= CD_HCDYN_OK) THEN + CALL fail_solve(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": '//TRIM(em)); RETURN + END IF + row%tors_valid = .TRUE. + END IF + IF (kind == 9 .AND. cable%line%tw_active) THEN + ! nodal twist: the torque at the node (its elements' mean; an end node's element) + IF (.NOT. row%ntq_valid) THEN + CALL row_array(row%ntq, cable%line%nn) + CALL CD_HermiteCable_Dyn_Node_Torque(cable%line, row%ntq, es, em) + IF (es /= CD_HCDYN_OK) THEN + CALL fail_solve(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": '//TRIM(em)); RETURN + END IF + row%ntq_valid = .TRUE. + END IF + val = row%ntq(inode) + ELSE IF (kind == 9) THEN + val = row%torque + ELSE IF (cable%line%torsion%active) THEN + IF (.NOT. row%etw_valid) THEN + CALL row_array(row%etw, nelem) + CALL CD_HermiteCable_Dyn_Element_Twist(cable%line, row%etw, es, em) + IF (es /= CD_HCDYN_OK) THEN + CALL fail_solve(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": '//TRIM(em)); RETURN + END IF + row%etw_valid = .TRUE. + END IF + IF (kind == 11 .AND. cable%line%tw_active) THEN + IF (.NOT. row%etw2_valid) THEN + CALL CD_HermiteCable_Dyn_End_Twist(cable%line, row%etw2, es, em) + IF (es /= CD_HCDYN_OK) THEN + CALL fail_solve(ErrStat, ErrMsg, 'OUTPUT "'//TRIM(ch)//'": '//TRIM(em)); RETURN + END IF + row%etw2_valid = .TRUE. + END IF + val = (SUM(row%etw2) + SUM(row%etw))*45.0_wp/QUARTER_PI + ELSE IF (kind == 11) THEN + val = (row%torque*SUM(cable%line%torsion%end_compliance) + SUM(row%etw))*45.0_wp/QUARTER_PI + ELSE + val = SUM(row%etw(inode:nelem))*45.0_wp/QUARTER_PI + END IF + END IF + END SUBROUTINE row_torsion_value + + SUBROUTINE row_array(a, n) + !! A line-wide array of an output row (CD_ChannelRow) sized n; its values are not kept. + REAL(wp), ALLOCATABLE, INTENT(INOUT) :: a(:) + INTEGER, INTENT(IN) :: n + IF (ALLOCATED(a)) THEN + IF (SIZE(a) == n) RETURN + DEALLOCATE (a) + END IF + ALLOCATE (a(n)) + END SUBROUTINE row_array + + ELEMENTAL SUBROUTINE CD_Channel_Row_Reset(row) + !! Clear the line-wide values of an output row (CD_ChannelRow) before the channels of a new + !! row, or after the state they were evaluated at changed; the arrays are kept for reuse. + TYPE(CD_ChannelRow), INTENT(INOUT) :: row + row%valid = .FALSE. + row%tors_valid = .FALSE. + row%etw_valid = .FALSE. + row%etw2_valid = .FALSE. + row%ntq_valid = .FALSE. + row%sc_valid = .FALSE. + row%amp_valid = .FALSE. + END SUBROUTINE CD_Channel_Row_Reset + PURE LOGICAL FUNCTION cable_state_ready(cable) RESULT(ready) !! Whether a finite-EI cable holds the state its channels read. TYPE(CD_HFMF_ModuleType), INTENT(IN) :: cable diff --git a/src/CableDyn_OpenFAST_Aggregate.f90 b/src/CableDyn_OpenFAST_Aggregate.f90 index 0b965d12..fcc180f5 100644 --- a/src/CableDyn_OpenFAST_Aggregate.f90 +++ b/src/CableDyn_OpenFAST_Aggregate.f90 @@ -66,7 +66,7 @@ MODULE CableDyn_OpenFAST_Aggregate USE CableDyn_Model, ONLY: CD_ModelControlSaveType, CD_Recompute_Model_Acceleration, CD_MODEL_OK USE CableDyn_DeckDriver, ONLY: CD_DeckAggregateType, CD_Init_Deck_Aggregate, CD_End_Deck_Aggregate, & CD_DECKDRV_OK, CD_DECKDRV_BADINPUT, CD_Eval_Aggregate_Channel, & - CD_Cable_Deck_Node, & + CD_ChannelRow, CD_Channel_Row_Reset, CD_Cable_Deck_Node, & CD_Channel_Unit, CD_DECK_NAMELEN, CD_LineInitSummary, & DeckFailure, DeckLine, DeckPoint, CD_Fire_Deck_Failures, & CD_Replay_Deck_Failures, CD_Check_System_Plausibility, & @@ -138,7 +138,7 @@ MODULE CableDyn_OpenFAST_Aggregate ! channel count/header/unit for registration, and the per-channel evaluator for CalcOutput. PUBLIC :: CD_AGG_NumChannels PUBLIC :: CD_AGG_ChannelHeader - PUBLIC :: CD_AGG_EvalChannel + PUBLIC :: CD_AGG_EvalChannel, CD_AGG_EvalChannels PUBLIC :: CD_AGG_WriteStaticProfile ! Range graphs of the LINES flag r: the standalone mixed route and the single-turbine OpenFAST ! module sample and write them; the accumulated state rides a host's checkpoint @@ -229,6 +229,9 @@ MODULE CableDyn_OpenFAST_Aggregate CHARACTER(10), ALLOCATABLE :: chan_units(:) LOGICAL, ALLOCATABLE :: line_is_cable(:) INTEGER, ALLOCATABLE :: line_obj_index(:) + ! the line-wide values the channels of one CD_AGG_EvalChannels row share per cable (twists, + ! torques, load powers, section curvature, VIV amplitude); cleared at the start of every row + TYPE(CD_ChannelRow), ALLOCATABLE :: chan_rows(:) ! deck point ids of each cable's End A and End B (Point

F channels) INTEGER, ALLOCATABLE :: cable_points(:, :) ! FAILURE runtime table (line failures on the coupled path): rows fire at the @@ -2465,6 +2468,7 @@ SUBROUTINE CD_AGG_End(self, ErrStat, ErrMsg) IF (ALLOCATED(self%chan_units)) DEALLOCATE (self%chan_units) IF (ALLOCATED(self%line_is_cable)) DEALLOCATE (self%line_is_cable) IF (ALLOCATED(self%line_obj_index)) DEALLOCATE (self%line_obj_index) + IF (ALLOCATED(self%chan_rows)) DEALLOCATE (self%chan_rows) IF (ALLOCATED(self%cable_points)) DEALLOCATE (self%cable_points) IF (ALLOCATED(self%fl_off)) DEALLOCATE (self%fl_off) IF (ALLOCATED(self%fl_q)) DEALLOCATE (self%fl_q) @@ -2542,7 +2546,7 @@ LOGICAL FUNCTION CD_AGG_IsInitialized(self) RESULT(is_initialized) is_initialized = self%initialized END FUNCTION CD_AGG_IsInitialized - INTEGER FUNCTION CD_AGG_NumChannels(self) RESULT(n) + PURE INTEGER FUNCTION CD_AGG_NumChannels(self) RESULT(n) !! Number of deck OUTPUTS channels this module emits to the OpenFAST WriteOutput surface !! (0 when the deck declares no OUTPUTS -- the coupled run then writes no CableDyn columns). TYPE(CD_AGG_ModuleType), INTENT(IN) :: self @@ -2658,9 +2662,6 @@ SUBROUTINE CD_AGG_EvalChannel(self, i, value, ErrStat, ErrMsg) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg - INTEGER :: es - CHARACTER(1024) :: em - value = CD_ZERO IF (.NOT. require_initialized(self, ErrStat, ErrMsg)) RETURN IF (.NOT. ALLOCATED(self%channels) .OR. i < 1 .OR. i > CD_AGG_NumChannels(self)) THEN @@ -2668,7 +2669,87 @@ SUBROUTINE CD_AGG_EvalChannel(self, i, value, ErrStat, ErrMsg) ErrMsg = 'CableDyn_OpenFAST_Aggregate: channel index out of range' RETURN END IF - IF (self%has_rigid6) THEN + CALL eval_channel(self, i, value, .FALSE., ErrStat, ErrMsg) + END SUBROUTINE CD_AGG_EvalChannel + + SUBROUTINE CD_AGG_EvalChannels(self, values, n_done, ErrStat, ErrMsg) + !! Evaluate every channel (1 .. CD_AGG_NumChannels) into values(1:NumChannels) at the + !! aggregate's present state, as one output row: each channel's value is the one + !! CD_AGG_EvalChannel returns for it, bit for bit, while the line-wide values several channels + !! of a cable read (its element twists and torsion state, node torques, load powers, section + !! curvature, VIV amplitude) are evaluated once for the row instead of once per channel + !! (CD_ChannelRow, cleared at the start of every call, so nothing is carried from one state + !! to the next). n_done: the channels evaluated; on a failure values(1:n_done) hold the + !! channels before the one that failed, whose status and message are returned, as a loop over + !! CD_AGG_EvalChannel would stop there. + TYPE(CD_AGG_ModuleType), INTENT(INOUT) :: self + REAL(wp), INTENT(INOUT) :: values(:) + INTEGER, INTENT(OUT) :: n_done + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + + INTEGER :: i, n, nc + + n_done = 0 + ErrStat = CD_AGG_OK + ErrMsg = '' + n = CD_AGG_NumChannels(self) + ! no channels: nothing to evaluate (as a loop over CD_AGG_EvalChannel would do nothing) + IF (n == 0) RETURN + IF (.NOT. require_initialized(self, ErrStat, ErrMsg)) RETURN + IF (SIZE(values) < n) THEN + ErrStat = CD_AGG_BADINPUT + ErrMsg = 'CableDyn_OpenFAST_Aggregate: channel value array smaller than the channel count' + RETURN + END IF + nc = 0 + IF (ALLOCATED(self%cables)) nc = SIZE(self%cables) + IF (ALLOCATED(self%chan_rows)) THEN + IF (SIZE(self%chan_rows) /= nc) DEALLOCATE (self%chan_rows) + END IF + IF (.NOT. ALLOCATED(self%chan_rows)) ALLOCATE (self%chan_rows(nc)) + CALL CD_Channel_Row_Reset(self%chan_rows) + ErrStat = CD_AGG_OK + ErrMsg = '' + DO i = 1, n + CALL eval_channel(self, i, values(i), .TRUE., ErrStat, ErrMsg) + IF (ErrStat /= CD_AGG_OK) EXIT + n_done = i + END DO + ! the row's values belong to this state only + CALL CD_Channel_Row_Reset(self%chan_rows) + END SUBROUTINE CD_AGG_EvalChannels + + SUBROUTINE eval_channel(self, i, value, use_row, ErrStat, ErrMsg) + !! Channel i (in range) at the present state through CD_Eval_Aggregate_Channel; use_row: + !! with the row values of CD_AGG_EvalChannels (self%chan_rows, sized and cleared there). + TYPE(CD_AGG_ModuleType), INTENT(INOUT) :: self + INTEGER, INTENT(IN) :: i + REAL(wp), INTENT(OUT) :: value + LOGICAL, INTENT(IN) :: use_row + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + + INTEGER :: es + CHARACTER(1024) :: em + + IF (use_row) THEN + IF (self%has_rigid6) THEN + CALL CD_Eval_Aggregate_Channel(self%channels(i), self%has_sys, self%sys%fast%system, self%cables, & + self%line_is_cable, self%line_obj_index, value, es, em, & + cable_points=self%cable_points, rigid_rt=self%rigid6, ranges=self%ranges, & + rows=self%chan_rows) + ELSE IF (self%has_rod) THEN + CALL CD_Eval_Aggregate_Channel(self%channels(i), self%has_sys, self%sys%fast%system, self%cables, & + self%line_is_cable, self%line_obj_index, value, es, em, & + cable_points=self%cable_points, rod_rt=self%rod, ranges=self%ranges, & + rows=self%chan_rows) + ELSE + CALL CD_Eval_Aggregate_Channel(self%channels(i), self%has_sys, self%sys%fast%system, self%cables, & + self%line_is_cable, self%line_obj_index, value, es, em, & + cable_points=self%cable_points, ranges=self%ranges, rows=self%chan_rows) + END IF + ELSE IF (self%has_rigid6) THEN CALL CD_Eval_Aggregate_Channel(self%channels(i), self%has_sys, self%sys%fast%system, self%cables, & self%line_is_cable, self%line_obj_index, value, es, em, & cable_points=self%cable_points, rigid_rt=self%rigid6, ranges=self%ranges) @@ -2682,7 +2763,7 @@ SUBROUTINE CD_AGG_EvalChannel(self, i, value, ErrStat, ErrMsg) cable_points=self%cable_points, ranges=self%ranges) END IF CALL map_deck_status(es, em, ErrStat, ErrMsg) - END SUBROUTINE CD_AGG_EvalChannel + END SUBROUTINE eval_channel SUBROUTINE CD_AGG_Range_Sample(self, time, ErrStat, ErrMsg) !! Accumulate the range graphs (LINES flag r) at a committed output time: once per written diff --git a/src/openfast/CableDyn_OF.f90 b/src/openfast/CableDyn_OF.f90 index 5cda9ff2..ba90d6cf 100644 --- a/src/openfast/CableDyn_OF.f90 +++ b/src/openfast/CableDyn_OF.f90 @@ -99,6 +99,7 @@ MODULE CableDyn CD_AGG_NTurbines, CD_AGG_TurbineOfMoving, & CD_AGG_NFluidNodes, CD_AGG_GetFluidNodePositions, CD_AGG_SetFluidFields, & CD_AGG_NumChannels, CD_AGG_ChannelHeader, CD_AGG_EvalChannel, & + CD_AGG_EvalChannels, & CD_AGG_GetInitMetadata, CD_AGG_GetInitLine, & CD_AGG_WriteStaticProfile, CD_AGG_Range_Graphs, CD_AGG_Range_Sample, & CD_AGG_Range_Write, CD_AGG_Range_MirrorSize, CD_AGG_Reopen_Start, & @@ -201,6 +202,8 @@ END FUNCTION cd_cpu_guard_armed LOGICAL :: loads_cached = .FALSE. INTEGER(IntKi) :: loads_at_n = -1 REAL(wp), ALLOCATABLE :: ws_chan(:) + ! the committed-step row of the .CD.out when it evaluates its own channels (CD_CalcOutput) + REAL(wp), ALLOCATABLE :: ws_rowchan(:) ! Load predictor (nsuper > 1 with predictLoads; CableDyn_LoadPredictor): the coupled ! loads and moments of the committed solve before the last and its time (pred_t < 0: ! none), shifted in by CD_UpdateStates when a mooring step starts and mirrored into the @@ -2553,13 +2556,14 @@ SUBROUTINE CD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) CHARACTER(*) , INTENT(INOUT) :: ErrMsg character(*), parameter :: RoutineName = 'CD_CalcOutput' - INTEGER(IntKi) :: ErrStat2, es, id, i + INTEGER(IntKi) :: ErrStat2, es, id, i, n_chan INTEGER(IntKi) :: prof_c0, prof_c1, prof_rate, prof_phase0 CHARACTER(ErrMsgLen) :: ErrMsg2 CHARACTER(ErrMsgLen) :: em - REAL(wp) :: cval REAL(wp) :: tau_pred ! load predictor: fraction of the mooring step elapsed LOGICAL :: fresh, state_overlaid + ! the channels this call evaluated are those of the committed state as it stands + LOGICAL :: chan_committed ! Report this call's OWN status: clear at entry (ErrStat is INTENT(INOUT) and ! every SetErrStat below only ACCUMULATES, so on the all-success path an @@ -2586,6 +2590,7 @@ SUBROUTINE CD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) Inst(id)%prof_n_calcout = Inst(id)%prof_n_calcout + 1_IntKi END IF state_overlaid = .FALSE. + chan_committed = .FALSE. ! Evaluate the loads the mooring exerts on the coupling points. At nsuper = 1 (the ! mooring stepping at the glue rate) the CURRENT coupled kinematics are transferred @@ -2699,10 +2704,12 @@ SUBROUTINE CD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) END IF ! Deck OUTPUTS channels are evaluated at the same aggregate state as the returned ! loads: with supercycling the last committed zero-order-hold mooring state, at - ! nsuper = 1 the state including the current coupled kinematics. + ! nsuper = 1 the state including the current coupled kinematics. The channels are + ! one row: the line-wide values several of a cable's channels read (its element twists, + ! node torques, ...) are evaluated once for the row (CD_AGG_EvalChannels). IF (Inst(id)%prof_enabled) CALL SYSTEM_CLOCK(prof_phase0) - DO i = 1, p%NumOuts - CALL CD_AGG_EvalChannel( Inst(id)%agg, i, cval, es, em ) + IF (p%NumOuts > 0) THEN + CALL CD_AGG_EvalChannels( Inst(id)%agg, Inst(id)%ws_chan, n_chan, es, em ) IF (es /= CD_AGG_OK) THEN CALL SetErrStat( ErrID_Fatal, 'CableDyn mooring module: output channel evaluation failed: '// & TRIM(em), ErrStat, ErrMsg, RoutineName ) @@ -2712,8 +2719,9 @@ SUBROUTINE CD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) END IF RETURN END IF - Inst(id)%ws_chan(i) = cval - END DO + END IF + ! supercycled, the state evaluated is the committed one itself (no overlay) + chan_committed = .NOT. state_overlaid IF (Inst(id)%prof_enabled) THEN CALL SYSTEM_CLOCK(prof_c1) Inst(id)%prof_t_channels = Inst(id)%prof_t_channels + & @@ -2747,7 +2755,8 @@ SUBROUTINE CD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) ! probe/extra CalcOutput may drive with transient kinematics). The row must carry ! the committed state the stamp names, so its channels re-evaluate against the ! restored aggregate (at nsuper > 1 the committed state is live anyway and the - ! re-evaluation is identical). Keyed on last_solve_n: exactly one row per advance, + ! re-evaluation is identical, so a row whose channels this call has just evaluated on that + ! state takes them). Keyed on last_solve_n: exactly one row per advance, ! whichever call after it comes first; the t = 0 static row was written at Init. ! If a glue correction re-advances the same n, BACKSPACE replaces the provisional ! last record with the corrected committed result rather than duplicating the time. @@ -2755,14 +2764,24 @@ SUBROUTINE CD_CalcOutput( t, u, p, x, xd, z, other, y, m, ErrStat, ErrMsg ) IF (Inst(id)%prof_enabled) CALL SYSTEM_CLOCK(prof_phase0) IF (Inst(id)%last_solve_n == Inst(id)%native_wrote_n) BACKSPACE (Inst(id)%native_un) WRITE (Inst(id)%native_un, '(ES25.16E3)', ADVANCE='NO') MAX(Inst(id)%t_commit, 0.0_DbKi) - DO i = 1, p%NumOuts - CALL CD_AGG_EvalChannel( Inst(id)%agg, i, cval, es, em ) + IF (chan_committed) THEN + DO i = 1, p%NumOuts + WRITE (Inst(id)%native_un, CD_NATIVE_CHANNEL_FMT, ADVANCE='NO') CHAR(9), Inst(id)%ws_chan(i) + END DO + ELSE + IF (.NOT. ALLOCATED(Inst(id)%ws_rowchan)) ALLOCATE (Inst(id)%ws_rowchan(p%NumOuts)) + n_chan = 0 + es = CD_AGG_OK + IF (p%NumOuts > 0) CALL CD_AGG_EvalChannels( Inst(id)%agg, Inst(id)%ws_rowchan, n_chan, es, em ) + ! the channels before a failed one, as a channel-by-channel row writes them + DO i = 1, n_chan + WRITE (Inst(id)%native_un, CD_NATIVE_CHANNEL_FMT, ADVANCE='NO') CHAR(9), Inst(id)%ws_rowchan(i) + END DO IF (es /= CD_AGG_OK) THEN CALL SetErrStat( ErrID_Fatal, 'CableDyn mooring module: committed-step channel record: '//TRIM(em), & ErrStat, ErrMsg, RoutineName ); RETURN END IF - WRITE (Inst(id)%native_un, CD_NATIVE_CHANNEL_FMT, ADVANCE='NO') CHAR(9), cval - END DO + END IF WRITE (Inst(id)%native_un, '(A)') '' ! keep the record readable during the run (and intact after a crash) FLUSH (Inst(id)%native_un) @@ -3304,10 +3323,10 @@ SUBROUTINE lin_eval( id, p, m, u, x_in, ErrStat, ErrMsg, dxdt, y_out ) TYPE(CD_OutputType), INTENT(INOUT), OPTIONAL :: y_out character(*), parameter :: RoutineName = 'CableDyn:lin_eval' - INTEGER(IntKi) :: ErrStat2, es, i, ic, il, ne, k + INTEGER(IntKi) :: ErrStat2, es, i, ic, il, ne, k, n_chan REAL(wp), ALLOCATABLE :: ve_rate(:), syr_rate(:) CHARACTER(ErrMsgLen) :: ErrMsg2, em - REAL(wp) :: cval, t_clock + REAL(wp) :: t_clock ErrStat = ErrID_None ErrMsg = '' @@ -3426,16 +3445,18 @@ SUBROUTINE lin_eval( id, p, m, u, x_in, ErrStat, ErrMsg, dxdt, y_out ) Inst(id)%lin_fld(:, i) = Inst(id)%ws_fld(:, i) Inst(id)%lin_moment(:, i) = Inst(id)%ws_moment(:, i) END DO - DO i = 1, p%NumOuts - CALL CD_AGG_EvalChannel( Inst(id)%agg, i, cval, es, em ) - IF (es /= CD_AGG_OK) THEN - CALL SetErrStat( ErrID_Fatal, 'CableDyn mooring module: output channel evaluation failed: '// & - TRIM(em), ErrStat, ErrMsg, RoutineName ) - CALL restore; RETURN - END IF - y_out%WriteOutput(i) = REAL(cval, ReKi) - Inst(id)%lin_chan(i) = cval + ! the channels as one row (their shared line-wide values once) + n_chan = 0 + es = CD_AGG_OK + IF (p%NumOuts > 0) CALL CD_AGG_EvalChannels( Inst(id)%agg, Inst(id)%lin_chan, n_chan, es, em ) + DO i = 1, n_chan + y_out%WriteOutput(i) = REAL(Inst(id)%lin_chan(i), ReKi) END DO + IF (es /= CD_AGG_OK) THEN + CALL SetErrStat( ErrID_Fatal, 'CableDyn mooring module: output channel evaluation failed: '// & + TRIM(em), ErrStat, ErrMsg, RoutineName ) + CALL restore; RETURN + END IF END IF CALL restore diff --git a/tests/test_channel_row.f90 b/tests/test_channel_row.f90 new file mode 100644 index 00000000..947abc64 --- /dev/null +++ b/tests/test_channel_row.f90 @@ -0,0 +1,266 @@ +! File: tests/test_channel_row.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_channel_row + !! The deck channels of one output row evaluated together, as the OpenFAST shell's CalcOutput, + !! its committed-step record, its linearization and the standalone mixed route evaluate them + !! (CD_AGG_EvalChannels: the line-wide values a cable's channels read -- element twists, torsion + !! state, end twists, node torques, section curvature -- once per row), against the same + !! channels one at a time (CD_AGG_EvalChannel), bit for bit. The deck is coupled: an EI = 0 + !! line and two finite-EI cables restrained in torsion (nodal twist), the second with + !! torque-tension coupling (GJ|K) and a torsional end spring, every fairlead surging and + !! rolling with the platform; the channels mix twists, torques, bend moments, curvatures, + !! tensions, kinematics and point forces of all three lines. + !! 1. the static state, then every step of a rolling, surging march: a row's values must + !! follow the state (a line-wide value kept from the row before, the stale row, fails); + !! a second row at the same state repeats the first bit for bit; + !! 2. a non-stepping transfer of other kinematics (the shell's output probe) changes the + !! state without a step: the row follows it. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_OpenFAST_Aggregate, ONLY: CD_AGG_ModuleType, CD_AGG_Init_From_Deck, CD_AGG_NMovingPoints, & + CD_AGG_GetMovingPointMesh, CD_AGG_UpdateStates_Moving, & + CD_AGG_Step_Moving, CD_AGG_CalcOutput, CD_AGG_NumChannels, & + CD_AGG_EvalChannel, CD_AGG_EvalChannels, CD_AGG_End, CD_AGG_OK + USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: INT64 + IMPLICIT NONE + + REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp, RHOW = 1025.0_wp + REAL(wp), PARAMETER :: DT = 0.05_wp, DEG = PI/180.0_wp + INTEGER, PARAMETER :: NSTEP = 12 + INTEGER :: n_fail = 0 + + CALL write_deck('chrow.dat') + CALL check_rows() + IF (n_fail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', n_fail, ' channel row check(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: channel rows (one row against one channel at a time, through a march and a '// & + 'probe transfer)' + +CONTAINS + + SUBROUTINE require(cond, msg) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: msg + IF (.NOT. cond) THEN + n_fail = n_fail + 1 + WRITE (*, '(A,A)') 'FAILED: ', msg + END IF + END SUBROUTINE require + + LOGICAL FUNCTION same_bits(a, b) RESULT(same) + !! Whether two arrays of the same size have the same bit patterns. + REAL(wp), INTENT(IN) :: a(:), b(:) + INTEGER :: k + same = SIZE(a) == SIZE(b) + IF (.NOT. same) RETURN + DO k = 1, SIZE(a) + IF (TRANSFER(a(k), 0_INT64) /= TRANSFER(b(k), 0_INT64)) THEN + same = .FALSE. + RETURN + END IF + END DO + END FUNCTION same_bits + + SUBROUTINE write_deck(path) + !! Three taut 100 m lines from fairleads at x = 0 to anchors at x = 100 m, 40 m deep, the cables + !! neutrally buoyant: line 1 EI = 0 (twice the displaced mass); line 2 finite EI, clamped and + !! restrained in torsion at both ends with a quarter turn of pretwist; line 3 finite EI under + !! torque-tension coupling, clamped, rigid in torsion at End A and on a torsional spring at End B. + CHARACTER(*), INTENT(IN) :: path + INTEGER :: u + REAL(wp) :: m + CHARACTER(32) :: mtxt, rtxt + m = RHOW*0.25_wp*PI*0.04_wp + WRITE (mtxt, '(ES24.16)') m + OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') + WRITE (u, '(A)') 'channel row gate' + WRITE (u, '(A)') '--- LINE TYPES ---' + WRITE (u, '(A)') 'Name Diam Mass EA BA EI GAs GJ Irt Irn Cdn Cdt Can Cat' + WRITE (u, '(A)') '(-) (m) (kg/m) (N) (-) (Nm2) (N) (Nm2) (kgm) (kgm) (-) (-) (-) (-)' + WRITE (rtxt, '(ES24.16)') 2.0_wp*m + WRITE (u, '(A)') 'rope 0.2 '//TRIM(rtxt)//' 1.0e7 0.0 0.0 0.0 0.0 0.0 0.0 1.2 0.0 1.0 0.0' + WRITE (u, '(A)') 'cab 0.2 '//TRIM(mtxt)//' 1.0e7 0.0 1.0e6 1.0e8 5.0e4 1.0 2.0 1.2 0.0 1.0 0.0' + WRITE (u, '(A)') 'arm 0.2 '//TRIM(mtxt)//' 1.0e7 0.0 1.0e6 1.0e8 5.0e4|4.0e3 1.0 2.0 1.2 0.0 1.0 0.0' + WRITE (u, '(A)') '--- POINTS ---' + WRITE (u, '(A)') 'ID Type X Y Z' + WRITE (u, '(A)') '(-) (-) (m) (m) (m)' + WRITE (u, '(A)') '1 Coupled 0.0 -20.0 -40.0' + WRITE (u, '(A)') '2 Fixed 100.0 -20.0 -40.0' + WRITE (u, '(A)') '3 Coupled 0.0 0.0 -40.0' + WRITE (u, '(A)') '4 Fixed 100.0 0.0 -40.0' + WRITE (u, '(A)') '5 Coupled 0.0 20.0 -40.0' + WRITE (u, '(A)') '6 Fixed 100.0 20.0 -40.0' + WRITE (u, '(A)') '--- LINES ---' + WRITE (u, '(A)') 'ID NodeA NodeB Outputs' + WRITE (u, '(A)') '(-) (-) (-) (-)' + WRITE (u, '(A)') '1 1 2 -' + WRITE (u, '(A)') '2 3 4 -' + WRITE (u, '(A)') '3 5 6 -' + WRITE (u, '(A)') '--- SECTIONS ---' + WRITE (u, '(A)') 'LineID LineType Length NumSegs' + WRITE (u, '(A)') '(-) (-) (m) (-)' + WRITE (u, '(A)') '1 rope 99.5 10' + WRITE (u, '(A)') '2 cab 99.5 12' + WRITE (u, '(A)') '3 arm 99.5 12' + WRITE (u, '(A)') '--- END CONNECTIONS ---' + WRITE (u, '(A)') 'LineID End Stiffness EzX EzY EzZ TorsStiffness NxX NxY NxZ Pretwist' + WRITE (u, '(A)') '(-) (-) (N-m/rad) (-) (-) (-) (N-m/rad) (-) (-) (-) (deg)' + WRITE (u, '(A)') '2 A Rigid 1 0 0 Rigid 0 0 1 0' + WRITE (u, '(A)') '2 B Rigid 1 0 0 Rigid 0 0 1 90' + WRITE (u, '(A)') '3 A Rigid 1 0 0 Rigid 0 0 1 0' + WRITE (u, '(A)') '3 B Rigid 1 0 0 2.0e4 0 0 1 45' + WRITE (u, '(A)') '--- OPTIONS ---' + WRITE (u, '(A)') '9.80665 g' + WRITE (u, '(A)') '1025.0 rhoW' + WRITE (u, '(A)') '0.05 dtM' + WRITE (u, '(A)') '--- OUTPUTS ---' + WRITE (u, '(A)') 'FairTen1' + WRITE (u, '(A)') 'L1N4pz' + WRITE (u, '(A)') 'L1N4ax' + WRITE (u, '(A)') 'Point1Fx' + WRITE (u, '(A)') 'Twist2' + WRITE (u, '(A)') 'Twist2N1' + WRITE (u, '(A)') 'Twist2N5' + WRITE (u, '(A)') 'Twist2N12' + WRITE (u, '(A)') 'Torq2N1' + WRITE (u, '(A)') 'Torq2N7' + WRITE (u, '(A)') 'BendMom2N3' + WRITE (u, '(A)') 'BendMom2N8' + WRITE (u, '(A)') 'Curv2N4' + WRITE (u, '(A)') 'CurvX2N4' + WRITE (u, '(A)') 'CurvY2N9' + WRITE (u, '(A)') 'Ten2N6' + WRITE (u, '(A)') 'L2N6vy' + WRITE (u, '(A)') 'L2N6ay' + WRITE (u, '(A)') 'FairTen2' + WRITE (u, '(A)') 'Twist3' + WRITE (u, '(A)') 'Twist3N2' + WRITE (u, '(A)') 'Twist3N11' + WRITE (u, '(A)') 'Torq3N1' + WRITE (u, '(A)') 'Torq3N13' + WRITE (u, '(A)') 'BendMom3N6' + WRITE (u, '(A)') 'CurvX3N6' + WRITE (u, '(A)') 'Ten3N6' + WRITE (u, '(A)') 'AnchTen3' + WRITE (u, '(A)') 'Point5Fz' + WRITE (u, '(A)') '--- END ---' + CLOSE (u) + END SUBROUTINE write_deck + + FUNCTION roll_dcm(phi) RESULT(r) + !! OpenFAST mesh orientation (global to local) of a roll phi about +x. + REAL(wp), INTENT(IN) :: phi + REAL(wp) :: r(3, 3) + r = 0.0_wp + r(1, 1) = 1.0_wp + r(2, 2) = COS(phi) + r(2, 3) = SIN(phi) + r(3, 2) = -SIN(phi) + r(3, 3) = COS(phi) + END FUNCTION roll_dcm + + SUBROUTINE one_at_a_time(agg, values) + TYPE(CD_AGG_ModuleType), INTENT(INOUT) :: agg + REAL(wp), INTENT(OUT) :: values(:) + INTEGER :: i, es + CHARACTER(512) :: em + DO i = 1, SIZE(values) + CALL CD_AGG_EvalChannel(agg, i, values(i), es, em) + CALL require(es == CD_AGG_OK, 'channel evaluates: '//TRIM(em)) + END DO + END SUBROUTINE one_at_a_time + + SUBROUTINE row(agg, values) + TYPE(CD_AGG_ModuleType), INTENT(INOUT) :: agg + REAL(wp), INTENT(OUT) :: values(:) + INTEGER :: es, n_done + CHARACTER(512) :: em + values = 0.0_wp + CALL CD_AGG_EvalChannels(agg, values, n_done, es, em) + CALL require(es == CD_AGG_OK .AND. n_done == SIZE(values), 'the row evaluates: '//TRIM(em)) + END SUBROUTINE row + + SUBROUTINE check_rows() + TYPE(CD_AGG_ModuleType) :: agg + INTEGER, PARAMETER :: NCP = 3 + ! the twist and torque channels away from End A (Twist2N1, the twist from End A to End A, is 0) + INTEGER, PARAMETER :: TWIST_CH(10) = [5, 7, 8, 9, 10, 20, 21, 22, 23, 24] + REAL(wp) :: pos(3, NCP), vel(3, NCP), acc(3, NCP), load(3, NCP), orient(3, 3, NCP) + REAL(wp) :: omega(3, NCP), alpha(3, NCP), x0(3, NCP), pos2(3, NCP) + REAL(wp), ALLOCATABLE :: v_row(:), v_one(:), v_again(:), v_prev(:), v_b(:) + REAL(wp) :: phi, rate, amp, w, t + INTEGER :: es, ni, k, nmp, nch, j + LOGICAL :: cv, st, rows_ok, moved + CHARACTER(512) :: em + + CALL CD_AGG_Init_From_Deck(agg, 'chrow.dat', DT, es, em, host_orientation=.TRUE.) + CALL require(es == CD_AGG_OK, 'the channel row deck builds on the aggregate: '//TRIM(em)) + IF (es /= CD_AGG_OK) RETURN + nmp = CD_AGG_NMovingPoints(agg, es, em) + CALL require(nmp == NCP .AND. agg%ncable == 2, 'the deck is one EI = 0 line and two coupled cables') + IF (nmp /= NCP) RETURN + nch = CD_AGG_NumChannels(agg) + CALL require(nch == 29, 'the deck declares its 29 channels') + ALLOCATE (v_row(nch), v_one(nch), v_again(nch), v_prev(nch), v_b(nch)) + + ! 1. the static state, then a rolling, surging march + CALL row(agg, v_row) + CALL one_at_a_time(agg, v_one) + CALL require(same_bits(v_row, v_one), '1: static state: the row equals the channels one at a time') + CALL CD_AGG_GetMovingPointMesh(agg, pos, vel, acc, load, es, em, orientation=orient) + x0 = pos + rate = 20.0_wp*DEG + amp = 0.5_wp + w = 2.0_wp*PI/1.2_wp + rows_ok = .TRUE. + moved = .TRUE. + v_prev = v_row + DO k = 1, NSTEP + t = DT*k + phi = rate*t + DO j = 1, NCP + orient(:, :, j) = roll_dcm(phi) + pos(:, j) = x0(:, j) + pos(1, j) = x0(1, j) + amp*SIN(w*t) + vel(:, j) = 0.0_wp + vel(1, j) = amp*w*COS(w*t) + acc(:, j) = 0.0_wp + acc(1, j) = -amp*w*w*SIN(w*t) + omega(:, j) = [rate, 0.0_wp, 0.0_wp] + alpha(:, j) = 0.0_wp + END DO + CALL CD_AGG_Step_Moving(agg, DT, pos, vel, acc, cv, st, ni, es, em, orientation=orient, & + angular_velocity=omega, angular_acceleration=alpha) + CALL require(es == CD_AGG_OK .AND. cv, '1: the march step converges: '//TRIM(em)) + IF (es /= CD_AGG_OK) EXIT + CALL CD_AGG_CalcOutput(agg, es, em) + CALL row(agg, v_row) + CALL one_at_a_time(agg, v_one) + CALL row(agg, v_again) + rows_ok = rows_ok .AND. same_bits(v_row, v_one) .AND. same_bits(v_again, v_row) + ! every twist and torque channel moves with the roll: a row value kept from the state before + ! would show here + moved = moved .AND. ALL(ABS(v_row(TWIST_CH) - v_prev(TWIST_CH)) > 0.0_wp) + v_prev = v_row + END DO + CALL require(rows_ok, '1: every step: the row equals the channels one at a time, and a second row '// & + 'at the same state repeats it, bit for bit') + CALL require(moved, '1: the twist and torque channels change at every step (the rows follow the state)') + WRITE (*, '(A,F10.4,A,F10.4,A)') '1 march: Twist2 ', v_row(5), ' deg, Twist3 ', v_row(20), ' deg' + + ! 2. a non-stepping transfer of other kinematics changes the state without a step + pos2 = pos + pos2(2, :) = pos(2, :) + 0.05_wp + CALL CD_AGG_UpdateStates_Moving(agg, pos2, vel, acc, es, em, output_probe=.TRUE., orientation=orient, & + angular_velocity=omega, angular_acceleration=alpha) + CALL require(es == CD_AGG_OK, '2: the probe transfer applies: '//TRIM(em)) + CALL CD_AGG_CalcOutput(agg, es, em) + CALL row(agg, v_b) + CALL one_at_a_time(agg, v_one) + CALL require(same_bits(v_b, v_one), '2: after a probe transfer: the row equals the channels one at a time') + CALL require(.NOT. same_bits(v_b, v_row), '2: the probe transfer changes the row (it follows the state)') + CALL CD_AGG_End(agg, es, em) + END SUBROUTINE check_rows +END PROGRAM test_channel_row From 8cf5cfc94c27dda15fbf5573a44dda08e2da98a4 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 20 Nov 2026 03:27:41 +0900 Subject: [PATCH 42/47] perf: cheaper coupled CalcOutput of a cable with the nodal twist (#185) On the OpenFAST route (CompMooring = 5) every CalcOutput of a finite-EI cable restrained in torsion with polar inertia (the nodal twist) did three line-wide assemblies the result did not need: - The fairlead force (CD_HermiteCable_Dyn_Reaction) and the moment of a rigid end connection (CD_HermiteCable_Dyn_EndConnection_Moment) each assembled the residual and the mass of the whole line, because the condensed torsion's single twist couples every element. The nodal twist does not: an element's torque reaches only the rows of its own nodes. - The transfer of the current fairlead kinematics checked the twist of every element twice before writing (the aggregate preflight and the cable's own trial pass), although the module reloads its committed state on any failure of that transfer. - The restore after the evaluation transferred the committed fairlead kinematics into the cable, with the same checks and a twist assembly, and then reloaded the cable's committed state from its mirror, which rewrites the coupled end, its frames and the twist. Now: - node_reaction (the rows of one node from the elements that reach it) also serves a line with the nodal twist: assemble_twist takes node_only and adds the torques of the node's elements and end spring as the full assembly adds them, without touching the model's twist scratch. The condensed torsion keeps the full assembly. The rows are assembled in a buffer of their own (ws_Rnode) instead of an automatic array, so the call allocates nothing. EndConnection_Moment takes full_assembly, as Reaction does. - An output probe (CD_AGG_UpdateStates_Moving, output_probe) skips the preflight of a cable with the nodal twist, and CD_HFMF_SetCoupledKinematics takes caller_restores to skip its trial pass there: the write itself checks the same conditions with the same message, and the probe's caller restores the whole state on failure. The condensed torsion keeps both checks. - The restores of CD_CalcOutput and lin_eval pass cables_from_mirror: the transfer leaves the cables to the mirror reload that follows. test_hermite_node_reaction gains nodal-twist cables (End B held or on a torsional spring, torsional damping, drag and added mass) at scattered states: the node reaction at every node and the moment at both rigid ends equal the full assembly bit for bit and leave the scratch untouched. On the IEA-15MW UMaine model with the three chains and a lazy-wave cable of 184 elements restrained in torsion (DT = 0.025 s, 150 s), CalcOutput takes 11.2 s instead of 30.4 s (1.9 ms per step instead of 5.1 ms) and the run 65 s instead of 81 s; .out, .CD.out and .CD.static.out are bit-identical to dev. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 12 +++ src/CableDyn_HermiteCableDynamic.f90 | 99 +++++++++++++++++------ src/CableDyn_OpenFAST_Aggregate.f90 | 39 ++++++++-- src/CableDyn_OpenFAST_HermiteFMF.f90 | 18 ++++- src/openfast/CableDyn_OF.f90 | 8 +- tests/test_hermite_node_reaction.f90 | 112 ++++++++++++++++++++++++++- 6 files changed, 251 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bb5b77d..ef7282ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -234,6 +234,18 @@ All notable changes to CableDyn are recorded in this file. The format follows restrained in torsion (nine `Twist` and nine `BendMom` channels, `DT = 0.01 s`), `CalcOutput` takes 12.3 ms per step instead of 26.6 ms (the channels 1.0 ms instead of 9.9 ms, the `.CD.out` row 0.6 ms instead of 5.1 ms), and CableDyn as a whole 26 ms instead of 42 ms. +- `CalcOutput` of the OpenFAST module is cheaper for a finite-EI cable with the nodal twist + (torsion with polar inertia `Irn`). Its fairlead force and the moment of a rigid end connection + come from the end element, as without torsion, instead of from an assembly of the whole line: + the nodal twist's element torques reach a node's rows only from the node's elements. The + transfer of the current fairlead kinematics before the evaluation no longer checks the twist of + every element twice ahead of the write, which checks it again (the module reloads its committed + state on any failure), and the restore after it leaves the cable to the reload of its committed + state, which rewrites the coupled end, its frames and the twist, instead of transferring the + committed kinematics first. Outputs, `.CD.out`, linearization files and restarts are unchanged + to the bit. On the IEA-15MW UMaine model with the three chains and a lazy-wave cable of 184 + elements restrained in torsion (`DT = 0.025 s`), `CalcOutput` takes 1.9 ms per step instead of + 5.1 ms, and the run 26 minutes per simulated hour instead of 32. - The bending damping of a finite-EI cable (`EI|Bb`, `EI|-zeta|f`) evaluates the second derivatives of the curvature only where the position Jacobian needs them, not in every residual evaluation. Results are unchanged to the bit; the Delta Flume case 9 deck of diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index c74a0f9f..ed77b53b 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -427,6 +427,8 @@ MODULE CableDyn_HermiteCableDynamic REAL(wp), ALLOCATABLE :: ws_recovery_q0(:), ws_recovery_v0(:), ws_recovery_a0(:) REAL(wp), ALLOCATABLE :: ws_qa(:), ws_aa(:), ws_va(:), ws_vk(:) REAL(wp), ALLOCATABLE :: ws_R(:), ws_G(:), ws_Gt(:), ws_inert(:), ws_qtrial(:), ws_dq(:) + ! the residual of a single node's assembly (node_reaction), apart from ws_R + REAL(wp), ALLOCATABLE :: ws_Rnode(:) ! Force-blended generalised-alpha: the unblended residual R(q_{n+1}, v_{n+1}, t_{n+1}) of ! the current iterate (ws_Rk) and of a line-search trial (ws_Rt), and the force at the ! committed state F_n = R(q_n, v_n, t_n). F_n is cached from the previous step's converged @@ -952,6 +954,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Init(model, l0, EA, EI, rho_a, w, seed, fixed_dof model%ws_inert(ndof), model%ws_qtrial(ndof), model%ws_dq(ndof), & model%ws_recovery_q0(ndof), model%ws_recovery_v0(ndof), model%ws_recovery_a0(ndof)) ALLOCATE (model%ws_Rk(ndof), model%ws_Rt(ndof), model%fc_R(ndof), model%fc_q(ndof), model%fc_v(ndof)) + ALLOCATE (model%ws_Rnode(ndof)) model%fc_valid = .FALSE. model%fc_clears = model%fc_clears + 1 model%tr_valid = .FALSE. @@ -8034,8 +8037,9 @@ SUBROUTINE CD_HermiteCable_Dyn_Reaction(model, node, freac, ErrStat, ErrMsg, ful ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_Reaction: node out of range'; RETURN END IF ! Only the node's rows are needed: assemble them from the elements that reach the node - ! (bit-identical to the full assembly below, which torsion still needs). - IF (.NOT. (model%torsion%active .OR. full)) THEN + ! (bit-identical to the full assembly below, which the condensed torsion still needs: its + ! single Theta couples every element; the nodal twist's element torques do not). + IF (.NOT. ((model%torsion%active .AND. .NOT. model%tw_active) .OR. full)) THEN CALL node_reaction(model, node, freac, es, em2) IF (es /= CD_HCDYN_OK) THEN freac = CD_ZERO @@ -8069,8 +8073,10 @@ SUBROUTINE node_reaction(model, node, freac, ErrStat, ErrMsg, tangent_rows) !! the node's rows of the total mass times the acceleration, with the added mass of those !! elements. Every row term is formed and summed in the order of the full assembly and of !! band_matvec, so the reaction is bit-identical, at the cost of one or two elements - !! instead of the line, and the model's scratch is not touched. Not for a line with - !! torsion, which couples every element. tangent_rows = .TRUE. returns the node's three + !! instead of the line, and the model's scratch is not touched (the rows are assembled in + !! ws_Rnode, a buffer of their own: no allocation per call). Not for a line with the + !! condensed torsion, which couples every element (the nodal twist is local: its element + !! torques reach the node's rows from the same elements). tangent_rows = .TRUE. returns the node's three !! material-tangent rows instead of its translational ones (a rigid end connection). TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model INTEGER, INTENT(IN) :: node @@ -8078,12 +8084,13 @@ SUBROUTINE node_reaction(model, node, freac, ErrStat, ErrMsg, tangent_rows) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg LOGICAL, INTENT(IN), OPTIONAL :: tangent_rows - REAL(wp) :: Rn(SIZE(model%ws_R)), Me(12, 12), mam(3, -KL_D:KU_D), inert(3), m + REAL(wp) :: Me(12, 12), mam(3, -KL_D:KU_D), inert(3), m INTEGER :: e, a, b, k, gi, gj, j, n, es CHARACTER(1024) :: em ErrStat = CD_HCDYN_OK; ErrMsg = ''; freac = CD_ZERO - CALL assemble_residual(model, model%q, model%v, model%t, .TRUE., .FALSE., es, em, node_only=node, R_out=Rn) + ! the rows land in ws_Rnode (assemble_residual node_only without R_out) + CALL assemble_residual(model, model%q, model%v, model%t, .TRUE., .FALSE., es, em, node_only=node) IF (es /= CD_HCDYN_OK) THEN ErrStat = es; ErrMsg = TRIM(em); RETURN END IF @@ -8124,7 +8131,7 @@ SUBROUTINE node_reaction(model, node, freac, ErrStat, ErrMsg, tangent_rows) inert(k) = inert(k) + m*model%a(j) END DO END DO - freac = -(inert + Rn(gi + 1:gi + 3)) + freac = -(inert + model%ws_Rnode(gi + 1:gi + 3)) END SUBROUTINE node_reaction SUBROUTINE CD_HermiteCable_Dyn_End_Force(model, node, force, ErrStat, ErrMsg) @@ -9339,7 +9346,7 @@ PURE REAL(wp) FUNCTION vector_angle(a, b) RESULT(angle) angle = ATAN2(NORM2(c), DOT_PRODUCT(a, b)) END FUNCTION vector_angle - SUBROUTINE CD_HermiteCable_Dyn_EndConnection_Moment(model, node, moment, ErrStat, ErrMsg) + SUBROUTINE CD_HermiteCable_Dyn_EndConnection_Moment(model, node, moment, ErrStat, ErrMsg, full_assembly) !! Moment exerted by the line-end connection on its supporting body. Finite !! mode evaluates the spring force; rigid mode recovers the exact constraint !! reaction from the committed equation of motion. Pinned mode returns zero. @@ -9348,8 +9355,12 @@ SUBROUTINE CD_HermiteCable_Dyn_EndConnection_Moment(model, node, moment, ErrStat REAL(wp), INTENT(OUT) :: moment(3) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg + ! .TRUE.: a rigid end's reaction from the full assembly, the reference the node's rows + ! reproduce bit for bit (as CD_HermiteCable_Dyn_Reaction) + LOGICAL, INTENT(IN), OPTIONAL :: full_assembly INTEGER :: iend, base, es + LOGICAL :: full REAL(wp) :: f_ec(3), k_ec(3, 3), direction(3), bend_moment(3) CHARACTER(1024) :: em @@ -9450,9 +9461,11 @@ SUBROUTINE CD_HermiteCable_Dyn_EndConnection_Moment(model, node, moment, ErrStat ! required in the residual is -G0 in the transverse tangent plane; under ! virtual work, m cross that contribution is the line's moment on the ! supporting body, matching the finite-spring convention. Only the end tangent's three - ! rows are needed: without torsion (which couples every element) they come from the - ! elements at the node, bit-identical to the full assembly (node_reaction). - IF (model%torsion%active) THEN + ! rows are needed: without the condensed torsion (which couples every element) they come + ! from the elements at the node, bit-identical to the full assembly (node_reaction). + full = .FALSE. + IF (PRESENT(full_assembly)) full = full_assembly + IF ((model%torsion%active .AND. .NOT. model%tw_active) .OR. full) THEN CALL assemble_residual(model, model%q, model%v, model%t, .TRUE., .FALSE., es, em) IF (es /= CD_HCDYN_OK) THEN ErrStat = es @@ -10027,6 +10040,7 @@ SUBROUTINE CD_HermiteCable_Dyn_End(model) model%ws_G, model%ws_Gt, model%ws_inert, model%ws_qtrial, model%ws_dq, & model%ws_recovery_q0, model%ws_recovery_v0, model%ws_recovery_a0) DEALLOCATE (model%ws_Rk, model%ws_Rt, model%fc_R, model%fc_q, model%fc_v) + IF (ALLOCATED(model%ws_Rnode)) DEALLOCATE (model%ws_Rnode) DEALLOCATE (model%ws_Kb, model%ws_Kvb, & model%ws_Keffb, model%ws_Msumb, model%ws_Mamb) DEALLOCATE (model%ws_ipiv) @@ -10151,8 +10165,10 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta ! node_only: assemble only the residual rows of that node, into R_out (sized like the ! residual) instead of the model's residual: the elements that reach the node and its own ! nodal terms, each added in the order of the full assembly, so those rows are bit-identical - ! and the model's scratch is untouched (node_reaction). Residual only, without torsion - ! (which couples every element). The other rows of R_out are partial. + ! and the model's scratch is untouched (node_reaction). Residual only, without the + ! condensed torsion (which couples every element; the nodal twist adds the torques of the + ! node's elements and end spring, assemble_twist node_only). The other rows of R_out are partial. + ! Without R_out the rows land in the model's ws_Rnode. INTEGER, INTENT(IN), OPTIONAL :: node_only REAL(wp), INTENT(INOUT), TARGET, OPTIONAL :: R_out(:) ! stash_tangent: a full residual-only assembly that evaluates each element kernel once for @@ -10224,9 +10240,9 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta Kvb => model%ws_Kvb e_lo = 1; e_hi = ne; n_lo = 1; n_hi = model%nn IF (PRESENT(node_only)) THEN - IF (want_tangent .OR. model%torsion%active .OR. .NOT. PRESENT(R_out)) THEN + IF (want_tangent .OR. (model%torsion%active .AND. .NOT. model%tw_active)) THEN ErrStat = CD_HCDYN_BADINPUT - ErrMsg = 'a single-node assembly is residual-only, without torsion, into a caller residual' + ErrMsg = 'a single-node assembly is residual-only, without the condensed torsion' RETURN END IF IF (node_only < 1 .OR. node_only > model%nn) THEN @@ -10234,6 +10250,7 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta END IF e_lo = MAX(1, node_only - 1); e_hi = MIN(ne, node_only) n_lo = node_only; n_hi = node_only + R => model%ws_Rnode END IF IF (PRESENT(R_out)) THEN IF (SIZE(R_out) /= SIZE(model%ws_R)) THEN @@ -10750,7 +10767,12 @@ SUBROUTINE assemble_residual(model, q_cfg, v_cfg, t_eval, want_residual, want_ta ! rank-one g g^T / C joins the solve by Sherman-Morrison; g is kept in tors_g). Nodal ! twist: the element torques and end springs (assemble_twist). IF (model%tw_active .AND. (want_residual .OR. want_tangent)) THEN - CALL assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, Kb, Kvb, es, em2) + IF (PRESENT(node_only)) THEN + CALL assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, Kb, Kvb, es, em2, & + node_only=node_only) + ELSE + CALL assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, Kb, Kvb, es, em2) + END IF IF (es /= CD_HCDYN_OK) THEN ErrStat = es; ErrMsg = TRIM(em2); RETURN END IF @@ -11137,7 +11159,8 @@ SUBROUTINE twist_link(model, iend, q_cfg, ends, want_hess, psi, gl, hl, ErrStat, END IF END SUBROUTINE twist_link - SUBROUTINE assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, Kb, Kvb, ErrStat, ErrMsg) + SUBROUTINE assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, Kb, Kvb, ErrStat, ErrMsg, & + node_only) !! Nodal-twist part of assemble_residual: every element's torque M_e = (GJ/l0) tw_e + (Bt/l0) !! d tw_e/dt (tw_e = phi_{e+1} - phi_e + rho_e(q), d/dt from the nodal rates and g . q_dot) !! and every elastic end's spring, at q_cfg, v_cfg and the angles and rates of the running @@ -11147,6 +11170,10 @@ SUBROUTINE assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, K !! for the solve (tw_eg, tw_ehv, tw_ek, tw_ed, tw_lg, tw_lk; want_tangent). tw_me holds the !! element torques and tw_tsum the summed twist. !! + !! node_only (residual only): the rows of that node alone, from the elements that reach it + !! and its end spring, each added as the full assembly adds it (assemble_residual node_only); + !! the model's twist scratch (tw_R, tw_me, tw_tsum) is not touched. + !! !! An element whose length changes at the rate l0_dot (active line control) damps the rate of !! its twist per length, the quantity tau/l0 its elastic torque GJ tau/l0 reads, as the axial !! damping takes the rate of the strain: M_e = (GJ/l0) tau + (Bt/l0) (d tau/dt - tau l0_dot/l0), @@ -11163,6 +11190,7 @@ SUBROUTINE assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, K REAL(wp), INTENT(INOUT) :: R(:), Kb(:, :), Kvb(:, :) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg + INTEGER, INTENT(IN), OPTIONAL :: node_only REAL(wp), POINTER :: phi(:), w(:) REAL(wp) :: ends(3, 4), phi_end, rho, beta, g(12), h(12, 12), ve(12), hv(12), ke(12, 12), kel, kd REAL(wp) :: om(3, 2), ew(3, 2) @@ -11171,12 +11199,24 @@ SUBROUTINE assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, K ! length-rate share of the damping (active line control): l0_dot/l0, the element's tangent ! handles (m in the 12-DOF layout, the r slots zero) and the angle stiffness it leaves REAL(wp) :: rr, mv(12), gmv(12), kel_t, cpl - LOGICAL :: ctrl_rate - INTEGER :: e, iend, node, b, i, j, es + LOGICAL :: ctrl_rate, one_node + INTEGER :: e, iend, node, b, i, j, es, e_lo, e_hi CHARACTER(1024) :: em ErrStat = CD_HCDYN_OK ErrMsg = '' + one_node = PRESENT(node_only) + e_lo = 1 + e_hi = model%ne + IF (one_node) THEN + IF (want_tangent .OR. .NOT. want_residual .OR. node_only < 1 .OR. node_only > model%nn) THEN + ErrStat = CD_HCDYN_BADINPUT + ErrMsg = 'assemble_twist: a single-node assembly is residual-only, at a node of the line' + RETURN + END IF + e_lo = MAX(1, node_only - 1) + e_hi = MIN(model%ne, node_only) + END IF CALL tw_frames(model, ends, phi_end) IF (model%tors_use_step) THEN phi => model%tw_pe @@ -11185,11 +11225,11 @@ SUBROUTINE assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, K phi => model%tw_phi w => model%tw_w END IF - IF (want_residual) model%tw_R = CD_ZERO - model%tw_tsum = CD_ZERO + IF (want_residual .AND. .NOT. one_node) model%tw_R = CD_ZERO + IF (.NOT. one_node) model%tw_tsum = CD_ZERO om = MERGE(model%tw_som, model%tw_om, model%tors_use_step) turning = ANY(ABS(om) > CD_ZERO) .AND. ALLOCATED(model%torsion%bt) - DO e = 1, model%ne + DO e = e_lo, e_hi kd = CD_ZERO IF (ALLOCATED(model%torsion%bt)) kd = model%torsion%bt(e)/model%l0(e) ! an element at a rigid end twists through rho as its end frame turns: its damping rate @@ -11226,6 +11266,10 @@ SUBROUTINE assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, K kel_t = kel - kd*rr END IF mt = kel*tau + kd*rate + IF (one_node) THEN + R(6*e - 5:6*e + 6) = R(6*e - 5:6*e + 6) + mt*g + CYCLE + END IF model%tw_me(e) = mt model%tw_tsum = model%tw_tsum + tau IF (want_residual) THEN @@ -11269,6 +11313,9 @@ SUBROUTINE assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, K END IF DO iend = 1, 2 IF (.NOT. tw_spring(model, iend)) CYCLE + IF (one_node) THEN + IF (MERGE(1, model%nn, iend == 1) /= node_only) CYCLE + END IF CALL twist_link(model, iend, q_cfg, ends, want_tangent, psi, gl, hl, es, em) IF (es /= CD_HCDYN_OK) THEN ErrStat = es @@ -11284,6 +11331,14 @@ SUBROUTINE assemble_twist(model, q_cfg, v_cfg, want_residual, want_tangent, R, K tw = psi + phi_end - phi(model%nn) END IF mt = k*tw + IF (one_node) THEN + IF (iend == 1) THEN + R(b + 1:b + 3) = R(b + 1:b + 3) - mt*gl + ELSE + R(b + 1:b + 3) = R(b + 1:b + 3) + mt*gl + END IF + CYCLE + END IF model%tw_tsum = model%tw_tsum + tw IF (want_residual) THEN IF (iend == 1) THEN diff --git a/src/CableDyn_OpenFAST_Aggregate.f90 b/src/CableDyn_OpenFAST_Aggregate.f90 index fcc180f5..0984f897 100644 --- a/src/CableDyn_OpenFAST_Aggregate.f90 +++ b/src/CableDyn_OpenFAST_Aggregate.f90 @@ -920,7 +920,7 @@ SUBROUTINE CD_AGG_GetMovingPointMesh(self, position, velocity, acceleration, loa END SUBROUTINE CD_AGG_GetMovingPointMesh SUBROUTINE CD_AGG_UpdateStates_Moving(self, position, velocity, acceleration, ErrStat, ErrMsg, output_probe, & - orientation, angular_velocity, angular_acceleration) + orientation, angular_velocity, angular_acceleration, cables_from_mirror) !! Transfer host kinematics for the moving points WITHOUT advancing. The EI=0 system columns !! route to CD_FMF_UpdateStates_Moving; each cable column's coupled node is written through !! CD_HFMF_SetCoupledKinematics (translation plus parent orientation/rates, interior and time frozen). The @@ -930,6 +930,13 @@ SUBROUTINE CD_AGG_UpdateStates_Moving(self, position, velocity, acceleration, Er !! CalcOutput taken after a fairlead move -- but before the next Step -- reflects that move: !! the cable's reaction is the instantaneous direct-feedthrough load (current coupled !! kinematics against the last committed interior shape), not the last committed step's load. + !! + !! An output probe skips the preflight and the pre-write trial pass of a cable with the nodal + !! twist (the write checks the same conditions): its caller reloads the complete state on + !! failure, so the update need not be atomic. + !! cables_from_mirror = .TRUE. (output probe only) leaves the cables untouched: it is the + !! restore of a probe whose caller then reloads every cable from its mirror + !! (CD_HFMF_UnpackMirror, which rewrites the coupled ends, their frames and the twist). TYPE(CD_AGG_ModuleType), INTENT(INOUT) :: self REAL(wp), INTENT(IN) :: position(:, :), velocity(:, :), acceleration(:, :) INTEGER, INTENT(OUT) :: ErrStat @@ -937,16 +944,24 @@ SUBROUTINE CD_AGG_UpdateStates_Moving(self, position, velocity, acceleration, Er LOGICAL, INTENT(IN), OPTIONAL :: output_probe REAL(wp), INTENT(IN), OPTIONAL :: orientation(:, :, :) REAL(wp), INTENT(IN), OPTIONAL :: angular_velocity(:, :), angular_acceleration(:, :) + LOGICAL, INTENT(IN), OPTIONAL :: cables_from_mirror INTEGER :: c, col, es REAL(wp) :: zero_angular(3) - LOGICAL :: is_output_probe + LOGICAL :: is_output_probe, skip_cables CHARACTER(1024) :: em IF (.NOT. require_initialized(self, ErrStat, ErrMsg)) RETURN zero_angular = CD_ZERO is_output_probe = .FALSE. IF (PRESENT(output_probe)) is_output_probe = output_probe + skip_cables = .FALSE. + IF (PRESENT(cables_from_mirror)) skip_cables = cables_from_mirror + IF (skip_cables .AND. .NOT. is_output_probe) THEN + ErrStat = CD_AGG_BADINPUT + ErrMsg = 'CableDyn_OpenFAST_Aggregate: cables_from_mirror is for an output-probe restore only' + RETURN + END IF IF (.NOT. (moving_cols_ok(position, self) .AND. moving_cols_ok(velocity, self) .AND. & moving_cols_ok(acceleration, self))) THEN ErrStat = CD_AGG_BADINPUT @@ -990,8 +1005,12 @@ SUBROUTINE CD_AGG_UpdateStates_Moving(self, position, velocity, acceleration, Er END IF ! Preflight every cable before touching the EI=0 system or an earlier cable. This ! includes the exact-rigid shortest-rotation check, which is stricter than merely - ! validating that each supplied orientation is a proper DCM. + ! validating that each supplied orientation is a proper DCM. An output probe's caller + ! restores the whole state on failure, so a probe writes a cable with the nodal twist + ! without it: the write checks every element itself (CD_HFMF_SetCoupledKinematics + ! caller_restores). DO c = 1, self%ncable + IF (is_output_probe .AND. self%cables(c)%line%tw_active) CYCLE col = self%ncp_sys + c IF (self%cable_col_b(c) > 0) THEN CALL cable_two_ends(self%cables(c), col, self%cable_col_b(c), CABLE_PREFLIGHT, position, velocity, & @@ -1060,20 +1079,23 @@ SUBROUTINE CD_AGG_UpdateStates_Moving(self, position, velocity, acceleration, Er IF (ErrStat /= CD_AGG_OK) RETURN END IF DO c = 1, self%ncable + IF (skip_cables) EXIT col = self%ncp_sys + c IF (self%cable_col_b(c) > 0) THEN CALL cable_two_ends(self%cables(c), col, self%cable_col_b(c), CABLE_SET, position, velocity, & acceleration, es, em, orientation, & - self%mv_omega, self%mv_alpha) + self%mv_omega, self%mv_alpha, caller_restores=is_output_probe) ELSE IF (PRESENT(orientation)) THEN CALL CD_HFMF_SetCoupledKinematics(self%cables(c), position(:, col), velocity(:, col), & acceleration(:, col), es, em, orientation(:, :, col), & - self%mv_omega(:, col), self%mv_alpha(:, col)) + self%mv_omega(:, col), self%mv_alpha(:, col), & + caller_restores=is_output_probe) ELSE CALL CD_HFMF_SetCoupledKinematics(self%cables(c), position(:, col), velocity(:, col), & acceleration(:, col), es, em, & u_angular_velocity=self%mv_omega(:, col), & - u_angular_acceleration=self%mv_alpha(:, col)) + u_angular_acceleration=self%mv_alpha(:, col), & + caller_restores=is_output_probe) END IF IF (es /= CD_HFMF_OK) THEN CALL map_hfmf_status(es, em, ErrStat, ErrMsg) @@ -3047,7 +3069,7 @@ PURE INTEGER FUNCTION ncp_all(self) RESULT(n) END FUNCTION ncp_all SUBROUTINE cable_two_ends(cable, ca, cb, mode, position, velocity, acceleration, es, em, orientation, & - angular_velocity, angular_acceleration, twist) + angular_velocity, angular_acceleration, twist, caller_restores) !! The HFMF boundary call of a cable with a moving End B (CD_HFMF_Set_Moving_End_B): End A takes !! the moving column ca, End B column cb, each with its orientation and rates (the !! committed parent orientation and zero rates where the host passes none). mode CABLE_PREFLIGHT @@ -3062,6 +3084,7 @@ SUBROUTINE cable_two_ends(cable, ca, cb, mode, position, velocity, acceleration, REAL(wp), INTENT(IN), OPTIONAL :: orientation(:, :, :) REAL(wp), INTENT(IN), OPTIONAL :: angular_velocity(:, :), angular_acceleration(:, :) REAL(wp), INTENT(IN), OPTIONAL :: twist + LOGICAL, INTENT(IN), OPTIONAL :: caller_restores ! CABLE_SET: see CD_HFMF_SetCoupledKinematics REAL(wp) :: dcm_a(3, 3), dcm_b(3, 3), w_a(3), al_a(3), w_b(3), al_b(3) dcm_a = cable%parent_dcm dcm_b = cable%parent_dcm_b @@ -3087,7 +3110,7 @@ SUBROUTINE cable_two_ends(cable, ca, cb, mode, position, velocity, acceleration, CASE (CABLE_SET) CALL CD_HFMF_SetCoupledKinematics(cable, position(:, ca), velocity(:, ca), acceleration(:, ca), & es, em, dcm_a, w_a, al_a, position(:, cb), velocity(:, cb), & - acceleration(:, cb), dcm_b, w_b, al_b) + acceleration(:, cb), dcm_b, w_b, al_b, caller_restores=caller_restores) CASE DEFAULT CALL CD_HFMF_UpdateStates(cable, position(:, ca), velocity(:, ca), acceleration(:, ca), es, em, & dcm_a, w_a, al_a, ub_pos=position(:, cb), ub_vel=velocity(:, cb), & diff --git a/src/CableDyn_OpenFAST_HermiteFMF.f90 b/src/CableDyn_OpenFAST_HermiteFMF.f90 index b71628b4..843e7705 100644 --- a/src/CableDyn_OpenFAST_HermiteFMF.f90 +++ b/src/CableDyn_OpenFAST_HermiteFMF.f90 @@ -1294,7 +1294,8 @@ END SUBROUTINE coupled_candidate_q SUBROUTINE CD_HFMF_SetCoupledKinematics(self, u_pos, u_vel, u_acc, ErrStat, ErrMsg, u_orientation, & u_angular_velocity, u_angular_acceleration, ub_pos, ub_vel, ub_acc, & - ub_orientation, ub_angular_velocity, ub_angular_acceleration) + ub_orientation, ub_angular_velocity, ub_angular_acceleration, & + caller_restores) !! Direct-feedthrough transfer: write ONLY the coupled node's three translational (r, v, a) !! DOFs into the line state, WITHOUT stepping the interior or advancing simulation time. Used !! between an UpdateStates_Moving (the host moves the fairlead) and the following CalcOutput so @@ -1304,6 +1305,13 @@ SUBROUTINE CD_HFMF_SetCoupledKinematics(self, u_pos, u_vel, u_acc, ErrStat, ErrM !! does not advance self%line%t; the next CD_HFMF_UpdateStates re-prescribes the boundary and !! performs the actual implicit advance. A moving End B (ub_*, required on such a cable) is !! written in the same way. + !! + !! The update is all or nothing: a parent-attached torsion frame is first checked at the state + !! about to be written. caller_restores = .TRUE. is for a caller that owns a complete state + !! mirror and reloads it on every failure (the OpenFAST output probe): on a cable with the + !! nodal twist that trial pass over every element is skipped, as the write itself checks the + !! same conditions (Set_Torsion_Frames, with the same message), so a failure can leave the + !! cable partly written for the caller to reload. The condensed torsion keeps its check. TYPE(CD_HFMF_ModuleType), INTENT(INOUT) :: self REAL(wp), INTENT(IN) :: u_pos(3), u_vel(3), u_acc(3) INTEGER, INTENT(OUT) :: ErrStat @@ -1312,11 +1320,13 @@ SUBROUTINE CD_HFMF_SetCoupledKinematics(self, u_pos, u_vel, u_acc, ErrStat, ErrM REAL(wp), INTENT(IN), OPTIONAL :: u_angular_velocity(3), u_angular_acceleration(3) REAL(wp), INTENT(IN), OPTIONAL :: ub_pos(3), ub_vel(3), ub_acc(3), ub_orientation(3, 3) REAL(wp), INTENT(IN), OPTIONAL :: ub_angular_velocity(3), ub_angular_acceleration(3) + LOGICAL, INTENT(IN), OPTIONAL :: caller_restores REAL(wp) :: target_dcm(3, 3), d0_target(3, 2) REAL(wp) :: tangent_q(3), tangent_v(3), tangent_a(3) REAL(wp) :: target_omega(3), target_alpha(3), tors_ends(3, 4) REAL(wp) :: target_dcm_b(3, 3), target_omega_b(3), target_alpha_b(3), tangent_b(3, 3) INTEGER :: base, es + LOGICAL :: atomic CHARACTER(1024) :: em CALL prepare_coupled_kinematics(self, u_pos, u_vel, u_acc, target_dcm, target_omega, target_alpha, & @@ -1329,10 +1339,12 @@ SUBROUTINE CD_HFMF_SetCoupledKinematics(self, u_pos, u_vel, u_acc, ErrStat, ErrM ErrMsg = 'CD_HFMF_SetCoupledKinematics: '//TRIM(em) RETURN END IF + atomic = .TRUE. + IF (PRESENT(caller_restores)) atomic = .NOT. (caller_restores .AND. self%line%tw_active) + IF (self%tors_parent .OR. self%tors_parent_b) tors_ends = coupled_torsion_ends(self, target_dcm, target_dcm_b) ! A parent-attached torsion frame is checked at the state about to be written before ! anything is written (the update is all or nothing) - IF (self%tors_parent .OR. self%tors_parent_b) THEN - tors_ends = coupled_torsion_ends(self, target_dcm, target_dcm_b) + IF ((self%tors_parent .OR. self%tors_parent_b) .AND. atomic) THEN ! the candidate configuration in the line's trial scratch (as coupled_candidate_q builds it) DO base = 1, SIZE(self%line%q) self%line%ws_qtrial(base) = self%line%q(base) diff --git a/src/openfast/CableDyn_OF.f90 b/src/openfast/CableDyn_OF.f90 index ba90d6cf..afabf6a8 100644 --- a/src/openfast/CableDyn_OF.f90 +++ b/src/openfast/CableDyn_OF.f90 @@ -3087,9 +3087,12 @@ SUBROUTINE restore_calcoutput_probe( inst_e, m, ErrStat, ErrMsg ) ErrStat = ErrID_None ErrMsg = '' + ! the cables are left to the mirror reload below, which rewrites their coupled ends, + ! frames and twist (a transfer here would be overwritten) CALL CD_AGG_UpdateStates_Moving( inst_e%agg, inst_e%sv_pos, inst_e%sv_vel, inst_e%sv_acc, es, em, & output_probe=.TRUE., orientation=inst_e%sv_orient, & - angular_velocity=inst_e%sv_omega, angular_acceleration=inst_e%sv_alpha ) + angular_velocity=inst_e%sv_omega, angular_acceleration=inst_e%sv_alpha, & + cables_from_mirror=.TRUE. ) IF (es /= CD_AGG_OK) THEN CALL SetErrStat( ErrID_Fatal, 'CableDyn CalcOutput endpoint restore failed: '//TRIM(em), & ErrStat, ErrMsg, 'restore_calcoutput_probe' ) @@ -3466,7 +3469,8 @@ SUBROUTINE restore() !! The committed coupled kinematics and mirror back; the held loads are re-evaluated. CALL CD_AGG_UpdateStates_Moving( Inst(id)%agg, Inst(id)%sv_pos, Inst(id)%sv_vel, Inst(id)%sv_acc, es, em, & output_probe=.TRUE., orientation=Inst(id)%sv_orient, & - angular_velocity=Inst(id)%sv_omega, angular_acceleration=Inst(id)%sv_alpha ) + angular_velocity=Inst(id)%sv_omega, angular_acceleration=Inst(id)%sv_alpha, & + cables_from_mirror=.TRUE. ) IF (es /= CD_AGG_OK) CALL SetErrStat( ErrID_Fatal, 'CableDyn linearization restore failed: '//TRIM(em), & ErrStat, ErrMsg, RoutineName ) CALL reload_interiors_ary( Inst(id), m, Inst(id)%ws_lsave, t_clock, ErrStat2, ErrMsg2 ) diff --git a/tests/test_hermite_node_reaction.f90 b/tests/test_hermite_node_reaction.f90 index 9f4f49e8..823e95c8 100644 --- a/tests/test_hermite_node_reaction.f90 +++ b/tests/test_hermite_node_reaction.f90 @@ -11,7 +11,10 @@ PROGRAM test_hermite_node_reaction !! attachments; finite, rigid or no end connections), at scattered states; !! B. the maintained IEA-15 MW mixed mooring example through the OpenFAST aggregate, along a !! coupled surge and heave trajectory in a current, and after a fairlead transfer without - !! a step (the state the OpenFAST CalcOutput evaluates). + !! a step (the state the OpenFAST CalcOutput evaluates); + !! C. hand-built cables with the nodal twist (rigid bending ends, End A held in torsion and + !! End B held or on a torsional spring, torsional damping), at scattered states: the + !! reaction and the rigid ends' connection moment equal the full assembly's. USE CableDyn_Precision, ONLY: wp USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & CD_HermiteCable_Dyn_Reaction, CD_HermiteCable_Dyn_Set_Contact, & @@ -20,7 +23,10 @@ PROGRAM test_hermite_node_reaction CD_HermiteCable_Dyn_Set_Drag, CD_HermiteCable_Dyn_Set_AddedMass, & CD_HermiteCable_Dyn_Set_Waves, CD_HermiteCable_Dyn_Set_Held_Fluid, & CD_HermiteCable_Dyn_Set_EndConnection, CD_HermiteCable_Dyn_End, & + CD_HermiteCable_Dyn_Set_Torsion, CD_HermiteCable_Dyn_EndConnection_Moment, & CD_HCDYN_OK + USE CableDyn_HermiteTorsion, ONLY: CD_HermiteTorsionType, CD_HermiteTorsion_Line, CD_HermiteTorsion_Unwrap, & + CD_HTORS_OK USE CableDyn_EndConnection, ONLY: CD_ENDCONN_FINITE, CD_ENDCONN_RIGID USE CableDyn_Line, ONLY: CD_Nodal_Seabed_Stiffness, CD_LINE_OK USE CableDyn_OpenFAST_Aggregate, ONLY: CD_AGG_ModuleType, CD_AGG_Init_From_Deck, CD_AGG_NMovingPoints, & @@ -39,12 +45,15 @@ PROGRAM test_hermite_node_reaction CALL case_hand_built(waves=.FALSE., mode=CD_ENDCONN_FINITE) CALL case_hand_built(waves=.FALSE., mode=CD_ENDCONN_RIGID) CALL case_hand_built(waves=.TRUE., mode=-1) + CALL case_nodal_twist(spring_b=.FALSE.) + CALL case_nodal_twist(spring_b=.TRUE.) IF (COMMAND_ARGUMENT_COUNT() >= 1) CALL case_mixed_example() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' ERROR STOP 1 END IF - WRITE (*, '(A,I0,A)') 'PASS: node reactions equal the full assembly bit for bit (', ncompared, ' nodes)' + WRITE (*, '(A,I0,A)') 'PASS: node reactions and end moments equal the full assembly bit for bit (', & + ncompared, ' nodes)' CONTAINS @@ -205,6 +214,105 @@ SUBROUTINE case_hand_built(waves, mode) CALL CD_HermiteCable_Dyn_End(m) END SUBROUTINE case_hand_built + SUBROUTINE case_nodal_twist(spring_b) + !! A 16-element cable along +x between held ends with Rigid bending connections and the nodal + !! twist (polar inertia, torsional damping, an imposed twist), End B held in torsion or on a + !! torsional spring, with drag in a current and added mass: at the rest state and at scattered + !! states (positions, velocities, accelerations and twist angles and rates), the node reaction + !! at every node and the connection moment at both ends equal the full assembly's. + LOGICAL, INTENT(IN) :: spring_b + INTEGER, PARAMETER :: NE = 16, NN = NE + 1, NDOF = 6*NN + REAL(wp), PARAMETER :: L = 1.5_wp, PI_L = 3.14159265358979323846_wp + TYPE(CD_HermiteCableDynType) :: m + TYPE(CD_HermiteTorsionType) :: tors + REAL(wp) :: l0(NE), diam(NE), q(NDOF), g(NDOF), raw, s, span, mo_full(3), mo_node(3) + REAL(wp), ALLOCATABLE :: r_saved(:), tw_saved(:) + INTEGER :: i, k, trial, es, es2, iend + CHARACTER(512) :: em + CHARACTER(32) :: label + + WRITE (label, '(A,L1)') 'C spring_b=', spring_b + l0 = L + diam = 0.12_wp + span = L*REAL(NE, wp) + q = 0.0_wp + DO i = 1, NN + ! along +x, bowed in y with the end tangents along +x (as the rigid connections hold them) + s = REAL(i - 1, wp)*L + q(6*i - 5) = s + q(6*i - 4) = 0.3_wp*SIN(PI_L*s/span)**2 + q(6*i - 2) = 1.0_wp + q(6*i - 1) = 0.3_wp*(PI_L/span)*SIN(2.0_wp*PI_L*s/span) + END DO + CALL CD_HermiteCable_Dyn_Init(m, l0, [(2.0e6_wp, k=1, NE)], [(500.0_wp, k=1, NE)], [(20.0_wp, k=1, NE)], & + [(0.0_wp, k=1, NE)], q, [1, 2, 3, NDOF - 5, NDOF - 4, NDOF - 3], -100.0_wp, & + 0.0_wp, 0.5_wp, es, em) + CALL require(es == CD_HCDYN_OK, TRIM(label)//': init: '//TRIM(em)) + IF (es /= CD_HCDYN_OK) RETURN + CALL CD_HermiteCable_Dyn_Set_EndConnection(m, [0.0_wp, 0.0_wp], & + RESHAPE([1.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp], [3, 2]), & + es, em, connection_mode=[CD_ENDCONN_RIGID, CD_ENDCONN_RIGID]) + CALL require(es == CD_HCDYN_OK, TRIM(label)//': end connections: '//TRIM(em)) + CALL CD_HermiteCable_Dyn_Set_Drag(m, 1025.0_wp, diam, [(1.2_wp, k=1, NE)], [(0.008_wp, k=1, NE)], 0.0_wp, & + [0.4_wp, 0.3_wp, 0.0_wp], es, em) + CALL require(es == CD_HCDYN_OK, TRIM(label)//': drag: '//TRIM(em)) + CALL CD_HermiteCable_Dyn_Set_AddedMass(m, 1025.0_wp, diam, [(1.0_wp, k=1, NE)], [(0.1_wp, k=1, NE)], 0.0_wp, & + es, em) + CALL require(es == CD_HCDYN_OK, TRIM(label)//': added mass: '//TRIM(em)) + tors%active = .TRUE. + tors%phi = 0.7_wp + tors%ends = RESHAPE([1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, & + 0.0_wp, 0.0_wp, 1.0_wp], [3, 4]) + tors%end_compliance = 0.0_wp + IF (spring_b) tors%end_compliance(2) = 2.0e-4_wp + ALLOCATE (tors%gj(NE), tors%irn(NE), tors%bt(NE)) + tors%gj = 3.0e3_wp + tors%irn = 0.05_wp + tors%bt = 40.0_wp + CALL CD_HermiteTorsion_Line(q, l0, tors%ends, raw, g, es, em) + CALL require(es == CD_HTORS_OK, TRIM(label)//': seed twist: '//TRIM(em)) + tors%theta = CD_HermiteTorsion_Unwrap(raw, 0.0_wp) + tors%has_theta = .TRUE. + CALL CD_HermiteCable_Dyn_Set_Torsion(m, tors, es, em) + CALL require(es == CD_HCDYN_OK, TRIM(label)//': torsion: '//TRIM(em)) + CALL require(m%tw_active, TRIM(label)//': the polar inertia installs the nodal twist') + IF (nfail > 0) RETURN + + DO trial = 0, 6 + IF (trial > 0) THEN + ! scattered state: positions within +-2 cm and tangent handles within +-0.02, velocities + ! and accelerations of order 1, twist angles within +-0.3 rad and their rates of order 1 + DO i = 1, NDOF + m%q(i) = q(i) + 0.02_wp*uniform() + m%v(i) = uniform() + m%a(i) = 2.0_wp*uniform() + END DO + DO i = 1, NN + m%tw_phi(i) = m%tw_phi(i) + 0.3_wp*uniform() + m%tw_w(i) = uniform() + END DO + m%t = 0.41_wp*REAL(trial, wp) + END IF + CALL compare_nodes(m, TRIM(label)//MERGE(' rest ', ' scattered', trial == 0), [(i, i=1, NN)]) + DO iend = 1, 2 + k = MERGE(1, NN, iend == 1) + CALL CD_HermiteCable_Dyn_EndConnection_Moment(m, k, mo_full, es, em, full_assembly=.TRUE.) + CALL require(es == CD_HCDYN_OK, TRIM(label)//': full moment: '//TRIM(em)) + r_saved = m%ws_R + tw_saved = [m%tw_me, m%tw_tsum] + CALL CD_HermiteCable_Dyn_EndConnection_Moment(m, k, mo_node, es2, em) + CALL require(es2 == CD_HCDYN_OK, TRIM(label)//': node moment: '//TRIM(em)) + CALL require(same_bits(mo_node, mo_full), TRIM(label)//': end moment equals the full one') + CALL require(same_bits(m%ws_R, r_saved) .AND. same_bits([m%tw_me, m%tw_tsum], tw_saved), & + TRIM(label)//': end moment leaves the scratch untouched') + IF (.NOT. same_bits(mo_node, mo_full)) WRITE (*, '(A,I0,3ES24.16/A,3ES24.16)') ' node ', k, mo_node, & + ' full ', mo_full + ncompared = ncompared + 1 + END DO + END DO + CALL CD_HermiteCable_Dyn_End(m) + END SUBROUTINE case_nodal_twist + SUBROUTINE case_mixed_example() !! The mixed mooring example (EI = 0 chains and a grounded finite-EI power cable with contact, !! friction, drag and added mass, host fluid held per step) along 4 s of coupled surge and From 5d97bde0655fb3c6f131581f3797dbdc55f69e58 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 20 Nov 2026 13:43:09 +0900 Subject: [PATCH 43/47] feat: OPTIONS CDOutDt, the interval of the coupled .CD.out rows (#186) The coupled .CD.out record takes a row after every committed CableDyn step. Each row re-evaluates the deck channels on the committed state and writes them, a large share of the module's output cost on a cable with many station channels at a small step (40-50 rows per second at DT = 0.02-0.025 s). OPTIONS CDOutDt [s] (alias cd_out_dt) writes a row at every whole multiple of it instead; 0, the default, keeps a row per committed step. It must be a whole multiple of the CableDyn step (dtM, or DT without dtM), or the run stops at initialisation. The OpenFAST shell counts the glue steps per row (nsuper times the CableDyn steps), the rewind of an abandoned branch trims the rows that branch wrote, and a restart continues on the same grid. The channels OpenFAST itself writes follow its DT_Out as before. The Python deck reader accepts and range-checks the option. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 6 +++ doc/options.rst | 10 +++++ doc/outputs.rst | 5 ++- examples/cabledyn_options_reference.dat | 1 + python/cabledyn/deck_file.py | 4 ++ python/tests/test_deck_file.py | 6 +++ src/CableDyn_DeckDriver.f90 | 12 +++++- src/CableDyn_OpenFAST_Aggregate.f90 | 4 ++ src/openfast/CableDyn_OF.f90 | 51 ++++++++++++++++++++++++- tests/test_channel_row.f90 | 31 ++++++++++++++- 10 files changed, 124 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef7282ff..c78ca02d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ All notable changes to CableDyn are recorded in this file. The format follows ### Added +- `OPTIONS CDOutDt` (alias `cd_out_dt`): the interval of the coupled `.CD.out` rows (OpenFAST and + FAST.Farm), a whole multiple of the CableDyn step; `0`, the default, keeps a row after every + committed step. A row re-evaluates and writes every deck channel, so on a cable with many + station channels at a small step the record is a large share of the module's output cost. + Retries, rewinds and restarts keep the row grid; OpenFAST's own channels follow `DT_Out` as + before. - Stochastic VIV band centre: an optional `VIV STOCHASTIC` section, rows `TypeName sigma c [Nf [seed]]`, makes the centre `cF` of a line type's synchronisation band the slowly varying random process of Ulveseter et al. (2017): `Nf` (default 100) sinusoids of a flat spectrum up to diff --git a/doc/options.rst b/doc/options.rst index e259ba35..915adc9f 100644 --- a/doc/options.rst +++ b/doc/options.rst @@ -573,6 +573,16 @@ Finite-EI cable controls (see :doc:`openfast`) - OpenFAST - ``False predictLoads`` + * - ``CDOutDt`` / ``cd_out_dt`` + - real, s + - ``0`` + - finite, >= 0, and a whole multiple of the CableDyn step (``dtM``, or ``DT`` when the deck + omits ``dtM``; the run stops at initialisation otherwise): the ``.CD.out`` record takes a + row at every whole multiple of it, which also skips the channel evaluation those rows + make. ``0`` writes a row after every committed step. The channels OpenFAST writes follow + its ``DT_Out`` either way (see :doc:`outputs`) + - OpenFAST and FAST.Farm + - ``0.1 CDOutDt`` Ambient fluid and prescribed motion ----------------------------------- diff --git a/doc/outputs.rst b/doc/outputs.rst index 1575da62..1b9cdef9 100644 --- a/doc/outputs.rst +++ b/doc/outputs.rst @@ -1136,8 +1136,9 @@ output root: digits, three-digit exponent), TAB-separated. The first data row is the static initialisation at ``t = 0``; every further row is written after -each committed CableDyn step, at every ``dtM`` boundary. It is independent of OpenFAST's ``DT_Out`` -and never repeats held values between +each committed CableDyn step, at every ``dtM`` boundary, or, with ``OPTIONS CDOutDt`` (a whole +multiple of the CableDyn step), at every multiple of ``CDOutDt``. It is independent of OpenFAST's +``DT_Out`` and never repeats held values between CableDyn steps. If OpenFAST retries a step, at any ``dtM``, the provisional row is replaced rather than duplicated, and a restore of an operating point (``CalcSteady``) keeps the rows of the run; the file is flushed after every row, so it is readable during a run and intact after a crash. diff --git a/examples/cabledyn_options_reference.dat b/examples/cabledyn_options_reference.dat index a9f693e1..b8038759 100644 --- a/examples/cabledyn_options_reference.dat +++ b/examples/cabledyn_options_reference.dat @@ -97,6 +97,7 @@ none waves - Wave model and parameters (m, s, deg) {none; airy; -- 0.01 threshIC - MoorDyn dynamic-relaxation compatibility only; accepted and ignored -- 0 WriteLog - MoorDyn logging compatibility only; accepted and ignored -- 0.1 dtOut - MoorDyn output-cadence compatibility only; accepted and ignored +-- 0.1 CDOutDt - OpenFAST/FAST.Farm: .CD.out row interval, a whole multiple of the CableDyn step [default: 0 = every step] -- 0 Currents - MoorDyn-C current mode {0=none; 1=current_profile.txt} [default: 0] -- 0.25 dtWave - MoorDyn-C WaveKin 3 resampling step (s) [default: 0.25] -- 3.14159 WvHiCOff - High cut-off of an elevation record, WaveKinMod 1 or WaveKin 3 (rad/s) {value; none} [default: 3.14159] diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index ce9675ed..3496702e 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -258,6 +258,8 @@ "max_strain": "max_strain", "vivrmswindow": "viv_rms_window", "viv_rms_window": "viv_rms_window", + "cdoutdt": "cd_out_dt", + "cd_out_dt": "cd_out_dt", "vivphaseseed": "viv_phase_seed", "viv_phase_seed": "viv_phase_seed", "rangestart": "range_start", @@ -1258,6 +1260,7 @@ def _scalar_option_value_error(keyword: str, value: str) -> str | None: "max_strain", "range_start", "viv_rms_window", + "cd_out_dt", }: if key == "friction" and value.lower() == "none": return None @@ -1297,6 +1300,7 @@ def _scalar_option_value_error(keyword: str, value: str) -> str | None: "max_strain", "range_start", "viv_rms_window", + "cd_out_dt", } or raw in { "dtic", "tmaxic", diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index 981391ad..47d6ba20 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -5148,6 +5148,12 @@ def test_finite_ei_viv_is_accepted_on_the_multibody_march(): DeckFile.from_text(_example("buoy_clamped_cable.dat", (row, row + " 0.8"))) +def test_cd_out_dt_option_is_non_negative(): + DeckFile.from_text(_edit(_STATIC, ("50.0 WtrDpth\n", "50.0 WtrDpth\n0.1 CDOutDt\n"))) + with pytest.raises(DeckFormatError, match="CDOutDt"): + DeckFile.from_text(_edit(_STATIC, ("50.0 WtrDpth\n", "50.0 WtrDpth\n-0.1 CDOutDt\n"))) + + def test_viv_rms_window_option_is_non_negative(): base = _edit(_STATIC, (_VIV_ROW, _VIV_ROW + " 0.8")) DeckFile.from_text(_edit(base, ("50.0 WtrDpth\n", "50.0 WtrDpth\n0.25 VIVrmsWindow\n"))) diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 58ea9445..15ab5219 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -829,6 +829,9 @@ MODULE CableDyn_DeckDriver ! OpenFAST supercycling (dtM > DT): extrapolate the coupled loads between dtM solves from the ! last two (CableDyn_LoadPredictor); FALSE holds the last solve's loads LOGICAL :: predict_loads = .TRUE. + ! OPTION CDOutDt [s]: the interval of the coupled .CD.out rows, a whole multiple of the + ! CableDyn step; 0 (the default) writes a row after every committed step + REAL(wp) :: cd_out_dt = CD_ZERO ! Opt-in adaptive mesh for COUPLED finite-EI cables: when set, a cable whose static IC is ! diagnosed under-resolved (CD_HermiteCable_Resolution_Metrics fragile) is refined by ! warm-started cubic-Hermite prolongation before the coupled dynamic run. Default FALSE keeps @@ -1311,6 +1314,8 @@ MODULE CableDyn_DeckDriver LOGICAL :: cable_load_feedback = .TRUE. ! Deck OPTION predictLoads (the OpenFAST shell; see CD_AGG_ModuleType%predict_loads) LOGICAL :: predict_loads = .TRUE. + ! Deck OPTION CDOutDt (the OpenFAST shell; see CD_AGG_ModuleType%cd_out_dt) + REAL(wp) :: cd_out_dt = CD_ZERO ! OPTION maxStrain, for the per-step plausibility guard of the coupled EI=0 lines. REAL(wp) :: max_strain = 0.5_wp REAL(wp), ALLOCATABLE :: host_current_profile_z(:) @@ -8380,6 +8385,7 @@ SUBROUTINE CD_Init_Deck_Aggregate(deck_path, dt, agg, ErrStat, ErrMsg, env_gravi agg%n_turbines = nturb agg%cable_load_feedback = opts%cable_load_feedback agg%predict_loads = opts%predict_loads + agg%cd_out_dt = opts%cd_out_dt agg%max_strain = opts%max_strain ! The standalone driver retains DeckOptions and evaluates a WaveKinMod-1 Fourier @@ -9665,6 +9671,7 @@ SUBROUTINE CD_End_Deck_Aggregate(agg) agg%host_current_enabled = .FALSE. agg%cable_load_feedback = .TRUE. agg%predict_loads = .TRUE. + agg%cd_out_dt = CD_ZERO agg%max_strain = 0.5_wp IF (ALLOCATED(agg%host_current_profile_z)) DEALLOCATE (agg%host_current_profile_z) IF (ALLOCATED(agg%host_current_profile_velocity)) DEALLOCATE (agg%host_current_profile_velocity) @@ -18838,6 +18845,8 @@ SUBROUTINE apply_option(line, opts, ErrStat, ErrMsg) opts%has_max_strain = ErrStat == 0 CASE ('vivrmswindow', 'viv_rms_window') CALL rd(val, opts%viv_rms_window, ErrStat, ErrMsg) + CASE ('cdoutdt', 'cd_out_dt') + CALL rd(val, opts%cd_out_dt, ErrStat, ErrMsg) CASE ('vivphaseseed', 'viv_phase_seed') SELECT CASE (TRIM(to_lower(val))) CASE ('spread') @@ -19344,7 +19353,8 @@ SUBROUTINE check_option_row_value(kw, val, ErrStat, ErrMsg) CASE ('dtm', 'dt') rule = 'time step' CASE ('tmax', 'tensile_strain_tolerance', 'tensilestraintolerance', 'ramptime', 'ramp_time', 'tramp', & - 'maxstrain', 'max_strain', 'rangestart', 'range_start', 'vivrmswindow', 'viv_rms_window') + 'maxstrain', 'max_strain', 'rangestart', 'range_start', 'vivrmswindow', 'viv_rms_window', 'cdoutdt', & + 'cd_out_dt') rule = 'non-negative' CASE ('frictionmu', 'mu', 'frictioncoefficient') IF (to_lower(TRIM(val)) == 'none') RETURN diff --git a/src/CableDyn_OpenFAST_Aggregate.f90 b/src/CableDyn_OpenFAST_Aggregate.f90 index 0984f897..d7384dc6 100644 --- a/src/CableDyn_OpenFAST_Aggregate.f90 +++ b/src/CableDyn_OpenFAST_Aggregate.f90 @@ -166,6 +166,9 @@ MODULE CableDyn_OpenFAST_Aggregate ! Deck OPTION predictLoads: the OpenFAST shell extrapolates the coupled loads between ! supercycled solves (TRUE) or holds the last solve's (FALSE) LOGICAL :: predict_loads = .TRUE. + ! Deck OPTION CDOutDt [s]: the OpenFAST shell writes a .CD.out row at every whole multiple + ! of it (a whole multiple of the CableDyn step); 0 writes one after every committed step + REAL(wp) :: cd_out_dt = CD_ZERO ! Deck OPTION maxStrain: the per-step plausibility bound on the EI=0 system lines. REAL(wp) :: max_strain = 0.5_wp INTEGER :: ncp_sys = 0 ! moving points owned by sys @@ -415,6 +418,7 @@ SUBROUTINE CD_AGG_Init_From_Deck(self, deck_path, dt, ErrStat, ErrMsg, env_gravi candidate%host_current_enabled = parts%host_current_enabled candidate%cable_load_feedback = parts%cable_load_feedback candidate%predict_loads = parts%predict_loads + candidate%cd_out_dt = parts%cd_out_dt candidate%max_strain = parts%max_strain IF (ALLOCATED(parts%host_current_profile_z)) THEN candidate%host_current_profile_z = parts%host_current_profile_z diff --git a/src/openfast/CableDyn_OF.f90 b/src/openfast/CableDyn_OF.f90 index afabf6a8..0ee1122b 100644 --- a/src/openfast/CableDyn_OF.f90 +++ b/src/openfast/CableDyn_OF.f90 @@ -248,6 +248,8 @@ END FUNCTION cd_cpu_guard_armed INTEGER(IntKi) :: native_wrote_n = -123456789 REAL(DbKi) :: native_wrote_t = 0.0_DbKi LOGICAL :: native_pending = .FALSE. + ! glue steps per .CD.out row: nsuper times the CableDyn steps of OPTION CDOutDt (1 without it) + INTEGER(IntKi) :: native_every = 1 CHARACTER(1024) :: native_root = '' ! Range graphs (LINES flag r): sampled by the aggregate once per committed mooring step ! (sample_range); ws_range is the double-precision transfer buffer to the OtherState @@ -516,6 +518,30 @@ SUBROUTINE restore_native_outputs( id, old_id, root, t_start, restart_serial, Er Inst(old_id)%native_pending = .FALSE. END SUBROUTINE restore_native_outputs + SUBROUTINE set_native_every( inst_e, ErrStat, ErrMsg ) + !! Glue steps per .CD.out row from OPTION CDOutDt: nsuper (a row after every committed + !! CableDyn step) without it, nsuper times its whole number of CableDyn steps with it. + TYPE(CD_OF_Instance), INTENT(INOUT) :: inst_e + INTEGER(IntKi), INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + REAL(wp) :: ratio + INTEGER(IntKi) :: k + ErrStat = ErrID_None + ErrMsg = '' + inst_e%native_every = MAX(1_IntKi, inst_e%nsuper) + IF (.NOT. (inst_e%agg%cd_out_dt > 0.0_wp)) RETURN + ratio = inst_e%agg%cd_out_dt/inst_e%dt_moor + k = NINT(ratio, IntKi) + IF (k < 1_IntKi .OR. ABS(ratio - REAL(k, wp)) > 1.0E-6_wp*MAX(1.0_wp, ratio)) THEN + CALL SetErrStat( ErrID_Fatal, 'CableDyn mooring module: OPTIONS CDOutDt = '// & + TRIM(Num2LStr(REAL(inst_e%agg%cd_out_dt, DbKi)))//' s is not a whole multiple of '// & + 'the CableDyn step '//TRIM(Num2LStr(REAL(inst_e%dt_moor, DbKi)))//' s (dtM, or DT '// & + 'when the deck omits dtM).', ErrStat, ErrMsg, 'set_native_every' ) + RETURN + END IF + inst_e%native_every = k*MAX(1_IntKi, inst_e%nsuper) + END SUBROUTINE set_native_every + SUBROUTINE resume_after_rewind( inst_e, other, ErrStat, ErrMsg ) !! The run takes a step from a restored state that lies before its last commit: the rows !! and the range samples past the restored commit now belong to an abandoned branch. @@ -545,6 +571,17 @@ SUBROUTINE resume_after_rewind( inst_e, other, ErrStat, ErrMsg ) ErrStat, ErrMsg, RoutineName ) RETURN END IF + ! the rows past the restored commit: one per CableDyn step, or one per CDOutDt (at the whole + ! multiples of native_every/nsuper CableDyn steps) + IF (inst_e%native_every > inst_e%nsuper) THEN + BLOCK + INTEGER(IntKi) :: n_wrote, n_commit, k_row + k_row = inst_e%native_every/inst_e%nsuper + n_wrote = NINT(inst_e%native_wrote_t/REAL(inst_e%dt_moor, DbKi), IntKi) + n_commit = n_wrote - ntrim + ntrim = n_wrote/k_row - MAX(n_commit, 0_IntKi)/k_row + END BLOCK + END IF DO k = 1, ntrim BACKSPACE (inst_e%native_un, IOSTAT=ios) IF (ios /= 0) THEN @@ -957,6 +994,13 @@ SUBROUTINE CD_Init(InitInp, u, p, x, xd, z, other, y, m, DTcoupling, InitOut, Er Inst(id)%nsuper = nsuper Inst(id)%dt_moor = dt_moor Inst(id)%use_extfluid = use_extf + CALL set_native_every( Inst(id), ErrStat2, ErrMsg2 ) + CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + IF (ErrStat >= AbortErrLev) RETURN + IF (Inst(id)%native_every > Inst(id)%nsuper) & + CALL WrScr( ' CableDyn: the .CD.out record takes a row every '// & + TRIM(Num2LStr(REAL(Inst(id)%agg%cd_out_dt, DbKi)))//' s (OPTIONS CDOutDt), every '// & + TRIM(Num2LStr(Inst(id)%native_every/Inst(id)%nsuper))//' CableDyn steps.' ) IF (nsuper > 1_IntKi) THEN IF (Inst(id)%agg%predict_loads) THEN CALL WrScr( ' CableDyn: between dtM solves the coupled loads are extrapolated from the last two '// & @@ -1657,6 +1701,9 @@ SUBROUTINE rebuild_from_checkpoint( t, u1, p, x, other, m, ErrStat, ErrMsg ) Inst(id)%nlines = nlines Inst(id)%nsuper = MAX(1_IntKi, NINT(p%dtM0/p%dtCoupling, IntKi)) Inst(id)%dt_moor = REAL(p%dtM0, wp) + CALL set_native_every( Inst(id), ErrStat2, ErrMsg2 ) + CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) + IF (ErrStat >= AbortErrLev) RETURN ALLOCATE (Inst(id)%ws_pos(3, ncp), Inst(id)%ws_vel(3, ncp), Inst(id)%ws_acc(3, ncp), & Inst(id)%ws_fld(3, ncp), Inst(id)%ws_moment(3, ncp), Inst(id)%ws_orient(3, 3, ncp), & Inst(id)%ws_omega(3, ncp), Inst(id)%ws_alpha(3, ncp), & @@ -2051,7 +2098,9 @@ SUBROUTINE CD_UpdateStates( t, n, u, t_array, p, x, xd, z, other, m, ErrStat, Er ! cache is invalidated on every successful advance (bit-identical for the ! normal path -- last_solve_n moved anyway -- and correct for corrections). Inst(id)%loads_cached = .FALSE. - Inst(id)%native_pending = Inst(id)%native_un > 0_IntKi + ! (a row at every native_every-th glue step: OPTIONS CDOutDt) + Inst(id)%native_pending = Inst(id)%native_un > 0_IntKi .AND. & + MOD(n + 1_IntKi, Inst(id)%native_every) == 0_IntKi ! commit the restart clock: the state now committed corresponds to the END ! of this mooring interval. The advance runs on the LAST glue substep, so ! the interval end is t + dtCoupling (t + dt_moor from here overshoots by diff --git a/tests/test_channel_row.f90 b/tests/test_channel_row.f90 index 947abc64..ceb902a4 100644 --- a/tests/test_channel_row.f90 +++ b/tests/test_channel_row.f90 @@ -15,7 +15,9 @@ PROGRAM test_channel_row !! follow the state (a line-wide value kept from the row before, the stale row, fails); !! a second row at the same state repeats the first bit for bit; !! 2. a non-stepping transfer of other kinematics (the shell's output probe) changes the - !! state without a step: the row follows it. + !! state without a step: the row follows it; + !! 3. OPTIONS CDOutDt, the interval of the shell's committed-step record, reaches the + !! aggregate, and a negative interval stops the deck. USE CableDyn_Precision, ONLY: wp USE CableDyn_OpenFAST_Aggregate, ONLY: CD_AGG_ModuleType, CD_AGG_Init_From_Deck, CD_AGG_NMovingPoints, & CD_AGG_GetMovingPointMesh, CD_AGG_UpdateStates_Moving, & @@ -31,6 +33,7 @@ PROGRAM test_channel_row CALL write_deck('chrow.dat') CALL check_rows() + CALL check_cd_out_dt() IF (n_fail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', n_fail, ' channel row check(s) failed' ERROR STOP 1 @@ -63,12 +66,13 @@ LOGICAL FUNCTION same_bits(a, b) RESULT(same) END DO END FUNCTION same_bits - SUBROUTINE write_deck(path) + SUBROUTINE write_deck(path, extra_option) !! Three taut 100 m lines from fairleads at x = 0 to anchors at x = 100 m, 40 m deep, the cables !! neutrally buoyant: line 1 EI = 0 (twice the displaced mass); line 2 finite EI, clamped and !! restrained in torsion at both ends with a quarter turn of pretwist; line 3 finite EI under !! torque-tension coupling, clamped, rigid in torsion at End A and on a torsional spring at End B. CHARACTER(*), INTENT(IN) :: path + CHARACTER(*), INTENT(IN), OPTIONAL :: extra_option INTEGER :: u REAL(wp) :: m CHARACTER(32) :: mtxt, rtxt @@ -115,6 +119,7 @@ SUBROUTINE write_deck(path) WRITE (u, '(A)') '9.80665 g' WRITE (u, '(A)') '1025.0 rhoW' WRITE (u, '(A)') '0.05 dtM' + IF (PRESENT(extra_option)) WRITE (u, '(A)') extra_option WRITE (u, '(A)') '--- OUTPUTS ---' WRITE (u, '(A)') 'FairTen1' WRITE (u, '(A)') 'L1N4pz' @@ -149,6 +154,28 @@ SUBROUTINE write_deck(path) CLOSE (u) END SUBROUTINE write_deck + SUBROUTINE check_cd_out_dt() + !! OPTIONS CDOutDt (the shell's .CD.out row interval) is carried to the aggregate, 0 without it; + !! a negative interval fails the deck naming the option. + TYPE(CD_AGG_ModuleType) :: agg + INTEGER :: es + CHARACTER(512) :: em + CALL CD_AGG_Init_From_Deck(agg, 'chrow.dat', DT, es, em, host_orientation=.TRUE.) + CALL require(es == CD_AGG_OK .AND. .NOT. (ABS(agg%cd_out_dt) > 0.0_wp), & + 'without CDOutDt the record keeps a row per step (cd_out_dt = 0)') + CALL CD_AGG_End(agg, es, em) + CALL write_deck('chrow_cdout.dat', '0.1 CDOutDt') + CALL CD_AGG_Init_From_Deck(agg, 'chrow_cdout.dat', DT, es, em, host_orientation=.TRUE.) + CALL require(es == CD_AGG_OK, 'a deck with CDOutDt builds: '//TRIM(em)) + CALL require(ABS(agg%cd_out_dt - 0.1_wp) <= 0.0_wp, 'CDOutDt reaches the aggregate') + CALL CD_AGG_End(agg, es, em) + CALL write_deck('chrow_cdout.dat', '-0.1 cd_out_dt') + CALL CD_AGG_Init_From_Deck(agg, 'chrow_cdout.dat', DT, es, em, host_orientation=.TRUE.) + CALL require(es /= CD_AGG_OK .AND. INDEX(em, 'cd_out_dt') + INDEX(em, 'CDOutDt') > 0, & + 'a negative CDOutDt stops the deck naming the option: '//TRIM(em)) + CALL CD_AGG_End(agg, es, em) + END SUBROUTINE check_cd_out_dt + FUNCTION roll_dcm(phi) RESULT(r) !! OpenFAST mesh orientation (global to local) of a roll phi about +x. REAL(wp), INTENT(IN) :: phi From 93010d4c51ab17cd8a7c07a3dd8cc02705ff683b Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 20 Nov 2026 17:03:21 +0900 Subject: [PATCH 44/47] perf: cheaper nodal-twist kernels (Hessians, frame-only transfer) (#187) The nodal twist evaluates every element's reference twist and holonomy, with their 12 x 12 Hessians on each tangent assembly. On a power cable with the nodal twist in a coupled OpenFAST run, these kernels are a large share of the cable step. A good part of that time went on run-time library calls and on Hessian entries nobody reads: - skew, outer, outer9 and identity3 used RESHAPE and SPREAD, which gfortran turns into calls into its run-time library (spread, reshape_r8) on every Gauss point and solid angle. They now set their entries one by one, with the same products. - The solid angle of a reference triangle formed its full 9 x 9 Hessian, while CD_HermiteTwist_Reference reads only the blocks between the triangle's free vertices (the node tangents; the committed tangents and end directors are fixed). With the new optional argument free, solid_angle forms those blocks alone, each entry with the same expression as before. - element_holonomy evaluated the shape derivatives twice per Gauss point (once directly, once inside element_ab). It also formed the two blocks of its 9 x 9 intermediate Hessian that are never read (rows of the unit tangent against the r' and r'' columns). - The finiteness checks of the reference vertices and of the Hessian are one rank-3 and one rank-2 test instead of 6 and 12 calls per element. Every entry is formed by the same floating-point operations in the same order, so the results are bit-identical. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 10 +++ src/CableDyn_HermiteCableDynamic.f90 | 88 +++++++++++++++++--- src/CableDyn_HermiteTorsion.f90 | 116 +++++++++++++++++++++------ tests/test_nodal_twist_dynamic.f90 | 66 ++++++++++++++- 4 files changed, 244 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c78ca02d..617e8ce5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -257,6 +257,16 @@ All notable changes to CableDyn are recorded in this file. The format follows evaluation. Results are unchanged to the bit; the Delta Flume case 9 deck of `validation/experiments/delta_flume` (64 elements, 80 000 steps) runs in 58.6 s instead of 73.2 s. +- The nodal twist of a finite-EI cable (torsion with polar inertia `Irn`) is cheaper to + evaluate. Its reference-twist and holonomy Hessians no longer call the run-time library for + small outer products and skew matrices, and they form only the solid-angle and intermediate + blocks that are read. A frame-only twist transfer (the OpenFAST output probe on every + `CalcOutput`, the checkpoint rebuild, linearization) re-bases only the elements at a rigid end + or at a turned node; the others keep their reference twist, which the evaluation would return + unchanged. Outputs, `.CD.out` and restarts are unchanged to the bit. On the IEA-15MW + VolturnUS-S with three chains and a lazy-wave power cable restrained in torsion (one thread), + simulation CPU per simulated hour fell from 36.5 to 32.5 min (241 elements, `DT = 0.02 s`) + and from 35.0 to 30.6 min (291 elements, `DT = 0.025 s`). ### Fixed diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index ed77b53b..efe473f6 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -640,6 +640,13 @@ MODULE CableDyn_HermiteCableDynamic ! the step's residual norm. REAL(wp) :: tw_tsum = CD_ZERO, tw_spsi(2) = CD_ZERO, tw_tscale = CD_ONE REAL(wp), ALLOCATABLE :: tw_su(:, :), tw_stn(:, :), tw_sbeta(:) + ! tw_sq: the configuration tw_advance_reference re-based at; tw_rq: the configuration of the + ! last committed step (tw_commit_reference after a step, not a frame-only transfer), at which + ! every element passed every check of twist_reference; valid while tw_rq_ok (none before the + ! first step, after tw_init or a change of the lengths). An element whose DOFs are tw_rq's + ! and whose unit node tangents are the reference's, bit for bit, keeps its reference twist. + REAL(wp), ALLOCATABLE :: tw_sq(:), tw_rq(:) + LOGICAL :: tw_rq_ok = .FALSE. ! tw_som(:, k): the angular velocity of end frame k over the running step, log(R_{n+1} ! R_n^T)/dt (R = [d n d x n]); tw_om: that of the committed step. A turning frame twists ! the element at a rigid end through rho, and the torsional damping takes that rate. @@ -3335,6 +3342,8 @@ SUBROUTINE rebuild_length_caches(model, l0_new, ErrStat, ErrMsg) cn_new = kn_new*model%seabed_cn_over_kn END IF model%l0 = l0_new + ! (the element checks of the nodal twist's recorded configuration hold for the old lengths) + model%tw_rq_ok = .FALSE. CALL MOVE_ALLOC(mgb_new, model%Mgb) CALL MOVE_ALLOC(trib_new, model%trib) IF (model%has_contact) THEN @@ -5154,7 +5163,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Torsion_Frames(model, ends, ErrStat, ErrMsg, IF (PRESENT(q_check)) RETURN ! a frame turn within one step of the end-frame constants (the wrapped change is unique) model%tors_drive_set = .FALSE. - CALL tw_commit_reference(model) + CALL tw_commit_reference(model, frames_only=.TRUE.) model%torsion%ends = ends model%tors_use_step = .FALSE. CALL assemble_twist(model, model%q, model%v, .TRUE., .FALSE., model%ws_R, model%ws_Kb, model%ws_Kvb, & @@ -10900,6 +10909,8 @@ PURE SUBROUTINE tw_unpack(model, buf) model%tw_psi = buf(9*nn + 2*ne + 1:9*nn + 2*ne + 2) model%tw_om = RESHAPE(buf(9*nn + 2*ne + 3:9*nn + 2*ne + 8), [3, 2]) model%tw_oal = RESHAPE(buf(9*nn + 2*ne + 9:9*nn + 2*ne + 14), [3, 2]) + ! (tw_rq stays: it is a configuration this model evaluated, and a reloaded reference is used + ! there only where its tangents are those of tw_rq, see tw_advance_reference) END SUBROUTINE tw_unpack ELEMENTAL REAL(wp) FUNCTION tw_wrap(x) RESULT(y) @@ -11519,7 +11530,7 @@ SUBROUTINE tw_init(model, mt, ErrStat, ErrMsg) model%tw_we(nn)) ALLOCATE (model%tw_eg(12, ne), model%tw_ehv(12, ne), model%tw_ek(ne), model%tw_ed(ne), model%tw_me(ne)) ALLOCATE (model%tw_K7(3*KB7 + 1, 7*nn), model%tw_x7(7*nn), model%tw_ipiv(7*nn)) - ALLOCATE (model%tw_su(3, nn), model%tw_stn(3, nn), model%tw_sbeta(ne)) + ALLOCATE (model%tw_su(3, nn), model%tw_stn(3, nn), model%tw_sbeta(ne), model%tw_sq(6*nn), model%tw_rq(6*nn)) ALLOCATE (model%ws_recovery_tw(tw_pack_size(model))) END IF model%tw_pn = CD_ZERO; model%tw_wn = CD_ZERO; model%tw_an = CD_ZERO; model%tw_pk = CD_ZERO @@ -11615,6 +11626,7 @@ SUBROUTINE tw_init(model, mt, ErrStat, ErrMsg) model%tw_w = CD_ZERO model%tw_al = CD_ZERO model%tw_mt = mt + model%tw_rq_ok = .FALSE. model%tw_active = .TRUE. CONTAINS PURE FUNCTION unit_perp(x, ax) RESULT(y) @@ -11675,6 +11687,8 @@ SUBROUTINE tw_release(model) IF (ALLOCATED(model%tw_eg)) DEALLOCATE (model%tw_eg, model%tw_ehv, model%tw_ek, model%tw_ed, model%tw_me) IF (ALLOCATED(model%tw_K7)) DEALLOCATE (model%tw_K7, model%tw_x7, model%tw_ipiv) IF (ALLOCATED(model%tw_su)) DEALLOCATE (model%tw_su, model%tw_stn, model%tw_sbeta) + IF (ALLOCATED(model%tw_sq)) DEALLOCATE (model%tw_sq, model%tw_rq) + model%tw_rq_ok = .FALSE. IF (ALLOCATED(model%ws_recovery_tw)) DEALLOCATE (model%ws_recovery_tw) IF (ALLOCATED(model%snap_tw)) DEALLOCATE (model%snap_tw) IF (ALLOCATED(model%snap_tw_fcR)) DEALLOCATE (model%snap_tw_fcR) @@ -11685,18 +11699,47 @@ SUBROUTINE tw_advance_reference(model, q_new, ends_new, ErrStat, ErrMsg) !! reference twists and end-frame references (the step's own formulas, so the committed !! state reproduces the converged iterate bit for bit), the unit tangents and the directors !! carried over by the smallest rotation (a rigid end's: its end frame's normal carried). + !! + !! An interior element (not at a rigid end) whose 12 DOFs are those of the last committed step + !! (tw_rq) and whose unit node tangents are those of the reference, bit for bit, keeps its + !! reference twist: its transport solid angles are those of the reference terms they are + !! differenced against, so twist_reference returns tw_beta(e) + tw_wrap(0) + 0, which is + !! formed here without the evaluation; and it passed every check of twist_reference (the + !! element's fold and handle checks) at that very shape. A frame-only transfer between steps + !! (CD_HermiteCable_Dyn_Set_Torsion_Frames at the committed shape, where a host writes only + !! the end nodes) so evaluates only the elements at a rigid end or at a node the host moved; + !! the commit of a step evaluates every element that moved. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: q_new(:), ends_new(3, 4) INTEGER, INTENT(OUT) :: ErrStat CHARACTER(*), INTENT(OUT) :: ErrMsg INTEGER :: e, i, iend - REAL(wp) :: rho, beta, g(12), h(12, 12), psi, gl(3), hl(3, 3), u(3), t(3) + REAL(wp) :: rho, beta, g(12), h(12, 12), psi, gl(3), hl(3, 3), u(3), t(3), rn + LOGICAL :: kept_prev, kept_i ErrStat = CD_HCDYN_OK ErrMsg = '' + ! the unit tangents at q_new first: an element whose two tangents are the reference's keeps + ! its reference twist + ! (a zero handle keeps a zero tangent here, so its elements are evaluated and report it) + DO i = 1, model%nn + rn = NORM2(q_new(6*i - 2:6*i)) + model%tw_stn(:, i) = CD_ZERO + IF (rn > CD_ZERO) model%tw_stn(:, i) = q_new(6*i - 2:6*i)/rn + END DO + model%tw_sq = q_new + kept_prev = .FALSE. DO e = 1, model%ne - CALL twist_reference(model, e, q_new, ends_new, .FALSE., rho, beta, g, h, ErrStat, ErrMsg) - IF (ErrStat /= CD_HCDYN_OK) RETURN - model%tw_sbeta(e) = beta + kept_i = node_kept(e + 1) + IF (e == 1) kept_prev = node_kept(1) + IF (kept_prev .AND. kept_i .AND. .NOT. ((e == 1 .AND. model%tw_rigid(1)) .OR. & + (e == model%ne .AND. model%tw_rigid(2)))) THEN + model%tw_sbeta(e) = model%tw_beta(e) + tw_wrap(CD_ZERO) + CD_ZERO + ELSE + CALL twist_reference(model, e, q_new, ends_new, .FALSE., rho, beta, g, h, ErrStat, ErrMsg) + IF (ErrStat /= CD_HCDYN_OK) RETURN + model%tw_sbeta(e) = beta + END IF + kept_prev = kept_i END DO model%tw_spsi = model%tw_psi DO iend = 1, 2 @@ -11706,8 +11749,7 @@ SUBROUTINE tw_advance_reference(model, q_new, ends_new, ErrStat, ErrMsg) model%tw_spsi(iend) = psi END DO DO i = 1, model%nn - t = q_new(6*i - 2:6*i)/NORM2(q_new(6*i - 2:6*i)) - model%tw_stn(:, i) = t + t = model%tw_stn(:, i) IF (i == 1 .AND. model%tw_rigid(1)) THEN u = CD_HermiteTwist_Carry(ends_new(:, 1), t, ends_new(:, 2)) ELSE IF (i == model%nn .AND. model%tw_rigid(2)) THEN @@ -11718,6 +11760,22 @@ SUBROUTINE tw_advance_reference(model, q_new, ends_new, ErrStat, ErrMsg) u = u - DOT_PRODUCT(u, t)*t model%tw_su(:, i) = u/NORM2(u) END DO + CONTAINS + LOGICAL FUNCTION node_kept(k) RESULT(kept) + !! Node k's six DOFs are those of the committed reference configuration and its unit + !! tangent the reference tangent, bit for bit. + INTEGER, INTENT(IN) :: k + INTEGER :: jj + kept = model%tw_rq_ok + DO jj = 6*k - 5, 6*k + IF (.NOT. kept) RETURN + kept = bits_equal(q_new(jj), model%tw_rq(jj)) + END DO + DO jj = 1, 3 + IF (.NOT. kept) RETURN + kept = bits_equal(model%tw_stn(jj, k), model%tw_tn(jj, k)) + END DO + END FUNCTION node_kept END SUBROUTINE tw_advance_reference SUBROUTINE tw_frame_rates(model, dt) @@ -11739,12 +11797,22 @@ SUBROUTINE tw_frame_rates(model, dt) END DO END SUBROUTINE tw_frame_rates - SUBROUTINE tw_commit_reference(model) - !! Make the reference state of tw_advance_reference the committed one. + SUBROUTINE tw_commit_reference(model, frames_only) + !! Make the reference state of tw_advance_reference the committed one. After a step it also + !! records the step's configuration as tw_rq; a frame-only transfer (frames_only) keeps the + !! tw_rq of the last step, as it moves no element DOF but the end nodes'. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model + LOGICAL, INTENT(IN), OPTIONAL :: frames_only + LOGICAL :: record + record = .TRUE. + IF (PRESENT(frames_only)) record = .NOT. frames_only model%tw_beta = model%tw_sbeta model%tw_psi = model%tw_spsi model%tw_tn = model%tw_stn + IF (record) THEN + model%tw_rq = model%tw_sq + model%tw_rq_ok = .TRUE. + END IF model%tw_u = model%tw_su END SUBROUTINE tw_commit_reference diff --git a/src/CableDyn_HermiteTorsion.f90 b/src/CableDyn_HermiteTorsion.f90 index 752b5586..8929f748 100644 --- a/src/CableDyn_HermiteTorsion.f90 +++ b/src/CableDyn_HermiteTorsion.f90 @@ -1396,7 +1396,7 @@ PURE SUBROUTINE CD_HermiteTwist_Reference(qe, L, tri, tslot, tsign, value, grad, LOGICAL, INTENT(IN), OPTIONAL :: holonomy INTEGER, INTENT(IN), OPTIONAL :: quadrature_order INTEGER :: order, k, j, i, ntri, si, sj - LOGICAL :: want_hess, with_h, need(2), finite + LOGICAL :: want_hess, with_h, need(2), finite, free(3) REAL(wp) :: node_t(3, 2), proj(3, 3, 2), x(3, 3), om, g9(9), h9(9, 9), gt(3, 2), htt(3, 3, 2, 2) REAL(wp) :: he, ge(12), hk(12, 12), dmy, blk(3, 3), blk2(3, 3) CHARACTER(200) :: em @@ -1433,13 +1433,8 @@ PURE SUBROUTINE CD_HermiteTwist_Reference(qe, L, tri, tslot, tsign, value, grad, END IF need(1) = ANY(tslot == 1) .OR. with_h need(2) = ANY(tslot == 2) .OR. with_h - ! (column by column: a reshaped copy of the assumed-shape tri would be a heap temporary) - finite = CD_All_Finite(qe) .AND. CD_Is_Finite(L) .AND. CD_All_Finite(tsign) - DO k = 1, ntri - DO j = 1, 3 - finite = finite .AND. CD_All_Finite(tri(:, j, k)) - END DO - END DO + ! (the rank-3 test reads tri in place: a reshaped copy would be a heap temporary) + finite = CD_All_Finite(qe) .AND. CD_Is_Finite(L) .AND. CD_All_Finite(tsign) .AND. CD_All_Finite(tri) IF (.NOT. finite) THEN ErrStat = CD_HTORS_NONFINITE ErrMsg = 'CD_HermiteTwist_Reference: non-finite input' @@ -1488,7 +1483,11 @@ PURE SUBROUTINE CD_HermiteTwist_Reference(qe, L, tri, tslot, tsign, value, grad, RETURN END IF END DO - CALL solid_angle(x(:, 1), x(:, 2), x(:, 3), want_hess, om, g9, h9) + ! (a local mask: the expression tslot(:, k) /= 0 as the argument is a heap temporary) + DO j = 1, 3 + free(j) = tslot(j, k) /= 0 + END DO + CALL solid_angle(x(:, 1), x(:, 2), x(:, 3), want_hess, om, g9, h9, free=free) value = value + tsign(k)*om DO j = 1, 3 si = tslot(j, k) @@ -1544,11 +1543,7 @@ PURE SUBROUTINE CD_HermiteTwist_Reference(qe, L, tri, tslot, tsign, value, grad, RETURN END IF IF (want_hess) THEN - finite = .TRUE. - DO j = 1, 12 - finite = finite .AND. CD_All_Finite(hess(:, j)) - END DO - IF (.NOT. finite) THEN + IF (.NOT. CD_All_Finite(hess)) THEN ErrStat = CD_HTORS_NONFINITE ErrMsg = 'CD_HermiteTwist_Reference: non-finite twist Hessian' value = CD_ZERO @@ -1727,8 +1722,14 @@ PURE SUBROUTINE element_holonomy(qe, L, order, want_hess, h, grad, hess, margin, margin = HUGE(CD_ONE) CALL CD_HermiteCable_Gauss_Rule(order, gp, gw) DO ig = 1, order + ! (element_ab, on the shape derivatives at hand) CALL shape_derivatives(L, gp(ig), dh, ddh) - CALL element_ab(qe, L, gp(ig), a, b) + a = CD_ZERO + b = CD_ZERO + DO i = 1, 4 + a = a + dh(i)*qe(3*i - 2:3*i) + b = b + ddh(i)*qe(3*i - 2:3*i) + END DO s2 = DOT_PRODUCT(a, a) sp = SQRT(s2) IF (sp <= GEOM_TOL) THEN @@ -1771,7 +1772,12 @@ PURE SUBROUTINE element_holonomy(qe, L, order, want_hess, h, grad, hess, margin, hd(1:3, 1:3) = 2.0_wp*eye + ta*(eye/sp - outer(a, a)/(sp*s2)) + (outer(a, t) + outer(t, a))/sp hd(1:3, 7:9) = outer(a, a)/sp + sp*eye hd(7:9, 1:3) = TRANSPOSE(hd(1:3, 7:9)) - hf = (hn - f*hd - outer9(gf, gd) - outer9(gd, gf))/den + ! (the blocks read below: rows 7:9 only against columns 7:9) + DO j = 1, 9 + DO i = 1, MERGE(9, 6, j > 6) + hf(i, j) = (hn(i, j) - f*hd(i, j) - gf(i)*gd(j) - gd(i)*gf(j))/den + END DO + END DO DO j = 1, 4 DO i = 1, 4 blk = dh(i)*dh(j)*hf(1:3, 1:3) + dh(i)*ddh(j)*hf(1:3, 4:6) + ddh(i)*dh(j)*hf(4:6, 1:3) & @@ -1871,14 +1877,18 @@ PURE FUNCTION smallest_rotation(a, b, v) RESULT(r) r = c*v + cross(w, v) + w*DOT_PRODUCT(w, v)/(CD_ONE + c) END FUNCTION smallest_rotation - PURE SUBROUTINE solid_angle(x, y, z, want_hess, om, g, h) + PURE SUBROUTINE solid_angle(x, y, z, want_hess, om, g, h, free) !! Omega = 2 atan2(N, D), N = x.(y x z), D = 1 + x.y + y.z + z.x (signed solid angle of the !! geodesic triangle x, y, z), with gradient g and Hessian h in the raw vectors (x, y, z). - !! Under the fold guard every triangle used here has D >= 1.5. + !! Under the fold guard every triangle used here has D >= 1.5. With free, only the Hessian + !! blocks between two free vertices (free(j): vertex j is a variable of the caller) are + !! formed, each entry as the full Hessian forms it; the others are zero. REAL(wp), INTENT(IN) :: x(3), y(3), z(3) LOGICAL, INTENT(IN) :: want_hess REAL(wp), INTENT(OUT) :: om, g(9), h(9, 9) - REAL(wp) :: nv, dv, r2, gn(9), gd(9), eye(3, 3) + LOGICAL, INTENT(IN), OPTIONAL :: free(3) + REAL(wp) :: nv, dv, r2, gn(9), gd(9), eye(3, 3), h0(3, 3), c1, c2, s(3, 3) + INTEGER :: bi, bj, i, j, ii, jj nv = DOT_PRODUCT(x, cross(y, z)) dv = CD_ONE + DOT_PRODUCT(x, y) + DOT_PRODUCT(y, z) + DOT_PRODUCT(z, x) @@ -1894,6 +1904,42 @@ PURE SUBROUTINE solid_angle(x, y, z, want_hess, om, g, h) h = CD_ZERO IF (.NOT. want_hess) RETURN eye = identity3() + IF (PRESENT(free)) THEN + c1 = nv*nv - dv*dv + c2 = 2.0_wp*dv*nv + DO bj = 1, 3 + IF (.NOT. free(bj)) CYCLE + DO bi = 1, 3 + IF (.NOT. free(bi)) CYCLE + ! the block (bi, bj) of d2N and d2D before the scaling below + IF (bi == bj) THEN + h0 = CD_ZERO + ELSE + IF (bi + bj == 3) THEN + s = skew(z) + ELSE IF (bi + bj == 5) THEN + s = skew(x) + ELSE + s = skew(y) + END IF + IF (bj == MOD(bi, 3) + 1) THEN + h0 = -dv*s - nv*eye + ELSE + h0 = dv*s - nv*eye + END IF + END IF + DO j = 1, 3 + jj = 3*(bj - 1) + j + DO i = 1, 3 + ii = 3*(bi - 1) + i + h(ii, jj) = 2.0_wp*(h0(i, j)/r2 + (c1*(gn(ii)*gd(jj) + gd(ii)*gn(jj)) & + - c2*(gn(ii)*gn(jj) - gd(ii)*gd(jj)))/(r2*r2)) + END DO + END DO + END DO + END DO + RETURN + END IF ! d2N: (x,y) = -S(z), (y,z) = -S(x), (z,x) = -S(y); d2D: identity off-diagonal blocks h(1:3, 4:6) = -dv*skew(z) - nv*eye h(4:6, 1:3) = dv*skew(z) - nv*eye @@ -1959,28 +2005,52 @@ PURE FUNCTION cross(a, b) RESULT(c) c = [a(2)*b(3) - a(3)*b(2), a(3)*b(1) - a(1)*b(3), a(1)*b(2) - a(2)*b(1)] END FUNCTION cross + ! (element by element: the RESHAPE and SPREAD forms of these are run-time library calls on the + ! torsion kernels' hot path; the entries are the same products) + PURE FUNCTION skew(v) RESULT(s) !! S(v) w = v x w. REAL(wp), INTENT(IN) :: v(3) REAL(wp) :: s(3, 3) - s = RESHAPE([CD_ZERO, v(3), -v(2), -v(3), CD_ZERO, v(1), v(2), -v(1), CD_ZERO], [3, 3]) + s(1, 1) = CD_ZERO + s(2, 1) = v(3) + s(3, 1) = -v(2) + s(1, 2) = -v(3) + s(2, 2) = CD_ZERO + s(3, 2) = v(1) + s(1, 3) = v(2) + s(2, 3) = -v(1) + s(3, 3) = CD_ZERO END FUNCTION skew PURE FUNCTION outer(a, b) RESULT(m) REAL(wp), INTENT(IN) :: a(3), b(3) REAL(wp) :: m(3, 3) - m = SPREAD(a, 2, 3)*SPREAD(b, 1, 3) + INTEGER :: i, j + DO j = 1, 3 + DO i = 1, 3 + m(i, j) = a(i)*b(j) + END DO + END DO END FUNCTION outer PURE FUNCTION outer9(a, b) RESULT(m) REAL(wp), INTENT(IN) :: a(9), b(9) REAL(wp) :: m(9, 9) - m = SPREAD(a, 2, 9)*SPREAD(b, 1, 9) + INTEGER :: i, j + DO j = 1, 9 + DO i = 1, 9 + m(i, j) = a(i)*b(j) + END DO + END DO END FUNCTION outer9 PURE FUNCTION identity3() RESULT(m) REAL(wp) :: m(3, 3) - m = RESHAPE([CD_ONE, CD_ZERO, CD_ZERO, CD_ZERO, CD_ONE, CD_ZERO, CD_ZERO, CD_ZERO, CD_ONE], [3, 3]) + m = CD_ZERO + m(1, 1) = CD_ONE + m(2, 2) = CD_ONE + m(3, 3) = CD_ONE END FUNCTION identity3 END MODULE CableDyn_HermiteTorsion diff --git a/tests/test_nodal_twist_dynamic.f90 b/tests/test_nodal_twist_dynamic.f90 index 0a6bcf08..c447791e 100644 --- a/tests/test_nodal_twist_dynamic.f90 +++ b/tests/test_nodal_twist_dynamic.f90 @@ -28,7 +28,12 @@ PROGRAM test_nodal_twist_dynamic !! carries at most 4e-6 of the peak kinetic energy with an extreme Irn = 1 kg m (6e-8 at !! 0.02 kg m), below the step's own energy band; !! R restart: a rolling, torsionally damped run restored from a snapshot, and one rebuilt - !! from the checkpoint mirror, continue bit-identically. + !! from the checkpoint mirror, continue bit-identically; + !! F a coupled write that folds the end element (the coupled end, elastic in torsion and + !! pinned in bending, translated past its neighbour with its tangent unchanged) is refused + !! before anything is written, after a march and after a frame-only transfer (whose + !! re-basing keeps the elements at the committed shape); a length change drops the + !! configuration the shortcut of the re-basing keeps elements at, and the next step records it. USE CableDyn_Precision, ONLY: wp USE CableDyn_EndConnection, ONLY: CD_ENDCONN_RIGID USE CableDyn_HermiteTorsion, ONLY: CD_HermiteTorsionType, CD_HermiteTorsion_Line, CD_HermiteTorsion_Unwrap, & @@ -37,11 +42,13 @@ PROGRAM test_nodal_twist_dynamic CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Energy, & CD_HermiteCable_Dyn_End, CD_HermiteCable_Dyn_Set_EndConnection, & CD_HermiteCable_Dyn_Set_Torsion, CD_HermiteCable_Dyn_Torsion_State, & - CD_HermiteCable_Dyn_Node_Torque, CD_HCDYN_OK + CD_HermiteCable_Dyn_Node_Torque, CD_HermiteCable_Dyn_Set_SegmentLength, & + CD_HCDYN_OK USE CableDyn_OpenFAST_HermiteFMF, ONLY: CD_HFMF_ModuleType, CD_HFMF_Init, CD_HFMF_Set_EndConnection, & CD_HFMF_Set_Torsion, CD_HFMF_UpdateStates, CD_HFMF_CalcOutput, & CD_HFMF_Snapshot, CD_HFMF_Restore, CD_HFMF_MirrorSize, & - CD_HFMF_PackMirror, CD_HFMF_UnpackMirror, CD_HFMF_End, CD_HFMF_OK + CD_HFMF_PackMirror, CD_HFMF_UnpackMirror, CD_HFMF_End, CD_HFMF_OK, & + CD_HFMF_SetCoupledKinematics IMPLICIT NONE REAL(wp), PARAMETER :: PI = 3.14159265358979323846_wp @@ -61,6 +68,7 @@ PROGRAM test_nodal_twist_dynamic CALL check_frame_energy() CALL check_pinned_energy() CALL check_restart() + CALL check_fold_refused() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' @@ -266,6 +274,58 @@ SUBROUTINE check_quasi_static(label, pinned, compliance) CALL CD_HFMF_End(cn) END SUBROUTINE check_quasi_static + ! ------------------------------------------------------------------------------------------ + SUBROUTINE check_fold_refused() + !! F: march a bending-pinned line, elastic in torsion, then write the coupled end 0.8 m back + !! along the line, past its neighbour 0.5 m away, with the end tangent unchanged: the end + !! element folds, and the write is refused with the state untouched. The same after a + !! frame-only transfer of the march's last pose. + TYPE(CD_HFMF_ModuleType), ALLOCATABLE :: cab + REAL(wp) :: q(NDOF), x(3), v(3), a(3), dcm(3, 3), w(3), al(3), phi + REAL(wp), ALLOCATABLE :: q0(:), u0(:, :), b0(:) + INTEGER :: es, pass + LOGICAL :: ok + CHARACTER(300) :: em + ALLOCATE (cab) + CALL line_seed(0.0_wp, 0.0_wp, q) + CALL build_cable(cab, q, 1.0_wp, 0.01_wp, 1.0e-10_wp, 0.8_wp, .TRUE., 1.0e-9_wp, 0.05_wp) + CALL require(cab%line%tw_active, 'F: the nodal twist is active') + CALL march(cab, 0, 20, ok) + CALL require(ok, 'F: the march steps') + IF (.NOT. ok) RETURN + DO pass = 1, 2 + CALL drive(20, x, v, a, dcm, w, al, phi) + IF (pass == 2) THEN + ! a frame-only transfer of the committed pose first: it re-bases the reference + x = cab%line%q(NDOF - 5:NDOF - 3) + CALL CD_HFMF_SetCoupledKinematics(cab, x, v, a, es, em, u_orientation=dcm, & + u_angular_velocity=w, u_angular_acceleration=al) + CALL require(es == CD_HFMF_OK, 'F: a frame-only transfer of the committed pose: '//TRIM(em)) + END IF + q0 = cab%line%q + u0 = cab%line%tw_u + b0 = cab%line%tw_beta + ! (the coupled node's committed position, node NN; the cable frame is the global one) + x = cab%line%q(NDOF - 5:NDOF - 3) - [0.8_wp, 0.0_wp, 0.0_wp] + CALL CD_HFMF_SetCoupledKinematics(cab, x, v, a, es, em, u_orientation=dcm, u_angular_velocity=w, & + u_angular_acceleration=al) + WRITE (*, '(A,I0,A)') 'F fold through the coupled end (pass ', pass, '): '//TRIM(em) + CALL require(es /= CD_HFMF_OK, 'F: a write that folds the end element is refused') + CALL require(nan_max_abs(cab%line%q - q0) <= 0.0_wp .AND. nan_max_abs(cab%line%tw_beta - b0) <= 0.0_wp & + .AND. nan_max_abs(RESHAPE(cab%line%tw_u - u0, [3*NN])) <= 0.0_wp, & + 'F: the refused write leaves the line and its twist reference unchanged') + END DO + ! a length change: the element shapes are no longer those the checks passed at, so the + ! recorded configuration is dropped (every element is evaluated) until the next step + CALL require(cab%line%tw_rq_ok, 'F: a committed step records its configuration') + CALL CD_HermiteCable_Dyn_Set_SegmentLength(cab%line, [NE/2], [0.55_wp], [0.0_wp], es, em) + CALL require(es == CD_HCDYN_OK .AND. .NOT. cab%line%tw_rq_ok, & + 'F: a length change drops the recorded configuration: '//TRIM(em)) + CALL march(cab, 20, 21, ok) + CALL require(ok .AND. cab%line%tw_rq_ok, 'F: the next step records it again') + CALL CD_HFMF_End(cab) + END SUBROUTINE check_fold_refused + ! ------------------------------------------------------------------------------------------ SUBROUTINE check_waves() !! W: a roll A sin(Omega t) of the coupled end (amplitude ramped in over the first eight From 3e5638d2e40e2c5a4832ecdd026a1a9cd397974b Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 20 Nov 2026 17:07:43 +0900 Subject: [PATCH 45/47] feat: VIV FRAME method cycle, a lag-free frame velocity (#188) The VIV FRAME section takes an optional third column, rows TypeName Tf [Method]: filter (the default, the first-order filter as before) or cycle. With cycle the frame velocity of a synchronisation type is the mean of the node velocity over the window Tf plus half its change over it, vbar(t) = (1/Tf) int_{t-Tf}^{t} v dt' + (v(t) - v(t-Tf))/2, which drops a component of period Tf and its harmonics (the cross-flow VIV and the in-line VIV at twice its frequency) and passes the slow motion of a towed or floater-driven cable without the filter's lag; Tf is then one period of the response. The filter's lag leaves the frame faster than the cable on a decelerating motion and slower on an accelerating one. The kernel (CD_VIV_Cycle_Init, CD_VIV_Cycle_Update, CD_VIV_Cycle_Valid) samples the velocity's integral every Tf/64, exactly for the velocity linear over a step, in a ring of 66 samples held relative to the integral at the committed time; I(t - Tf) and v(t - Tf) come from the quadratic through the three samples around t - Tf. Its state, 2 + 3 x 66 rows per node, sits in the motion statistics after the frame rows on EI = 0 lines and finite-EI cables, so step recovery, snapshots and checkpoints carry it, and a restored state with a sample time off [0, 1] or a slot off the ring fails closed. A line takes one method; rows without the column are unchanged to the bit. Tests: viv_cycle_frame (a period-Tf component and its second harmonic drop out within 0.25 %, a ramp passes to round-off, a quadratic gives the T^2/12 error, long steps); hermite_viv_frame F5 (moving and fixed pipe agree, the frame follows the imposed velocity within 0.17 % against 1.7 % for the filter, snapshot replay bit for bit); hfmf_mirror (6) checkpoint round-trip and an invalid slot failing closed; viv_coupled (checkpoint restart and rewind with the ring on both line kinds); viv_frame_deck G5-G7 (Method filter is the row without it to the bit, Method cycle towed and held, refusals); viv_wake_deck W7 (the four-column row, an unknown Method and Method cycle on a wake-oscillator type refused by name). The Python deck checker and builder follow (viv_frame_method). Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 12 ++ CMakeLists.txt | 7 ++ doc/capabilities.rst | 3 +- doc/driver_format.md | 26 ++-- doc/theory.rst | 37 ++++++ python/cabledyn/builder.py | 28 ++++- python/cabledyn/deck_file.py | 55 +++++++-- python/tests/test_deck_file.py | 25 +++- src/CableDyn_DeckDriver.f90 | 85 +++++++++++-- src/CableDyn_HermiteCableDynamic.f90 | 52 +++++++- src/CableDyn_Model.f90 | 58 ++++++++- src/CableDyn_OpenFAST_HermiteFMF.f90 | 5 + src/CableDyn_VIV.f90 | 103 ++++++++++++++++ tests/test_hermite_viv_frame.f90 | 74 ++++++++++- tests/test_hfmf_mirror.f90 | 45 ++++++- tests/test_viv_coupled.f90 | 28 ++++- tests/test_viv_cycle_frame.f90 | 177 +++++++++++++++++++++++++++ tests/test_viv_frame_deck.f90 | 100 ++++++++++++++- tests/test_viv_wake_deck.f90 | 13 +- 19 files changed, 872 insertions(+), 61 deletions(-) create mode 100644 tests/test_viv_cycle_frame.f90 diff --git a/CHANGELOG.md b/CHANGELOG.md index 617e8ce5..83cfa54b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,18 @@ All notable changes to CableDyn are recorded in this file. The format follows ### Added +- `VIV FRAME` method `cycle`: an optional third column, rows `TypeName Tf [Method]`, `filter` (the + default) or `cycle`. With `cycle` the frame velocity of a synchronisation type is the mean of the + node velocity over the window `Tf` plus half its change over it, which drops a component of + period `Tf` and its harmonics (the cross-flow VIV and the in-line VIV at twice its frequency) and + passes the slow motion of a towed or floater-driven cable without the first-order filter's lag; + `Tf` is then one period of the response. The filter's lag leaves the frame faster than the cable + on a decelerating motion and slower on an accelerating one; on the moving pipe of the frame gate + the cycle mean follows the imposed velocity within 0.17 % of its amplitude, the filter within + 1.7 %. A ring of 66 samples per node is the new state (step recovery, snapshots, checkpoints; an + invalid restored state fails closed). `EI = 0` lines and finite-EI cables, standalone and + coupled; one method per line; rows without the column are unchanged to the bit. + - `OPTIONS CDOutDt` (alias `cd_out_dt`): the interval of the coupled `.CD.out` rows (OpenFAST and FAST.Farm), a whole multiple of the CableDyn step; `0`, the default, keeps a row after every committed step. A row re-evaluates and writes every deck channel, so on a cable with many diff --git a/CMakeLists.txt b/CMakeLists.txt index 9865b3f8..cf31a56c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1324,6 +1324,13 @@ target_link_libraries(test_viv_kernels PRIVATE cabledyn_core) add_test(NAME viv_kernels COMMAND test_viv_kernels) set_tests_properties(viv_kernels PROPERTIES LABELS "fortran;unit;dynamic;viv") +# The cycle-mean flow frame kernel (VIV FRAME method cycle): a component of period T and its second +# harmonic drop out, a ramp passes without lag, a quadratic gives the second-order error. +add_executable(test_viv_cycle_frame tests/test_viv_cycle_frame.f90) +target_link_libraries(test_viv_cycle_frame PRIVATE cabledyn_core) +add_test(NAME viv_cycle_frame COMMAND test_viv_cycle_frame) +set_tests_properties(viv_cycle_frame PROPERTIES LABELS "fortran;unit;dynamic;viv") + # Time-step convergence of a locked-in VIV response (the line and the synchronisation model or the # wake oscillator coupled): second order in the step at rho_inf 1 and 0.4 on an EI = 0 line, and # on a finite-EI cable; the lock-in does not move with the numerical damping. diff --git a/doc/capabilities.rst b/doc/capabilities.rst index e5b74585..69277c22 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -157,7 +157,8 @@ Line and constitutive capability host's fluid field on the coupled routes and its state in the checkpoint; a ``VIV FRAME`` row (``Tf``) takes the cable's filtered motion as the frame of its phases, amplitude estimate and cross-flow damping (a towed or floater-driven cable, - :ref:`theory-viv-frame`) + :ref:`theory-viv-frame`), by a first-order filter or (method ``cycle``) the lag-free mean + over one response period * - Stochastic VIV band centre (``VIV STOCHASTIC`` section ``sigma``, ``c``, ``Nf``, ``seed``) - Standalone and coupled - the slowly varying random synchronisation centre of Ulveseter et al. (2017) on ``EI = 0`` diff --git a/doc/driver_format.md b/doc/driver_format.md index 9dec5de5..c7131b8b 100644 --- a/doc/driver_format.md +++ b/doc/driver_format.md @@ -1382,15 +1382,16 @@ filter time `Tf` the frame moves with the cable's own slow motion (see ```text --------------------- VIV FRAME ---------------------------------------- -TypeName Tf -(-) (s) -cable 10 +TypeName Tf Method +(-) (s) (-) +cable 10 filter ``` | Column | Meaning | |--------|---------| | `TypeName` | an existing LINE TYPES name (case-insensitive) with LINE TYPES `Cl > 0` or a WAKE OSCILLATOR row, at most one row each | -| `Tf` | filter time >= 0 [s], at most 1e15; `0` is the ambient flow | +| `Tf` | filter time >= 0 [s], at most 1e15; `0` is the ambient flow; with `Method cycle` the window, one period of the VIV response | +| `Method` | optional: `filter` (the default) or `cycle` (synchronisation model only, `Tf > 0`) | Behaviour: @@ -1420,11 +1421,22 @@ Behaviour: in the relative velocity (`omega_m Tf <= 0.1`) needs a motion period at least 30 VIV periods long. For a motion only a few VIV periods long (a floater heave close to the VIV frequency) no `Tf` separates the two, and the response depends on `Tf`: report its sensitivity to `Tf`. +- `Method cycle` takes the frame velocity as the mean over the window `Tf` plus half its change + over it, `(1/Tf) int_{t-Tf}^{t} v dt' + (v(t) - v(t-Tf))/2`: a component of period `Tf` and its + harmonics (the cross-flow VIV and the in-line VIV at twice its frequency) drop out, and the + slow motion passes without the filter's lag, so a decelerating motion does not leave the frame + faster than the cable. Give `Tf` as one period of the response (`1/f`): off the period the VIV + velocity passes into the frame by about `|sin(pi delta)|` for `f Tf = 1 + delta` (a taut cable + responding at 0.29 Hz locks in at A/D 0.79 with `Tf` 3.5 s and at 0.55 with `Tf` 1 s), so it + suits a response at one known frequency. A line takes one method; its ring of 66 samples per node + is part of the step-recovery, snapshot and checkpoint state (see + [Flow frame of the synchronisation model](theory.rst)). - The filtered velocity is part of the step-recovery, snapshot and checkpoint state. A row with `Tf = 0` leaves the run exactly as without it. It acts on `EI = 0` lines and finite-EI cables, - standalone and coupled. A row fails if it is not `TypeName Tf`, names an undefined or already - named type or one without VIV (neither LINE TYPES `Cl > 0` nor a WAKE OSCILLATOR row), or holds - a value out of range. + standalone and coupled. A row fails if it is not `TypeName Tf [Method]`, names an undefined or + already named type or one without VIV (neither LINE TYPES `Cl > 0` nor a WAKE OSCILLATOR row), + holds a value out of range or a `Method` other than `filter` and `cycle`, or takes `cycle` on a + type without `Cl > 0` or with `Tf = 0`; a line whose types mix the two methods fails. ### VIV STOCHASTIC (optional) diff --git a/doc/theory.rst b/doc/theory.rst index 9d74a3a7..8cb0dda2 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -1682,6 +1682,43 @@ estimate, stay 0 without a table), so it is part of the step-recovery, snapshot state; an ``EI = 0`` line filters its smoothed node velocity. :math:`T_f` 0 or no row leaves the run unchanged to the bit. +**Cycle mean** (``VIV FRAME`` method ``cycle``). The first-order filter lags a motion at +:math:`\omega_m` by :math:`\arctan\omega_m T_f`, so on a decelerating motion the frame keeps more +of the earlier, faster velocity than the cable has, and on an accelerating one less, so the frame +speed differs between the two half-cycles at the same flow speed. With the method ``cycle`` the frame velocity is instead the mean over the +window :math:`T = T_f` plus half the change over it, + +.. math:: + + \bar{\mathbf v}(t) = \frac{1}{T}\int_{t-T}^{t}\mathbf v\,dt' + + \tfrac12\left[\mathbf v(t) - \mathbf v(t - T)\right]. + +A component of period :math:`T` and its harmonics drop out of both terms (the cross-flow VIV at +:math:`f = 1/T` and the in-line one at :math:`2f`), and a velocity linear in time passes unchanged, +without lag; a velocity quadratic in time is off by :math:`T^2/12` times its second derivative. +The integral :math:`I = \int\mathbf v\,dt` is sampled every :math:`h = T/64`, exactly for the +velocity linear over a step, in a ring of 66 samples per node held relative to :math:`I` at the +committed time, and :math:`I(t - T)` and :math:`\mathbf v(t - T) = I'(t - T)` come from the +quadratic through the three samples around :math:`t - T`; the sampled harmonics at :math:`f` and +:math:`2f` leave 0.25 % of their amplitude (``viv_cycle_frame``). On the pipe moved through still +water above (``Tf`` 0.6 s against the window 1 s) the frame velocity is off the imposed velocity +by 0.17 % of its amplitude over 5-15 s, against 1.7 % for the filter (``hermite_viv_frame``). The +window must be one period of the response, :math:`T = 1/f`: off the period the VIV velocity +passes into :math:`\bar{\mathbf v}` by about :math:`|\sin(\pi\,\delta)|` for a mismatch +:math:`fT = 1 + \delta`, and the phases and the amplitude estimate lose it (the taut cable of the +deck gate, its response at 0.29 Hz, locks in at A/D 0.79 with :math:`T` 3.5 s and at 0.55 with +:math:`T` 1 s). It therefore suits a response at one known frequency; a response that moves +between modes needs the filter. The method acts on the synchronisation model (not the wake +oscillator), one method per line. The sample time, the ring slot and the ring are +:math:`2 + 3 \times 66` rows of the node's motion statistics after rows 7-9, so they are part of +the step-recovery, snapshot and checkpoint state, and a restart that installs a sample time off +:math:`[0, 1]` or a slot off the ring fails closed. On the L3-O cylinder with the published sets, +the window :math:`T = 1/f_1` = 0.373 s against the filter of the record (:math:`T_f` 0.2 s), the +mean gap between the decelerating and accelerating paths becomes 0.413 / 0.599 for uls19 at +:math:`U_{R,max}` 6.5 / 7.9 (0.426 / 0.498 with the filter; measured 0.089 / 0.123) and +0.320 / 0.267 for b1 (0.364 / 0.380): the method removes the filter's lag from the frame, not the +deceleration hold of these sets. + .. _theory-viv-stochastic: Stochastic band centre diff --git a/python/cabledyn/builder.py b/python/cabledyn/builder.py index 19961304..5b80ab2e 100644 --- a/python/cabledyn/builder.py +++ b/python/cabledyn/builder.py @@ -240,6 +240,11 @@ class LineType: the phases, the amplitude estimate (and so the ``viv_amplitude`` coefficients) and the ``viv_damping`` split, so it needs ``cl > 0`` or ``wake_cl0``. ``None`` writes no row. + viv_frame_method : str | None + Optional method of the ``VIV FRAME`` row, its third column: ``"filter"`` (the + first-order filter, as without the column) or ``"cycle"`` (the lag-free mean over the + window ``viv_frame_tf``, one period of the response; synchronisation model only, + ``viv_frame_tf > 0``). ``None`` writes the two-column row. viv_stochastic : tuple[float, ...] | None Optional stochastic band centre of a type's synchronisation model, a ``VIV STOCHASTIC`` section row ``Name sigma c [Nf [seed]]`` as @@ -297,6 +302,7 @@ class LineType: viv_frame_tf: float | None = None viv_damping: tuple[float, ...] | None = None viv_stochastic: tuple[float, ...] | None = None + viv_frame_method: str | None = None @dataclass(eq=False) @@ -1725,6 +1731,7 @@ def add_line_type( viv_frame_tf: float | None = None, viv_damping: tuple[float, ...] | None = None, viv_stochastic: tuple[float, ...] | None = None, + viv_frame_method: str | None = None, ) -> LineType: """Add a ``LINE TYPES`` row; see :class:`LineType` for the fields. @@ -1770,6 +1777,7 @@ def add_line_type( viv_frame_tf, None if viv_damping is None else tuple(viv_damping), None if viv_stochastic is None else tuple(viv_stochastic), + viv_frame_method, ) self._line_types.append(item) return item @@ -3117,15 +3125,31 @@ def _viv_diam_table(self) -> tuple[str, str, list[list[str]]]: def _viv_frame_table(self) -> tuple[str, str, list[list[str]]]: rows: list[list[str]] = [] + with_method = any( + item.viv_frame_tf is not None and item.viv_frame_method is not None + for item in self._line_types + ) for item in self._line_types: if item.viv_frame_tf is None: + if item.viv_frame_method is not None: + raise ValueError( + f"line type {item.name!r}: viv_frame_method needs viv_frame_tf" + ) continue what = f"line type {item.name!r}" if item.wake_cl0 is None and not (item.cl is not None and item.cl > 0.0): raise ValueError( f"{what}: viv_frame_tf sets the frame of its VIV model, set cl > 0 or wake_cl0" ) - rows.append([_text(item.name, what), _num(item.viv_frame_tf, what)]) + row = [_text(item.name, what), _num(item.viv_frame_tf, what)] + if with_method: + method = (item.viv_frame_method or "filter").lower() + if method not in ("filter", "cycle"): + raise ValueError(f"{what}: viv_frame_method must be 'filter' or 'cycle'") + row.append(method) + rows.append(row) + if with_method: + return "Name Tf Method", "(-) (s) (-)", rows return "Name Tf", "(-) (s)", rows def _viv_sto_table(self) -> tuple[str, str, list[list[str]]]: @@ -3373,6 +3397,8 @@ def load(self) -> None: for row in self.rows("VIV FRAME"): t = row.tokens model.line_types[t[0]].viv_frame_tf = _f(t[1]) + if len(t) > 2: + model.line_types[t[0]].viv_frame_method = t[2].lower() for row in self.rows("VIV STOCHASTIC"): t = row.tokens model.line_types[t[0]].viv_stochastic = tuple(_f(v) for v in t[1:]) diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index 3496702e..14be1592 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -3393,22 +3393,40 @@ def _check_viv_diam_section(self, viv_type_names: set[str]) -> None: "VIV: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row" ) - def _check_viv_frame_section(self, frame_type_names: set[str]) -> None: - """Native ``apply_type_viv_frame`` for the VIV FRAME section. + def _check_viv_frame_section( + self, + frame_type_names: set[str], + lift_type_names: set[str] | None = None, + section_types_by_line: dict[str, list[str]] | None = None, + ) -> None: + """Native ``apply_type_viv_frame`` and ``deck_line_frame_cycle`` for the VIV FRAME section. - A row ``TypeName Tf`` sets the flow frame of a line type's VIV model: with the filter + A row ``TypeName Tf [Method]`` sets the flow frame of a line type's VIV model: with the time ``Tf > 0`` [s] the free stream is the ambient flow relative to the cable's velocity - low-pass filtered over ``Tf`` (0: the ambient flow), at most 1e15. It sets the wake - oscillator's frequency, or on the synchronisation model the motion of the phases, the - amplitude estimate and the VIV DAMPING split, so the type needs LINE TYPES ``Cl > 0`` or - a WAKE OSCILLATOR row with ``CL0 > 0`` (``frame_type_names``); a type takes one row. + low-pass filtered over ``Tf`` (``Method filter``, the default) or its lag-free mean over + the window ``Tf`` (``Method cycle``, synchronisation types only, ``Tf > 0``); 0 is the + ambient flow, at most 1e15. It sets the wake oscillator's frequency, or on the + synchronisation model the motion of the phases, the amplitude estimate and the VIV + DAMPING split, so the type needs LINE TYPES ``Cl > 0`` (``lift_type_names``) or a WAKE + OSCILLATOR row with ``CL0 > 0`` (``frame_type_names``); a type takes one row, and a line + whose framed lift types mix the two methods fails. """ types = {row.tokens[0].lower(): row.tokens[0] for row in self.line_types} named: set[str] = set() + cycle_types: set[str] = set() + filter_types: set[str] = set() for row in self._rows("VIV FRAME"): where = self._at(row) - if len(row.tokens) != 2: - raise DeckFormatError(f"{where}: VIV FRAME rows must be: TypeName Tf") + if len(row.tokens) not in (2, 3): + raise DeckFormatError(f"{where}: VIV FRAME rows must be: TypeName Tf [Method]") + cyc = False + if len(row.tokens) == 3: + method = row.tokens[2].lower() + if method not in ("filter", "cycle"): + raise DeckFormatError( + f'{where}: VIV FRAME Method must be filter or cycle, got "{row.tokens[2]}"' + ) + cyc = method == "cycle" name = row.tokens[0].lower() if name not in types: raise DeckFormatError( @@ -3431,6 +3449,21 @@ def _check_viv_frame_section(self, frame_type_names: set[str]) -> None: f'{where}: VIV FRAME of LINE TYPE "{types[name]}" sets the flow frame of its ' "VIV model: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row" ) + lifting = lift_type_names is None or name in lift_type_names + if cyc and not (lifting and value > 0.0): + raise DeckFormatError( + f'{where}: VIV FRAME Method cycle of LINE TYPE "{types[name]}" acts on the ' + "synchronisation model (LINE TYPES Cl > 0) with a window Tf > 0" + ) + if lifting and value > 0.0: + (cycle_types if cyc else filter_types).add(name) + for line_id, section_types in (section_types_by_line or {}).items(): + used = {t.lower() for t in section_types} + if used & cycle_types and used & filter_types: + raise DeckFormatError( + f"{self._label}: line {line_id}: its VIV FRAME rows mix the methods filter and " + "cycle; a line takes one method" + ) def _check_viv_sto_section(self, viv_type_names: set[str], wake_type_names: set[str]) -> None: """Native ``apply_type_viv_sto`` for the VIV STOCHASTIC section. @@ -4905,7 +4938,9 @@ def end_key(token: str) -> str: wake_type_names = self._check_wake_section(viv_type_names) amp_type_names = self._check_viv_amp_section(viv_type_names) self._check_viv_diam_section(viv_type_names | wake_type_names) - self._check_viv_frame_section(viv_type_names | wake_type_names) + self._check_viv_frame_section( + viv_type_names | wake_type_names, viv_type_names, section_types_by_line + ) self._check_viv_sto_section(viv_type_names, wake_type_names) damp_type_names = self._check_viv_damp_section(amp_type_names) amp_lines = { diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index 47d6ba20..10493675 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -5012,7 +5012,9 @@ def test_viv_frame_rows_are_read_and_kept(tmp_path): @pytest.mark.parametrize( "wake, rows, message", [ - (True, ("chain 8 1",), "rows must be: TypeName Tf"), + (True, ("chain 8 cycle 1",), "rows must be: TypeName Tf [Method]"), + (True, ("chain 8 1",), 'Method must be filter or cycle, got "1"'), + (True, ("chain 8 cycle",), "acts on the synchronisation model"), (True, ("cable 8",), 'undefined LINE TYPE "cable"'), (True, ("chain 8", "chain 4"), 'names LINE TYPE "chain" twice'), (True, ("chain -1",), "filter time Tf must be >= 0"), @@ -5033,6 +5035,27 @@ def test_viv_frame_rows_follow_the_native_checks(wake, rows, message): ) +def test_viv_frame_method_cycle_is_read_kept_and_checked(tmp_path): + from cabledyn import DeckModel + + lift_only = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) + text = _with_section(lift_only, "VIV FRAME", "TypeName Tf Method", "chain 0.4 cycle") + DeckFile.from_text(text) + path = tmp_path / "cycle.dat" + path.write_text(text, encoding="utf-8") + model = DeckModel.load(path) + assert model.line_types["chain"].viv_frame_tf == 0.4 + assert model.line_types["chain"].viv_frame_method == "cycle" + saved = tmp_path / "saved.dat" + model.save(saved) + again = DeckModel.load(saved) + assert again.line_types["chain"].viv_frame_method == "cycle" + assert again.line_types["chain"].viv_frame_tf == 0.4 + DeckFile.from_text(_with_section(lift_only, "VIV FRAME", "chain 8 filter")) + with pytest.raises(DeckFormatError, match=re.escape("with a window Tf > 0")): + DeckFile.from_text(_with_section(lift_only, "VIV FRAME", "chain 0 cycle")) + + def test_viv_frame_takes_a_synchronisation_type(): # the phases of the lift alone, and with a table its estimate and damping split, take it lift_only = _edit(_DYNAMIC, (_LIFT_ROW, _LIFT_ROW + " 0.8")) diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 15ab5219..7e54eab4 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -471,10 +471,12 @@ MODULE CableDyn_DeckDriver ! has_wake_row marks a type the section names. REAL(wp) :: wo_cl0 = CD_ZERO, wo_st = CD_VIV_WAKE_DEFAULT_ST, wo_eps = CD_VIV_WAKE_DEFAULT_EPS REAL(wp) :: wo_a = CD_VIV_WAKE_DEFAULT_A - ! The VIV frame of a line type (the optional VIV FRAME section, a row per type: TypeName Tf): - ! the filter time Tf [s] of the cable velocity that the VIV model's flow frame moves with - ! (0: the ambient flow); has_vivf_row marks a type the section names. + ! The VIV frame of a line type (the optional VIV FRAME section, a row per type: TypeName Tf + ! [Method]): the time Tf [s] of the cable velocity that the VIV model's flow frame moves with + ! (0: the ambient flow), the first-order filter time or with Method cycle (viv_tfcyc) the + ! window of the cycle mean; has_vivf_row marks a type the section names. REAL(wp) :: viv_tf = CD_ZERO + LOGICAL :: viv_tfcyc = .FALSE. LOGICAL :: has_vivf_row = .FALSE. ! The stochastic band centre of a line type (the optional VIV STOCHASTIC section, a row per type: ! TypeName sigma c [Nf [seed]]; Ulveseter et al. 2017): the standard deviation sigma of the @@ -3774,6 +3776,9 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, ! nodes and tangent (a line the reader turned around, a mesh the static solve refined) BLOCK REAL(wp) :: seed(cable%line%nn) + LOGICAL :: frame_cyc + frame_cyc = deck_line_frame_cycle(ln, sections, types, ErrStat, ErrMsg) + IF (ErrStat /= 0) RETURN IF (ALLOCATED(cable%deck_node)) THEN CALL CD_Deck_VIV_Phase_Seed(cable%line%l0, ln%ends_swapped, seed, deck_map=cable%deck_node, & zero=opts%viv_phase_zero) @@ -3801,7 +3806,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, tangent_reversed=.NOT. ln%ends_swapped, clx=viv_clx, il_alpha=viv_al, & chh=viv_hh, amp=viv_amp3, amp_n=viv_ampn, dviv=viv_dva, & cdy=RESHAPE([cdy_a, cdy_b, cdy_c], [3, SIZE(cdy_a)], ORDER=[2, 1]), & - tf=wo_tf, sto=viv_sto) + tf=wo_tf, sto=viv_sto, tf_cycle=frame_cyc) ELSE CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, viv_cl, viv_cf, viv_df, & MERGE(opts%viv_rms_window, & @@ -3810,7 +3815,7 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts, tangent_reversed=.NOT. ln%ends_swapped, amp=viv_amp3, amp_n=viv_ampn, & dviv=viv_dva, & cdy=RESHAPE([cdy_a, cdy_b, cdy_c], [3, SIZE(cdy_a)], ORDER=[2, 1]), & - tf=wo_tf, sto=viv_sto) + tf=wo_tf, sto=viv_sto, tf_cycle=frame_cyc) END IF END BLOCK IF (es /= CD_HCDYN_OK) THEN @@ -10988,6 +10993,9 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er ! deck's End B: CD_Deck_VIV_Phase_Seed takes it to the model's nodes and tangent BLOCK REAL(wp) :: seed(model%n_dof/3) + LOGICAL :: frame_cyc + frame_cyc = deck_line_frame_cycle(ln, sections, types, ErrStat, ErrMsg) + IF (ErrStat /= 0) RETURN CALL CD_Deck_VIV_Phase_Seed(model%l0, ln%ends_swapped, seed, zero=opts%viv_phase_zero) ! the VIV AMPLITUDE tables, left unallocated (absent below) on a line without one CALL viv_amp_tables(types, viv_tix, viv_amp3, viv_ampn) @@ -11000,11 +11008,11 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er 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, tf=viv_ftf, & - sto=viv_sto) + sto=viv_sto, tf_cycle=frame_cyc) ELSE 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, amp=viv_amp3, & - amp_n=viv_ampn, tf=viv_ftf, sto=viv_sto) + amp_n=viv_ampn, tf=viv_ftf, sto=viv_sto, tf_cycle=frame_cyc) END IF END BLOCK IF (es == CD_MODEL_OK) CALL CD_Recompute_Model_Acceleration(model, es, em) @@ -18028,9 +18036,12 @@ SUBROUTINE apply_type_viv_diam(row, types, ErrStat, ErrMsg) END SUBROUTINE apply_type_viv_diam SUBROUTINE apply_type_viv_frame(row, types, ErrStat, ErrMsg) - !! One VIV FRAME row: TypeName Tf -- the flow frame of a line type's VIV model: with the filter - !! time Tf > 0 [s] (at most 1e15) the flow the model takes as the free stream is the ambient - !! flow relative to the cable's velocity low-pass filtered over Tf (first order), so that a + !! One VIV FRAME row: TypeName Tf [Method] -- the flow frame of a line type's VIV model: with + !! the time Tf > 0 [s] (at most 1e15) the flow the model takes as the free stream is the ambient + !! flow relative to the cable's velocity low-pass filtered over Tf (Method filter, the default: + !! first order; Method cycle, synchronisation model only: the cycle mean over the window Tf plus + !! half the velocity's change over it, which drops a component of period Tf and its harmonics + !! and passes the slow motion without lag; Tf then about one VIV period), so that a !! cable moved through the water by a tow or its floater sees that motion as flow, and its own !! VIV velocity, much faster than Tf, does not count; Tf 0 is the ambient flow. It sets the !! wake oscillator's frequency, or on the synchronisation model (LINE TYPES Cl > 0) the motion @@ -18045,11 +18056,23 @@ SUBROUTINE apply_type_viv_frame(row, types, ErrStat, ErrMsg) CHARACTER(DECK_RECLEN) :: tok INTEGER :: it REAL(wp) :: v - LOGICAL :: found, ok + LOGICAL :: found, ok, cyc ErrStat = 0; ErrMsg = '' - IF (count_tokens(row) /= 2) THEN - CALL fail(ErrStat, ErrMsg, 'VIV FRAME rows must be: TypeName Tf'); RETURN + IF (count_tokens(row) /= 2 .AND. count_tokens(row) /= 3) THEN + CALL fail(ErrStat, ErrMsg, 'VIV FRAME rows must be: TypeName Tf [Method]'); RETURN + END IF + cyc = .FALSE. + IF (count_tokens(row) == 3) THEN + CALL get_token(row, 3, tok, found) + SELECT CASE (to_lower(TRIM(tok))) + CASE ('filter') + cyc = .FALSE. + CASE ('cycle') + cyc = .TRUE. + CASE DEFAULT + CALL fail(ErrStat, ErrMsg, 'VIV FRAME Method must be filter or cycle, got "'//TRIM(tok)//'"'); RETURN + END SELECT END IF CALL get_token(row, 1, tok, found) it = find_type(types, TRIM(tok)) @@ -18072,10 +18095,46 @@ SUBROUTINE apply_type_viv_frame(row, types, ErrStat, ErrMsg) CALL fail(ErrStat, ErrMsg, 'VIV FRAME of LINE TYPE "'//TRIM(types(it)%name)//'" sets the flow frame of '// & 'its VIV model: give the type LINE TYPES Cl > 0 or a WAKE OSCILLATOR row'); RETURN END IF + IF (cyc .AND. .NOT. (types(it)%cl > CD_ZERO .AND. v > CD_ZERO)) THEN + CALL fail(ErrStat, ErrMsg, 'VIV FRAME Method cycle of LINE TYPE "'//TRIM(types(it)%name)//'" acts on the '// & + 'synchronisation model (LINE TYPES Cl > 0) with a window Tf > 0'); RETURN + END IF types(it)%viv_tf = v + types(it)%viv_tfcyc = cyc types(it)%has_vivf_row = .TRUE. END SUBROUTINE apply_type_viv_frame + LOGICAL FUNCTION deck_line_frame_cycle(ln, sections, types, ErrStat, ErrMsg) RESULT(cyc) + !! The VIV FRAME method of a line: .TRUE. where its lifting types with a frame (Cl > 0, Tf > 0) + !! take Method cycle. A line takes one method; types that mix the two are refused. + TYPE(DeckLine), INTENT(IN) :: ln + TYPE(DeckSection), INTENT(IN) :: sections(:) + TYPE(DeckLineType), INTENT(IN) :: types(:) + INTEGER, INTENT(OUT) :: ErrStat + CHARACTER(*), INTENT(OUT) :: ErrMsg + INTEGER :: i, tidx + LOGICAL :: any_cyc, any_filter + ErrStat = 0; ErrMsg = '' + any_cyc = .FALSE. + any_filter = .FALSE. + DO i = 1, SIZE(sections) + IF (sections(i)%line_id /= ln%id) CYCLE + tidx = sections(i)%ltype + IF (.NOT. (types(tidx)%cl > CD_ZERO .AND. types(tidx)%viv_tf > CD_ZERO)) CYCLE + IF (types(tidx)%viv_tfcyc) THEN + any_cyc = .TRUE. + ELSE + any_filter = .TRUE. + END IF + END DO + cyc = any_cyc + IF (any_cyc .AND. any_filter) THEN + CALL fail(ErrStat, ErrMsg, 'line '//TRIM(int_to_str(ln%id))//': its VIV FRAME rows mix the methods filter '// & + 'and cycle; a line takes one method') + cyc = .FALSE. + END IF + END FUNCTION deck_line_frame_cycle + SUBROUTINE apply_type_viv_sto(row, types, ErrStat, ErrMsg) !! One VIV STOCHASTIC row: TypeName sigma c [Nf [seed]] -- the stochastic band centre of a line !! type's synchronisation model (Ulveseter et al. 2017): the centre cF becomes a slowly varying diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90 index efe473f6..50c8a607 100644 --- a/src/CableDyn_HermiteCableDynamic.f90 +++ b/src/CableDyn_HermiteCableDynamic.f90 @@ -70,6 +70,7 @@ MODULE CableDyn_HermiteCableDynamic CD_VIV_Inline_Phase_Rate, CD_VIV_Wake_Advance, CD_VIV_NMS, CD_VIV_NMS_AMP, & CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, CD_VIV_Check_Amp_Table, & CD_VIV_Ambient_Crossflow_Rate, CD_VIV_NMS_FRAME, CD_VIV_Mean_Square_Weight, & + CD_VIV_NMS_CYC, CD_VIV_Cycle_Init, CD_VIV_Cycle_Update, & CD_VIV_Filter_Linear, CD_VIV_Sto_Node, CD_VIV_Sto_Centre, CD_VIV_STO_MAXF USE CableDyn_Hydro, ONLY: CD_Morison_Drag_Per_Length_Jac, CD_Airy_Wave_Kinematics_Precomputed, & CD_Morison_Drag_Split_Per_Length_Jac, & @@ -406,6 +407,10 @@ MODULE CableDyn_HermiteCableDynamic ! amplitude-table coefficients, and on an element with viv_ftfe(e) > 0 the axes and blend of ! the cross-flow damping (elem_frame_v, the mean over its end nodes). LOGICAL :: viv_frame = .FALSE. + ! the cycle-mean frame (Set_VIV tf_cycle; VIV FRAME method cycle): rows 7:9 hold instead the + ! cycle mean over Tf of the node velocity (CD_VIV_Cycle_Update), its state in the + ! CD_VIV_NMS_CYC rows after them, so the snapshot, the step recovery and the checkpoint carry it + LOGICAL :: viv_cyc = .FALSE. REAL(wp), ALLOCATABLE :: viv_ftf(:), viv_ftfe(:) ! The stochastic band centre (Set_VIV sto; VIV STOCHASTIC section; CableDyn_VIV): with sigma > 0 ! on some element (viv_sto) viv_ms has one more row, its last, the node's travelled @@ -1190,7 +1195,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial(model, mu_axial, ErrStat, ErrM END SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg, phase_seed, tangent_reversed, & - clx, il_alpha, chh, wake, amp, amp_n, dviv, cdy, tf, sto) + clx, il_alpha, chh, wake, amp, amp_n, dviv, cdy, tf, sto, tf_cycle) !! 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 @@ -1259,6 +1264,12 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err !! length-weighted c over those with sigma > 0, the most components and the seed of the first; !! its centre advances with the node's travelled distance theta = integral U/D dt, U the !! shedding speed of the phase rate, at the step's mid-point as the phase. + !! + !! tf_cycle (optional, with tf; default .FALSE.): the frame velocity is the cycle mean over the + !! window Tf instead of the first-order filter, vbar = (1/Tf) int_{t-Tf}^{t} v dt' + + !! (v(t) - v(t-Tf))/2 (CD_VIV_Cycle_Update): a component of period Tf and its harmonics drop + !! out and the slow motion passes without the filter's lag. Tf is then about one period of the + !! cable's VIV response. TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: cl(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -1275,9 +1286,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err REAL(wp), INTENT(IN), OPTIONAL :: dviv(:) REAL(wp), INTENT(IN), OPTIONAL :: cdy(:, :) REAL(wp), INTENT(IN), OPTIONAL :: tf(:) + LOGICAL, INTENT(IN), OPTIONAL :: tf_cycle REAL(wp), INTENT(IN), OPTIONAL :: sto(:, :) INTEGER :: e, k, ne, nn, es, nms, nw, nfm, nfk, seedk - LOGICAL :: had_filter, had_frame, want_frame, had_sto, want_sto + LOGICAL :: had_filter, had_frame, want_frame, had_sto, want_sto, had_cyc, want_cyc REAL(wp) :: wsum, tw_old, rest_old, ssum, csum, cw REAL(wp), ALLOCATABLE :: s_a(:), s_f(:, :), s_p(:, :) INTEGER, ALLOCATABLE :: s_n(:) @@ -1530,6 +1542,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err had_wake = model%viv_wake had_filter = model%wo_filter had_frame = model%viv_frame + had_cyc = model%viv_cyc had_sto = model%viv_sto had_amp = model%has_viv_amp tw_old = model%viv_tw @@ -1547,6 +1560,10 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err END IF nms = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, want_amp) IF (want_frame) nms = CD_VIV_NMS_FRAME + want_cyc = .FALSE. + IF (want_frame .AND. PRESENT(tf_cycle)) want_cyc = tf_cycle + ! the cycle-mean frame's state after the frame rows + IF (want_cyc) nms = nms + CD_VIV_NMS_CYC ! the step predictor after the motion statistics (viv_pred_row; row 2 on a wake cable) IF (.NOT. want_wake) nms = nms + MERGE(2, 1, want_il) ! the travelled distance of the stochastic band centre last (viv_theta) @@ -1603,6 +1620,14 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err ALLOCATE (model%viv_ftfe(ne), model%viv_ftf(nn)) model%viv_ftfe = tf model%viv_ftf = CD_ZERO + ! every node holds a valid cycle-mean state (nodes without lift included), so a checkpoint of + ! the whole block reloads + IF (want_cyc) THEN + DO k = 1, nn + CALL CD_VIV_Cycle_Init(model%viv_ms(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, k), & + model%v(6*(k - 1) + 1:6*(k - 1) + 3)) + END DO + END IF DO k = 1, nn IF (.NOT. model%viv_node(k)) CYCLE wsum = CD_ZERO @@ -1613,8 +1638,11 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err END DO model%viv_ftf(k) = model%viv_ftf(k)/wsum model%viv_ms(7:9, k) = model%v(6*(k - 1) + 1:6*(k - 1) + 3) + IF (want_cyc) CALL CD_VIV_Cycle_Init(model%viv_ms(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, k), & + model%v(6*(k - 1) + 1:6*(k - 1) + 3)) END DO model%viv_frame = .TRUE. + model%viv_cyc = want_cyc END IF IF (want_sto) THEN ! per node the length-weighted sigma over its lifting elements, the length-weighted c over @@ -1757,6 +1785,7 @@ SUBROUTINE refresh_acceleration() model%viv_wake = had_wake model%wo_filter = had_filter model%viv_frame = had_frame + model%viv_cyc = had_cyc model%viv_sto = had_sto model%has_viv_amp = had_amp model%viv_tw = tw_old @@ -1855,6 +1884,7 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%viv_ftfe)) DEALLOCATE (model%viv_ftfe) IF (ALLOCATED(model%viv_sto_a)) DEALLOCATE (model%viv_sto_a, model%viv_sto_f, model%viv_sto_p, model%viv_sto_n) model%viv_frame = .FALSE. + model%viv_cyc = .FALSE. model%viv_sto = .FALSE. model%has_viv_amp = .FALSE. model%has_viv = .FALSE. @@ -2089,6 +2119,7 @@ PURE INTEGER FUNCTION viv_pred_row(model) RESULT(r) IF (model%viv_wake) RETURN r = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp) IF (model%viv_frame) r = CD_VIV_NMS_FRAME + IF (model%viv_cyc) r = r + CD_VIV_NMS_CYC r = r + 1 END FUNCTION viv_pred_row @@ -2311,9 +2342,20 @@ SUBROUTINE viv_step_end(model, dt) vf = CD_ZERO IF (model%viv_frame) THEN IF (model%viv_ftf(k) > CD_ZERO) THEN - IF (CD_All_Finite(model%v(i0 + 1:i0 + 3))) & - model%viv_ms_next(7:9, k) = CD_VIV_Filter_Linear(model%viv_ms(7:9, k), model%ws_vn(i0 + 1:i0 + 3), & - model%v(i0 + 1:i0 + 3), dt/model%viv_ftf(k)) + IF (CD_All_Finite(model%v(i0 + 1:i0 + 3))) THEN + IF (model%viv_cyc) THEN + ! the cycle mean over Tf (CD_VIV_Cycle_Update), the velocity linear over the step, + ! from the committed state (so a repeated end-of-step pass gives the same result) + model%viv_ms_next(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, k) = & + model%viv_ms(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, k) + CALL CD_VIV_Cycle_Update(model%viv_ms_next(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, k), & + model%ws_vn(i0 + 1:i0 + 3), model%v(i0 + 1:i0 + 3), dt, model%viv_ftf(k), & + model%viv_ms_next(7:9, k)) + ELSE + model%viv_ms_next(7:9, k) = CD_VIV_Filter_Linear(model%viv_ms(7:9, k), model%ws_vn(i0 + 1:i0 + 3), & + model%v(i0 + 1:i0 + 3), dt/model%viv_ftf(k)) + END IF + END IF vf = 0.5_wp*(model%viv_ms(7:9, k) + model%viv_ms_next(7:9, k)) END IF END IF diff --git a/src/CableDyn_Model.f90 b/src/CableDyn_Model.f90 index f593c0ff..6eea0f34 100644 --- a/src/CableDyn_Model.f90 +++ b/src/CableDyn_Model.f90 @@ -61,6 +61,7 @@ MODULE CableDyn_Model CD_VIV_NMS, CD_VIV_NMS_AMP, CD_VIV_AMP_MAXP, CD_VIV_Amplitude_Update, CD_VIV_Table, & CD_VIV_Check_Amp_Table, CD_VIV_Ambient_Crossflow_Rate, CD_VIV_Wake_Advance, & CD_VIV_NMS_FRAME, CD_VIV_Mean_Square_Weight, CD_VIV_Filter_Linear, & + CD_VIV_NMS_CYC, CD_VIV_Cycle_Init, CD_VIV_Cycle_Update, CD_VIV_Cycle_Valid, & CD_VIV_Sto_Node, CD_VIV_Sto_Centre, CD_VIV_STO_MAXF USE CableDyn_Dynamic, ONLY: GenAlphaConfig, CD_CableGenAlphaWorkspace, CD_Clear_GenAlpha_Workspace, & CD_Cable_Initial_Acceleration, CD_Cable_Gen_Alpha_Step, CD_Cable_Step_Loads, & @@ -451,6 +452,10 @@ MODULE CableDyn_Model ! flow, and so the shedding speed, unchanged), and the amplitude estimate takes the node's ! velocity across the ambient flow both relative to it (frame_node). LOGICAL :: viv_frame = .FALSE. + ! the cycle-mean frame (CD_Set_Model_VIV tf_cycle; VIV FRAME method cycle): rows 7:9 hold the + ! cycle mean over Tf of the node's smoothed velocity (CD_VIV_Cycle_Update), its state in the + ! CD_VIV_NMS_CYC rows after them + LOGICAL :: viv_cyc = .FALSE. REAL(wp), ALLOCATABLE :: viv_ftf(:) ! The stochastic band centre (CD_Set_Model_VIV sto; VIV STOCHASTIC section; CableDyn_VIV): with ! sigma > 0 on some element (viv_sto) viv_ms has one more row, its last, the node's travelled @@ -3981,7 +3986,7 @@ SUBROUTINE CD_Set_Model_Syrope_State(model, slow, tmax, ErrStat, ErrMsg) END SUBROUTINE CD_Set_Model_Syrope_State SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, ErrMsg, phase_seed, & - tangent_reversed, clx, il_alpha, chh, amp, amp_n, wake, tf, sto) + tangent_reversed, clx, il_alpha, chh, amp, amp_n, wake, tf, sto, tf_cycle) !! Install the cross-flow VIV model (CableDyn_VIV) on an initialised line. Per element: !! the lift coefficient cl (0 = no lift on that element), hydrodynamic diameter, and the !! synchronisation centre cf and half-range df of the non-dimensional shedding frequency; @@ -4021,6 +4026,10 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, !! in-line motion of the phases takes the node's velocity relative to vbar, and the amplitude !! estimate takes it across the ambient flow relative to vbar, so a line moved through the !! water sees that motion as flow. The shedding speed stays the relative normal speed. + !! tf_cycle (optional, with tf; default .FALSE.): vbar is the cycle mean over the window Tf, + !! (1/Tf) int_{t-Tf}^{t} v dt' + (v(t) - v(t-Tf))/2 (CD_VIV_Cycle_Update), in place of the + !! first-order filter: a component of period Tf and its harmonics drop out and the slow motion + !! passes without lag. TYPE(CD_ModelType), INTENT(INOUT) :: model REAL(wp), INTENT(IN) :: rho, cl(:), diameter(:), cf(:), df(:), t_window INTEGER, INTENT(OUT) :: ErrStat @@ -4035,6 +4044,7 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, INTEGER, INTENT(IN), OPTIONAL :: amp_n(:) REAL(wp), INTENT(IN), OPTIONAL :: wake(:, :) REAL(wp), INTENT(IN), OPTIONAL :: tf(:) + LOGICAL, INTENT(IN), OPTIONAL :: tf_cycle !! sto (optional, (4, n_elem); not with the wake oscillator), per element (sigma, c, N_f, seed) of !! the stochastic band centre of Ulveseter et al. (2017; CD_VIV_Sto_Node), as the finite-EI model !! takes it (CD_HermiteCable_Dyn_Set_VIV): sigma >= 0 (0: the constant cf), and where sigma > 0 @@ -4044,7 +4054,7 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, REAL(wp), INTENT(IN), OPTIONAL :: sto(:, :) INTEGER :: n_nodes, n_elem, e, nd, istat, k, nms, nfm, nfk, seedk REAL(wp) :: wsum, ssum, csum, cw - LOGICAL :: want_il, want_amp, want_wake, want_filter, want_frame, want_sto + LOGICAL :: want_il, want_amp, want_wake, want_filter, want_frame, want_sto, want_cyc CHARACTER(160) :: amsg ErrStat = CD_MODEL_OK @@ -4247,6 +4257,10 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, END DO nms = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, want_amp .OR. (want_wake .AND. want_filter)) IF (want_frame) nms = CD_VIV_NMS_FRAME + want_cyc = .FALSE. + IF (want_frame .AND. PRESENT(tf_cycle)) want_cyc = tf_cycle + ! the cycle-mean frame's state after the frame rows + IF (want_cyc) nms = nms + CD_VIV_NMS_CYC ! the step predictor after the motion statistics (viv_pred_row; row 2 on a wake line) IF (.NOT. want_wake) nms = nms + MERGE(2, 1, want_il) ! the travelled distance of the stochastic band centre last (viv_theta) @@ -4349,6 +4363,14 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, ! the filter time per node, length-weighted over its lifting elements as the band; the ! filtered velocity starts at the node's (smoothed) velocity model%viv_ftf = CD_ZERO + ! every node holds a valid cycle-mean state (the ends and nodes without lift included), so a + ! checkpoint of the whole block reloads + IF (want_cyc) THEN + DO nd = 1, n_nodes + CALL CD_VIV_Cycle_Init(model%viv_ms(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, nd), & + model%v(3*nd - 2:3*nd)) + END DO + END IF DO nd = 2, n_nodes - 1 IF (.NOT. model%viv_node(nd)) CYCLE wsum = CD_ZERO @@ -4359,8 +4381,11 @@ SUBROUTINE CD_Set_Model_VIV(model, rho, cl, diameter, cf, df, t_window, ErrStat, END DO model%viv_ftf(nd) = model%viv_ftf(nd)/wsum model%viv_ms(7:9, nd) = smoothed(model%v, 3*nd - 2) + IF (want_cyc) CALL CD_VIV_Cycle_Init(model%viv_ms(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, nd), & + smoothed(model%v, 3*nd - 2)) END DO model%viv_frame = .TRUE. + model%viv_cyc = want_cyc END IF model%viv_phi_rollback = model%viv_phi model%viv_ms_rollback = model%viv_ms @@ -4538,6 +4563,7 @@ SUBROUTINE CD_Set_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi CHARACTER(*), INTENT(OUT) :: ErrMsg REAL(wp), INTENT(IN), OPTIONAL :: phi_x(:), ms_x(:, :) LOGICAL :: neg + INTEGER :: i ErrStat = CD_MODEL_OK ErrMsg = '' IF (.NOT. model%initialized) THEN @@ -4564,6 +4590,15 @@ SUBROUTINE CD_Set_Model_VIV_State(model, phi, ms, t_window, ErrStat, ErrMsg, phi neg = .FALSE. IF (.NOT. model%viv_wake) neg = ANY(ms(1:2, :) < CD_ZERO) IF (model%has_viv_amp .OR. model%viv_frame) neg = neg .OR. ANY(ms(4:5, :) < CD_ZERO) + IF (model%viv_cyc) THEN + DO i = 1, SIZE(ms, 2) + IF (.NOT. CD_VIV_Cycle_Valid(ms(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, i))) THEN + CALL fail(ErrStat, ErrMsg, 'VIV cycle-mean frame state: the sample time must be in [0, 1] and the '// & + 'ring slot an integer of the ring') + RETURN + END IF + END DO + END IF IF (neg .OR. t_window < CD_ZERO) THEN CALL fail(ErrStat, ErrMsg, 'VIV mean squares, amplitudes and averaging time must be non-negative') RETURN @@ -4799,6 +4834,7 @@ PURE INTEGER FUNCTION CD_Model_VIV_NMS(model) RESULT(n) TYPE(CD_ModelType), INTENT(IN) :: model n = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp .OR. model%wo_filter) IF (model%viv_frame) n = CD_VIV_NMS_FRAME + IF (model%viv_cyc) n = n + CD_VIV_NMS_CYC IF (model%has_viv .AND. .NOT. model%viv_wake) n = n + MERGE(2, 1, model%has_viv_il) ! the travelled distance of a stochastic band centre last IF (model%viv_sto) n = n + 1 @@ -4937,6 +4973,7 @@ PURE INTEGER FUNCTION viv_pred_row(model) RESULT(r) IF (model%viv_wake) RETURN r = MERGE(CD_VIV_NMS_AMP, CD_VIV_NMS, model%has_viv_amp) IF (model%viv_frame) r = CD_VIV_NMS_FRAME + IF (model%viv_cyc) r = r + CD_VIV_NMS_CYC r = r + 1 END FUNCTION viv_pred_row @@ -5097,8 +5134,18 @@ SUBROUTINE viv_step_end(model, dt, ErrStat, ErrMsg) ! keeps it) averaged with the step-start one vf = CD_ZERO IF (frame_node(model, nd)) THEN - IF (CD_All_Finite(vs1)) & - model%viv_ms_next(7:9, nd) = CD_VIV_Filter_Linear(model%viv_ms(7:9, nd), vs0, vs1, dt/model%viv_ftf(nd)) + IF (CD_All_Finite(vs1)) THEN + IF (model%viv_cyc) THEN + ! the cycle mean over Tf (CD_VIV_Cycle_Update), the smoothed velocity linear over the + ! step, from the committed state (so a repeated end-of-step pass gives the same result) + model%viv_ms_next(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, nd) = & + model%viv_ms(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, nd) + CALL CD_VIV_Cycle_Update(model%viv_ms_next(CD_VIV_NMS_FRAME + 1:CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC, nd), & + vs0, vs1, dt, model%viv_ftf(nd), model%viv_ms_next(7:9, nd)) + ELSE + model%viv_ms_next(7:9, nd) = CD_VIV_Filter_Linear(model%viv_ms(7:9, nd), vs0, vs1, dt/model%viv_ftf(nd)) + END IF + END IF vf = 0.5_wp*(model%viv_ms(7:9, nd) + model%viv_ms_next(7:9, nd)) END IF ! the mid-point motion: the mean position, and the velocity and acceleration over the step, @@ -5290,6 +5337,7 @@ SUBROUTINE clear_viv(model) IF (ALLOCATED(model%viv_sto_a)) DEALLOCATE (model%viv_sto_a, model%viv_sto_f, model%viv_sto_p, model%viv_sto_n) model%viv_sto = .FALSE. model%viv_frame = .FALSE. + model%viv_cyc = .FALSE. model%viv_wake = .FALSE. model%wo_filter = .FALSE. model%has_viv_amp = .FALSE. @@ -8074,6 +8122,7 @@ SUBROUTINE CD_Copy_Model(src, dst, ErrStat, ErrMsg) work%viv_sto = src%viv_sto work%wo_filter = src%wo_filter work%viv_frame = src%viv_frame + work%viv_cyc = src%viv_cyc work%has_viv_amp = src%has_viv_amp CALL copy_real3(src%viv_amp, work%viv_amp, 'viv_amp', ErrStat, ErrMsg) IF (ErrStat /= CD_MODEL_OK) RETURN @@ -8271,6 +8320,7 @@ SUBROUTINE commit_model_copy(from, to) CALL MOVE_ALLOC(from%wo_tf, to%wo_tf) CALL MOVE_ALLOC(from%viv_ftf, to%viv_ftf) to%viv_frame = from%viv_frame + to%viv_cyc = from%viv_cyc CALL MOVE_ALLOC(from%viv_sto_a, to%viv_sto_a) CALL MOVE_ALLOC(from%viv_sto_f, to%viv_sto_f) CALL MOVE_ALLOC(from%viv_sto_p, to%viv_sto_p) diff --git a/src/CableDyn_OpenFAST_HermiteFMF.f90 b/src/CableDyn_OpenFAST_HermiteFMF.f90 index 843e7705..ab8a3f67 100644 --- a/src/CableDyn_OpenFAST_HermiteFMF.f90 +++ b/src/CableDyn_OpenFAST_HermiteFMF.f90 @@ -51,6 +51,7 @@ MODULE CableDyn_OpenFAST_HermiteFMF USE CableDyn_HermiteTorsion, ONLY: CD_HermiteTorsionType, CD_HermiteTorsion_Compliance, CD_HermiteTorsion_Line, & CD_HermiteTorsion_Unwrap, CD_HTORS_OK, CD_HTORS_MAX_STEP USE CableDyn_HermiteCable, ONLY: CD_HermiteCable_Shapes + USE CableDyn_VIV, ONLY: CD_VIV_Cycle_Valid, CD_VIV_NMS_FRAME, CD_VIV_NMS_CYC USE CableDyn_EndConnection, ONLY: CD_EndConn_Project, CD_ENDCONN_OK, CD_ENDCONN_BADINPUT, & CD_ENDCONN_PINNED, CD_ENDCONN_FINITE, CD_ENDCONN_RIGID USE CableDyn_Bathymetry, ONLY: CD_BathymetryType @@ -2493,6 +2494,10 @@ SUBROUTINE CD_HFMF_UnpackMirror(self, buf, t, ErrStat, ErrMsg) IF (self%line%has_viv_amp .OR. self%line%viv_frame) THEN IF (ANY(buf(kb + (i - 1)*nv + 4:kb + (i - 1)*nv + 5) < CD_ZERO)) bad_viv = .TRUE. END IF + IF (self%line%viv_cyc) THEN + IF (.NOT. CD_VIV_Cycle_Valid(buf(kb + (i - 1)*nv + CD_VIV_NMS_FRAME + 1: & + kb + (i - 1)*nv + CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC))) bad_viv = .TRUE. + END IF END DO IF (bad_viv) THEN ErrStat = CD_HFMF_BADINPUT diff --git a/src/CableDyn_VIV.f90 b/src/CableDyn_VIV.f90 index 8183c3a2..b69b8577 100644 --- a/src/CableDyn_VIV.f90 +++ b/src/CableDyn_VIV.f90 @@ -81,6 +81,9 @@ MODULE CableDyn_VIV PUBLIC :: CD_VIV_Ambient_Crossflow_Rate PUBLIC :: CD_VIV_Sto_Node PUBLIC :: CD_VIV_Sto_Centre + PUBLIC :: CD_VIV_Cycle_Init + PUBLIC :: CD_VIV_Cycle_Update + PUBLIC :: CD_VIV_Cycle_Valid !> MoorDyn's running-RMS window in time steps (Line%n_m): each step updates the stored !> mean square as ((n_m - 1) old + new) / n_m. @@ -119,6 +122,12 @@ MODULE CableDyn_VIV !> the number Ulveseter et al. (2017, Sec. 3) take. INTEGER, PARAMETER, PUBLIC :: CD_VIV_STO_MAXF = 1000 INTEGER, PARAMETER, PUBLIC :: CD_VIV_STO_DEFAULT_NF = 100 + !> The cycle-mean flow frame (VIV FRAME method `cycle`; CD_VIV_Cycle_Update): samples per window + !> T, and the rows of its state per node, the time since the last sample, the ring position of + !> that sample and the ring of CD_VIV_CYC_NB + 2 samples of the integral of the velocity (three + !> components each), held relative to the integral at the committed time. + INTEGER, PARAMETER, PUBLIC :: CD_VIV_CYC_NB = 64 + INTEGER, PARAMETER, PUBLIC :: CD_VIV_NMS_CYC = 2 + 3*(CD_VIV_CYC_NB + 2) !> Chord below which a node tangent is undefined (a collapsed pair of neighbours). REAL(wp), PARAMETER :: TINY_CHORD = 1.0e-12_wp @@ -730,6 +739,100 @@ PURE REAL(wp) FUNCTION CD_VIV_Sto_Centre(cf, a, fhat, p0, theta) RESULT(centre) centre = cf + a*SUM(SIN(p0 + CD_VIV_TWO_PI*theta*fhat)) END FUNCTION CD_VIV_Sto_Centre + PURE SUBROUTINE CD_VIV_Cycle_Init(st, v) + !! The cycle-mean frame state (CD_VIV_Cycle_Update) of a node that has moved at the constant + !! velocity v for all past time: its frame velocity is then v. + REAL(wp), INTENT(OUT) :: st(CD_VIV_NMS_CYC) + REAL(wp), INTENT(IN) :: v(3) + INTEGER :: j + st(1) = CD_ZERO + st(2) = CD_ONE + ! slot j holds the sample j - 1 intervals h before the latest, (I - I(t))/h = -(j - 1) v + DO j = 1, CD_VIV_CYC_NB + 2 + st(3 + 3*(j - 1):5 + 3*(j - 1)) = -REAL(j - 1, wp)*v + END DO + END SUBROUTINE CD_VIV_Cycle_Init + + PURE SUBROUTINE CD_VIV_Cycle_Update(st, v0, v1, dt, tw, vs) + !! One step dt of the cycle-mean flow frame of a node: with the node velocity linear from v0 + !! to v1 over the step, the frame velocity at the step end is + !! + !! v_s(t) = (I(t) - I(t - T))/T + (v(t) - v(t - T))/2, I(t) = int^t v dt' + !! + !! over the window T = tw: the mean velocity over the last window plus half its change over it. + !! A component of period T and its harmonics drop out of both terms exactly (to the sampling + !! below), and a velocity linear in time passes unchanged, with no lag; a quadratic one with + !! the error T^2/6 of its second derivative. I is sampled every h = T/NB (NB = CD_VIV_CYC_NB) in + !! a ring of NB + 2 samples, exactly for the velocity linear over the step, and I(t - T) and + !! v(t - T) = I'(t - T) come from the quadratic through the three samples around t - T. The ring + !! holds I relative to its value at the step end, (I - I(t))/h, so it stays of the order of the + !! velocity however long the run. st: (1) the time since the latest sample over h, (2) the + !! ring slot of the latest sample, (3:) the ring (CD_VIV_Cycle_Init). + REAL(wp), INTENT(INOUT) :: st(CD_VIV_NMS_CYC) + REAL(wp), INTENT(IN) :: v0(3), v1(3), dt, tw + REAL(wp), INTENT(OUT) :: vs(3) + INTEGER, PARAMETER :: nr = CD_VIV_CYC_NB + 2 + REAL(wp) :: h, tau, di(3), s, is(3), x, c0, c1, c2, d0, d1, d2, ia(3), ib(3), ic(3) + INTEGER :: latest, j, ja, jb, jc + h = tw/REAL(CD_VIV_CYC_NB, wp) + tau = st(1)*h + latest = NINT(st(2)) + ! the integral over the step, per h: the ring shifts so that it stays relative to I(t_end) + di = 0.5_wp*dt*(v0 + v1)/h + DO j = 1, nr + st(3 + 3*(j - 1):5 + 3*(j - 1)) = st(3 + 3*(j - 1):5 + 3*(j - 1)) - di + END DO + ! the samples inside the step, at s = h - tau, 2h - tau, ... from its start + s = h - tau + DO WHILE (s <= dt) + ! I(t0 + s) - I(t_end) = -int_s^dt v, v linear: per h + is = -((dt - s)*v0 + 0.5_wp*(dt*dt - s*s)*(v1 - v0)/dt)/h + latest = MODULO(latest - 2, nr) + 1 + st(3 + 3*(latest - 1):5 + 3*(latest - 1)) = is + s = s + h + END DO + ! the time since the latest sample, in [0, h]: at a sample landing on the step end the + ! difference can round to a few ulps below 0 (Tf 1 s, dt 0.01 s), which must stay a valid state + tau = MIN(MAX(dt - (s - h), CD_ZERO), h) + st(1) = tau/h + st(2) = REAL(latest, wp) + ! t - T lies x = NB - tau/h sample intervals before the latest sample, x in (NB - 1, NB]: the + ! quadratic through the samples NB - 1, NB and NB + 1 intervals back (age a, increasing back in + ! time), Lagrange weights at x and of the derivative in x + x = REAL(CD_VIV_CYC_NB, wp) - st(1) + ja = slot(CD_VIV_CYC_NB - 1) + jb = slot(CD_VIV_CYC_NB) + jc = slot(CD_VIV_CYC_NB + 1) + x = x - REAL(CD_VIV_CYC_NB, wp) ! in [-1, 0): the ages NB - 1, NB, NB + 1 sit at -1, 0, 1 + c0 = 0.5_wp*x*(x - CD_ONE) + c1 = (CD_ONE - x)*(CD_ONE + x) + c2 = 0.5_wp*x*(x + CD_ONE) + d0 = x - 0.5_wp + d1 = -2.0_wp*x + d2 = x + 0.5_wp + ia = st(3 + 3*(ja - 1):5 + 3*(ja - 1)) + ib = st(3 + 3*(jb - 1):5 + 3*(jb - 1)) + ic = st(3 + 3*(jc - 1):5 + 3*(jc - 1)) + ! (I(t) - I(t - T))/T with I(t) = 0 in the ring's units (per h, T = NB h); age grows back in + ! time, so dI/dt = -(1/h) dI/dage + vs = -(c0*ia + c1*ib + c2*ic)/REAL(CD_VIV_CYC_NB, wp) + 0.5_wp*(v1 + (d0*ia + d1*ib + d2*ic)) + CONTAINS + PURE INTEGER FUNCTION slot(age) RESULT(j) + INTEGER, INTENT(IN) :: age + j = MODULO(latest - 1 + age, nr) + 1 + END FUNCTION slot + END SUBROUTINE CD_VIV_Cycle_Update + + PURE LOGICAL FUNCTION CD_VIV_Cycle_Valid(st) RESULT(ok) + !! A cycle-mean frame state (CD_VIV_Cycle_Update) that a restart may install: finite, the time + !! since the latest sample in [0, 1] sample intervals and the ring slot an integer of the ring. + REAL(wp), INTENT(IN) :: st(:) + ok = SIZE(st) == CD_VIV_NMS_CYC + IF (.NOT. ok) RETURN + ok = ALL(ABS(st) <= HUGE(CD_ONE)) .AND. st(1) >= CD_ZERO .AND. st(1) <= CD_ONE .AND. & + st(2) >= CD_ONE .AND. st(2) <= REAL(CD_VIV_CYC_NB + 2, wp) .AND. .NOT. (ABS(st(2) - ANINT(st(2))) > CD_ZERO) + END FUNCTION CD_VIV_Cycle_Valid + ELEMENTAL REAL(wp) FUNCTION CD_VIV_Wrap_Phase(phi) RESULT(wrapped) !! The phase mapped to [0, 2 pi); the model only uses cos(phi) and sin(. - phi). REAL(wp), INTENT(IN) :: phi diff --git a/tests/test_hermite_viv_frame.f90 b/tests/test_hermite_viv_frame.f90 index 59b291a5..4d831285 100644 --- a/tests/test_hermite_viv_frame.f90 +++ b/tests/test_hermite_viv_frame.f90 @@ -40,10 +40,16 @@ PROGRAM test_hermite_viv_frame !! 18 %) and the RMS more than 15 % (measured 23 %) from the fixed pipe's, with the lift alone !! the RMS more than 4 % (measured 8 %); !! * F4 a snapshot taken mid-run and restored replays the following steps bit for bit, the - !! filtered velocity included. + !! filtered velocity included; + !! * F5 the cycle-mean frame (tf_cycle, window Tf 1 s, about one period of the response): it + !! installs its state after the frame rows (CD_VIV_NMS_CYC more), the moving and the fixed pipe + !! agree as in F2, its frame velocity follows the imposed one without the filter's lag (at the + !! mid node over 5-15 s, the ramp: within 0.5 % of U0, measured 0.17 %, and at most a fifth of the + !! first-order filter's lag error with Tf 0.6 s, measured 1.7 %), and a snapshot taken mid-run + !! and restored replays the following steps bit for bit, the ring of the cycle mean included. USE, INTRINSIC :: IEEE_ARITHMETIC, ONLY: IEEE_VALUE, IEEE_QUIET_NAN USE CableDyn_Precision, ONLY: wp - USE CableDyn_VIV, ONLY: CD_VIV_AMP_MAXP, CD_VIV_NMS_FRAME + USE CableDyn_VIV, ONLY: CD_VIV_AMP_MAXP, CD_VIV_NMS_FRAME, CD_VIV_NMS_CYC USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, & CD_HermiteCable_Dyn_Set_Drag, CD_HermiteCable_Dyn_Set_AddedMass, & CD_HermiteCable_Dyn_Set_VIV, CD_HermiteCable_Dyn_Set_Held_Fluid, & @@ -172,6 +178,61 @@ PROGRAM test_hermite_viv_frame CALL CD_HermiteCable_Dyn_End(model) END BLOCK + ! ---- F5 the cycle-mean frame ---- + BLOCK + REAL(wp), ALLOCATABLE :: q_ref(:, :), ms_ref(:, :, :) + REAL(wp) :: tfc(NE), y, vi, ai, dev, devf + INTEGER :: s, nr + tfc = 1.0_wp + CALL run_case(.TRUE., tfc, .TRUE., pk_mf, rms_mf, cycle=.TRUE.) + CALL run_case(.FALSE., tfc, .TRUE., pk_ff, rms_ff, cycle=.TRUE.) + WRITE (*, '(A,2F9.4,A,2F9.4)') ' F5 (tables) cycle mean: moving peak, RMS A/D ', pk_mf/D, rms_mf/D, '; fixed ', & + pk_ff/D, rms_ff/D + CALL require(pk_ff > 0.2_wp*D, 'F5: the fixed pipe locks in with the cycle-mean frame') + CALL require(ABS(pk_mf/pk_ff - 1.0_wp) <= TOL_F2_PEAK .AND. ABS(rms_mf/rms_ff - 1.0_wp) <= TOL_F2, & + 'F5: with the cycle-mean frame the moving and the fixed pipe agree') + nr = CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC + 1 + CALL build(model) + CALL CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy, tf=tfc, & + tf_cycle=.TRUE.) + CALL require(es == CD_HCDYN_OK .AND. model%viv_frame .AND. model%viv_cyc .AND. SIZE(model%viv_ms, 1) == nr, & + 'F5: the cycle-mean frame installs its state after the frame rows: '//TRIM(em)) + CALL build(twin) + CALL CD_HermiteCable_Dyn_Set_VIV(twin, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy, tf=tfv) + CALL require(es == CD_HCDYN_OK .AND. .NOT. twin%viv_cyc, 'F5: the filter twin installs: '//TRIM(em)) + dev = 0.0_wp + devf = 0.0_wp + DO s = 1, 1500 + CALL advance(model, s, .TRUE.) + CALL advance(twin, s, .TRUE.) + IF (s > 500) THEN + CALL imposed(REAL(s, wp)*DT, y, vi, ai) + dev = MAX(dev, ABS(model%viv_ms(8, NE/2 + 1) - vi)) + devf = MAX(devf, ABS(twin%viv_ms(8, NE/2 + 1) - vi)) + END IF + END DO + WRITE (*, '(A,F8.4,A,F8.4)') ' F5 frame velocity off the imposed one, cycle mean ', dev/U0, '; filter ', devf/U0 + CALL require(dev <= 0.005_wp*U0 .AND. devf > 5.0_wp*dev, & + 'F5: the cycle mean follows the imposed velocity without the filter''s lag') + CALL CD_HermiteCable_Dyn_Snapshot(model, es, em) + CALL require(es == CD_HCDYN_OK, 'F5: snapshot: '//TRIM(em)) + ALLOCATE (q_ref(SIZE(model%q), 200), ms_ref(nr, NN, 200)) + DO s = 1, 200 + CALL advance(model, 1500 + s, .TRUE.) + q_ref(:, s) = model%q + ms_ref(:, :, s) = model%viv_ms + END DO + CALL CD_HermiteCable_Dyn_Restore(model, es, em) + CALL require(es == CD_HCDYN_OK, 'F5: restore: '//TRIM(em)) + DO s = 1, 200 + CALL advance(model, 1500 + s, .TRUE.) + IF (ANY(model%q /= q_ref(:, s)) .OR. ANY(model%viv_ms /= ms_ref(:, :, s))) EXIT + END DO + CALL require(s > 200, 'F5: the restored snapshot replays the state and the cycle-mean ring bit for bit') + CALL CD_HermiteCable_Dyn_End(model) + CALL CD_HermiteCable_Dyn_End(twin) + END BLOCK + IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' ERROR STOP 1 @@ -272,20 +333,25 @@ SUBROUTINE advance(m, s, moving) IF (es /= CD_HCDYN_OK) CALL require(.FALSE., 'step: '//TRIM(em)) END SUBROUTINE advance - SUBROUTINE run_case(moving, tfe, tables, pk, rms) + SUBROUTINE run_case(moving, tfe, tables, pk, rms, cycle) !! Two periods of the moving or the fixed pipe with the filter times tfe, with the amplitude !! tables and the cross-flow damping (tables) or the lift Cl alone; over the second period !! the peak and RMS cross-flow (z) displacement of the mid node from its rest depth. LOGICAL, INTENT(IN) :: moving, tables REAL(wp), INTENT(IN) :: tfe(NE) REAL(wp), INTENT(OUT) :: pk, rms + LOGICAL, INTENT(IN), OPTIONAL :: cycle TYPE(CD_HermiteCableDynType), ALLOCATABLE :: m + LOGICAL :: cyc REAL(wp) :: z, s2 INTEGER :: s, n ALLOCATE (m) CALL build(m) + cyc = .FALSE. + IF (PRESENT(cycle)) cyc = cycle IF (tables) THEN - CALL CD_HermiteCable_Dyn_Set_VIV(m, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy, tf=tfe) + CALL CD_HermiteCable_Dyn_Set_VIV(m, cl, cf, df, 2.0_wp, es, em, amp=amp, amp_n=ampn, cdy=cdy, tf=tfe, & + tf_cycle=cyc) ELSE CALL CD_HermiteCable_Dyn_Set_VIV(m, cl, cf, df, 2.0_wp, es, em, tf=tfe) END IF diff --git a/tests/test_hfmf_mirror.f90 b/tests/test_hfmf_mirror.f90 index 97a102eb..472b8d54 100644 --- a/tests/test_hfmf_mirror.f90 +++ b/tests/test_hfmf_mirror.f90 @@ -21,7 +21,10 @@ PROGRAM test_hfmf_mirror !! non-finite time fail closed; !! 5) with cross-flow and in-line VIV the VIV block is 6 nn + 1 values (the in-line phase and !! mean squares after the cross-flow block), it round-trips bit-identically into the twin's - !! in-line state, and a negative in-line mean square fails closed. + !! in-line state, and a negative in-line mean square fails closed; + !! 6) with the cycle-mean VIV frame (VIV FRAME method cycle) the VIV block carries its ring + !! (CD_VIV_NMS_CYC rows per node after the frame rows), round-trips bit-identically after a + !! few steps have filled it, and a ring slot off the ring fails closed. USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Init_Deck_HermiteCable, CD_DECKDRV_OK USE CableDyn_OpenFAST_HermiteFMF, ONLY: CD_HFMF_ModuleType, CD_HFMF_MirrorSize, CD_HFMF_PackMirror, & @@ -29,6 +32,7 @@ PROGRAM test_hfmf_mirror CD_HFMF_BoundaryMirrorSize, CD_HFMF_VIVMirrorSize, CD_HFMF_TorsionMirrorSize, & CD_HFMF_End, CD_HFMF_OK, CD_HFMF_BADINPUT USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCable_Dyn_Set_VIV, CD_HCDYN_OK + USE CableDyn_VIV, ONLY: CD_VIV_NMS_FRAME, CD_VIV_NMS_CYC USE, INTRINSIC :: IEEE_ARITHMETIC, ONLY: IEEE_IS_FINITE, IEEE_VALUE, IEEE_QUIET_NAN IMPLICIT NONE INTEGER :: nfail @@ -150,6 +154,45 @@ PROGRAM test_hfmf_mirror 'a negative in-line mean square fails closed') END BLOCK + ! (6) the cycle-mean frame's ring in the VIV block + BLOCK + REAL(wp), ALLOCATABLE :: cl(:), cf(:), df(:), tf(:), vb(:), vb2(:) + INTEGER :: ne, nn, kv, nv, j + ne = cable%line%ne + nn = cable%line%nn + ALLOCATE (cl(ne), cf(ne), df(ne), tf(ne)) + cl = 0.8_wp; cf = 0.18_wp; df = 0.08_wp; tf = 1.0_wp + CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, cl, cf, df, 0.25_wp, es, em, tf=tf, tf_cycle=.TRUE.) + CALL require(es == CD_HCDYN_OK .AND. cable%line%viv_cyc, 'cycle-mean frame on the cable: '//TRIM(em)) + CALL CD_HermiteCable_Dyn_Set_VIV(twin%line, cl, cf, df, 0.25_wp, es, em, tf=tf, tf_cycle=.TRUE.) + CALL require(es == CD_HCDYN_OK, 'cycle-mean frame on the twin: '//TRIM(em)) + nv = SIZE(cable%line%viv_ms, 1) + CALL require(nv == CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC + 1, 'the ring sits after the frame rows') + CALL require(CD_HFMF_VIVMirrorSize(cable) == (1 + nv)*nn + 1, 'VIV block with the ring: (1 + nms) nn + 1 values') + ! a filled ring: distinct values in every row, a valid sample time and slot + DO j = 1, nn + DO i = CD_VIV_NMS_FRAME + 3, CD_VIV_NMS_FRAME + CD_VIV_NMS_CYC + cable%line%viv_ms(i, j) = 1.0e-3_wp*REAL(i + 7*j, wp) + END DO + cable%line%viv_ms(CD_VIV_NMS_FRAME + 1, j) = 0.375_wp + cable%line%viv_ms(CD_VIV_NMS_FRAME + 2, j) = REAL(MOD(j, 60) + 1, wp) + END DO + ALLOCATE (vb(CD_HFMF_MirrorSize(cable)), vb2(CD_HFMF_MirrorSize(cable))) + CALL CD_HFMF_PackMirror(cable, vb, es, em) + CALL require(es == CD_HFMF_OK, 'pack with the ring: '//TRIM(em)) + kb = 3*nf + CD_HFMF_FrictionMirrorSize(cable) + 3*(cable%line%ndof - nf) + vb(kb + 7:kb + 15) = [1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp] + CALL CD_HFMF_UnpackMirror(twin, vb, 3.0_wp, es, em) + CALL require(es == CD_HFMF_OK, 'unpack with the ring: '//TRIM(em)) + CALL require(nan_max_abs(twin%line%viv_ms - cable%line%viv_ms) <= 0.0_wp, 'the ring reloads') + CALL CD_HFMF_PackMirror(twin, vb2, es, em) + CALL require(nan_max_abs(vb2 - vb) <= 0.0_wp, 'the VIV block with the ring round-trips bit-identically') + kv = SIZE(vb) - CD_HFMF_TorsionMirrorSize(cable) - CD_HFMF_VIVMirrorSize(cable) + nn + vb(kv + CD_VIV_NMS_FRAME + 2) = 0.5_wp + CALL CD_HFMF_UnpackMirror(twin, vb, 3.0_wp, es, em) + CALL require(es == CD_HFMF_BADINPUT, 'a fractional ring slot fails closed') + END BLOCK + CALL CD_HFMF_End(cable) CALL CD_HFMF_End(twin) CALL finish() diff --git a/tests/test_viv_coupled.f90 b/tests/test_viv_coupled.f90 index 84db44db..cd15f601 100644 --- a/tests/test_viv_coupled.f90 +++ b/tests/test_viv_coupled.f90 @@ -45,11 +45,14 @@ PROGRAM test_viv_coupled !! statistics), with the same restart and rewind checks; !! * the flow frame on the lift alone (VIV FRAME Tf 5 s, no tables): both blocks carry the !! filtered velocity in rows 7-9 of 9 motion statistics (rows 3-6 unused), with the same restart - !! and rewind checks; + !! and rewind checks; with the cycle-mean frame (VIV FRAME Tf 3.4 s Method cycle) both blocks + !! carry its ring after them too (CD_VIV_NMS_CYC more rows per node), with the same restart and + !! rewind checks; !! * a stochastic band centre (VIV STOCHASTIC sigma 0.02, c 0.07, 100 components on both types): !! both blocks grow by the travelled distance of the centre (1 per node), with the same restart !! and rewind checks. USE CableDyn_Precision, ONLY: wp + USE CableDyn_VIV, ONLY: CD_VIV_NMS_CYC USE CableDyn_OpenFAST_Aggregate, ONLY: CD_AGG_ModuleType, CD_AGG_Init_From_Deck, CD_AGG_End, CD_AGG_OK, & CD_AGG_NMovingPoints, CD_AGG_GetMovingPointMesh, CD_AGG_Step_Moving, & CD_AGG_UpdateStates_Moving, CD_AGG_CalcOutput, CD_AGG_NFluidNodes, & @@ -69,7 +72,7 @@ PROGRAM test_viv_coupled ! the deck of the restart and rewind cases, and whether its lines carry in-line VIV CHARACTER(32) :: deck_name = 'viv_coupled.dat' LOGICAL :: il_case = .FALSE., wake_case = .FALSE., amp_case = .FALSE., wakef_case = .FALSE., ampf_case = .FALSE. - LOGICAL :: frame_case = .FALSE., sto_case = .FALSE. + LOGICAL :: frame_case = .FALSE., sto_case = .FALSE., cyc_case = .FALSE. nfail = 0 CALL write_deck('viv_coupled.dat', 0.8_wp) @@ -80,6 +83,7 @@ PROGRAM test_viv_coupled CALL write_deck('viv_coupled_amp.dat', 0.8_wp, amp=.TRUE.) CALL write_deck('viv_coupled_ampf.dat', 0.8_wp, amp=.TRUE., wake_tf='5.0', damp=.TRUE.) CALL write_deck('viv_coupled_frame.dat', 0.8_wp, wake_tf='5.0') + CALL write_deck('viv_coupled_cyc.dat', 0.8_wp, wake_tf='3.4 cycle') CALL write_deck('viv_coupled_sto.dat', 0.8_wp, sto='0.02 0.07 100 3') CALL case_lockin() CALL case_restart() @@ -105,6 +109,11 @@ PROGRAM test_viv_coupled frame_case = .TRUE. CALL case_restart() CALL case_rewind() + deck_name = 'viv_coupled_cyc.dat' + cyc_case = .TRUE. + CALL case_restart() + CALL case_rewind() + cyc_case = .FALSE. frame_case = .FALSE. deck_name = 'viv_coupled_amp.dat' wake_case = .FALSE. @@ -413,7 +422,7 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) ! synchronisation line, the step predictor (two rows with in-line VIV) ok = ok .AND. nv == (MERGE(6, 3, il_case) + MERGE(4, 0, amp_case .OR. wakef_case) + & MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case) + MERGE(1, 0, sto_case) + & - MERGE(0, MERGE(2, 1, il_case), wake_case))*(ndof/3) + 1 + MERGE(CD_VIV_NMS_CYC, 0, cyc_case) + MERGE(0, MERGE(2, 1, il_case), wake_case))*(ndof/3) + 1 IF (with_viv .AND. nv > 0) THEN ALLOCATE (buf(nv)) CALL CD_Get_System_Line_VIV_State(a%sys%fast%system, il, buf, es, em) @@ -428,7 +437,8 @@ LOGICAL FUNCTION rebuild(a, b, with_viv) RESULT(ok) nvc = CD_HFMF_VIVMirrorSize(a%cables(1)) ok = ok .AND. nvc == (MERGE(6, 3, il_case) + MERGE(MERGE(5, 2, wakef_case), 0, wake_case) + & MERGE(4, 0, amp_case) + MERGE(3, 0, ampf_case) + MERGE(7, 0, frame_case) + & - MERGE(1, 0, sto_case) + MERGE(0, MERGE(2, 1, il_case), wake_case))*a%cables(1)%line%nn + 1 + MERGE(1, 0, sto_case) + MERGE(CD_VIV_NMS_CYC, 0, cyc_case) + & + MERGE(0, MERGE(2, 1, il_case), wake_case))*a%cables(1)%line%nn + 1 IF (.NOT. with_viv) THEN ! the cable's VIV block as the fresh build has it (the torsion-free cable ends with it) CALL CD_HFMF_PackMirror(b%cables(1), fresh, es, em) @@ -458,7 +468,9 @@ LOGICAL FUNCTION identical(a, b) RESULT(same) ! the filtered velocity in rows 7-9 of the motion statistics on both lines, no tables same = a%cables(1)%line%viv_frame .AND. .NOT. a%cables(1)%line%has_viv_amp .AND. & a%sys%fast%system%lines(1)%viv_frame .AND. .NOT. a%sys%fast%system%lines(1)%has_viv_amp .AND. & - SIZE(a%cables(1)%line%viv_ms, 1) == 10 .AND. SIZE(a%sys%fast%system%lines(1)%viv_ms, 1) == 10 .AND. & + SIZE(a%cables(1)%line%viv_ms, 1) == 10 + MERGE(CD_VIV_NMS_CYC, 0, cyc_case) .AND. & + SIZE(a%sys%fast%system%lines(1)%viv_ms, 1) == 10 + MERGE(CD_VIV_NMS_CYC, 0, cyc_case) .AND. & + (a%cables(1)%line%viv_cyc .EQV. cyc_case) .AND. (a%sys%fast%system%lines(1)%viv_cyc .EQV. cyc_case) .AND. & MAXVAL(ABS(a%sys%fast%system%lines(1)%viv_ms - b%sys%fast%system%lines(1)%viv_ms)) <= 0.0_wp .AND. & MAXVAL(ABS(a%cables(1)%line%viv_ms - b%cables(1)%line%viv_ms)) <= 0.0_wp END IF @@ -587,7 +599,11 @@ SUBROUTINE write_deck(path, cl, window, dtm, anchor_first, inline, wake, amp, wa END IF IF (PRESENT(wake_tf)) THEN WRITE (u, '(A)') '--------------------- VIV FRAME ---' - WRITE (u, '(A)') 'TypeName Tf' + IF (INDEX(wake_tf, 'cycle') > 0) THEN + WRITE (u, '(A)') 'TypeName Tf Method' + ELSE + WRITE (u, '(A)') 'TypeName Tf' + END IF WRITE (u, '(A)') 'riser '//wake_tf WRITE (u, '(A)') 'cable '//wake_tf END IF diff --git a/tests/test_viv_cycle_frame.f90 b/tests/test_viv_cycle_frame.f90 new file mode 100644 index 00000000..403ba8c9 --- /dev/null +++ b/tests/test_viv_cycle_frame.f90 @@ -0,0 +1,177 @@ +! File: tests/test_viv_cycle_frame.f90 +! SPDX-License-Identifier: Apache-2.0 +! Copyright (c) 2026 Jae Hoon Seo, SMI Lab, Inha University +PROGRAM test_viv_cycle_frame + !! The cycle-mean flow frame kernel (CD_VIV_Cycle_Init, CD_VIV_Cycle_Update, CD_VIV_Cycle_Valid): + !! vbar(t) = (1/T) int_{t-T}^{t} v dt' + (v(t) - v(t-T))/2 over the window T, from a ring of + !! CD_VIV_CYC_NB samples per window of the velocity's integral. + !! * C1 a component of period T and its second harmonic (a cross-flow VIV at f = 1/T and an + !! in-line one at 2f) on a constant drop out: vbar is the constant within 1 % of the harmonics' + !! amplitude after the first window (measured 0.25 %; what is left is the sampled derivative of + !! v(t - T), the quadratic through three samples, of order (omega h)^2/6 with h = T/NB); + !! * C2 a ramp v = a + b t passes without lag: vbar = v(t) to round-off (1e-12; the first-order + !! filter of time T lags it by b T); with the harmonics of C1 on it within 1 %; + !! * C3 a quadratic v = c t^2 gives c (t^2 - T^2/6), the kernel's second-order error, within + !! c h^2 (the sampled integral of a cubic); + !! * C4 C2 and C3 hold for steps longer than a sample interval (dt = 1.7 T/NB) and for a step that + !! does not divide T; + !! * C5 a node at rest at v0 (Init) gives vbar = v0 at once; the state stays valid + !! (CD_VIV_Cycle_Valid) over a long run, also where samples land on step ends (window 1 s, + !! steps of 0.01 s), and a state with a sample time outside [0, 1] or a slot off the ring is + !! invalid. + USE CableDyn_Precision, ONLY: wp + USE CableDyn_VIV, ONLY: CD_VIV_Cycle_Init, CD_VIV_Cycle_Update, CD_VIV_Cycle_Valid, CD_VIV_NMS_CYC, CD_VIV_CYC_NB + IMPLICIT NONE + REAL(wp), PARAMETER :: PI = 3.141592653589793238_wp, TW = 0.4_wp + INTEGER :: nfail + REAL(wp) :: st(CD_VIV_NMS_CYC), vs(3), err + nfail = 0 + + ! C5 at rest + CALL CD_VIV_Cycle_Init(st, [0.3_wp, -0.2_wp, 0.1_wp]) + CALL CD_VIV_Cycle_Update(st, [0.3_wp, -0.2_wp, 0.1_wp], [0.3_wp, -0.2_wp, 0.1_wp], 1.0e-3_wp, TW, vs) + CALL require(MAXVAL(ABS(vs - [0.3_wp, -0.2_wp, 0.1_wp])) <= 1.0e-14_wp, 'C5: a node at rest keeps its velocity') + + ! C1 harmonics on a constant + err = run_case(1, 1.0e-3_wp) + WRITE (*, '(A,ES10.3)') ' C1 harmonics on a constant, max |vbar - v_slow|/amp: ', err + CALL require(err <= 1.0e-2_wp, 'C1: a component of period T and its second harmonic drop out') + ! C2 ramp + err = run_case(2, 1.0e-3_wp) + WRITE (*, '(A,ES10.3)') ' C2 ramp, max |vbar - v|: ', err + CALL require(err <= 1.0e-12_wp, 'C2: a ramp passes without lag') + err = run_case(4, 1.0e-3_wp) + WRITE (*, '(A,ES10.3)') ' C2 ramp with harmonics, max |vbar - v_slow|/amp: ', err + CALL require(err <= 1.0e-2_wp, 'C2: a ramp with harmonics on it passes without lag') + ! C3 quadratic + err = run_case(3, 1.0e-3_wp) + WRITE (*, '(A,ES10.3)') ' C3 quadratic, max |vbar - c (t^2 - T^2/6)| / (c h^2): ', err + CALL require(err <= 1.0_wp, 'C3: a quadratic gives the second-order error c T^2/6') + ! C4 long steps that do not divide T + err = run_case(2, 1.7_wp*TW/REAL(CD_VIV_CYC_NB, wp)) + CALL require(err <= 1.0e-12_wp, 'C4: a ramp passes without lag with steps longer than a sample interval') + err = run_case(3, 1.7_wp*TW/REAL(CD_VIV_CYC_NB, wp)) + CALL require(err <= 1.0_wp, 'C4: the quadratic error holds with steps longer than a sample interval') + + ! C5 a sample landing on a step end (window 1 s, steps of 0.01 s, the 25th step rounded the + ! sample time a few ulps below 0) keeps the state valid over many windows + BLOCK + INTEGER :: k + LOGICAL :: all_ok + CALL CD_VIV_Cycle_Init(st, [0.1_wp, 0.0_wp, 0.0_wp]) + all_ok = .TRUE. + DO k = 1, 10000 + CALL CD_VIV_Cycle_Update(st, [0.1_wp, 0.0_wp, 0.0_wp], [0.1_wp, 0.0_wp, 0.0_wp], 0.01_wp, 1.0_wp, vs) + all_ok = all_ok .AND. CD_VIV_Cycle_Valid(st) .AND. st(1) >= 0.0_wp + END DO + CALL require(all_ok, 'C5: samples on step ends keep a valid state (window 1 s, dt 0.01 s)') + CALL require(MAXVAL(ABS(vs - [0.1_wp, 0.0_wp, 0.0_wp])) <= 1.0e-12_wp, 'C5: and the constant velocity') + END BLOCK + + ! C5 validity + CALL CD_VIV_Cycle_Init(st, [0.0_wp, 0.0_wp, 0.0_wp]) + CALL require(CD_VIV_Cycle_Valid(st), 'C5: the initial state is valid') + st(1) = 1.5_wp + CALL require(.NOT. CD_VIV_Cycle_Valid(st), 'C5: a sample time beyond one interval is invalid') + st(1) = 0.5_wp + st(2) = REAL(CD_VIV_CYC_NB + 3, wp) + CALL require(.NOT. CD_VIV_Cycle_Valid(st), 'C5: a slot off the ring is invalid') + st(2) = 2.5_wp + CALL require(.NOT. CD_VIV_Cycle_Valid(st), 'C5: a fractional slot is invalid') + + IF (nfail > 0) THEN + WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' + ERROR STOP 1 + END IF + WRITE (*, '(A)') 'PASS: the cycle-mean flow frame kernel' + +CONTAINS + + SUBROUTINE require(cond, label) + LOGICAL, INTENT(IN) :: cond + CHARACTER(*), INTENT(IN) :: label + IF (.NOT. cond) THEN + WRITE (*, '(A)') 'MISMATCH: '//label + nfail = nfail + 1 + END IF + END SUBROUTINE require + + PURE FUNCTION signal(kind, t) RESULT(v) + !! The test velocity (three components) and, in v(4:6), its slow part (the expected vbar). + INTEGER, INTENT(IN) :: kind + REAL(wp), INTENT(IN) :: t + REAL(wp) :: v(6), w, h(3) + w = 2.0_wp*PI/TW + h = [0.0_wp, 0.5_wp*SIN(w*t + 0.3_wp), 0.2_wp*COS(2.0_wp*w*t)] + SELECT CASE (kind) + CASE (1) + v(4:6) = [0.25_wp, -0.1_wp, 0.05_wp] + v(1:3) = v(4:6) + h + CASE (2) + v(4:6) = [0.25_wp + 0.03_wp*t, -0.1_wp - 0.02_wp*t, 0.05_wp] + v(1:3) = v(4:6) + CASE (3) + v(1:3) = [0.02_wp*t*t, -0.01_wp*t*t, 0.0_wp] + v(4:6) = v(1:3) - [0.02_wp, -0.01_wp, 0.0_wp]*TW*TW/6.0_wp + CASE DEFAULT + v(4:6) = [0.25_wp + 0.03_wp*t, -0.1_wp - 0.02_wp*t, 0.05_wp] + v(1:3) = v(4:6) + h + END SELECT + END FUNCTION signal + + REAL(wp) FUNCTION run_case(kind, dt) RESULT(err) + !! The largest error of vbar against the slow part over 20 windows, after the first two + !! (a ramp or quadratic case starts from its value continued backwards in time exactly: the + !! ring is primed with the integral of the signal over the window before t = 0). + INTEGER, INTENT(IN) :: kind + REAL(wp), INTENT(IN) :: dt + REAL(wp) :: s(CD_VIV_NMS_CYC), t, v0(6), v1(6), out(3), scale, h + INTEGER :: n, k + CALL prime(kind, s) + h = TW/REAL(CD_VIV_CYC_NB, wp) + ! the harmonics' amplitude; the ramp absolute (round-off); the quadratic's c h^2 + SELECT CASE (kind) + CASE (1, 4) + scale = 0.5_wp + CASE (3) + scale = 0.02_wp*h*h + CASE DEFAULT + scale = 1.0_wp + END SELECT + err = 0.0_wp + n = CEILING(20.0_wp*TW/dt) + t = 0.0_wp + DO k = 1, n + v0 = signal(kind, t) + v1 = signal(kind, t + dt) + CALL CD_VIV_Cycle_Update(s, v0(1:3), v1(1:3), dt, TW, out) + t = t + dt + IF (t > 2.0_wp*TW) err = MAX(err, MAXVAL(ABS(out - v1(4:6)))/scale) + CALL require(CD_VIV_Cycle_Valid(s), 'C5: the state stays valid') + END DO + END FUNCTION run_case + + SUBROUTINE prime(kind, s) + !! The ring at t = 0 for the signal continued backwards: sample j (j - 1 intervals h back) holds + !! (I(-(j - 1) h) - I(0))/h, the integral by Simpson's rule (exact for these polynomials and + !! close for the harmonics, which the first windows flush anyway). + INTEGER, INTENT(IN) :: kind + REAL(wp), INTENT(OUT) :: s(CD_VIV_NMS_CYC) + REAL(wp) :: h, a, b, va(6), vm(6), vb(6), acc(3) + INTEGER :: j + CALL CD_VIV_Cycle_Init(s, [0.0_wp, 0.0_wp, 0.0_wp]) + h = TW/REAL(CD_VIV_CYC_NB, wp) + acc = 0.0_wp + s(3:5) = 0.0_wp + DO j = 2, CD_VIV_CYC_NB + 2 + b = -REAL(j - 2, wp)*h + a = b - h + va = signal(kind, a) + vm = signal(kind, 0.5_wp*(a + b)) + vb = signal(kind, b) + acc = acc - h*(va(1:3) + 4.0_wp*vm(1:3) + vb(1:3))/6.0_wp + s(3 + 3*(j - 1):5 + 3*(j - 1)) = acc/h + END DO + END SUBROUTINE prime + +END PROGRAM test_viv_cycle_frame diff --git a/tests/test_viv_frame_deck.f90 b/tests/test_viv_frame_deck.f90 index 98cd1681..a510dc15 100644 --- a/tests/test_viv_frame_deck.f90 +++ b/tests/test_viv_frame_deck.f90 @@ -25,7 +25,15 @@ PROGRAM test_viv_frame_deck !! 0.5 %, measured at most 0.24 %, frequency within 0.005 Hz), on both cores, with and without !! the tables (an EI = 0 line cannot run between two moving points, so the towed case is !! finite-EI only); - !! G4 refusals by name: a VIV FRAME row on a type without VIV (no Cl, no WAKE OSCILLATOR row). + !! G4 refusals by name: a VIV FRAME row on a type without VIV (no Cl, no WAKE OSCILLATOR row); + !! G5 Method filter (the third column) is the row without it, bit for bit, on both cores; + !! G6 Method cycle (the cycle mean over the window Tf 3.5 s, one period of the 0.29 Hz response): + !! towed, the finite-EI cable responds as + !! the cable held in the current (A/D within 1 %, frequency within 0.005 Hz), and held in the + !! current it leaves the response as the ambient flow gives it (A/D within 0.5 %, frequency + !! within 0.005 Hz), on both cores, with the tables; + !! G7 refusals by name: an unknown Method, Method cycle with Tf 0 and a line whose types mix the + !! two methods. USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK IMPLICIT NONE @@ -46,6 +54,10 @@ PROGRAM test_viv_frame_deck CALL check_tow('vfd_tow', AMP, 'riser 0.31 0.89', fe_cur, fe_cur_tf, ' (tables)') CALL check_tow('vfd_tows', '', '', fs_cur, fs_cur_tf, ' (lift only)') CALL check_refusals() + CALL check_methods('1.0', AMP, 'riser 0.31 0.89', 'vfm_fe', fe_cur) + CALL check_methods('0.0', AMP, '', 'vfm_l', l_cur) + CALL check_cycle_tow(fe_cur) + CALL check_method_refusals() IF (nfail > 0) THEN WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed' ERROR STOP 1 @@ -133,7 +145,7 @@ SUBROUTINE write_rows(u, title, header, rows) END DO END SUBROUTINE write_rows - SUBROUTINE write_deck(path, ei, amp_rows, damp_rows, tmax_, tow, frame_rows, cl) + SUBROUTINE write_deck(path, ei, amp_rows, damp_rows, tmax_, tow, frame_rows, cl, mix) !! ei the type's EI; amp_rows/damp_rows: the VIV AMPLITUDE and VIV DAMPING data rows, !! ';'-separated ('' for no section); tow: no current, both ends Coupled and moved by the motion !! file vfd_tow.txt; frame_rows: the VIV FRAME data rows (no section without it). @@ -141,10 +153,14 @@ SUBROUTINE write_deck(path, ei, amp_rows, damp_rows, tmax_, tow, frame_rows, cl) REAL(wp), INTENT(IN) :: tmax_ LOGICAL, INTENT(IN) :: tow CHARACTER(*), INTENT(IN), OPTIONAL :: frame_rows, cl + LOGICAL, INTENT(IN), OPTIONAL :: mix CHARACTER(8) :: cl_col INTEGER :: u + LOGICAL :: two cl_col = '0.8' IF (PRESENT(cl)) cl_col = cl + two = .FALSE. + IF (PRESENT(mix)) two = mix OPEN (NEWUNIT=u, FILE=path, STATUS='REPLACE', ACTION='WRITE') WRITE (u, '(A)') '--------------------- CableDyn Input File ---------------------------------' WRITE (u, '(A)') 'VIV FRAME deck gate: taut cable in a uniform current or towed through still water' @@ -152,6 +168,8 @@ SUBROUTINE write_deck(path, ei, amp_rows, damp_rows, tmax_, tow, frame_rows, cl) WRITE (u, '(A)') 'TypeName Diam Mass/m EA BA/-zeta EI Cd Ca CdAx CaAx Cl dF cF' WRITE (u, '(A)') 'riser 0.10 10.0 5.0e7 -0.8 '//ei//' 1.2 1.0 0.0 0.0 '//TRIM(cl_col)// & ' 0.08 0.18' + IF (two) WRITE (u, '(A)') 'riser2 0.10 10.0 5.0e7 -0.8 '//ei//' 1.2 1.0 0.0 0.0 '// & + TRIM(cl_col)//' 0.08 0.18' WRITE (u, '(A)') '----------------------- POINTS ----------------------------------------------' WRITE (u, '(A)') 'ID Attachment X Y Z M V CdA CA' WRITE (u, '(A)') '1 Coupled 0.0 0.0 -50.0 0 0 0 0' @@ -165,10 +183,21 @@ SUBROUTINE write_deck(path, ei, amp_rows, damp_rows, tmax_, tow, frame_rows, cl) WRITE (u, '(A)') '1 1 2 -' WRITE (u, '(A)') '----------------------- SECTIONS --------------------------------------------' WRITE (u, '(A)') 'LineID LineType Length NumSegs' - WRITE (u, '(A)') '1 riser 99.900100 50' + IF (two) THEN + WRITE (u, '(A)') '1 riser 49.950050 25' + WRITE (u, '(A)') '1 riser2 49.950050 25' + ELSE + WRITE (u, '(A)') '1 riser 99.900100 50' + END IF IF (LEN_TRIM(amp_rows) > 0) CALL write_rows(u, 'VIV AMPLITUDE', 'TypeName AD Cv CdAmp', amp_rows) IF (LEN_TRIM(damp_rows) > 0) CALL write_rows(u, 'VIV DAMPING', 'TypeName a b', damp_rows) - IF (PRESENT(frame_rows)) CALL write_rows(u, 'VIV FRAME', 'TypeName Tf', frame_rows) + IF (PRESENT(frame_rows)) THEN + IF (INDEX(frame_rows, 'cycle') > 0 .OR. INDEX(frame_rows, 'filter') > 0 .OR. INDEX(frame_rows, 'bogus') > 0) THEN + CALL write_rows(u, 'VIV FRAME', 'TypeName Tf Method', frame_rows) + ELSE + CALL write_rows(u, 'VIV FRAME', 'TypeName Tf', frame_rows) + END IF + END IF WRITE (u, '(A)') '---------------------- OPTIONS ----------------------------------------------' WRITE (u, '(A)') '0.01 dtM' WRITE (u, '(A)') '100.0 WtrDpth' @@ -350,4 +379,67 @@ SUBROUTINE check_refusals() 'G4: a VIV FRAME row on a type without VIV is refused') END SUBROUTINE check_refusals + SUBROUTINE check_methods(ei, amp_rows, damp_rows, tag, ref) + !! G5 and G6 (held) on the cable of EI ei in the current: Method filter against the row without + !! it, and Method cycle against the ambient flow (ref: A/D, f without the section). + CHARACTER(*), INTENT(IN) :: ei, amp_rows, damp_rows, tag + REAL(wp), INTENT(IN) :: ref(2) + REAL(wp) :: r(2) + LOGICAL :: ok + CHARACTER(1024) :: msg + CHARACTER(:), ALLOCATABLE :: lab + lab = ' (EI '//ei//')' + CALL write_deck(tag//'_tf.dat', ei, amp_rows, damp_rows, TMAX, .FALSE., frame_rows='riser 10') + CALL run(tag//'_tf.dat', tag//'_tf', ok, msg) + CALL require(ok, 'G5: the deck with Tf 10 s runs'//lab//': '//TRIM(msg)) + CALL write_deck(tag//'_flt.dat', ei, amp_rows, damp_rows, TMAX, .FALSE., frame_rows='riser 10 filter') + CALL run(tag//'_flt.dat', tag//'_flt', ok, msg) + CALL require(ok, 'G5: the deck with Method filter runs'//lab//': '//TRIM(msg)) + CALL require(same_file(tag//'_tf.out', tag//'_flt.out'), & + 'G5: Method filter is the row without it, bit for bit'//lab) + CALL write_deck(tag//'_cyc.dat', ei, amp_rows, damp_rows, TMAX, .FALSE., frame_rows='riser 3.5 cycle') + CALL run(tag//'_cyc.dat', tag//'_cyc', ok, msg) + CALL require(ok, 'G6: the deck with Method cycle runs'//lab//': '//TRIM(msg)) + CALL stats(tag//'_cyc', r, ok) + CALL require(ok, 'G6: the cycle run wrote its rows'//lab) + WRITE (*, '(A,2F8.4,A,2F8.4)') 'G6'//lab//': in the current A/D, f [Hz] with Method cycle ', r, '; ambient ', ref + CALL require(ABS(r(1)/ref(1) - 1.0_wp) <= 0.005_wp .AND. ABS(r(2) - ref(2)) <= 0.005_wp, & + 'G6: held in the current, Method cycle leaves the response as the ambient flow gives it'//lab) + END SUBROUTINE check_methods + + SUBROUTINE check_cycle_tow(ref) + !! G6 (towed) on the finite-EI cable with the tables, Method cycle, against the cable held in the + !! current (ref). + REAL(wp), INTENT(IN) :: ref(2) + REAL(wp) :: r(2) + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('vfm_tow_cyc.dat', '1.0', AMP, 'riser 0.31 0.89', TMAX, .TRUE., frame_rows='riser 3.5 cycle') + CALL run('vfm_tow_cyc.dat', 'vfm_tow_cyc', ok, msg) + CALL require(ok, 'G6: the towed deck with Method cycle runs: '//TRIM(msg)) + CALL stats('vfm_tow_cyc', r, ok) + CALL require(ok, 'G6: the towed cycle run wrote its rows') + WRITE (*, '(A,2F8.4,A,2F8.4)') 'G6: towed A/D, f [Hz] with Method cycle ', r, '; held in the current ', ref + CALL require(ABS(r(1)/ref(1) - 1.0_wp) <= TOL_TOW .AND. ABS(r(2) - ref(2)) <= 0.005_wp, & + 'G6: towed with Method cycle, the cable responds as the cable held in the current') + END SUBROUTINE check_cycle_tow + + SUBROUTINE check_method_refusals() + LOGICAL :: ok + CHARACTER(1024) :: msg + CALL write_deck('vfm_bad1.dat', '1.0', '', '', 1.0_wp, .FALSE., frame_rows='riser 10 bogus') + CALL run('vfm_bad1.dat', 'vfm_bad1', ok, msg) + WRITE (*, '(A)') 'G7 an unknown Method: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'Method must be filter or cycle') > 0, 'G7: an unknown Method is refused') + CALL write_deck('vfm_bad2.dat', '1.0', '', '', 1.0_wp, .FALSE., frame_rows='riser 0 cycle') + CALL run('vfm_bad2.dat', 'vfm_bad2', ok, msg) + WRITE (*, '(A)') 'G7 Method cycle with Tf 0: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'with a window Tf > 0') > 0, 'G7: Method cycle with Tf 0 is refused') + CALL write_deck('vfm_bad3.dat', '1.0', '', '', 1.0_wp, .FALSE., frame_rows='riser 1 cycle;riser2 1 filter', & + mix=.TRUE.) + CALL run('vfm_bad3.dat', 'vfm_bad3', ok, msg) + WRITE (*, '(A)') 'G7 mixed methods: '//TRIM(msg) + CALL require(.NOT. ok .AND. INDEX(msg, 'mix the methods') > 0, 'G7: a line whose types mix the methods is refused') + END SUBROUTINE check_method_refusals + END PROGRAM test_viv_frame_deck diff --git a/tests/test_viv_wake_deck.f90 b/tests/test_viv_wake_deck.f90 index dece5969..5bccad05 100644 --- a/tests/test_viv_wake_deck.f90 +++ b/tests/test_viv_wake_deck.f90 @@ -28,8 +28,9 @@ PROGRAM test_viv_wake_deck !! fixed cable in the current with Tf 10 s locks in as without it (the filter removes the !! VIV velocity: A/D within 2 %, frequency within 0.002 Hz), on both cores, and the two !! cores agree there as in W5 (an EI = 0 line cannot run between two moving points); - !! W7 VIV FRAME refusals by name: a malformed row, an unknown or repeated type, - !! a negative Tf, and a type without VIV (no Cl, no WAKE OSCILLATOR row). + !! W7 VIV FRAME refusals by name: a malformed row, an unknown Method, Method cycle on a + !! wake-oscillator type, an unknown or repeated type, a negative Tf, and a type without VIV + !! (no Cl, no WAKE OSCILLATOR row). USE CableDyn_Precision, ONLY: wp USE CableDyn_DeckDriver, ONLY: CD_Run_Deck_Driver, CD_DECKDRV_OK IMPLICIT NONE @@ -411,8 +412,12 @@ END SUBROUTINE check_filter_fixed SUBROUTINE check_refusals() CALL refused('riser 0.3 0.2 0.3 12 1', 'TypeName CL0 [St [eps [A]]]', 'a row of six columns') - CALL refused('riser 0.3', 'VIV FRAME rows must be: TypeName Tf', 'W7: a VIV FRAME row of three columns', & - frame_rows='riser 10 1') + CALL refused('riser 0.3', 'VIV FRAME rows must be: TypeName Tf [Method]', 'W7: a VIV FRAME row of four columns', & + frame_rows='riser 10 cycle 1') + CALL refused('riser 0.3', 'VIV FRAME Method must be filter or cycle', & + 'W7: a VIV FRAME row with an unknown Method', frame_rows='riser 10 1') + CALL refused('riser 0.3', 'acts on the synchronisation model', 'W7: Method cycle on a wake-oscillator type', & + frame_rows='riser 10 cycle') CALL refused('riser 0.3', 'VIV FRAME row names undefined LINE TYPE', 'W7: an unknown type', & frame_rows='cable 10') CALL refused('riser 0.3', 'VIV FRAME names LINE TYPE', 'W7: a repeated type', frame_rows='riser 10;riser 5') From 1b1c469f0f693bd0f1e610556701fa6fa7c420ad Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 20 Nov 2026 21:21:48 +0900 Subject: [PATCH 46/47] release: CableDyn 0.4.3 Set the version to 0.4.3 (2026-11-20) in the build, the Fortran banner, the OpenFAST module, the C API and its header, the Python package and CITATION.cff, and date the CHANGELOG section. The release note of the documentation front page names what 0.4.3 changes. The README and VALIDATION.md name the 0.4.2 release driver as the one the L5 wall-clock records were measured with. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 5 ++++- CITATION.cff | 4 ++-- CMakeLists.txt | 2 +- README.md | 14 +++++++------- RELEASE.md | 2 +- VALIDATION.md | 2 +- doc/capi.rst | 8 ++++---- doc/citing.rst | 2 +- doc/coupling_boundary.md | 2 +- doc/index.rst | 16 ++++++++-------- doc/installation.rst | 26 +++++++++++++------------- doc/openfast.rst | 2 +- doc/quickstart.rst | 4 ++-- doc/tutorial_openfast.rst | 2 +- examples/openfast/README.md | 2 +- integration/openfast/README.md | 4 ++-- pyproject.toml | 2 +- python/README.md | 2 +- python/cabledyn/__init__.py | 2 +- python/pyproject.toml | 2 +- release/check_release_metadata.py | 4 ++-- src/CableDyn_Banner.f90 | 2 +- src/CableDyn_CAPI.f90 | 4 ++-- src/CableDyn_CAPI.h | 2 +- src/openfast/CableDyn_OF.f90 | 2 +- tests/test_c_api.f90 | 2 +- 26 files changed, 62 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83cfa54b..838c3f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ All notable changes to CableDyn are recorded in this file. The format follows ## [Unreleased] +## [0.4.3] - 2026-11-20 + ### Added - `VIV FRAME` method `cycle`: an optional third column, rows `TypeName Tf [Method]`, `filter` (the @@ -1410,7 +1412,8 @@ Corrections made during the pre-release review. values of the shipped example decks and states which tension (end element or `FairTen` end force) each comparison uses. -[Unreleased]: https://github.com/SMI-Lab-Inha/CableDyn/compare/v0.4.2...HEAD +[Unreleased]: https://github.com/SMI-Lab-Inha/CableDyn/compare/v0.4.3...HEAD +[0.4.3]: https://github.com/SMI-Lab-Inha/CableDyn/releases/tag/v0.4.3 [0.4.2]: https://github.com/SMI-Lab-Inha/CableDyn/releases/tag/v0.4.2 [0.4.1]: https://github.com/SMI-Lab-Inha/CableDyn/releases/tag/v0.4.1 [0.4.0]: https://github.com/SMI-Lab-Inha/CableDyn/releases/tag/v0.4.0 diff --git a/CITATION.cff b/CITATION.cff index a34cf73c..69442422 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -23,8 +23,8 @@ authors: repository-code: "https://github.com/SMI-Lab-Inha/CableDyn" url: "https://github.com/SMI-Lab-Inha/CableDyn" license: Apache-2.0 -version: 0.4.2 -date-released: 2026-11-09 +version: 0.4.3 +date-released: 2026-11-20 keywords: - mooring dynamics - cable dynamics diff --git a/CMakeLists.txt b/CMakeLists.txt index cf31a56c..ddbfa291 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ # cmake_minimum_required(VERSION 3.20) # VERSION is a bare numeric triple matching the release version. -project(CableDynCore VERSION 0.4.2 LANGUAGES C Fortran +project(CableDynCore VERSION 0.4.3 LANGUAGES C Fortran DESCRIPTION "CableDyn geometrically exact cable/mooring solver — Fortran core") option(CABLEDYN_ENABLE_COVERAGE "Instrument the GNU Fortran core for gcov/gcovr source coverage" OFF) diff --git a/README.md b/README.md index 39e876a3..a9d6998c 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ lifting off the seabed lie inside the formulation. It runs as a standalone program, as a mooring module of OpenFAST and FAST.Farm (`CompMooring = 5`), through a C interface, or from Python. -The current stable release is `v0.4.2`; interfaces are versioned and may change before `1.0.0`. +The current stable release is `v0.4.3`; interfaces are versioned and may change before `1.0.0`. ## What CableDyn does @@ -68,10 +68,10 @@ selection: | Bergdahl dynamic chain test, 30 conditions | measured end force | correlation 0.993 | | IEA 15 MW VolturnUS-S in OpenFAST with a power cable | OpenFAST with MoorDyn | platform motions within 0.6 % | -Run times on one processor thread, same host and protocol, with the timing scripts in +Run times of the 0.4.2 release driver on one processor thread, same host and protocol, with the timing scripts in [`validation/performance`](https://cabledyn.readthedocs.io/en/latest/validation.html): -| Case | CableDyn 0.4.2 | OrcaFlex 11.6d | +| Case | CableDyn | OrcaFlex 11.6d | |---|---|---| | 80 / 200 / 800 m lazy-wave spans, 60 s of heave | 1.3 / 2.4 / 5.0 s | 2.7 / 5.3 / 27.8 s | | One-hour VolturnUS-S chain mooring | 4.3 s | 19.7 s | @@ -89,8 +89,8 @@ Unsupported combinations stop with a named error rather than running approximate |---|---| | `CableDyn_driver.exe` | Standalone solver for Windows x64 (AVX2 processor) | | `openfast.exe` | OpenFAST with CableDyn available as `CompMooring = 5` | - | `cabledyn-0.4.2-py3-none-any.whl` | Python package (pre- and post-processing, batch runs) | - | `cabledyn-0.4.2.tar.gz` | Python source distribution | + | `cabledyn-0.4.3-py3-none-any.whl` | Python package (pre- and post-processing, batch runs) | + | `cabledyn-0.4.3.tar.gz` | Python source distribution | | `SHA256SUMS.txt` | Checksums for the assets above | Both executables are statically linked, need no installer, compiler, or runtime @@ -128,7 +128,7 @@ Unsupported combinations stop with a named error rather than running approximate cabledyn-run examples\wd0050_chain.dat wd0050 ``` - The pure Python wheel on the release page (`cabledyn-0.4.2-py3-none-any.whl`) + The pure Python wheel on the release page (`cabledyn-0.4.3-py3-none-any.whl`) carries no driver: `cabledyn-run` then needs `--executable .\CableDyn_driver.exe`, the `CABLEDYN_DRIVER` environment variable, or the driver on `PATH`. A source build names the driver `cabledyn` (see [Build from source](#build-from-source)); @@ -202,7 +202,7 @@ If you use CableDyn in academic work, please cite: > offshore wind. *Ocean Engineering* 368 (Part 2), 128332, 2026. > -To identify the software version, also cite the release (CableDyn 0.4.2). +To identify the software version, also cite the release (CableDyn 0.4.3). The [citation file](https://cabledyn.readthedocs.io/en/latest/citing.html) contains both entries (GitHub **Cite this repository**); BibTeX is on the manual's [How to cite](https://cabledyn.readthedocs.io/en/latest/citing.html) page. diff --git a/RELEASE.md b/RELEASE.md index 0758dcda..4d17a314 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -104,7 +104,7 @@ The build fails if either executable imports a non-system DLL or lacks the UTF-8 active-code-page manifest (`release/check_static_windows_binary.ps1`), or if the standalone and `CompMooring = 5` smoke cases fail with a system-only `PATH` or from a folder named in mixed scripts. It also fails unless `openfast.exe -v` names the -executable `OpenFAST-v5.0.0-CableDyn-0.4.2`: the OpenFAST base and the CableDyn version, +executable `OpenFAST-v5.0.0-CableDyn-0.4.3`: the OpenFAST base and the CableDyn version, never a `-dirty` describe of the patched tree. The release workflow (`.github/workflows/release-windows-static.yml`) produces diff --git a/VALIDATION.md b/VALIDATION.md index 3b68fed2..403e3744 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -682,7 +682,7 @@ the tow tests it predicts). Inputs, reduction scripts, results, and source prove ### Wall-clock time -The measurements below were made on 2026-11-08 and 2026-11-09 (CableDyn 0.4.2) on one host (AMD Ryzen Threadripper PRO 7965WX, +The measurements below were made on 2026-11-08 and 2026-11-09 (the 0.4.2 release driver and a GNU build of its source) on one host (AMD Ryzen Threadripper PRO 7965WX, Windows 11 Pro) with one thread per code, as the median of three runs after one warm-up. They come from [`validation/scripts/performance_records.py`](https://github.com/SMI-Lab-Inha/CableDyn/blob/main/validation/scripts/performance_records.py), which also checks each timed model against its reference response. CableDyn is timed with the diff --git a/doc/capi.rst b/doc/capi.rst index 7c7593dd..1f1e7d51 100644 --- a/doc/capi.rst +++ b/doc/capi.rst @@ -122,12 +122,12 @@ files directly, as shown below. - Library files - Header * - Linux - - ``lib/libcabledyn.so.0.4.2``, the soname link ``libcabledyn.so.1``, and the development + - ``lib/libcabledyn.so.0.4.3``, the soname link ``libcabledyn.so.1``, and the development link ``libcabledyn.so``. ``lib`` is the platform ``CMAKE_INSTALL_LIBDIR``, which can be ``lib64`` or a multiarch directory. - ``include/CableDyn_CAPI.h`` * - macOS - - ``lib/libcabledyn.0.4.2.dylib``, ``lib/libcabledyn.1.dylib``, ``lib/libcabledyn.dylib`` + - ``lib/libcabledyn.0.4.3.dylib``, ``lib/libcabledyn.1.dylib``, ``lib/libcabledyn.dylib`` - ``include/CableDyn_CAPI.h`` * - Windows, GNU toolchain - ``bin/libcabledyn.dll`` and the import library ``lib/libcabledyn.dll.a``. The GNU @@ -257,7 +257,7 @@ ABI and versioning - the same four numbers, reported by the loaded library * - ``CableDyn_GetVersionString`` - runtime - - ``"CableDyn 0.4.2 C-ABI 1"`` + - ``"CableDyn 0.4.3 C-ABI 1"`` * - shared-library ``SOVERSION`` - 1 - soname ``libcabledyn.so.1`` or install name ``libcabledyn.1.dylib``. The Windows DLL @@ -830,7 +830,7 @@ Version queries - ``char *`` - ``version_len`` - yes: no-op - - receives ``"CableDyn 0.4.2 C-ABI 1"``, truncated to ``version_len - 1`` characters and + - receives ``"CableDyn 0.4.3 C-ABI 1"``, truncated to ``version_len - 1`` characters and ``NUL``-terminated * - ``version_len`` - in diff --git a/doc/citing.rst b/doc/citing.rst index de9623bd..cc88f09d 100644 --- a/doc/citing.rst +++ b/doc/citing.rst @@ -53,7 +53,7 @@ software]. https://github.com/SMI-Lab-Inha/CableDyn } When results depend on a particular release, quote the version reported in the solver banner -(``CableDyn v0.4.2``) together with the options recorded for the run. +(``CableDyn v0.4.3``) together with the options recorded for the run. Relation to the journal article ------------------------------- diff --git a/doc/coupling_boundary.md b/doc/coupling_boundary.md index 4caf90cf..5c441a73 100644 --- a/doc/coupling_boundary.md +++ b/doc/coupling_boundary.md @@ -117,7 +117,7 @@ Rules shared by every entry point: The interface ships as the versioned shared library `libcabledyn` (`cabledyn.dll` in an Intel Fortran and MSVC build; CMake target `cabledyn_shared`) with the installed header; it reports -CableDyn 0.4.2 and C ABI version 1, minor extension 4. The Python package uses the same library. +CableDyn 0.4.3 and C ABI version 1, minor extension 4. The Python package uses the same library. ### Concurrency diff --git a/doc/index.rst b/doc/index.rst index 81e9d1f7..1646dcc0 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -14,12 +14,12 @@ with MoorDyn-C, MoorDyn-F, and OrcaFlex on common reference cases. .. admonition:: Release status :class: note - CableDyn ``v0.4.2`` is the current stable release. It is on PyPI with wheels that carry the - solver (``pip install cabledyn``). It makes the modal analysis of long lines and the - finite-EI dynamic step faster, holds the finite-EI static solve to its tolerance on graded - meshes, in cross currents, with attachments, ``Rigid`` ends and as-laid friction, gives a - mesh-independent axial damping ratio (``axialDampingRatio mode1``), and runs every shipped - example deck in its test suite. + CableDyn ``v0.4.3`` is the current stable release. It is on PyPI with wheels that carry the + solver (``pip install cabledyn``). It adds in-line, higher-harmonic and wake-oscillator VIV, + amplitude-dependent VIV coefficients and cross-flow damping, a VIV frame for cables moved + through the water, and bending and Rayleigh damping of finite-EI cables, each validated + against published riser and power-cable tests; it makes the coupled outputs of a cable + restrained in torsion several times cheaper, and lets a finite-EI line end on a free point. Every comparative-accuracy statement is linked to a passing benchmark in :doc:`validation`. The project remains below ``1.0.0``, so public APIs may evolve between minor releases. @@ -55,8 +55,8 @@ Download to first result in five minutes ---------------------------------------- #. Download ``CableDyn_driver.exe``, ``SHA256SUMS.txt``, and **Source code (zip)** (for the - ``examples`` folder) from the `v0.4.2 release - `_ and verify the checksum — + ``examples`` folder) from the `v0.4.3 release + `_ and verify the checksum — :doc:`installation`. No installer and no runtime DLLs. #. Put ``CableDyn_driver.exe`` in a working folder, unzip the source archive, and copy its ``examples`` folder next to the executable. diff --git a/doc/installation.rst b/doc/installation.rst index 65f1395c..55a0a069 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -6,8 +6,8 @@ Installation There are two ways to get CableDyn: * **Windows release (recommended for users).** Two single-file executables and a Python wheel, - attached to the `v0.4.2 GitHub release - `_. No installer, no compiler, + attached to the `v0.4.3 GitHub release + `_. No installer, no compiler, and no runtime DLLs. Start here if you want a first result in five minutes. * **Build from source** (Windows, Linux, macOS). Needed for the C/Python in-process API, for development, and on every platform other than Windows x64. @@ -35,11 +35,11 @@ What is on the release page - OpenFAST v5.0.0 (maintained by NLR, the National Laboratory of the Rockies, formerly NREL) with CableDyn built in as ``CompMooring = 5``; stock MoorDyn (``CompMooring = 3``) is still available in the same binary (:doc:`openfast`). It names - itself ``OpenFAST-v5.0.0-CableDyn-0.4.2`` (``openfast.exe -v`` and the start of every run). - * - ``cabledyn-0.4.2-py3-none-any.whl`` + itself ``OpenFAST-v5.0.0-CableDyn-0.4.3`` (``openfast.exe -v`` and the start of every run). + * - ``cabledyn-0.4.3-py3-none-any.whl`` - the pure-Python package: deck editing, case generation, driver automation, result readers, fatigue and spectral post-processing (:doc:`python`) - * - ``cabledyn-0.4.2.tar.gz`` + * - ``cabledyn-0.4.3.tar.gz`` - the Python source distribution (same package as the wheel) * - ``SHA256SUMS.txt`` - SHA-256 checksums of the four files above @@ -65,7 +65,7 @@ Download and verify ~~~~~~~~~~~~~~~~~~~ 1. Create a folder, for example ``C:\CableDyn``, and download into it ``CableDyn_driver.exe``, - ``openfast.exe`` (only if you will couple with OpenFAST), ``cabledyn-0.4.2-py3-none-any.whl`` + ``openfast.exe`` (only if you will couple with OpenFAST), ``cabledyn-0.4.3-py3-none-any.whl`` (only if you will use Python), ``SHA256SUMS.txt``, and ``Source code (zip)``. 2. Verify every downloaded asset against ``SHA256SUMS.txt`` in PowerShell: @@ -85,8 +85,8 @@ Download and verify OK CableDyn_driver.exe OK openfast.exe - OK cabledyn-0.4.2-py3-none-any.whl - not downloaded cabledyn-0.4.2.tar.gz + OK cabledyn-0.4.3-py3-none-any.whl + not downloaded cabledyn-0.4.3.tar.gz ``not downloaded`` only reports an asset you chose to skip. @@ -95,7 +95,7 @@ Download and verify ``(Get-FileHash .\CableDyn_driver.exe -Algorithm SHA256).Hash`` with its line in ``SHA256SUMS.txt`` (the comparison is case-insensitive). -3. Unzip ``Source code (zip)``. It expands to a folder such as ``CableDyn-0.4.2``; copy (or move) +3. Unzip ``Source code (zip)``. It expands to a folder such as ``CableDyn-0.4.3``; copy (or move) its ``examples`` folder into ``C:\CableDyn`` so the layout is:: C:\CableDyn\ @@ -121,7 +121,7 @@ Check that it runs .. code-block:: text =================================================================== - CableDyn v0.4.2 + CableDyn v0.4.3 Geometrically exact finite-element statics and dynamics of mooring lines and dynamic power cables for floating offshore wind ------------------------------------------------------------------- @@ -177,8 +177,8 @@ the CableDyn shared library and the standalone driver, so the package runs decks release executables. On another platform pip builds from the source distribution, which needs a Fortran compiler and LAPACK. -The pure Python wheel on the release page (``cabledyn-0.4.2-py3-none-any.whl``) carries no -solver; install it with ``py -m pip install .\cabledyn-0.4.2-py3-none-any.whl``. The package +The pure Python wheel on the release page (``cabledyn-0.4.3-py3-none-any.whl``) carries no +solver; install it with ``py -m pip install .\cabledyn-0.4.3-py3-none-any.whl``. The package finds the driver in this order: #. an explicit path, ``CableDynDriver(r"C:\CableDyn\CableDyn_driver.exe")`` or @@ -273,7 +273,7 @@ The script downloads the LAPACK source from its release tag and verifies its SHA integration to OpenFAST itself (do not pre-apply it), builds both executables, rejects any non-system DLL import, runs a standalone and a coupled ``CompMooring = 5`` / ``CompMooring = 3`` smoke case with a system-only ``PATH``, and writes -``SHA256SUMS.txt`` into ``build-static-release\dist``. The v0.4.2 assets were built from +``SHA256SUMS.txt`` into ``build-static-release\dist``. The v0.4.3 assets were built from OpenFAST revision ``2895884d2be01862173c88d70f86b358d2f1a50a`` and smoke-tested against ``r-test`` revision ``dd5feaaaa500ba7283140107806300d551cff0a7``. diff --git a/doc/openfast.rst b/doc/openfast.rst index d944fefe..780e37cd 100644 --- a/doc/openfast.rst +++ b/doc/openfast.rst @@ -223,7 +223,7 @@ Run and confirm Before trusting a run, confirm in the console: -#. ``Running CableDyn (v0.4.2, ...)`` and ``Parsing CableDyn input file: ``; +#. ``Running CableDyn (v0.4.3, ...)`` and ``Parsing CableDyn input file: ``; #. the ``dtM`` line and the model inventory (``Created CableDyn model: ... line object(s)``); #. for every line, the converged fairlead effective tension, force vector, inclination, declination, and azimuth at the static equilibrium — printed unconditionally, whether or not diff --git a/doc/quickstart.rst b/doc/quickstart.rst index 7dbe3dca..89c3a6ae 100644 --- a/doc/quickstart.rst +++ b/doc/quickstart.rst @@ -18,7 +18,7 @@ and the ``examples`` folder (from the release's **Source code (zip)**) side by s .. code-block:: powershell Set-Location C:\CableDyn - .\CableDyn_driver.exe --version # prints the v0.4.2 banner, exit code 0 + .\CableDyn_driver.exe --version # prints the v0.4.3 banner, exit code 0 2. Solve a mooring line ----------------------- @@ -38,7 +38,7 @@ The run takes well under a second: .. code-block:: text =================================================================== - CableDyn v0.4.2 + CableDyn v0.4.3 Geometrically exact finite-element statics and dynamics of mooring lines and dynamic power cables for floating offshore wind ------------------------------------------------------------------- diff --git a/doc/tutorial_openfast.rst b/doc/tutorial_openfast.rst index a9e41cb1..726b26fa 100644 --- a/doc/tutorial_openfast.rst +++ b/doc/tutorial_openfast.rst @@ -168,7 +168,7 @@ The CableDyn part of the console (other modules' lines trimmed): .. code-block:: text - Running CableDyn (v0.4.2, 2026-11-09). + Running CableDyn (v0.4.3, 2026-11-20). CableDyn: geometrically exact finite-element statics and dynamics of mooring lines and dynamic power cables. ... CableDyn time step dtM = 2.50000E-02 s (1 x glue DT; deck dtM) diff --git a/examples/openfast/README.md b/examples/openfast/README.md index 7ed66bfb..7dac9f6d 100644 --- a/examples/openfast/README.md +++ b/examples/openfast/README.md @@ -70,7 +70,7 @@ Grid sizing is described in the manual's OpenFAST page (SeaState grid). .\openfast.exe IEA-15-UMaine_CompMooring3_MoorDyn.fst # MoorDyn ``` -The CableDyn run log identifies the module with `Running CableDyn (v0.4.2, 2026-11-09)` and +The CableDyn run log identifies the module with `Running CableDyn (v0.4.3, 2026-11-20)` and prints the converged fairlead state of each line, as the standalone driver does: ```text diff --git a/integration/openfast/README.md b/integration/openfast/README.md index 3761dbea..10adb328 100644 --- a/integration/openfast/README.md +++ b/integration/openfast/README.md @@ -9,7 +9,7 @@ who only run coupled cases should use the released `openfast.exe` and the The patches in [`patches/`](patches/) apply to the public OpenFAST upstream commit `2895884d2be01862173c88d70f86b358d2f1a50a` (the OpenFAST v5.0.0 release, used by -CableDyn v0.4.2). They add only the OpenFAST host integration; the CableDyn sources come from +CableDyn v0.4.3). They add only the OpenFAST host integration; the CableDyn sources come from this repository. | File | Purpose | @@ -67,7 +67,7 @@ ifx default, `/fp:fast`, may reassociate sums and flush subnormals to zero. OpenFAST names its version with `git describe --dirty`, which would read `v5.0.0-dirty` on the patched tree. A CableDyn-enabled executable names itself `OpenFAST--CableDyn-` instead, here -`OpenFAST-v5.0.0-CableDyn-0.4.2` (printed by `openfast.exe -v` and at the start of every run). +`OpenFAST-v5.0.0-CableDyn-0.4.3` (printed by `openfast.exe -v` and at the start of every run). The OpenFAST part is `git describe --tags --abbrev=8` of the checked-out commit, the unpatched base; the CableDyn part is the project version in the CableDyn `CMakeLists.txt`. Patch `0021` sets it in the CMake build, and `integrate_openfast_vs_solution.ps1` in the diff --git a/pyproject.toml b/pyproject.toml index b89abb2a..2c5f381c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ build-backend = "scikit_build_core.build" [project] name = "cabledyn" -version = "0.4.2" +version = "0.4.3" description = "Python tools for CableDyn, a geometrically exact finite-element solver for mooring lines and dynamic power cables" readme = "python/README.md" requires-python = ">=3.10" diff --git a/python/README.md b/python/README.md index 23652cae..762e218c 100644 --- a/python/README.md +++ b/python/README.md @@ -25,7 +25,7 @@ Fortran compiler and LAPACK. The pure Python wheel attached to each [GitHub release](https://github.com/SMI-Lab-Inha/CableDyn/releases/latest) -(`cabledyn-0.4.2-py3-none-any.whl`) carries no solver. `CableDynDriver` finds the +(`cabledyn-0.4.3-py3-none-any.whl`) carries no solver. `CableDynDriver` finds the driver from an explicit path, then the `CABLEDYN_DRIVER` environment variable, then the driver inside the package, then `PATH`; the in-process `CableDyn` class uses the library inside the package, or one named by `CABLEDYN_LIBRARY` or found in diff --git a/python/cabledyn/__init__.py b/python/cabledyn/__init__.py index d13fdac0..63070260 100644 --- a/python/cabledyn/__init__.py +++ b/python/cabledyn/__init__.py @@ -300,7 +300,7 @@ "viv_response", ] -__version__ = "0.4.2" +__version__ = "0.4.3" def __getattr__(name: str) -> Any: diff --git a/python/pyproject.toml b/python/pyproject.toml index 6a99fb89..cb544a53 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" [project] name = "cabledyn" -version = "0.4.2" +version = "0.4.3" description = "Python tools for CableDyn, a geometrically exact finite-element solver for mooring lines and dynamic power cables" readme = "README.md" requires-python = ">=3.10" diff --git a/release/check_release_metadata.py b/release/check_release_metadata.py index e0636349..ed3b8ebe 100644 --- a/release/check_release_metadata.py +++ b/release/check_release_metadata.py @@ -26,8 +26,8 @@ def capture(relative_path: str, pattern: str, label: str) -> str: return match.group(1) -# Spellings that name a CableDyn release: "CableDyn 0.4.2", "CableDyn v0.4.2", "v0.4.2", -# "cabledyn-0.4.2-py3-none-any.whl", ".../releases/tag/v0.4.2" and "libcabledyn.so.0.4.2". +# Spellings that name a CableDyn release: "CableDyn 0.4.3", "CableDyn v0.4.3", "v0.4.3", +# "cabledyn-0.4.3-py3-none-any.whl", ".../releases/tag/v0.4.3" and "libcabledyn.so.0.4.3". VERSION_REFERENCE = re.compile( r"(?i)(?:cabledyn[ _-]+v?|cabledyn-|releases/tag/v|libcabledyn\.(?:so\.)?|(? Minor extension level of ABI 1: 1 adds the in-process object queries, 2 the host-coupling !> calls (initialization at host positions, state save/restore, the coupled layout query), 3 !> the host rotations (initialization for a host that turns its coupled points, their diff --git a/src/CableDyn_CAPI.h b/src/CableDyn_CAPI.h index 9d01580c..fd60e974 100644 --- a/src/CableDyn_CAPI.h +++ b/src/CableDyn_CAPI.h @@ -45,7 +45,7 @@ #define CABLEDYN_CAPI_VERSION_MAJOR 0 #define CABLEDYN_CAPI_VERSION_MINOR 4 -#define CABLEDYN_CAPI_VERSION_PATCH 2 +#define CABLEDYN_CAPI_VERSION_PATCH 3 #define CABLEDYN_CAPI_ABI_VERSION 1 #ifdef __cplusplus diff --git a/src/openfast/CableDyn_OF.f90 b/src/openfast/CableDyn_OF.f90 index 0ee1122b..51d158d7 100644 --- a/src/openfast/CableDyn_OF.f90 +++ b/src/openfast/CableDyn_OF.f90 @@ -150,7 +150,7 @@ MODULE CableDyn ! the kinds of first-order linearization state (lin_state_map) INTEGER(IntKi), PARAMETER :: LIN1_VE = 1, LIN1_SYROPE = 2 - TYPE(ProgDesc), PARAMETER :: CableDyn_ProgDesc = ProgDesc( 'CableDyn', 'v0.4.2', '2026-11-09' ) + TYPE(ProgDesc), PARAMETER :: CableDyn_ProgDesc = ProgDesc( 'CableDyn', 'v0.4.3', '2026-11-20' ) INTERFACE ! 1 when the CableDyn core targets x86-64-v3 (CABLEDYN_TARGET_AVX2) and carries the ! start-up processor check of src/cabledyn_cpu_guard.c; the reference also keeps that diff --git a/tests/test_c_api.f90 b/tests/test_c_api.f90 index f8d827e6..6368bd2c 100644 --- a/tests/test_c_api.f90 +++ b/tests/test_c_api.f90 @@ -59,7 +59,7 @@ SUBROUTINE case_version() abi_version = -1_C_INT msg = 'x' CALL CableDyn_GetVersion(major, minor, patch, abi_version) - CALL require(major == 0_C_INT .AND. minor == 4_C_INT .AND. patch == 2_C_INT .AND. abi_version == 1_C_INT, & + CALL require(major == 0_C_INT .AND. minor == 4_C_INT .AND. patch == 3_C_INT .AND. abi_version == 1_C_INT, & 'c-api-version:tuple') CALL CableDyn_GetVersionString(C_LOC(msg), INT(SIZE(msg), C_INT)) CALL require(INDEX(c_text(msg), 'CableDyn') == 1 .AND. INDEX(c_text(msg), 'C-ABI 1') > 0, & From 706ab87df90e5d91461bf3bbb93ddda84ac7a621 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Fri, 20 Nov 2026 23:00:38 +0900 Subject: [PATCH 47/47] chore(release): rerun the experiment records with 0.4.3 Holcombe and Bergdahl rerun with the 0.4.3 GNU Release build. Both reproduce their summaries, metrics, refinement figures and the hashed Holcombe static profiles byte for byte; provenance.json names the release, the date and the executable. The Bergdahl waveform comparison still stands from the 0.3.0 run. The bodies suite passes all 102 metrics with the same build. Signed-off-by: Jae Hoon Seo --- VALIDATION.md | 2 +- validation/experiments/bergdahl/README.md | 4 ++-- validation/experiments/bergdahl/provenance.json | 8 ++++---- validation/experiments/holcombe/provenance.json | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/VALIDATION.md b/VALIDATION.md index 403e3744..ea5cf05f 100644 --- a/VALIDATION.md +++ b/VALIDATION.md @@ -328,7 +328,7 @@ the tow tests it predicts). Inputs, reduction scripts, results, and source prove over the full 30-condition period-radius matrix, cycle-maximum upper-end force has RMSE 1.58 N, mean absolute percentage error 3.11%, Pearson correlation 0.993, and Lin concordance 0.989. Two phase-averaged measured histories had - waveform RMSEs of 5.93% and 2.56% of their force ranges with 0.3.0 (not rerun for 0.4.0, 0.4.1 or 0.4.2). + waveform RMSEs of 5.93% and 2.56% of their force ranges with 0.3.0 (not rerun for 0.4.0, 0.4.1, 0.4.2 or 0.4.3). Halving the mesh length and the time step changes the mean cycle maximum by at most 0.29% and 0.27%. The 0.3125 ms step resolves the segment axial modes that the snap loads excite (and the axial diff --git a/validation/experiments/bergdahl/README.md b/validation/experiments/bergdahl/README.md index 485f610e..c597323a 100644 --- a/validation/experiments/bergdahl/README.md +++ b/validation/experiments/bergdahl/README.md @@ -76,8 +76,8 @@ mean absolute percentage error of 3.11%, a mean bias of +0.47 N, a Pearson corre conditions, halving the nominal element length and the time step changes the mean cycle maximum by no more than 0.29% and 0.27%, respectively. The phase-averaged force histories had RMSEs of 5.93% and 2.56% of the measured force range with 0.3.0; that comparison was not rerun for -0.4.0, 0.4.1 or 0.4.2 (its waveform files and metrics are the 0.3.0 run's, `provenance.json`). The -0.4.1 and 0.4.2 reruns reproduce the 0.4.0 force maxima, metrics and refinement summaries byte for byte. The line's upper +0.4.0, 0.4.1, 0.4.2 or 0.4.3 (its waveform files and metrics are the 0.3.0 run's, `provenance.json`). The +0.4.1, 0.4.2 and 0.4.3 reruns reproduce the 0.4.0 force maxima, metrics and refinement summaries byte for byte. The line's upper end lies 0.3 m above the still-water level, so 0.4.0's dry weight of the part above the surface changed the results: the RMSE from 1.583 N to 1.577 N and the mean absolute percentage error from 3.13% to 3.11%. The waveform CSVs carry the measured phase averages computed from the diff --git a/validation/experiments/bergdahl/provenance.json b/validation/experiments/bergdahl/provenance.json index 457f959b..c70a0eaa 100644 --- a/validation/experiments/bergdahl/provenance.json +++ b/validation/experiments/bergdahl/provenance.json @@ -1,8 +1,8 @@ { - "CableDyn_release": "v0.4.2", - "validation_date": "2026-11-09", + "CableDyn_release": "v0.4.3", + "validation_date": "2026-11-20", "executable_name": "cabledyn.exe", - "executable_sha256": "0ab8649f0d5532450ff5f99e8277e498ff8f8f24556ef98f46bf2d52fb5417e0", + "executable_sha256": "84a1f1ff4fda48cca59afcf7313b023425e45d7229a1e7db5199310e52fb14de", "compiler": "GNU Fortran 16.2.0", "build_type": "Release", "platform": "Windows 11 x86-64", @@ -22,5 +22,5 @@ "waveform_metrics_sha256": "0fb6015cb30aa2bbb1cd8951b603f9201af50372ee6d3633a72fc70ea5280d1a", "refinement_summary_sha256": "75342ed4f3ebe2d7acb19af56394e24e6ce909bb3df7445bf3a1d884280f9eb6", "waveform_comparison_release": "v0.3.0", - "waveform_comparison_note": "not rerun with 0.4.0, 0.4.1 or 0.4.2: the supplement expData.dat was not available when the record was rerun; the waveform files and metrics are those of the v0.3.0 run" + "waveform_comparison_note": "not rerun with 0.4.0, 0.4.1, 0.4.2 or 0.4.3: the supplement expData.dat was not available when the record was rerun; the waveform files and metrics are those of the v0.3.0 run" } diff --git a/validation/experiments/holcombe/provenance.json b/validation/experiments/holcombe/provenance.json index 7431f1c2..7b8ba627 100644 --- a/validation/experiments/holcombe/provenance.json +++ b/validation/experiments/holcombe/provenance.json @@ -1,8 +1,8 @@ { - "CableDyn_release": "v0.4.2", - "validation_date": "2026-11-09", + "CableDyn_release": "v0.4.3", + "validation_date": "2026-11-20", "executable_name": "cabledyn.exe", - "executable_sha256": "0ab8649f0d5532450ff5f99e8277e498ff8f8f24556ef98f46bf2d52fb5417e0", + "executable_sha256": "84a1f1ff4fda48cca59afcf7313b023425e45d7229a1e7db5199310e52fb14de", "compiler": "GNU Fortran 16.2.0", "build_type": "Release", "platform": "Windows 11 x86-64",