FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0391 — Cable/LumpedMass offers an analytical Jacobian that omits the seabed contact
ID 0391
Class BUG
Severity 2
Status ready

Models: Cable/LumpedMass

Found: 2026-10-16, feature seabed-pins (plan D1 phase 0, step 4, defect candidate D-a)

Decision needed: none beyond the owner ruling Q5i (opt out of the Jacobian while in contact, as MARE-0134 and FISH-0086); the fix goes with the D1 phase 2 ME switches.

Evidence

  • src/cable/Cable.cpp:86 Cable::HasJacobians() returns true always, and Cable::OdeJacobian (:91-111) calls ComputeStructuralJacobian only.
  • The element forces of the same object include the seabed contact: InternalCableWithBottomContact::AddElementForce (src/cable/subroutines/InternalCableWithBottomContact.cpp:77) calls SeafloorForces::AddBottomForceCylinder, and marks the force with MarkForceOutsideJacobian() (:80).
  • Cable never reads HasForceOutsideJacobian(). CableBranched does (src/cable/CableBranched.cpp:199-200, HasJacobians :259-262) and opts out while in contact.

Effect

A Cable/LumpedMass lying on the seabed gives the implicit solver (BDF) a Newton matrix without the contact stiffness and damping: more step rejections, or a wrong step. Same defect class as MARE-0134 (Net/NetStructure, Net/Disk) and FISH-0086 before their fixes.

Possible fix

Make Cable::HasJacobians() false while the cable has a force outside the Jacobian (m_internalCable->HasForceOutsideJacobian()), as CableBranched does. Alternative (Q5i option 2, later): differentiate the contact law.

Test that would prove it

Test first: a Cable/LumpedMass with two nodes on the seabed, the finite-difference Jacobian check of FhSim (FhSimJacobianCheck) fails before the fix and passes after; and HasJacobians() is true again once the cable is clear of the seabed. After the fix the Cable_BedRegression baseline then runs with the default Jacobian mode (remove TestJacobianMode::No from its test in tests/Cable_Test.cpp). Compare the pins of tests/SeabedContact_Pin_Test.cpp (L2, L2_CableLumpedMassCallsTheCylinderLawPerElementAndLeavesItOutOfTheJacobian): unchanged.

Risk

Opting out costs steps under BDF on the seabed (MARE-0228/0229). Check E3/E5 do not touch the same files at the time of the fix.