Repository navigation
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
Open
Make conserve-volume the default hydraulic PTO limit and add an ideal vs realistic RM3 comparison#33dav-og wants to merge 10 commits into
dav-og wants to merge 10 commits into
Conversation
…imit to the hydraulic PTO.
…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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make
kConserveVolumethe defaultAccumulatorLimitPolicyofRectifiedHydraulicPTO, and give the three circuit choices named presets:IdealRectifierConserveVolumeParams(), the same as a default-constructedRectifiedHydraulicPTOParams{}IdealRectifierMakeUpParams(), the explicit open circuit; oil is created or removed at accumulator boundsCompressibleChambersConserveVolumeParams(), which still needs chamber and valve data set by the callerDevice 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_paramshelper, and harnessV1Defaults()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.mdis context text in the verification report, not a pass/fail check.A new comparison case,
compare_ideal_vs_realistic_hydraulic_pto_rm3_irreg, putsV1Defaults()(--config v1) andRealisticDefaults()(--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 optionalreport_section.mdfor PASS, WARN and INFO cases. Neither set is the library default.How it was tested
On Windows (Release,
build_verify_dev), after mergingdev: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 useskConserveVolume, notkIdealMakeUp. 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-testmake_test_params, and harnessV1Defaults()) 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
dev.full-testsis set if the change can affect verification or comparison results.