Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 53 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,39 @@ if(Python3_Interpreter_FOUND)
message(STATUS "viv_lockin: skipped (numpy not importable in ${Python3_EXECUTABLE})")
endif()

# Deck-driver end-to-end oracles (need numpy): one linear sea written as deck wave rows, as a
# MoorDyn-C WaveKin 7 table and as a WaveKin 3 record gives one line response; the modes of a
# two-section string are the roots of its closed-form frequency equation; a cylindrical bend
# stiffener is the section of cable and sleeve, and a cable clamped at the angle a off its
# tangent carries the root moment a sqrt(EI T).
if(_range_tdp_numpy_rc EQUAL 0)
add_test(NAME wave_input_equivalence
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_wave_input_equivalence.py
--exe $<TARGET_FILE:cabledyn>
--output ${CMAKE_BINARY_DIR}/wave_input_equivalence)
set_tests_properties(wave_input_equivalence PROPERTIES
LABELS "python;driver;integration;dynamic;validation"
TIMEOUT 600
ENVIRONMENT "${_cabledyn_python_test_environment}")
add_test(NAME composite_string_modes
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_composite_string_modes.py
--exe $<TARGET_FILE:cabledyn>
--output ${CMAKE_BINARY_DIR}/composite_string_modes)
set_tests_properties(composite_string_modes PROPERTIES
LABELS "python;driver;integration;static;modal;validation"
TIMEOUT 600
ENVIRONMENT "${_cabledyn_python_test_environment}")
add_test(NAME stiffener_section_equivalence
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_stiffener_section_equivalence.py
--exe $<TARGET_FILE:cabledyn>
--examples ${CMAKE_CURRENT_SOURCE_DIR}/examples
--output ${CMAKE_BINARY_DIR}/stiffener_section_equivalence)
set_tests_properties(stiffener_section_equivalence PROPERTIES
LABELS "python;driver;integration;static;dynamic;finite_ei;validation"
TIMEOUT 600
ENVIRONMENT "${_cabledyn_python_test_environment}")
endif()

# Node channels on a refined finite-EI line name deck nodes: the static profile's DeckNode
# column, the standalone static and dynamic cubic-Hermite routes, the mixed route (the OpenFAST
# aggregate evaluator) and the C API on the coarse lazy-wave deck the static solve refines
Expand Down Expand Up @@ -3466,19 +3499,37 @@ foreach(_dyn_example IN ITEMS dynamic_chain_held dynamic_chain_current dynamic_c
endforeach()
# Feature examples (vessel motion and RAOs, discrete buoyancy, range graphs and touchdown, wave
# spectra, stream waves, anisotropic friction, modal analysis, clamped ends on bodies, MoorDyn-C
# kinematics files, bodies and rods, line failure): every shipped deck must run to completion.
# kinematics files, bodies and rods, line failure, cross-flow VIV, the mode-1 axial damping ratio,
# composite synthetic ropes on a floater, a cable between two moving ends, attachments under a
# bend stiffener, bathymetry with as-laid friction, torsion with one end free): every shipped
# deck must run to completion.
foreach(_feature_example IN ITEMS
lazy_wave_vessel_motion lazy_wave_vessel_rao lazy_wave_bend_stiffener lazy_wave_buoyancy_modules lazy_wave_buoyancy_smeared
chain_range_tdp chain_torsethaugen_spread chain_two_train_sea stream_wave_shallow_chain
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)
als_volturnus_line_break_time als_volturnus_line_break_tension
viv_taut_line_crossflow 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)
get_filename_component(_feature_name "${_feature_example}" NAME)
add_test(NAME example_${_feature_name}
COMMAND cabledyn "${CMAKE_CURRENT_SOURCE_DIR}/examples/${_feature_example}.dat"
"${CMAKE_CURRENT_BINARY_DIR}/example_${_feature_name}")
set_tests_properties(example_${_feature_name} PROPERTIES LABELS "fortran;driver;integration;example;dynamic")
endforeach()
# The shipped decks no other test runs by name (static moorings, a buoy and a spar on legs):
# each must run as shipped.
foreach(_shipped_example IN ITEMS
composite_chain_wire nylon_taut_mooring semitaut_chain_polyester spread_4line_chain
taut_chain_steep ve_nylon_loaddependent_mooring wd0050_chain wire_catenary_mooring
rigid6_buoy rod_moored_spar)
add_test(NAME example_${_shipped_example}
COMMAND cabledyn "${CMAKE_CURRENT_SOURCE_DIR}/examples/${_shipped_example}.dat"
"${CMAKE_CURRENT_BINARY_DIR}/example_${_shipped_example}")
set_tests_properties(example_${_shipped_example} PROPERTIES LABELS "fortran;driver;integration;example")
endforeach()

