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
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,33 @@ All notable changes to CableDyn are recorded in this file. The format follows
one turn of pretwist, in still water and in a cross-flow current, keeps its torque, twist and
fairlead tension over a still 10 s run to the output precision (a torsion stage before the
polish would ring by 3e-3 of the torque); neutral modules reproduce the bare line's GJ Phi / L.
- `CoupledPinned`/`VesselPinned` bodies in OpenFAST, as MoorDyn-F's coupled pinned body: the
body reference point is a node of the coupling mesh that takes the platform position only, the
body turns about it with its own three rotations, and the node returns the body's net load
less its inertia, with no moment. `PtfmInit` moves and turns the body, `bodyIC static` balances
it about its node, and the checkpoint state and correction rewind carry it. A dry compound
pendulum keeps the elliptic-integral period to 1.6e-4 at `dt = T/100`, a body with a
`CoupledPinned` rod's mass and inertia follows the rod to 2e-12, and against MoorDyn-F
(`inertialF 1`) a pendulum swinging through 120 deg agrees to 0.09 deg (0.15 deg when its node
surges). Outside a coupled host, without inertias, and in linearisation the body fails closed
by name.
- Active line control (`CONTROL`, OpenFAST `CableDeltaL`/`CableDeltaLdot`) of a Syrope
polyester segment, which stopped at initialisation before. As in MoorDyn-F and MoorDyn-C the
segment's slow stretch carries over the length change (its slow strain is read at the new
length) and the running maximum is kept. On a taut 100 m line whose fairlead segment is paid
out by 0.5 m, hauled in to -1 m and paid back, the tension follows the rest curve of its load
history (working curve, OWC, then the working curve of the new maximum) to 2.5e-4 along the
ramps and 6e-7 at rest; after a length step it is MoorDyn's at the carried stretch to 1e-15
(carrying the strain instead would be off by 0.4 to 2.4 %); a restart in the ramp continues
bit for bit; a polyester-chain line with a Syrope fairlead segment and a
chain-polyester-chain line run.
- Active line control of a viscoelastic segment (`Es|Ed` and `Es|alphaMBL|vbeta`), which
stopped at initialisation before. As in MoorDyn-F and MoorDyn-C the slow-branch stretch
`dl_1` is left as it is and read at the new length. On the same taut line and cycle the
tension follows the static law `Es` times the strain to 1.7e-4 along the ramps (4.6e-4
load-dependent) and 4e-9 at rest; after a length step it is MoorDyn's at the carried stretch
to 4e-16 (carrying the strain instead would be off by 0.4 to 4.6 %); a restart in the ramp
continues bit for bit.
- OpenFAST linearisation with the line dynamics, as MoorDyn-F's: the continuous states are the
interior-node positions of every `EI = 0` line (MoorDyn's names and order) and the free
degrees of freedom of every finite-EI cable (node positions and tangents), then their
Expand Down Expand Up @@ -115,6 +142,16 @@ All notable changes to CableDyn are recorded in this file. The format follows
- Output channels `StfMom<L>N<J>`, the share of the section moment a bend stiffener carries,
and `FairDefl<L>`/`AnchDefl<L>`, the deflection of the end force from the direction a held
END CONNECTIONS row declares (with the end tension, a stiffener's load case).
- MoorDyn-C time-varying and gridded currents on the standalone routes: `Currents 2` (the depth
profile in time `current_profile_dynamic.txt`) and `Currents 5` (the grid in x, y, z and time
`current_profile_4d.txt`), read and interpolated as MoorDyn-C v2.7.1 does (resampled at the
smallest time interval, repeating past the last sample, held beyond the grid, no fluid
acceleration) at every node's position and time, the static start included. At 739 points and
times the current is identical to MoorDyn-C v2.7.1's; a constant table equals `Currents 1` and a
grid uniform in x and y equals `Currents 2`; on a 70 m rope the tension change of a time-varying
and of a sheared current matches MoorDyn-C's within 0.9 %, and the static start in a sheared grid
holds the tensions to 1.4e-7 of the change the current makes. The C API, without a clock,
refuses a table that varies in time.

### Changed

Expand Down Expand Up @@ -165,6 +202,34 @@ All notable changes to CableDyn are recorded in this file. The format follows

### Fixed

- In OpenFAST, Free Rigid6 bodies and Free, Pinned and CoupledPinned rods started their first
step from zero acceleration: the module restores its state mirror after the output call at
`t = 0`, which marked the objects' accelerations as committed before the start accelerations
were solved. They are now solved when the module initialises (and, before the first step, at a
committed step-start transfer and in new host fluid fields, so a SeaState current or wave starts
them in that field), and the line ends on a CoupledPinned object move with them.
An object in its static equilibrium changes at round-off (1e-12 m and 1e-6 deg over 10 s); one
started out of balance (`bodyIC deck`) changes by the first step's velocity error, 0.02 m/s and
0.05 deg for a hanging Pinned rod and up to 0.6 m/s for bodies and rods released far out of
balance. The committed host kinematics at the first step are those of the initial state, so a
host acceleration at `t = 0` enters neither version.
- MoorDyn-F's `inertialF` option was an unknown keyword; `inertialF 1` (CableDyn's behaviour)
is now accepted, and `0` and `2` are rejected by name.
- A Syrope line held at its running maximum (the fairlead pulled out and held) under
`False alpha_force_blend` stopped with "Syrope backward-Euler state solve did not converge":
next to the top sample of the working curve the Newton step's difference quotient straddled
the kink and crept along one side of the bracket. The solve now finishes by bisection there,
and where a light rope's steep residual (BA_s|BA_d = 1e4|1e3) changes sign between two
adjacent reals it returns that root to machine precision. Over 440,000 fuzzed states every
solve that converged before is bit-identical, and the 26 that failed now converge.
- The static start of an `EI = 0` line now carries a deck current that is zero along the
straight chord between its ends but not where the line sags (a depth profile or a current
grid): it was solved in still water and the march drifted toward the current's equilibrium.
On a 70 m rope with its ends at z = -20 m in 0.8 m/s below z = -32 m the start now holds to
machine precision (it drifted 192 N in 4 s) and agrees with the finite-EI route within 0.14 %.
The static tangent takes the current's gradient along the line, so the Newton iteration also
converges in a current sheared across the line. A later `current` row now discards the levels
of an earlier profile row.
- A deck with a WaterKin elevation history (`WaveKinMod 1`) at `TMax = 0`, a check of the static
start, reduces the record over its own length instead of failing for want of a positive
`TMax`.
Expand Down
69 changes: 69 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,19 @@ add_test(NAME openfast_pinned_rod COMMAND test_openfast_pinned_rod
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openfast_pinned_rod)
set_tests_properties(openfast_pinned_rod PROPERTIES LABELS "fortran;dynamic;openfast;validation")

# CoupledPinned bodies on the coupled aggregate: the compound-pendulum period and pin reaction of
# a held node, a constant node acceleration against closed forms, a CoupledPinned rod of the same
# inertia as a second route, a symmetric mooring that does not turn the body, the output probe,
# snapshot/restore and restart, PtfmInit with the static start, sub-cycling, the OpenFAST shell's
# state-mirror restore before the first step, the refusals, and the start of Free bodies and rods
# in a host fluid field.
add_executable(test_openfast_pinned_body tests/test_openfast_pinned_body.f90)
target_link_libraries(test_openfast_pinned_body PRIVATE cabledyn_core)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/openfast_pinned_body)
add_test(NAME openfast_pinned_body COMMAND test_openfast_pinned_body
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openfast_pinned_body)
set_tests_properties(openfast_pinned_body PROPERTIES LABELS "fortran;dynamic;openfast;validation")

