Summary
The standard MSL 4.1.0 Modelica.Fluid.Examples.Tanks.ThreeTanks example fails during rumoca's DAE structural lowering with a structurally singular system error: 121 equations are matched against 121 unknowns, leaving 6 unknowns in the StaticPipe.flowModel sub-components unmatched. This blocks simulation of a canonical Modelica.Fluid example.
Context
-
rumoca version: 0.9.20 (also tested 0.9.18)
-
OS: Windows
-
Modelica Standard Library: 4.1.0, downloaded via cargo xtask repo modelica-deps ensure
-
Model: Modelica.Fluid.Examples.Tanks.ThreeTanks from Modelica.Fluid.Examples.Tanks
-
Command used:
cargo run -p rumoca --release -- sim -c examples/simulation/rumoca-scenario.tanks_three_tanks_msl.toml
-
Scenario config: examples/simulation/rumoca-scenario.tanks_three_tanks_msl.toml
source_roots = [
"../../target/msl/ModelicaStandardLibrary_v4.1.0",
]
[rumoca]
version = "1"
task = "simulate"
[model]
file = "../../target/msl/ModelicaStandardLibrary_v4.1.0/Modelica 4.1.0/Fluid/Examples/Tanks.mo"
name = "Modelica.Fluid.Examples.Tanks.ThreeTanks"
[viewer]
mode = "results_panel"
[sim]
solver = "auto"
t_end = 200.0
[[plot.views]]
id = "tank_levels"
title = "Tank Levels vs Time"
type = "timeseries"
x = "time"
y = ["tank1.level", "tank2.level", "tank3.level"]
-
Full error log:
Simulating Modelica.Fluid.Examples.Tanks.ThreeTanks to t=200...
structural lowering failed: structurally singular system: 121 matched out of 121 equations and 127 unknowns;
│ unmatched equations: -; unmatched unknowns: pipe1.flowModel.vs[2], pipe1.flowModel.mus_act, pipe2.flowModel.vs[2],
│ pipe2.flowModel.mus_act, pipe3.flowModel.vs[2], pipe3.flowModel.rhos_act
error: process didn't exit successfully: `target\release\rumoca.exe sim -c examples/simulation/rumoca-scenario.tanks_three_tanks_msl.toml` (exit code: 1)
-
Unmatched unknowns:
pipe1.flowModel.vs[2]
pipe1.flowModel.mus_act
pipe2.flowModel.vs[2]
pipe2.flowModel.mus_act
pipe3.flowModel.vs[2]
pipe3.flowModel.rhos_act
These variables come from Modelica.Fluid.Pipes.BaseClasses.FlowModels inside each StaticPipe component (pipe1, pipe2, pipe3).
-
The same structural lowering failure also occurs for TanksWithOverflow and EmptyTanks in the same Modelica.Fluid.Examples.Tanks package.
-
Source-root resolution and parsing issues were resolved before hitting this structural lowering failure; the problem is now in the DAE index/matching phase.
Relevant Specs
spec/README.md
spec/SPEC_0007_IR_PIPELINE.md — IR stage contracts and structural transformation scope, where DAE structural lowering/index reduction belongs
spec/SPEC_0022_MLS_COMPILER_COMPLIANCE.md — Modelica semantics and MSL-backed validation for standard Modelica.Fluid examples
spec/SPEC_0032_RANGE_PRESERVING_TENSORS.md — array/tensor range preservation, relevant because vs[2] is an array element among the unmatched unknowns
spec/SPEC_0001_DEFID.md / spec/SPEC_0002_SCOPE_TREE.md — name lookup and scoping for nested flowModel component variables
Expected Behavior
Modelica.Fluid.Examples.Tanks.ThreeTanks should pass rumoca's structural DAE analysis and proceed to the numerical solver, producing a simulation trace. This model simulates successfully in OpenModelica and Dymola.
Verification
- Run
cargo run -p rumoca --release -- sim -c examples/simulation/rumoca-scenario.tanks_three_tanks_msl.toml and confirm it no longer fails with a structurally singular system error.
- Optionally add a regression test that compiles (or fully simulates)
Modelica.Fluid.Examples.Tanks.ThreeTanks against target/msl/ModelicaStandardLibrary_v4.1.0.
Notes
- The failure is in the structural DAE matching / index reduction step, not parsing or source-root loading.
- The unmatched unknowns involve array indices (
vs[2]) and auxiliary variables (mus_act, rhos_act) from Modelica.Fluid pipe flow models, which may exercise rumoca's handling of array element variables, auxiliary variables, or balance equations in reusable flow-model components.
- This issue is a blocker for using rumoca to simulate standard
Modelica.Fluid example models.
Summary
The standard MSL 4.1.0
Modelica.Fluid.Examples.Tanks.ThreeTanksexample fails during rumoca's DAE structural lowering with a structurally singular system error: 121 equations are matched against 121 unknowns, leaving 6 unknowns in theStaticPipe.flowModelsub-components unmatched. This blocks simulation of a canonicalModelica.Fluidexample.Context
rumoca version: 0.9.20 (also tested 0.9.18)
OS: Windows
Modelica Standard Library: 4.1.0, downloaded via
cargo xtask repo modelica-deps ensureModel:
Modelica.Fluid.Examples.Tanks.ThreeTanksfromModelica.Fluid.Examples.TanksCommand used:
Scenario config:
examples/simulation/rumoca-scenario.tanks_three_tanks_msl.tomlFull error log:
Unmatched unknowns:
pipe1.flowModel.vs[2]pipe1.flowModel.mus_actpipe2.flowModel.vs[2]pipe2.flowModel.mus_actpipe3.flowModel.vs[2]pipe3.flowModel.rhos_actThese variables come from
Modelica.Fluid.Pipes.BaseClasses.FlowModelsinside eachStaticPipecomponent (pipe1,pipe2,pipe3).The same structural lowering failure also occurs for
TanksWithOverflowandEmptyTanksin the sameModelica.Fluid.Examples.Tankspackage.Source-root resolution and parsing issues were resolved before hitting this structural lowering failure; the problem is now in the DAE index/matching phase.
Relevant Specs
spec/README.mdspec/SPEC_0007_IR_PIPELINE.md— IR stage contracts and structural transformation scope, where DAE structural lowering/index reduction belongsspec/SPEC_0022_MLS_COMPILER_COMPLIANCE.md— Modelica semantics and MSL-backed validation for standardModelica.Fluidexamplesspec/SPEC_0032_RANGE_PRESERVING_TENSORS.md— array/tensor range preservation, relevant becausevs[2]is an array element among the unmatched unknownsspec/SPEC_0001_DEFID.md/spec/SPEC_0002_SCOPE_TREE.md— name lookup and scoping for nestedflowModelcomponent variablesExpected Behavior
Modelica.Fluid.Examples.Tanks.ThreeTanksshould pass rumoca's structural DAE analysis and proceed to the numerical solver, producing a simulation trace. This model simulates successfully in OpenModelica and Dymola.Verification
cargo run -p rumoca --release -- sim -c examples/simulation/rumoca-scenario.tanks_three_tanks_msl.tomland confirm it no longer fails with a structurally singular system error.Modelica.Fluid.Examples.Tanks.ThreeTanksagainsttarget/msl/ModelicaStandardLibrary_v4.1.0.Notes
vs[2]) and auxiliary variables (mus_act,rhos_act) fromModelica.Fluidpipe flow models, which may exercise rumoca's handling of array element variables, auxiliary variables, or balance equations in reusable flow-model components.Modelica.Fluidexample models.