Fix isothermal domain test connections by ChrisRackauckas-Claude · Pull Request #478 · SciML/ModelingToolkitStandardLibrary.jl · GitHub
Skip to content

Fix isothermal domain test connections - #478

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:agent/fix-isothermal-dynamic-volume-balance
Jul 13, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:agent/fix-isothermal-dynamic-volume-balance

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jul 12, 2026 •

Copy link
Copy Markdown
Member

This PR should be ignored until reviewed by @ChrisRackauckas.

Summary

  • Use domain_connect for hydraulic domain propagation instead of routing flow equations through the fluid parameter setter.
  • Keep the cap/volume physical connection explicit.
  • Transfer the Actuator operating point with public symbolic problem indexing instead of pairing symbolic unknowns with raw solution storage.
  • Check domain parameter propagation through the public ModelingToolkitBase.bindings API.
  • Add source/volume flow-balance assertions to the DynamicVolume test.

Root cause

ModelingToolkit commit b0f315369 stopped silently zeroing underconstrained variables during alias elimination. The immediate parent 80f7f62bc passes the reduced DynamicVolume model, while b0f315369 reports 48 highest-order variables and 47 equations. The tests were using a fluid domain setter as a physical flow connector, which hid the model structure behind the removed zeroing behavior.

The Actuator test also copied a failed zero-length solution by zipping unknowns(initsys) with raw initsol.u storage. Its public problem operating point contains piston.dx = 0, while the copied raw value was NaN. Reading each unknown through initprob[v] preserves the intended operating point.

Validation

  • Rebased head 1cb83378 on current main 8539d8f2 (merged test: use Base.ifelse in Chua circuit #477).
  • Direct test/isothermal_compressible.jl on Julia 1.12.6, exit 0:
    • Fluid Domain and Tube: 2/2
    • Valve: 1/1
    • DynamicVolume and minimum-volume feature: 12/12
    • Actuator System: 9/9
    • Prevent Negative Pressure: 3/3
  • Exact commit boundary with the same reduced model and local environment:
    • 80f7f62bc: exit 0
    • b0f315369: exit 1, 48 variables / 47 equations
  • Official GROUP=Core Pkg.test() on a temporary validation stack containing current main, this patch, and Fix callable interpolation builder symtype #480: Analog 100/100, Chua 1/1, Continuous 76/76, Digital 34/34, and Isothermal 27/27; the run then stopped on the separate clean-main exact-equality assertion in test/magnetic.jl:66, which is under an independent reproduction and ULP analysis.
  • Repository-wide Runic 1.7 --check .: exit 0 across 81 files.
  • git diff --check: exit 0.

No test was skipped, disabled, silenced, or made warn-only.

Related: #457, merged #477, and #480.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the agent/fix-isothermal-dynamic-volume-balance branch from 7b7966a to 1cb8337 Compare July 13, 2026 09:32
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 13, 2026 10:20
@ChrisRackauckas
ChrisRackauckas merged commit d0243bd into SciML:main Jul 13, 2026
5 of 11 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