# Composite grounded moorings must initialize at every mesh refinement of the shipped decks.
add_executable(test_static_mesh_refinement tests/test_static_mesh_refinement.f90)
Expand Down
69 changes: 69 additions & 0 deletions doc/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ Mooring configurations
- chain–polyester–chain: one line, three ordered sections
- cable, static
- < 1 s
* - ``composite_chain_poly_chain_modes.dat``
- the 12 lowest natural periods and mode shapes (``nModes``) of that composite line, partly
grounded, with each section's added mass and the linearised seabed contact
- cable, modal
- < 1 s
* - ``semitaut_chain_polyester.dat``
- Lozon et al. (2025) Gulf of Maine 200 m semi-taut composite (chain at the anchor,
polyester above)
Expand Down Expand Up @@ -163,6 +168,12 @@ for the equations, the viscoelastic (series-Kelvin) and Syrope sections of :doc:
needs ``data/syrope/`` and ``data/vessel/vessel_surge_heave_pitch_12s_dt005.txt``
- cable, dynamic
- < 1 s
* - ``composite_ve_syrope_jonswap.dat``
- two chain–polyester–chain legs of one floater, the polyester viscoelastic (``Es|Ed``) on
one and Syrope on the other, the floater moved by ``data/vessel/sample_rao.txt``
(``vesselRAO``) in a JONSWAP sea that also loads the lines: the two rope models side by side
- cable, dynamic
- ~2 s

Dynamic environment
-------------------
Expand Down Expand Up @@ -203,6 +214,18 @@ Dynamic environment
(``current_profile.txt``) read from the deck folder — :doc:`tutorial_dynamics`
- cable, dynamic
- < 1 s
* - ``moordynC_currents/chain_wavekin3_currents2.dat``
- MoorDyn-C ``WaveKin 3`` (the elevation record ``wave_elevation.txt``, reduced to its
Fourier components) and ``Currents 2`` (``current_profile_dynamic.txt``: a sheared current
that turns across the line and grows over the run) on a partly grounded chain held by
seabed friction
- cable, dynamic
- < 1 s
* - ``moordynC_currents/chain_currents5_grid.dat``
- MoorDyn-C ``Currents 5``: the grid in x, y, z and time ``current_profile_4d.txt``, a cross
current growing along the line and ramped in over 30 s
- cable, dynamic
- < 1 s
* - ``stream_wave_shallow_chain.dat``
- the 30 m R4 chain under a steep Dean stream-function wave (H 8 m, T 10 s,
``StreamOrder`` 20) — :doc:`tutorial_dynamics`
Expand All @@ -223,6 +246,25 @@ Dynamic environment
(``frictionMuAxial`` 0.3, ``frictionMuLateral`` 1.0) — :doc:`tutorial_dynamics`
- cable, dynamic
- < 1 s
* - ``chain_sloped_bathymetry_friction.dat``
- the chain of ``chain_range_tdp.dat`` on a structured seabed (``bathymetryFile``
``data/bathymetry/sloped_seabed.txt``) that rises toward the anchor and slopes across the
line, held by seabed friction from its as-laid layout (``staticsFriction asLaid``) under
the surging fairlead
- cable, dynamic
- < 1 s
* - ``composite_axial_damping_mode1.dat``
- the chain–polyester–chain mooring under a 4 m Airy wave with ``axialDampingRatio mode1``:
a negative ``BA`` of −0.02 damps the line's first axial mode (2.03 Hz) at 2 % on any mesh
- cable, dynamic
- < 1 s
* - ``viv_taut_line_crossflow.dat``
- cross-flow VIV (``LINE TYPES`` ``Cl``, ``dF``, ``cF``; ``VIVphaseSeed``,
``VIVrmsWindow``): a taut 100 m line locks in across a 0.15 m/s current at a mid-span
amplitude A/D of 0.66, MoorDyn-F's; the ``Outputs`` flag ``V`` writes the nodal lift —
:ref:`theory-viv`
- cable, dynamic
- ~2 s

