FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0085 — Own drag and added-mass models outside the environment laws (ADR 0002)
ID 0085
Class ARCHITECTURE
Severity 1
Status blocked

Models: — (annotated on the fhsim_base library group)

Found: 2026-10-20, hydrodynamics overview section 7 (doc/hydrodynamics-overview.md in fhsim_workspace), feature m2-hydro-doc-gaps

Decision needed: Owner: migrate these models to the environment laws (sphere_hydro, cylinder_hydro), or keep them as they are? If kept, state the reason in each header (other shape, kept for compatibility, ...). A migration moves results for the cases that use them.

Evidence

fhsim_base keeps its own hydrodynamic code, outside ADR 0002 of fhsim_environment ("one copy of each law"):

  • src/rigidbody/CHydroCylinder.cpp:28: double dragCoeff = 0.4 * 0.5 * rho * 2 * oR;, a hard-coded strip Cd of 0.4.
  • src/kalman/HydroBall.cpp:30-31, 57: m_RhoWater = 1000; m_DragCoef = 0.5; and its own sphere drag. The environment sphere law (sphere_hydro) has Cd 0.5 and rho 1025 by default.
  • src/cable/Cable.cpp:430-438: addWaveInertia, the wave inertia copy already filed as BASE-0083.
  • src/cable/Cable.cpp:470: uses the env cylinder drag but the fixed viscosity (ENV-0124).

Effect

Drag laws in base can drift from the environment's. The fixed rho 1000 and Cd values cannot follow an XML change of water density or a sourced coefficient.

Possible fix

Per model: use the env law (results move where rho or Cd differ), or keep it and say why. BASE-0083 covers the bit-for-bit part for Cable.cpp.

Test that would prove it

Existing regressions for the models, compared before and after; for a kept model, a comment test that pins the intended difference.

Risk

Medium for a migration (baselines move); none for keeping and documenting.