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
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2845,6 +2845,16 @@ if(Python3_Interpreter_FOUND)
endif()
# A clamped finite-EI cable with a buoyant section on a Rigid6 body: the body static solve
# holds the objects at their deck poses, warns once, and reports no balanced clamped end loads.
# A lazy wave on a graded mesh in a cross current: the continuation route stops on a compression
# read on elements longer than half the bending length, which is no grounded-run limit, so the
# mesh-sequenced route still runs and solves the deck, with no fallback.
add_test(NAME driver_graded_cross_current
COMMAND ${CMAKE_COMMAND} -DDRIVER=$<TARGET_FILE:cabledyn> -DEXPECT_RC=0
"-DARGS=${CMAKE_CURRENT_SOURCE_DIR}/tests/data/lazy_wave_graded_cross_current.dat|graded"
"-DMUST_NOT=failed Newton;stalled;looser tolerance"
-DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/driver_graded_cross_current
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/check_driver_output.cmake)
set_tests_properties(driver_graded_cross_current PROPERTIES LABELS "fortran;driver;integration;static" TIMEOUT 600)
add_test(NAME driver_clamped_buoyant_held
COMMAND ${CMAKE_COMMAND} -DDRIVER=$<TARGET_FILE:cabledyn> -DEXPECT_RC=0
"-DARGS=${CMAKE_CURRENT_SOURCE_DIR}/tests/data/clamped_buoyant_cable_held.dat|held"
Expand Down
33 changes: 27 additions & 6 deletions src/CableDyn_HermiteCableStatic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3248,7 +3248,7 @@ PURE LOGICAL FUNCTION current_has_drag(cur) RESULT(has)
has = cur%drag
END FUNCTION current_has_drag

FUNCTION current_compression_note(l0, EA, qx, seabed_z, flat, frictional, frictionless_run) RESULT(note)
FUNCTION current_compression_note(l0, EA, qx, seabed_z, flat, frictional, frictionless_run, EI, w) RESULT(note)
!! Diagnosis of a current that has no tension-only equilibrium on the traced branch:
!! empty unless the state qx (the last one reached) carries an element-mean axial force
!! (three-point Gauss mean of EA (|r'| - 1), free of the end-node boundary layer) below
Expand All @@ -3263,8 +3263,13 @@ FUNCTION current_compression_note(l0, EA, qx, seabed_z, flat, frictional, fricti
! TRUE for the two frictionless grounded-run diagnoses (the run folds against its end or
! is pushed along the seabed in compression).
LOGICAL, INTENT(OUT), OPTIONAL :: frictionless_run
! The bending stiffness and weight per length of the elements (both or neither): on an
! element longer than half its bending length (EI/|w|)^(1/3) the element-mean axial force of
! a stiff line oscillates and can read a compression the line does not carry, so a
! compression there names the mesh, not a limit of the current.
REAL(wp), INTENT(IN), OPTIONAL :: EI(:), w(:)
CHARACTER(1024) :: note
REAL(wp) :: t_min, t_max, s_min, z_min, z_top
REAL(wp) :: t_min, t_max, s_min, z_min, z_top, need
INTEGER :: k, k_min, wios, ne, es
CHARACTER(1024) :: em
note = ''
Expand All @@ -3279,6 +3284,22 @@ FUNCTION current_compression_note(l0, EA, qx, seabed_z, flat, frictional, fricti
IF (.NOT. (t_min < -1.0e-3_wp*t_max)) RETURN
! Height of the compressed element: the lower of its two nodes.
z_min = MIN(qx(6*(k_min - 1) + 3), qx(6*k_min + 3))
IF (PRESENT(EI) .AND. PRESENT(w)) THEN
! the compressed element and its neighbours against half their bending length
need = CD_ZERO
DO k = MAX(1, k_min - 1), MIN(ne, k_min + 1)
IF (EI(k) > CD_ZERO .AND. ABS(w(k)) > CD_ZERO) &
need = MAX(need, l0(k)/(0.5_wp*(EI(k)/ABS(w(k)))**(1.0_wp/3.0_wp)))
END DO
IF (need > 1.0_wp) THEN
WRITE (note, '(A,ES10.3,A,F10.2,A,F6.2,A)', IOSTAT=wios) 'the line reads an element-mean axial '// &
'compression (', t_min, ' N at unstretched arc length ', s_min, ' m) on elements ', need, &
' times half the bending length (EI/|w|)^(1/3), where the element-mean axial force of a stiff '// &
'line oscillates and can read a compression the line does not carry; refine those elements '// &
'(NumSegs) to half the bending length or less; '
RETURN
END IF
END IF
IF (flat .AND. z_min <= seabed_z + 0.01_wp*(z_top - seabed_z) .AND. frictional) THEN
WRITE (note, '(A,ES10.3,A,F10.2,A,ES10.3,A)', IOSTAT=wios) 'the line is in axial compression at '// &
'the seabed (', t_min, ' N at unstretched arc length ', s_min, ' m, ', z_min - seabed_z, &
Expand Down Expand Up @@ -3695,7 +3716,7 @@ LOGICAL FUNCTION frictionless_run_limit(qx) RESULT(run_limit)
run_limit = .FALSE.
IF (.NOT. PRESENT(current)) RETURN
IF (.NOT. current_has_drag(current)) RETURN
note = current_compression_note(l0, EA, qx, seabed_z, flat, use_fric, run_limit)
note = current_compression_note(l0, EA, qx, seabed_z, flat, use_fric, run_limit, EI=EI, w=w)
END FUNCTION frictionless_run_limit

FUNCTION compression_note(qx) RESULT(note)
Expand All @@ -3707,7 +3728,7 @@ FUNCTION compression_note(qx) RESULT(note)
note = ''
IF (.NOT. PRESENT(current)) RETURN
IF (.NOT. current_has_drag(current)) RETURN
note = current_compression_note(l0, EA, qx, seabed_z, flat, use_fric)
note = current_compression_note(l0, EA, qx, seabed_z, flat, use_fric, EI=EI, w=w)
END FUNCTION compression_note

FUNCTION fixed_point_name() RESULT(name)
Expand Down Expand Up @@ -6798,7 +6819,7 @@ SUBROUTINE CD_HermiteCable_Static_Solve_AutoMesh(l0, EA, EI, w, seed, fixed_dofs
IF (PRESENT(current)) THEN
IF (current_has_drag(current)) &
emloc = TRIM(current_compression_note(l0_out, EA_out, q_out, seabed_z,.NOT. PRESENT(bathymetry), &
ALLOCATED(current%friction)))//TRIM(emloc)
ALLOCATED(current%friction), EI=EI_out, w=w_out))//TRIM(emloc)
END IF
ErrStat = es; ErrMsg = 'CD_HermiteCable_Static_Solve_AutoMesh: refined-mesh polish failed: '//TRIM(emloc)
RETURN
Expand Down Expand Up @@ -6930,7 +6951,7 @@ SUBROUTINE CD_HermiteCable_Static_Solve_AutoMesh(l0, EA, EI, w, seed, fixed_dofs
IF (PRESENT(current)) THEN
IF (current_has_drag(current)) &
wbuf = TRIM(current_compression_note(l0_out, EA_out, q_out, seabed_z,.NOT. PRESENT(bathymetry), &
ALLOCATED(current%friction)))//TRIM(wbuf)
ALLOCATED(current%friction), EI=EI_out, w=w_out))//TRIM(wbuf)
END IF
ErrMsg = wbuf
RETURN
Expand Down
57 changes: 57 additions & 0 deletions tests/data/lazy_wave_graded_cross_current.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
--------------------- CableDyn Input File ------------------------------------
Lazy-wave cable on a graded mesh in a cross current: a mesh-scale compression is no grounded-run limit
-- The lazy wave of lazy_wave_touchdown_planar_coarse_att.dat (25 discrete buoyancy modules on a
-- frictional seabed) with its buoyant stretch refined fourfold, so 0.9 m elements meet 4 m ones at
-- the sag bend and 10 m ones along the grounded run, in a 0.2 m/s current across the line's plane.
-- The catenary-continuation route stops on an element-mean axial compression read on those long
-- elements, where the axial force of a stiff line oscillates: a mesh artefact, not the friction
-- holding the grounded run. The static solve names it as such and goes on to the mesh-sequenced
-- route, which solves the deck.
--------------------- LINE TYPES ---------------------------------------------
Name Diam Mass EA BA EI GAs GJ Irt Irn Cdn Cdt Can Cat
(-) (m) (kg/m) (N) (-) (Nm2) (N) (Nm2) (kgm) (kgm) (-) (-) (-) (-)
bare 0.16 36.70 4.69e8 0.0 1.99e4 1.0e8 1.5e4 1.0 1.0 1.2 0.1 1.0 0.0
--------------------- POINTS -------------------------------------------------
ID Type X Y Z
(-) (-) (m) (m) (m)
7 Coupled 30.0 0.0 -20.0
8 Fixed 500.0 0.0 -200.0
--------------------- LINES --------------------------------------------------
ID NodeA NodeB Outputs
(-) (-) (-) (-)
4 7 8 -
--------------------- SECTIONS -----------------------------------------------
LineID LineType Length NumSegs
(-) (-) (m) (-)
4 bare 80.0 20
4 bare 96.0 108
4 bare 424.0 42
--------------------- ATTACHMENTS -------------------------------------------
LineID ArcLength Mass Volume CdA Ca CdAx
(-) (m) (kg) (m^3) (m^2) (-) (m^2)
4 80.0:10.66666667:176.0 228.3 0.45945 3.48 1.0 0.0
--------------------- END CONNECTIONS ----------------------------------------
LineID End Stiffness EzX EzY EzZ TorsStiffness NxX NxY NxZ Pretwist
(-) (-) (N-m/rad) (-) (-) (-) (N-m/rad) (-) (-) (-) (deg)
4 A Rigid 0.1058 0 -0.9944 Free 0 1 0 0
4 B Rigid 1 0 0 Free 0 1 0 0
--------------------- OPTIONS ------------------------------------------------
9.80665 g
1025.0 rhoW
3.0e6 kBot
3.0e5 cBot
0.35 frictionMu
200.0 WtrDpth
0.025 dtM
0.0 TMax
uniform 0 0.2 0.0 current
--------------------- OUTPUTS ------------------------------------------------
FairTen4
AnchTen4
Point7Fx
Point7Fy
Point7Fz
Point8Fx
Point8Fy
Point8Fz
--------------------- END ----------------------------------------------------
Loading