Skip to content

Refresh DAE under v7 stack - #1575

Draft
ChrisRackauckas-Claude wants to merge 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:clean/DAE
Draft

Refresh DAE under v7 stack#1575
ChrisRackauckas-Claude wants to merge 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:clean/DAE

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Verified locally; Manifest refresh.

Summary

  • All 14 .jmd files under benchmarks/DAE tangle cleanly with SciMLBenchmarks.weave_file(..., (:script,)) on Julia 1.11 against the refreshed Manifest.
  • No surviving v7-era patterns (Bool autodiff/verbose, precs, integer sol[i], old ensemble prob_func).
  • Notable Manifest bumps: ModelingToolkit 11.24.1 -> 11.26.3, Symbolics 7.21.0 -> 7.24.2, SymbolicUtils 4.26.0 -> 4.30.1 (fixes a precompile method-overwriting bug that was repeatedly breaking extension precompilation), Sundials 6.1.0 -> 6.2.1, DASKR 3.1.0 -> 3.1.1, DASSL 3.0.0 -> 3.0.1, SciMLBase 3.7.1 -> 3.13.0, OrdinaryDiffEqBDF/Rosenbrock/FIRK/SDIRK 2.0.0 -> 2.x.

Please ignore until reviewed by @ChrisRackauckas.

Local smoke test passed: instantiate clean, scripts extract cleanly for
all 14 .jmd files. Manifest refresh notable bumps:
ModelingToolkit 11.24.1 -> 11.26.3, Symbolics 7.21.0 -> 7.24.2,
SymbolicUtils 4.26.0 -> 4.30.1 (fixes precompile dup-definition),
Sundials 6.1.0 -> 6.2.1, DASKR 3.1.0 -> 3.1.1, DASSL 3.0.0 -> 3.0.1,
SciMLBase 3.7.1 -> 3.13.0, OrdinaryDiffEqBDF/Rosenbrock/FIRK/SDIRK 2.0 -> 2.x.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
…tolerances

charge_pump.jmd: Symbolics v7 removed the old derivative-registration API
(Symbolics.derivative(::typeof(f), ::NTuple, ::Val{i})). Replace with the
new @register_derivative macro for qgate, qsrc, qdrain (and vin). Verified
that expand_derivatives(D(qdrain(U1, U1-U2, U1-U3))) now expands to a sum
of dqdrain_i(...) * Differential(...) terms instead of a dangling
Differential(t,1)(qdrain(...)), and that @mtkbuild successfully reduces
the index-2 system from 9 unknowns down to 4.

fekete.jmd: The "High Tolerances" and "Timeseries Errors" WorkPrecisionSets
paired abstols = 10.0.^-(5:8) with reltols = 10.0.^-(1:4) element-wise.
The first pair (abstol=1e-5, reltol=1e-1) is too loose for Sundials, which
spins for hours emitting "error test failed repeatedly" before failing.
Tightened reltols to 10.0.^-(4:7) so abstol and reltol are within ~1 order
of each other (sane per-step error control), and added :verbose => false
to the IDA/DASKR setups dicts to silence Sundials' repeated-error-test
warnings on the still moderately-loose end of the grid. The existing
maxiters = Int(1e7) WorkPrecisionSet kwarg already caps runaway runtimes.
Other tolerance blocks (MM vs DAE vs MTK subset, Low Tolerances) already
use tighter pairings and were left unchanged.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
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