Repository navigation
Set an absolute tolerance on the joint reactions in the RM3 regular-wave regression test - #26
Merged
Merged
Conversation
…ave regression test. The test uses Chrono's HHT integrator with step-size control and the GMRES solver. Chrono's default absolute tolerance on the constraint reactions is 1e-10, so a reaction component that is close to zero (the yaw moment in the prismatic joint is about 1e-3 N m, against 1e6 N m in pitch) has to converge to about 1e-10 when it passes through zero. The iterative solver does not reach that, the step is halved, and after enough halvings the run stops with "Reached minimum allowable step size". The long run (200 s) stopped this way in a continuous integration run on macOS. On Windows, 3 of 337 long runs stop when the wave amplitude is changed by multiples of 1e-12 m. The absolute tolerance on the reactions is now 0.01 N (N m); the tolerance on the accelerations keeps Chrono's default. With it, no step is cut in 60 long runs with the amplitude changed in the same way. The test now also fails with a message if the integrator cuts a step. The result moves against the stored reference, which was produced with step cuts in the first three steps: the float surge drift by 5.5 mm at most (RMS 3.3 mm against a limit of 6.3 mm, maximum limit 20 mm) and the float heave by 0.08 mm at most. The reference and the limits are unchanged.
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
test_regression_rm3_reg_wavescan stop with Chrono's "Reached minimum allowable step size". This sets an absolute tolerance on the joint reactions in the test's integrator, which removes the cause, and makes the test fail with a message if the integrator ever cuts a step.Only
tests/regression/rm3/test_rm3_reg_waves.cppchanges. The stored reference and the limits are unchanged.Cause
The test uses Chrono's HHT integrator with step-size control and the GMRES solver, at Chrono's default tolerances. The absolute tolerance on constraint reactions is 1e-10. A reaction component that is close to zero has to converge to about 1e-10 when it passes through zero, which the iterative solver does not reach. Chrono then halves the step, and after enough halvings it throws.
In this case the waves travel along x, so the yaw moment in the prismatic joint is about 1e-3 N m, against 1e6 N m in pitch. It changes sign between t = 148.29 s and 148.30 s, which is where the unmodified test halves its step on Windows.
The long run (200 s) stopped this way in a continuous integration run on macOS. On Windows, 3 of 337 long runs of the unmodified test stop when the wave amplitude is changed by multiples of 1e-12 m.
Change
SetAbsTolerances(1e-10, 1e-2): 0.01 N (N m) on the reactions; the tolerance on the accelerations keeps Chrono's default.DoStepDynamics, the test fails if more Newton iterations were used than one attempt allows, which means a step was cut.test_rm3_decayhas the same integrator settings but never needs more than four iterations per step, also over 200 s, so it is not changed.Effect on the result
The stored reference was produced with step cuts in the first three steps, so the result moves against it. Windows, short and long mode, with 2 threads and with the default number:
The test passes against the existing reference and limits. The surge drift now uses about half of its RMS limit; regenerating the reference with the new settings would restore the margin and is left as a separate decision.
Validation
full-testslabel so that CI runs the long mode on all three platforms.