FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0368 — TrawlCable and RundDorg cable elements, doors and clump weights hard-code g = 9.81
ID 0368
Class KNOWN-LIMITATION
Severity 1
Status ready

Models: TrawlCable, MooringCable, RundDorg

Found: 2026-10-12, feature wake-receiving P1 review of a237d92 (owner ruling A3 of 2026-10-12: file, do not fix)

Related: MARE-0326 (the water density fixed at 1025 kg/m³ in the same laws, kRhoWater, CableSegmentWaterForce.h:34, extended 2026-10-12 to name the door and clump lines).

Evidence

The literal 9.81 stands for g in every water law of these models:

  • src/trawl_mooring_interaction/CableSegmentWaterForce.h:87 (InWaterForce, cable elements): Force(2) = 9.81 * (segment.mass - kRhoWater * segment.displacementVolume * f);
  • :199 (DoorForce): Force(2) = 9.81 * (door.mass - door.displacementVolume * kRhoWater);
  • :229 (ClumpWeightForce): Force(2) = 9.81 * (clump.mass - clump.length * clump.radius * clump.radius * M_PI * kRhoWater);
  • src/trawl_mooring_interaction/TrawlCableConstraintSets.cpp:494 (elements in the sediment) and :524 (the door weight body, 9.81*door.WeightMass).

marenv defines marenv::gravity = 9.81 (marenv/include/marenv/marenv.h:19), the constant the wave theories use; the environment has no run-time gravity. The cable elements, the door and the clump weight all do the same thing here (none reads the environment's constant).

Effect

None in value today: 9.81 equals marenv::gravity. A change of the environment's gravity (another constant, 9.80665, or a configurable g) would not reach these models, and their buoyancy would no longer balance the hydrostatic pressure of the waves.

Possible fix

Use marenv::gravity in place of the literal (bit for bit), and together with MARE-0326 pass the environment's density; if the environment gets a run-time g, read it at FinalSetup.

Test that would prove it

None while both are 9.81 (the change is bit for bit). With a configurable g: an element at rest in still water with g = 9.80665 has the weight in water (m − rho V) · 9.80665.

Risk

None for the literal-to-constant change.