FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0381 — Net wake-rebuild log: the cable drag uses the wave velocities of the last OdeFcn
ID 0381
Class BUG
Severity 1
Status ready

Models: Net/NetStructureWithConstraints, Net/NetStructure

Found: 2026-10-14, feature nswc-node-state (plan C1, read at 85cb274)

Evidence

fhsim_environment PanelSourceSet::DescribeRebuild (src/environment/PanelSourceSet.cpp:49), called during a wake rebuild in PreOdeFcn, calls CableHydrodynamicForce(T, X, …) (NetWakePanels.h:77). That calls AddCableForceRange (NetStructureWithConstraints.cpp:765-776, the twin NetStructure.cpp:727-737), which takes the water velocity from FlowAt (:798), which reads m_nodeWaveVelocity (:444). That buffer is filled only by UpdateNodeWaveVelocities in OdeFcn (and in NetStructure::OdeJacobian), so it holds the wave velocities of the last OdeFcn's state and time, not of (T, X).

Effect

Only the wake-rebuild log line ("Cable drag along the mean relative flow …, cables and floats are … % of the net's drag") is affected, and only with waves: its cable drag uses wave velocities from up to one stage earlier, and zero before the first OdeFcn. No result depends on it.

Possible fix

Call UpdateNodeWaveVelocities(T, X, 0, m_numNodesCalc) at the start of CableHydrodynamicForce in both nets (it is const and writes a mutable buffer that OdeFcn overwrites anyway).

Test that would prove it

A net with cables in an Airy wave: CableHydrodynamicForce at (T, X) before any OdeFcn equals the sum of the cable forces computed from that state's wave velocities.

Risk

Log text only.