Fix underdetermined thermal heat-flow sensor test#488
Conversation
Connect the two ideal heat-flow sensors in series so the test system has a unique through-flow, and assert that both sensors report the same value. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
|
Investigation scratchpad ReproductionI reproduced this from unmodified upstream Compiling the unchanged heat-flow system fails with: Structural causeEach ideal heat-flow sensor imposes zero temperature drop and has an independent through-flow variable. With both sensors connected across the same two nodes, their temperature equations are duplicates and the node balances determine only
Detection boundaryUsing the unchanged fixture from MTSL v2.25.0 in one preserved environment:
The source boundary is ModelingToolkit commit Fix and verificationThe patch connects both sensors in series and asserts exact equality of their readings. No production API or implementation changes are needed.
The unmodified clean-main |
|
Independent corroboration from the current stacked-branch audit:
A broader Core run reached the thermal file and passed that focused repair, then stopped later at the separate clean-main |
|
CI classification as the matrix progresses:
The changed thermal file has already passed locally in full on Julia 1.10, 1.12, and 1.13-rc1 (20/20 each), with no skipped or weakened assertion. |
This PR should be ignored until reviewed by @ChrisRackauckas.
Summary
HeatFlowSensors in series instead of in parallel.Why
The parallel topology connects both ideal sensors across the same two thermal nodes. Their zero-temperature-drop equations are duplicates, while the node balances constrain only the sum of the two sensor flows. The individual flow split is therefore arbitrary, producing the observed structural imbalance (11 highest-order variables and 10 equations on the current stack).
Putting the sensors in series gives each sensor a uniquely determined through-flow without changing production code. This also preserves the original heat-flow assertion and adds a direct regression assertion for both sensor readings.
The invalid parallel topology dates to the initial thermal test upload (
ae289f4d). A local release boundary probe with the unchanged fixture passes on ModelingToolkit v10.31.0 and is detected as structurally singular on v10.31.1. The detecting source change is ModelingToolkit commit3eef54d43a752f7a46a0f53689d5f557115299f9, which moves consistency checking before alias elimination so alias-added zero constraints no longer mask underdetermination.The output-marking approach explored in #450 does not change structural balance; #452 also identified the parallel sensors.
Verification
test/thermal.jlpasses (Heat systems 6/6, Heat flow system 6/6, Radiator 3/3, Thermal Collector 3/3, FixedHeatFlow 2/2).test/thermal.jlpasses with the same counts.test/thermal.jlpasses with the same counts.Runic --check .passes on the full repository.git diff --checkpasses.A clean-main
GROUP=Corerun was also attempted locally. It reaches the pre-existing piston missing-independent-variable failure before the thermal file; the targeted thermal suite above was therefore run directly on all three Julia versions.