Points, buoys, bodies, and rods
-------------------------------
Expand Down Expand Up @@ -370,6 +412,26 @@ touchdown and lazy-wave shape from the geometry alone; there is no initial-shape
:ref:`theory-torsion`
- Hermite, dynamic
- ~2 s
* - ``torsion_free_end_armoured_cable.dat``
- the 80 m cable with an illustrative torque–tension coupling (``GJ|K|Bt``), restrained in
torsion at the hang-off and free to twist at the anchor: the stretch twists the line
(``Twist1`` −5.6°), and under the 3 m hang-off heave the twist oscillates through torsional
waves whose torque the hang-off takes (``Torq1N1``) — :ref:`theory-torsion`
- Hermite, dynamic
- ~2 s
* - ``lazy_wave_modules_stiffener.dat``
- the 80 m cable with ten discrete buoyancy modules (``ATTACHMENTS``) and a 4 m bend
stiffener (``STIFFENERS``) at its clamped hang-off on the vessel of
``lazy_wave_vessel_motion.dat``, in a 0.3 m/s current; the range graph (``Outputs`` flag
``r``) of the finite-EI line
- Hermite, dynamic
- ~2 s
* - ``shared_cable_two_floaters.dat``
- a 360 m array cable hung between the clamped hang-offs of two floaters 300 m apart, both
ends moving (two ``Coupled`` points, ``data/shared/floaters_surge_heave_12s_dt0025.txt``):
the span opens and closes by 4 m
- Hermite, dynamic
- ~1 s

The first three set ``TMax = 0`` (static only). The motion file holds absolute position,
velocity, and acceleration at every ``dtM`` and is regenerated by
Expand Down Expand Up @@ -437,4 +499,11 @@ These files are inputs referenced by decks, not decks:
``torsion_lazy_wave_hangoff_twist.dat``; ``data/torsion/generate_hangoff_roll.py`` writes it.
* ``moordynC_wavekin/wave_frequencies.txt`` and ``moordynC_wavekin/current_profile.txt`` — the
MoorDyn-C kinematics files, read from the folder of the deck beside them.
* ``moordynC_currents/wave_elevation.txt``, ``current_profile_dynamic.txt`` and
``current_profile_4d.txt`` — the MoorDyn-C files of the two decks in that folder;
``moordynC_currents/generate_kinematics.py`` writes them.
* ``data/shared/floaters_surge_heave_12s_dt0025.txt`` — the hang-off motions of both ends of
``shared_cable_two_floaters.dat``; ``data/shared/generate_floater_motion.py`` writes it.
* ``data/bathymetry/sloped_seabed.txt`` — the ``x y depth`` grid of
``chain_sloped_bathymetry_friction.dat``.
* ``plot_range_envelope.py`` — plots the tension envelope of a range-graph file.
9 changes: 6 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ Copy a deck under a new name and keep every file it references at the same relat
| `*.dat` | Standalone decks. `iea15mw_umaine_openfast_cabledyn.dat` is an OpenFAST-only `MooringFile`; `iea15mw_umaine_mixed_cabledyn.dat` runs both standalone and coupled. |
| `openfast/` | IEA-15MW VolturnUS-S `.fst` pair (`CompMooring = 5` and `3`) with their mooring decks; see [openfast/README.md](openfast/README.md). |
| `data/syrope/` | Syrope settings and original working-curve table used by `syrope_polyester_mooring.dat` and `composite_chain_syrope_chain.dat`. |
| `data/lozon/` | Prescribed hang-off heave history for `lozon_gomex80_power_cable_motion.dat` and the script that generates it. |
| `data/vessel/` | 6-DOF vessel-motion record for `lazy_wave_vessel_motion.dat` and `composite_chain_syrope_chain.dat`, the script that generates it, and the illustrative RAO table for `lazy_wave_vessel_rao.dat` and `lazy_wave_bend_stiffener.dat`. |
| `data/lozon/` | Prescribed hang-off heave history for `lozon_gomex80_power_cable_motion.dat` and `torsion_free_end_armoured_cable.dat`, and the script that generates it. |
| `data/vessel/` | 6-DOF vessel-motion record for `lazy_wave_vessel_motion.dat`, `composite_chain_syrope_chain.dat` and `lazy_wave_modules_stiffener.dat`, the script that generates it, and the illustrative RAO table for `lazy_wave_vessel_rao.dat`, `lazy_wave_bend_stiffener.dat` and `composite_ve_syrope_jonswap.dat`. |
| `data/torsion/` | Hang-off roll history (motionFile roll column) for `torsion_lazy_wave_hangoff_twist.dat` and the script that generates it. |
| `data/range_tdp/` | Fairlead surge history for `chain_range_tdp.dat` and the script that generates it. |
| `data/range_tdp/` | Fairlead surge history for `chain_range_tdp.dat` and `chain_sloped_bathymetry_friction.dat`, and the script that generates it. |
| `data/shared/` | Hang-off motions of both ends of `shared_cable_two_floaters.dat` and the script that generates them. |
| `data/bathymetry/` | The `x y depth` seabed grid of `chain_sloped_bathymetry_friction.dat`. |
| `moordynC_wavekin/` | A deck with the MoorDyn-C `wave_frequencies.txt` and `current_profile.txt` files it reads from its own folder. |
| `moordynC_currents/` | Two decks with the MoorDyn-C `wave_elevation.txt`, `current_profile_dynamic.txt` and `current_profile_4d.txt` files they read from their own folder (`WaveKin 3`, `Currents 2` and `5`), and the script that generates the files. |
| `plot_range_envelope.py` | Plots the tension envelope of a range-graph file (`python plot_range_envelope.py <out_root>`). |

