|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0467 |
| Class | KNOWN-LIMITATION |
| Severity | 2 |
| Status | ready |
Models: CableBranched
Found: 2026-11-25, trawl-movie timing runs
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_marine_elements/src/cable/CableBranched.cpp:368-371:
CableBranched does not override HasPortJacobians.
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.
Implement GetJacobianSparsity for CableBranched: a node couples only to its neighbour nodes along each branch (block tridiagonal per branch, plus the branch joints). Implement HasPortJacobians and the port Jacobians of its end-point inputs and force outputs, as NetStructure does (src/net/JACOBIAN_RECIPE.md). This issue and FISH-0143 (Trawl/Vessel, Trawl/TrawlDoor) must both be fixed before the trawl system gets a sparse pattern; one object type alone does not enable the sparse path.
A unit test that compares the declared pattern with a finite-difference Jacobian of a branched cable with bottom contact (no nonzero outside the pattern). A run of the deck above logs no dense warning for the cables.
A pattern that misses an entry gives wrong Newton steps in BDF (slow or failed convergence), not wrong physics in explicit runs. Result files of explicit-method tests do not change.