FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
0163 — fhsim_aquaculture cannot build on fhsim_marine_elements 4 without a port, and the migration guide does not list what the port must change
ID 0163
Class DOCUMENTATION
Severity 2
Status blocked

Models: Net/NetStructureWakeEffect

Found: Review 2026-09-28: I-12. 2026-09-28 review of feature/net-hydrodynamics at 6d0b845 (worktrees/nethydro/review/interactions.md); source rechecked at 4ddaad5 (only documentation, test comments and the recipe changed since, c81508e, 4ddaad5); filed by phase K WP K4 (owner ruling R42 item 39)

Decision needed: Owner (Karl-Johan): should aquaculture's MaxAcceleration inputs warn (they are silently ignored today), and should the port replace NetCageWakeEffect with Net/NetStructure plus CastWake, rather than keep the deprecated class alive until 5.0?

Review 2026-09-28: I-12 (interactions review, tracker scale, severity 2). Confirmed by reading fhsim_aquaculture 2.0.0 (fhsimweb/reloadrepos/fhsim_aquaculture f8df04c). The fhsim_marine_elements review's aquaculture section adds the porting hazards quoted below. Owner ruling R42 item 41 asks for a port plan (only), which is written separately.

Evidence

  • aquaculture conanfile.py:41-44 pins fhsim_marine_elements ~2.0.0 and fhsim_environment ~2.0.0; it also requires base ~3.0, coribo ~2.8 and fhsim_conan/1.2, all three majors behind.
  • (a) Pre-3.0 names are gone: net/CNetStructure.h, CNetStructureWakeEffect, CNetElement3NWakeEffect, Hungarian fields such as dMassFactor (renamed in ME 3, 41040d0); aquaculture 2.0.0 already fails against ME 3.
  • (b) SAdaptationSpec_t::maxAcceleration is removed (MARE-0133, R40); aquaculture reads m_SAdaptations.dMaxAcceleration in five SimObjects (CNetCageWakeEffect.cpp:730, CNetCageScreen.cpp:978, CMembraneStructure.cpp:398, CMembraneCage.cpp:559, CNetCage.cpp:586). Removing the clamp changes cage results where inputs set it.
  • (c) NetCageWakeEffect derives from the deprecated class (setup warning in 4.x, removal in 5.0, no [[deprecated]] attribute, so no compiler warning), and inherits MARE-0157.
  • (d) Under fhsim_environment 4, GetParticleVelocity/GetCurrentVelocity return flow waked by every registered lumped source; its internal wake polynomials then stack on any environment wake object placed for the same cage (suspected double counting). It casts no lumped source.
  • (e) Density fixed at kRhoWater = 1025 in four files (fhsim_base BASE-0054, review I-8).
  • ME review (aquaculture section): CNetCage overrides CalcStateDerivatives, AddNetForces, AddCableForces and AddNodeBottomForce without const; the bases are const since 3.0, so a port with those signatures silently hides rather than overrides them. The NetElement3N constructor and AddNodeForces signatures changed (compile error). CNetCageScreen's bases (the Screen group) are deleted (R6).
  • doc/user/migration_4_0.md §mig40_deprecated says the classes are kept "because fhsim_aquaculture derives" from them, but lists none of the above.

Effect

The main cage consumer of the net code has no documented route to ME 4; a port that follows the old signatures can compile and silently skip its overrides.

Possible fix

Add an aquaculture section to migration_4_0.md listing (a)–(e), the const-override hazard and the files; treat the port as a separate work package with its own baselines.

Test that would prove it

After the decision: a SimObject test of the chosen behaviour.

Risk

Result changes only in the cases named above; check the regression baselines.