Files under `data/` are inputs referenced by decks; do not pass them to an executable.
Expand Down
58 changes: 58 additions & 0 deletions examples/chain_sloped_bathymetry_friction.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
--------------------- CableDyn Input File ------------------------------------
CableDyn driver deck -- chain on a sloping seabed (bathymetryFile) held by as-laid friction, surging fairlead, 60 s
-- The 410 m studless chain of chain_range_tdp.dat on a structured seabed instead of a flat one:
-- data/bathymetry/sloped_seabed.txt is a grid of `x y depth` rows, here a plane 60 m deep under
-- the fairlead that rises 2.1 deg toward the anchor (45 m deep at x = 400 m) and falls 2.9 deg
-- across the line, toward +Y. The seabed is bilinear between the grid points; bathymetryFile
-- replaces WtrDpth, which the deck must then leave out. Seabed friction (frictionMu 0.5) exceeds
-- the cross slope (tan 2.9 deg = 0.05), so the grounded chain holds; staticsFriction asLaid
-- solves the static start against the as-laid layout, the chain laid from the anchor along its
-- chord and its top end then moved to the fairlead, so the grounded length rests where it was
-- laid instead of sliding down the cross slope. The fairlead then surges 5 m at 30 s
-- (data/range_tdp/chain_surge_5m_30s_dt005.txt, after a 15 s smooth start). TDP1s and TDP1x
-- follow the touchdown point; L1N30py is the sideways position of a grounded node 290 m from
-- the fairlead, which friction keeps from creeping downslope.
--------------------- LINE TYPES ---------------------------------------
TypeName Diam MassDenInAir EA BA/-zeta EI Cd_n Cd_t Ca_n Ca_t
(-) (m) (kg/m) (N) (N-s/-) (N-m^2) (-) (-) (-) (-)
chain 0.252 390.0 1.674e9 -1.0 0.0 1.37 0.64 1.0 0.0
--------------------- POINTS -------------------------------------------
ID Type X Y Z Mass Vol CdA Ca
(-) (-) (m) (m) (m) (kg) (m^3) (m^2) (-)
1 Fixed 400.0 0.0 -45.0 0 0 0 0
2 Coupled 0.0 0.0 0.0 0 0 0 0
--------------------- LINES --------------------------------------------
ID NodeA NodeB Outputs
(-) (-) (-) (-)
1 2 1 -
--------------------- SECTIONS -----------------------------------------
LineID LineType Length NumSegs
(-) (-) (m) (-)
1 chain 410.0 41
--------------------- OPTIONS ------------------------------------------
9.80665 g - Gravitational acceleration (m/s^2) [default: 9.80665]
1025.0 rhoW - Water density (kg/m^3) [default: 1025]
data/bathymetry/sloped_seabed.txt bathymetryFile - Structured seabed: x y depth grid (m) [default: absent]
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.5 frictionMu - Seabed friction coefficient {none; value>=0} [default: none]
asLaid staticsFriction - Static seabed friction policy {none; asLaid} [default: none]
0.05 dtM - CableDyn internal time step (s) [default: omitted standalone; the glue DT in OpenFAST]
60.0 TMax - Standalone simulation duration (s) [default: omitted standalone; host-owned OpenFAST]
data/range_tdp/chain_surge_5m_30s_dt005.txt motionFile - Prescribed fairlead motion history
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 current - Current model and 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; file; SEASTATE coupled only} [default: no policy]
-- Complete option/default reference: cabledyn_options_reference.dat and doc/options.rst.
--------------------- OUTPUTS ------------------------------------------
"FairTen1"
"AnchTen1"
"TDP1s"
"TDP1x"
"L1N30py"
"L1N30pz"
--------------------- need this line -----------------------------------
Loading
Loading