Repository navigation
Cantera-compatible solver mode, kinetics fixes, counterflow continuation (sync from Subsapce-Lab) - #88
Merged
Conversation
… faster Jacobians) (#49) * Optimize standard mass action scan * Add solution neutrality comparison harness * Report per-case neutrality timing * Skip empty timing samples in report * Report matching solver counts * Benchmark a solved flame kernel state * Load solved state in Cantera microbenchmark * Align benchmark flame point indices * Keep benchmark state arrays concrete * Check reference flame validity for neutrality cases * Take the harness location from NH3_HARNESS_DIR in the neutrality script Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test kinetics: exhaustively compare fused mass action scan * test kinetics: verify sparse mass action entries * test kinetics: cover repeated mass action coefficients --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Align counterflow bound step decisions * Defer counterflow refresh across rejected steps * Revert deferred pseudo-time Jacobian refresh * Store tight reference scalars as scalars * Defer first counterflow transient refresh * Revert "Defer first counterflow transient refresh" This reverts commit 258814e. * Preserve counterflow Jacobian age across retry * Match Cantera lower bound fraction * Test counterflow retry lifecycle * Test negative counterflow bound failure * Test stale counterflow Jacobian retry * Remove deferred counterflow Jacobian retry
Snapshot capture/replay for stage-by-stage Cantera parity checks
…l, ~15% faster rates) (#51) * Reuse validated mass action orders * Check mass action against current main
This reverts commit 62cf294.
…ions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Self-contained repository: bundle parity harness, remove unreferenced artifacts
Native YAML reader for gas mechanisms, mechanism audit and opt-in NASA7 refit
Docs: full citations and BibTeX for Arrhenius.jl and related publications
Organize plasma code under an Arrhenius.Plasma submodule
) Adds a know-why record format to the design rationale (what a rule protects against, evidence, couplings, GPU implication, status) with a pilot table for the Newton rules, and AGENTS.md describing how to change a numerical policy: prediction first, baseline vs candidate counts, record update. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Removes the know-why record section added in #65 and trims AGENTS.md to the policy-change procedure. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…G and load validation (#66) * Fix native gas kinetics edge cases * Honor validation options in gas audit * Reject unknown gas rate types
…ary excess species (#62) * Match counterflow species closure to Cantera * Test boundary-only counterflow closure guards * Clarify counterflow species closure docs * Freeze counterflow boundary closure during Newton trials * Freeze twin growth closure index * Compare twin closure Jacobian to frozen finite differences
…bian, time-step counter (#69) * Reuse premixed workspace across steady retries * Refresh flame workspace after domain expansion * Revert "Refresh flame workspace after domain expansion" This reverts commit 1c29b40. * Revert "Reuse premixed workspace across steady retries" This reverts commit 50b3779. * Reuse premixed Newton correction storage * Avoid allocating the Newton correction view * Fill correction buffer without reshape * Pool flame workspaces across repeated solves * Bound premixed workspace cache by gas identity * Reset Jacobian state when reusing flame workspaces * Keep ionized flame workspaces out of pool * Remove residual and Jacobian hot-path allocations * Cache premixed residual statistics * Keep ionized workspace handling generic * Reuse ionized Jacobian property snapshots * Reuse ionized Newton correction storage * Cover premixed allocation paths by flame kind * Add solution archive neutrality checker * Add allocation neutrality group runner * Add flame allocation profiling harnesses * Add flame archive invariant checker * Use endpoint elemental balance in checker * Add exclusive flame timing harness * Record six flame timing cases * Fix neutral-runner line endings * Count accepted premixed time steps * Allow reported step counter correction in neutrality check * Add focused pseudo-time stats test * Remove harness-specific helper scripts from the branch * Assert accepted pseudo-time step counts * Own flame workspaces per flame * Test workspace reuse across flame grids
…free and burner flames (#70) * Add analytic auto Jacobian for premixed flames * Limit auto species Jacobian to free flames * Correct free flame Jacobian regression scope * Add Cantera free flame Jacobian fixture * Add free flame Jacobian timing harness * Avoid undeclared statistics dependency in timing harness * Benchmark free flame Jacobians from saved states * Benchmark free flame Jacobian timing across saved states * Fixture README: no private environment path Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Guard premixed auto Jacobian helper by flame kind * Enable auto Jacobian for burner flames * Fix burner Jacobian test setup * Compare burner analytic columns with automatic derivatives * Retain finite-difference flame boundary rows * Revert "Retain finite-difference flame boundary rows" This reverts commit cc52dc7. * Test omitted burner boundary coupling * Retain burner endpoint Jacobian couplings * Make premixed analytic Jacobian opt-in * Reduce premixed Jacobian property refreshes * Keep property refresh counts premixed-only * Add Cantera compatibility solve switch * Match free flame boundary Jacobian coordinates * Add free flame L1 Jacobian diagnostic * Fix L1 diagnostic scope * Include transient diagonal in L1 diagnostic * Save L1 diagnostic anchor * Use captured FreeFlame anchor in L1 fixture * Use captured steady L1 Jacobian * Use native band LU in L1 diagnostic * Match native correction vector order * Match Cantera finite difference steps in auto mode * Isolate Cantera boundary species steps * Add full Cantera auto Jacobian fixture * Report Cantera Jacobian block errors * Capture live Cantera Jacobian mismatch * Correct full Cantera Jacobian fixture scaling * Avoid allocation in flame property node accounting --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…anged) (#68) * Expose configurable Newton policy options * Report policy evidence conservation metrics * Include snapshot policy solver statistics * Fix Newton policy option test setup * Improve Newton policy validation evidence * Report elemental source balance in policy evidence * Report steady failures in policy evidence * Fix compatible Newton policy overrides * Test Newton policy preset overrides * Handle skipped Newton damping trials * Check damped Newton decisions against Cantera * Assert Newton returns match damped trace * Clarify Cantera temperature bound mapping * Match Cantera Newton component bounds * Fix velocity bounds regression assertion * Handle component bounds across flame state layouts * Use physical ionized velocity in Newton bounds * Guard damping failure convergence status * Assert literal Newton damping traces * Add Newton acceptance and convergence traces
…#72) * Add counterflow pseudo-arclength continuation * Correct continuation metric and expand Cantera fixtures * Test continuation across premixed counterflow kinds * Add continuation checkpoint restart * Add continuation step profiler * Add 12 point continuation fixture * Validate continuation checkpoints for premixed flames * Report continuation curve invariants * Add Cantera-style two-point diffusion control * Extend pseudo-arclength on controlled diffusion flames * Report continuation curve invariants * Scope curve invariant diagnostics * Record two-point control selection evidence * Allow solver residual in control temperature evidence * Use curve tolerance for control temperature evidence * Two-point control: strict sign change only, as Cantera (exact grid hits are not crossings)
* Match free flame auto ladder anchor and final stage * Update free flame anchor regression expectations * Pin free flame auto anchor results * Add focused free flame anchor regression * Match automatic premixed flame staging * Add premixed compatibility count runner * Check free flame width during compatibility solves * Fix free flame callback syntax * Correct free flame anchor test coordinate * Stop the auto ladder when refinement is disabled * Normalize dry run flag in count tool * Resolve count runner mechanisms from specs * Report steady call grid trace * Skip refinement solve when grid refinement is disabled * Report solution invariants with count traces * Clarify endpoint composition diagnostic * Check free flame width after steady solve * Guard burner blowoff and restore failed stages * Check burner flame invariants * Report burner conservation checks * Exercise full failed-stage retry ladder * Align compatibility Jacobian test with ladder * Compare the imposed flow value to 4 ulp (platform FMA differences) * Test multicomponent auto staging * Final compatible stage: test the saved multicomponent/Soret flags, as Cantera * Update tests for compatible Newton policy --------- Co-authored-by: Codex <codex@localhost>
…ary blocks (#73) * Add analytic auto Jacobian for premixed flames * Limit auto species Jacobian to free flames * Correct free flame Jacobian regression scope * Add Cantera free flame Jacobian fixture * Add free flame Jacobian timing harness * Avoid undeclared statistics dependency in timing harness * Benchmark free flame Jacobians from saved states * Benchmark free flame Jacobian timing across saved states * Fixture README: no private environment path Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Guard premixed auto Jacobian helper by flame kind * Enable auto Jacobian for burner flames * Fix burner Jacobian test setup * Compare burner analytic columns with automatic derivatives * Retain finite-difference flame boundary rows * Revert "Retain finite-difference flame boundary rows" This reverts commit cc52dc7. * Test omitted burner boundary coupling * Retain burner endpoint Jacobian couplings * Make premixed analytic Jacobian opt-in * Reduce premixed Jacobian property refreshes * Keep property refresh counts premixed-only * Add Cantera compatibility solve switch * Match free flame boundary Jacobian coordinates * Add free flame L1 Jacobian diagnostic * Fix L1 diagnostic scope * Include transient diagonal in L1 diagnostic * Save L1 diagnostic anchor * Use captured FreeFlame anchor in L1 fixture * Use captured steady L1 Jacobian * Use native band LU in L1 diagnostic * Match native correction vector order * Match Cantera finite difference steps in auto mode * Isolate Cantera boundary species steps * Add full Cantera auto Jacobian fixture * Report Cantera Jacobian block errors * Capture live Cantera Jacobian mismatch * Correct full Cantera Jacobian fixture scaling * Avoid allocation in flame property node accounting * Match compatible burner Jacobian boundary omissions * Add controlled fixed flame ablation runners * Capture fixed flame Cantera decision traces * Record fixed flame initial mesh in count runner * Report fixed flame conservation diagnostics * Check fixed flame elemental flux in ablation runner * Fix ablation flux diagnostic broadcasting * Separate analytic and auto burner Jacobians * Keep auto omission in boundary assembly * Preserve auto omission through FD fallback --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Test Cantera compatibility switch * Test counterflow solver options reset
* Gate fixed-temperature transient convergence by residual * Document transient compatibility option * Restore Cantera transient convergence criterion * Add fixed-temperature count diagnostic * Trim count diagnostic arguments * Add fixed-temperature decision trace tools * Resolve trace mechanism from caller directory * Add fixed-temperature Jacobian diagnostic * Allow diagnostic mechanism directory * Fix diagnostic mechanism path setup * Skip empty domains in fixed-temperature diagnostic * Support dense Cantera diagnostic Jacobian * Match Cantera fixed-temperature burner guess * Add fixed-temperature matrix cross-check * Batch fixed-temperature matrix exports * Fix fixed-temperature matrix scaling * Align fixed-temperature matrix components * Report fixed-temperature conservation checks * Keep burner guess anchor unchanged * Check burner guess velocity at imposed temperature * Compare fixed-T Jacobian blocks in common coordinates * Diagnose fixed-T boundary Jacobian rows * Probe fixed-T Jacobian residual derivatives * Match fixed-temperature burner velocity guess * Use compatible burner velocity ramp * Add fixed and burner conservation count diagnostic * Fix Cantera count diagnostic output * Support compatible fixed-temperature burner solves * Mark compatible fixed burner solve converged * Report fixed and burner reference validity * Compare all fixed and burner cases in one pass * Compare conservation against tight Cantera states * Check burner velocity ramp in staged test * Run fixed-temperature diagnostics in one session * Add controlled fixed temperature diagnostics * Handle optional conservative flux export * Test staged burner guess controls * Preserve convergence metadata in diagnostics * Compare fixed flame elemental flux profiles * Match fixed burner startup state to Cantera * Add fixed temperature velocity regression * Test fixed-temperature first steady velocity
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.
Brings upstream up to date with the Subsapce-Lab fork (77 commits since #87). Every change was reviewed and tested in the fork (full
Pkg.test()on each merge; 7009 tests pass on the head commit).Highlights
cantera_compatible=true, opt-in; defaults unchanged): Cantera's Jacobian construction (analytic interior species columns, finite differences elsewhere, including the deliberately omitted burner boundary blocks), Newton policy (weighted-step stop, damping, bounds), staged solve ladder, and initial guesses for free, burner and fixed-temperature flames. Under it, the first Newton step norm matches Cantera's to 1e-9 on the NH3 validation flames, and fixed-temperature flames reproduce Cantera's solver counts exactly.🤖 Generated with Claude Code
https://claude.ai/code/session_01ESwzs6ZCNt9TpFJXaF3wqC