Skip to content

Make conserve-volume the default hydraulic PTO limit and add an ideal vs realistic RM3 comparison - #33

Open
dav-og wants to merge 10 commits into
devfrom
feat/rm3-hyd-pto-wecsim-verify
Open

dav-og wants to merge 10 commits into
devfrom
feat/rm3-hyd-pto-wecsim-verify

Conversation

@dav-og

@dav-og dav-og commented Dec 4, 2026

Copy link
Copy Markdown
Member

Summary

Make kConserveVolume the default AccumulatorLimitPolicy of RectifiedHydraulicPTO, and give the three circuit choices named presets:

  • IdealRectifierConserveVolumeParams(), the same as a default-constructed RectifiedHydraulicPTOParams{}
  • IdealRectifierMakeUpParams(), the explicit open circuit; oil is created or removed at accumulator bounds
  • CompressibleChambersConserveVolumeParams(), which still needs chamber and valve data set by the caller

Device sizes stay with the caller. They are not library defaults.

The shipped RM3 hydraulic demo, the irregular linear-vs-hydraulic comparison, the unit-test make_test_params helper, and harness V1Defaults() are pinned to the previous make-up behaviour so their existing numbers do not change silently. Verification still compares WEC-Sim only to the matched set. report_context.md is context text in the verification report, not a pass/fail check.

A new comparison case, compare_ideal_vs_realistic_hydraulic_pto_rm3_irreg, puts V1Defaults() (--config v1) and RealisticDefaults() (--config realistic) side by side on the same irregular RM3 case as the linear-vs-hydraulic comparison. It is INFO, 0 checks, context only, and is not compared with WEC-Sim. The comparison report prints an optional report_section.md for PASS, WARN and INFO cases. Neither set is the library default.

How it was tested

On Windows (Release, build_verify_dev), after merging dev:

ctest -C Release -R test_comparison_rm3_compare_ideal_vs_realistic_hydraulic_pto_rm3_irreg --output-on-failure

Tests #156 (execute) and #157 (comparison script) both passed. Before these two commits, the same tree's hydraulic unit tests, the verification suite (14/14) and the comparison suite (29/29) were run locally, and both generated reports were checked. The full regression suite was not completed locally. Continuous integration runs the unit, regression and external tests on Linux, macOS and Windows.

Effect on results

A default-constructed RectifiedHydraulicPTOParams{} now uses kConserveVolume, not kIdealMakeUp. Call sites that are pinned (demos/rm3/demo_rm3_hydraulic_pto.cpp, tests/comparison/rm3/test_compare_linear_vs_hydraulic_pto_rm3_irreg.cpp, unit-test make_test_params, and harness V1Defaults()) keep the previous make-up behaviour and their previous numbers. Verification against WEC-Sim still uses only the matched set; those numbers, references and tolerances are unchanged. The new comparison case is INFO with 0 checks and does not pass or fail on metric values. No reference data was regenerated and no tolerance was widened.

Checklist

  • The pull request targets dev.
  • New behaviour has a test, or the summary explains why it does not.
  • No reference data was regenerated and no tolerance was widened to make a test pass.
  • Documentation is updated where behaviour, options or outputs changed.
  • The label full-tests is set if the change can affect verification or comparison results.

…cuit presets.

Default AccumulatorLimitPolicy is now kConserveVolume; a default-constructed RectifiedHydraulicPTOParams{} equals IdealRectifierConserveVolumeParams(). IdealRectifierMakeUpParams() is the explicit open-circuit choice: oil is created or removed at accumulator bounds, so it is not a closed circuit. CompressibleChambersConserveVolumeParams() still needs chamber and valve data.

The shipped demo, the irregular linear-vs-hydraulic comparison, the unit-test make_test_params helper and V1Defaults() are pinned to the previous make-up behaviour. Verification still compares WEC-Sim to the matched set only; report_context.md is context text in the verification report, not a pass/fail check. Neither v1 nor realistic is the library default.
Context only (INFO, 0 checks): V1Defaults() (--config v1) against RealisticDefaults() (--config realistic) on the same irregular RM3 case as the linear-vs-hydraulic comparison. Not pass/fail, and neither run is compared with WEC-Sim. The optional report_section.md next to status.json is printed for PASS, WARN and INFO cases. Neither set is the library default.
@dav-og dav-og added the full-tests Run the full test suites on all platforms in CI label Dec 4, 2026
test_makeup_is_measured_and_v1_unchanged required the make-up path to match
the 46cc14b reference update exactly. Apple clang on arm64 contracts the
reference's one-expression oil update into a fused multiply-add, which leaves
ULP-level differences (force 4.07e-10 N of a ~414 kN peak, HP oil 5.55e-17 m^3)
and failed on macOS only. Compare each quantity (force, HP oil, LP oil, motor
speed) to 1e-12 of its own peak, matching the adjacent roundoff checks, and
print the largest differences on the pass line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-tests Run the full test suites on all platforms in CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant