FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0143 — Trawl/Vessel and Trawl/TrawlDoor report a dense Jacobian and no port Jacobians, so BDF runs of trawls use the dense solver
ID 0143
Class KNOWN-LIMITATION
Severity 2
Status ready

Models: ToVessel, ToTrawlDoor

Found: 2026-11-25, trawl-movie timing runs

Evidence

Run: fhsim_fishery/data/trawl/movies/trawl/morenot520/TrawlMovie.xml, 600 to 610 s, Method="BDF", FhSim (no rendering), plan trawl-movie, 2026-11-25. FhSim warns:

‍SimObject 'PWarp' has 138 states but reports dense Jacobian (GetJacobianSparsity returns -1). (also SWarp 138, PBridle 114, SBridle 114)

‍No analytical Jacobian sparsity for this model: the whole 3107x3107 system is assembled as dense, so the sparse linear solvers are unavailable. 7 of 8 stateful SimObjects report a dense block (GetJacobianSparsity returns -1): Vessel, PDoor, SDoor, PWarp, SWarp, and 2 more – 533 of 3107 states, 17% of the system. 34 port coupling(s) have no analytical port Jacobians, which abandons the pattern on its own.

The model has one Trawl/Vessel, two Trawl/TrawlDoor, four Cable/Branched (warps and bridles) and one Net/NetStructure. Only Net/NetStructure gives a sparsity pattern and port Jacobians (HasPortJacobians, fhsim_marine_elements/src/net/NetStructure.h:358). The warning comes from fhsim/src/engine/model/JacobianSparsityAnalyzer.cpp:854-885: the system pattern needs every object's pattern and analytical port Jacobians on each coupling.

fhsim_fishery/src/trawl/TrawlVessel.cpp:158-161 and fhsim_fishery/src/trawl/TrawlDoorBase.cpp:320-323 both return -1; // dense from GetJacobianSparsity. Neither TrawlVessel nor TrawlDoorBase overrides HasPortJacobians (only CenterWeight and Auv do in this repo).

Effect

BDF takes steps of about StepMax (0.03 s; about 375 steps per 10 s, against about 25 000 for RK45_i), but each step factorises a dense 3107x3107 matrix. Without rendering, the 10 s run takes 2 min 12 s with BDF and 59 s with RK45_i, so BDF is slower than the explicit method for trawl runs without visualisation. It is faster only when each step is rendered (movie capture). With a sparse pattern, BDF should win in both cases.

Possible fix

The vessel and door blocks are small (13 states each), so a full block per object is fine: return the pattern of a full block instead of -1. The main work is HasPortJacobians and the port Jacobians of the warp and bridle couplings (positions and velocities out, forces in), as CenterWeight does. This issue and MARE-0467 (Cable/Branched) must both be fixed before the trawl system gets a sparse pattern; one object type alone does not enable the sparse path.

Test that would prove it

A unit test per model that compares the port Jacobians with finite differences. A run of the deck above logs no "No analytical Jacobian sparsity" warning once MARE-0467 is fixed too.

Risk

Wrong port Jacobians give slow or failed BDF convergence, not wrong physics in explicit runs. Result files of explicit-method tests do not change.