# Maintained IEA-15 MW mixed deck: the finite-EI power cable has a genuine multi-node
# grounded run and marches through the OpenFAST aggregate at 40 Hz with host current.
add_executable(test_openfast_touchdown tests/test_openfast_touchdown.f90)
Expand Down Expand Up @@ -1418,6 +1431,9 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_ID STREQUAL "GN
# And with the nodal twist (polar inertia, torsional damping, the 7-DOF-per-node band).
add_test(NAME step_allocations_nodal_twist COMMAND test_step_allocations nodal)
set_tests_properties(step_allocations_nodal_twist PROPERTIES LABELS "fortran;dynamic;memory")
# And the MoorDyn-C current grid (Currents 2 and 5) every standalone step samples at the nodes.
add_test(NAME step_allocations_current_grid COMMAND test_step_allocations current_grid)
set_tests_properties(step_allocations_current_grid PROPERTIES LABELS "fortran;dynamic;memory")
endif()

add_executable(test_snap_load tests/test_snap_load.f90)
Expand Down Expand Up @@ -1703,6 +1719,17 @@ if(Python3_Interpreter_FOUND)
LABELS "python;integration;dynamic;viv;validation"
TIMEOUT ${_viv_lockin_timeout}
ENVIRONMENT "${_cabledyn_python_test_environment}")
# MoorDyn-C Currents 2 and 5 runs: tensions against MoorDyn-C v2.7.1, two sources of one
# field, and the static start in a sheared grid on the EI = 0 and finite-EI routes
add_test(NAME mdc_currents_runs
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_mdc_currents_runs.py
--exe $<TARGET_FILE:cabledyn>
--data ${CMAKE_CURRENT_SOURCE_DIR}/tests/data/currents_mdc
--output ${CMAKE_BINARY_DIR}/mdc_currents_runs)
set_tests_properties(mdc_currents_runs PROPERTIES
LABELS "python;integration;dynamic;validation"
TIMEOUT ${_viv_lockin_timeout}
ENVIRONMENT "${_cabledyn_python_test_environment}")
else()
message(STATUS "viv_lockin: skipped (numpy not importable in ${Python3_EXECUTABLE})")
endif()
Expand Down Expand Up @@ -2085,6 +2112,19 @@ target_link_libraries(test_wavekin_modes PRIVATE cabledyn_core)
add_test(NAME wavekin_modes COMMAND test_wavekin_modes WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_tests_properties(wavekin_modes PROPERTIES LABELS "fortran;driver;validation;dynamic")

# MoorDyn-C Currents 2 and 5 vs MoorDyn-C v2.7.1 and an independent evaluation on shared inputs
# (the reference rows come from validation/scripts/currents_mdc_reference.py)
file(GLOB_RECURSE CD_CURRENTS_MDC_FILES RELATIVE ${CMAKE_SOURCE_DIR}/tests/data/currents_mdc
${CMAKE_SOURCE_DIR}/tests/data/currents_mdc/*)
foreach(f IN LISTS CD_CURRENTS_MDC_FILES)
configure_file(tests/data/currents_mdc/${f} ${CMAKE_BINARY_DIR}/currents_mdc/${f} COPYONLY)
endforeach()
add_executable(test_mdc_currents tests/test_mdc_currents.f90)
target_link_libraries(test_mdc_currents PRIVATE cabledyn_core)
add_test(NAME mdc_currents COMMAND test_mdc_currents WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/mdc_currents_work)
set_tests_properties(mdc_currents PROPERTIES LABELS "fortran;driver;validation;dynamic")
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/mdc_currents_work)

add_executable(test_clamped_cable_ends tests/test_clamped_cable_ends.f90)
target_link_libraries(test_clamped_cable_ends PRIVATE cabledyn_core)
add_test(NAME clamped_cable_ends COMMAND test_clamped_cable_ends)
Expand All @@ -2102,6 +2142,18 @@ add_test(NAME torsion_attachments
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_tests_properties(torsion_attachments PROPERTIES LABELS "fortran;driver;integration;static;dynamic")

# Where the MoorDyn-parity features meet: a CoupledPinned body in a Currents 2/5 deck (refused on
# the coupled aggregate for the current files, standalone for the body), CONTROL on viscoelastic
# and Syrope segments in the host's cross-flow against the static start of the changed deck, and
# ATTACHMENTS on a turned torsion line in a sheared Currents 5 grid (a still run keeps the start)
add_executable(test_parity_integration tests/test_parity_integration.f90)
target_link_libraries(test_parity_integration PRIVATE cabledyn_core)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/parity_integration)
add_test(NAME parity_integration
COMMAND test_parity_integration ${CMAKE_CURRENT_SOURCE_DIR}/tests/data/lazy_wave_torsion_attachments.dat
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/parity_integration)
set_tests_properties(parity_integration PROPERTIES LABELS "fortran;driver;integration;dynamic;openfast")

add_executable(test_section_curvature tests/test_section_curvature.f90)
target_link_libraries(test_section_curvature PRIVATE cabledyn_core)
add_test(NAME section_curvature COMMAND test_section_curvature)
Expand All @@ -2112,6 +2164,20 @@ target_link_libraries(test_syrope_composite PRIVATE cabledyn_core)
add_test(NAME syrope_composite COMMAND test_syrope_composite)
set_tests_properties(syrope_composite PROPERTIES LABELS "fortran;driver;integration;static;dynamic")

# Active line control of Syrope segments on the coupled route (the slow stretch carried over a
# length change, as MoorDyn-F/C carry it): quasi-static cycle, length step, restart, composites
add_executable(test_syrope_control tests/test_syrope_control.f90)
target_link_libraries(test_syrope_control PRIVATE cabledyn_core)
add_test(NAME syrope_control COMMAND test_syrope_control)
set_tests_properties(syrope_control PROPERTIES LABELS "fortran;integration;dynamic;openfast")

# Active line control of viscoelastic (ElasticMod 2/3) segments on the coupled route (the dl_1
# stretch carried over a length change, as MoorDyn-F/C carry it): quasi-static cycle, step, restart
add_executable(test_viscoelastic_control tests/test_viscoelastic_control.f90)
target_link_libraries(test_viscoelastic_control PRIVATE cabledyn_core)
add_test(NAME viscoelastic_control COMMAND test_viscoelastic_control)
set_tests_properties(viscoelastic_control PROPERTIES LABELS "fortran;integration;dynamic;openfast")

add_executable(test_torsion_coupling tests/test_torsion_coupling.f90)
target_link_libraries(test_torsion_coupling PRIVATE cabledyn_core)
add_test(NAME torsion_coupling COMMAND test_torsion_coupling)
Expand Down Expand Up @@ -2781,6 +2847,8 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
-Wno-maybe-uninitialized)
target_compile_options(test_torsion_deck PRIVATE -Wno-uninitialized -Wno-maybe-uninitialized)
target_compile_options(test_hermite_cable_control PRIVATE -Wno-uninitialized -Wno-maybe-uninitialized)
target_compile_options(test_syrope_control PRIVATE -Wno-uninitialized -Wno-maybe-uninitialized)
target_compile_options(test_viscoelastic_control PRIVATE -Wno-uninitialized -Wno-maybe-uninitialized)
endif()

if(CABLEDYN_ENABLE_COVERAGE)
Expand Down Expand Up @@ -2860,6 +2928,7 @@ if(CABLEDYN_ENABLE_COVERAGE)
test_hermite_fmf
test_openfast_aggregate
test_openfast_pinned_rod
test_openfast_pinned_body
test_of_mooring_counters
test_ei0_mesh_scaling_counters
test_c_api
Expand Down
Loading
Loading