Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with tolerance tubes at the end of the transient when the simulation result is longer than the reference one #77

Open
casella opened this issue Feb 9, 2025 · 2 comments
Assignees

Comments

@casella
Copy link
Collaborator

casella commented Feb 9, 2025

The MSL contains some model with chaotic motion. The experiment annotation has a StopTime that allows to actually observe it, which is perfectly fine. However, it is of course futile to try to compare such simulation with a reference trajectory of the same length, since any small numerical error can cause an arbitrarily large drift between the two trajectories, given enough time.

For the time being, we decided to avoid regression errors in these cases by deliberately providing a reference CSV file with a reduced time span, which is short enough to ensure that the trajectory divergence is small, when using different tools or different integration algorithms.

For example, the Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.BevelGear1D has StopTime = 1, but we limited the reference CSV file to a time span of 0.4 seconds. The idea is that the comparison should only take place in the time interval that is in common between the reference result and the simulation result.

Unfortunately, in some cases as, e.g., BevelGear1D, something goes wrong with the comparison: the shape of the tubes at the end of the shorter CSV reference file is kind of warped, causing a comparison failure right at the end of the reference file time interval:

Image

Note that the error takes place at 0.402 seconds, which is supposedly beyond the CSV file reporting interval, which spans from 0 to 0.4.

@beutlich could you please have a look? Thanks!

@casella
Copy link
Collaborator Author

casella commented Feb 9, 2025

I double-checked the BevelGear1D test case, the CSV reference file ends at time = 0.40000001, so the CSV-compare tool should definitely compute the high and low tubes only up to that point, rather than up to 0.402, where it fails.

I haven't looked up into the CSV-compare source code, but I guess it shouldn't be hard to make sure that the comparison is only performed on a time interval which is the intersection of the time span of the two CSV files.

@casella
Copy link
Collaborator Author

casella commented Feb 11, 2025

Apparently something was fixed on the LTX servers, by looking at the latest Modelica regression test report, the BevelGear1D model passes the verification phase.

All's well that ends well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants