FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0064 — The BottomContact output of the NetStructure family is always zero
ID 0064
Class BUG
Severity 2
Status blocked
Models Net/NetStructure, Net/NetStructureArray, Net/NetStructureWakeEffect
Found 2026-09-25, independent review of the MARE-0022 documentation (24f9aa9)
Decision needed Approve the result-changing fix: compute the bottom contact into the buffer, or remove the port.

Evidence

m_bottomContact is zeroed in each constructor and only read afterwards:

  • src/net/NetStructure.cpp:45 zeroes it, :692 feeds it to the filter.
  • src/net/NetStructureArray.cpp:50 and :888.
  • src/net/NetStructureWakeEffect.cpp:44 and :724.

No other line of the three classes writes it; AddBottomForces computes the seafloor force per node but does not store a sum.

Effect

The six-wide BottomContact output, registered by all three classes, is a filtered zero. A user who logs it to check whether the net touches the seafloor always reads "no contact". The pages now say so, but the port name promises otherwise.

Possible fix

  • (a) Sum the seafloor force (and moment, or contact area, whatever the six values were meant to be) into m_bottomContact in AddBottomForces. The six components are not defined in the source and need the owner's definition.
  • (b) Remove the port, which breaks input files that log it.

Test that would prove it

A one-node net resting on a flat seafloor: the output must be non-zero.

Risk

(a) changes the port's value; (b) breaks input files. Neither changes the net's dynamics.


Note (2026-09-25)

Not fixed in the 2026-09-25 batch, though the result-changing fix was approved: fix (a) needs the meaning of the six components, and the source gives none. m_bottomContact is six wide in all five classes that have it (NetStructure, NetStructureArray, NetStructureWakeEffect, NetStructureWithConstraints and the uncompiled NetStructureOCL), is only ever zeroed, and no history in this repository writes it (git log -S finds only the Hungarian-notation rename). AddBottomForces computes per node the three components of CalcBottomForceSphere and nothing else. The owner needs to choose, for example:

  • (a1) the sum of the seafloor force [N] (3) and its moment about the origin or the net's centroid [N m] (3);
  • (a2) the sum of the seafloor force (3), the number of nodes in contact, the largest penetration and two spare zeros;
  • (b) remove the port.

Since MARE-0068, Net/NetStructureWakeEffect computes the seafloor forces as well, so (a) would apply to all three classes. AddBottomForces is const, so the sum needs a mutable buffer.