Skip to content

Add Andrews squeezing mechanism benchmark with MM, DAE, and MTK formu…#1485

Merged
ChrisRackauckas merged 7 commits intoSciML:masterfrom
singhharsh1708:andrews-mechanism-benchmark
Mar 13, 2026
Merged

Add Andrews squeezing mechanism benchmark with MM, DAE, and MTK formu…#1485
ChrisRackauckas merged 7 commits intoSciML:masterfrom
singhharsh1708:andrews-mechanism-benchmark

Conversation

@singhharsh1708
Copy link
Copy Markdown

Adds Andrews' squeezing mechanism benchmark including mass-matrix, residual DAE, and MTK index-reduced formulations. Includes solver behavior analysis and work-precision diagrams.

@singhharsh1708
Copy link
Copy Markdown
Author

@ChrisRackauckas

@ChrisRackauckas
Copy link
Copy Markdown
Member

It doesn't look like this one is working?

@singhharsh1708
Copy link
Copy Markdown
Author

singhharsh1708 commented Mar 9, 2026

@ChrisRackauckas I’ve cleaned up the Andrews benchmark and fixed the WPD section so it now reflects the only working solver path (direct RADAU5). All code runs locally and plots generate correctly.

@ChrisRackauckas
Copy link
Copy Markdown
Member

Update ODEInterfaceDiffEq.jl so that you can just use the standard work-precision diagram directly. You just need to give the algorithm type the arguments required to forward them here.

@singhharsh1708
Copy link
Copy Markdown
Author

@ChrisRackauckas I’ve updated the benchmark to use the standard WorkPrecisionSet interface.

Changes made:

Patched ODEInterfaceDiffEq to forward M1/M2, DIMOFIND*, and mass matrix options

Replaced direct ODEInterface.radau5 calls with standard solve

Restored proper work-precision diagrams

Adjusted tolerance range for index-3 stability

All code runs locally and plots now generate correctly.

Wrapper PR: SciML/ODEInterfaceDiffEq.jl#90

@singhharsh1708 singhharsh1708 force-pushed the andrews-mechanism-benchmark branch from 004ee93 to 458a7b4 Compare March 9, 2026 19:59
@singhharsh1708
Copy link
Copy Markdown
Author

I’ve updated the benchmark based on your suggestions.
Could you please take a look and let me know if everything looks correct now?

Harsh Singh added 6 commits March 12, 2026 22:20
The radau5() wrapper with M1/M2/DIMOFIND kwargs is not yet released
to the Julia registry (PR merged to master but not tagged). CI installs
from registry and gets MethodError on the wrapper constructor.

Reverted Reference Solution and WPD sections to use direct OI.radau5()
API (same approach that passed CI in build #4040):
- make_radau5_opts() helper for ODEInterface options
- Direct OI.radau5() calls with output_fcn for trajectory
- Manual WPD loop with median timing instead of WorkPrecisionSet
- Added Statistics for median()
- Added Convergence Table section
@singhharsh1708 singhharsh1708 force-pushed the andrews-mechanism-benchmark branch from 9d9ccfd to 888e25e Compare March 12, 2026 16:50
Replace manual WPD loops with standard WorkPrecisionSet from DiffEqDevTools.
Use radau5() DiffEq wrapper with DIMOFIND kwargs instead of direct OI.radau5
API. Remove 13-component rhs_andrews (only needed for direct OI API).

Key changes:
- Reference solution: radau5 wrapper at tol=3e-8 with dt=1e-6 (INITIALSS)
- WPD: WorkPrecisionSet with tolerances [3e-5..1e-7], dt=1e-6
- Removed manual WPD for-loop, convergence table
- Removed Statistics import and OI alias
- Aligns with SciMLBenchmarks repo style (cf. Car Axis benchmark)
@singhharsh1708
Copy link
Copy Markdown
Author

This benchmark now uses the radau5() DiffEq wrapper with DIMOFIND
arguments and the standard WorkPrecisionSet workflow (similar to the
Car Axis benchmark).

Reference solution computed with abstol=reltol=3e-8 and dt=1e-6.
The WorkPrecisionSet tolerances are chosen to avoid DtLessThanMin
failures for this index-3 system.

All tests run locally and the WPD generates successfully.

@singhharsh1708
Copy link
Copy Markdown
Author

singhharsh1708 commented Mar 12, 2026

@ChrisRackauckas there are few errors can you check if they are fine or need changes?

@ChrisRackauckas ChrisRackauckas merged commit ec11d43 into SciML:master Mar 13, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants