FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0319 — NetStructure's cable drag Jacobian uses the water density, not the element's air/water blend
Class BUG
Severity 2
Status ready

Models: Net/NetStructure

Found: 2026-09-30 review of f42360e..a6492d6 (four parallel correctness reviews)

Decision needed: —

Evidence

src/net/NetStructure.cpp:1487-1495 (OdeJacobian) passes m_panelHydrodynamics.fluid.rho to ComputeCableDragVelocityJacobian and ComputeCableDragPositionJacobian; the comment above says "the rhoWater air/water blending across z=0 is also ignored (assume both ends submerged for the Jacobian-validation configuration)". The force uses the blend: src/cable/subroutines/CableElBasics.cpp:301 const double rhoWaterCorr = submergedFraction * rhoWater + (1.0 - submergedFraction) * m_rhoAir;, with the fraction from the wave surface (R65/R66).

Effect

For a cable element above the surface (a collar or floating rope) the analytic drag blocks are about rhoWater/rhoAir ≈ 850 times too large; for one straddling the surface, too large by 1/f. Only the Newton matrix of implicit integrators is wrong, not the forces: convergence near the surface may suffer. It was so before the diff too (constant rho), but R65/R66 made the blend real.

Possible fix

Pass each element's blended density (f rhoWater + (1 - f) rhoAir, from the element after CalcFoundation) to both functions. Or return false from HasJacobians while a cable element is at or above the surface.

Test that would prove it

ExpectJacobiansMatch on a net whose cables straddle z = 0 and lie above it, with the NetStructure_Jacobian tolerances.

Risk

Low: Jacobian only.