From dc1d11a96fa819b5aeae2b5398a0cc640ff7390a Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Mon, 13 Jul 2026 13:45:24 -0400 Subject: [PATCH] Initialize the FixedHeatFlow algebraic state Co-Authored-By: Chris Rackauckas --- test/thermal.jl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/thermal.jl b/test/thermal.jl index fbba97fa..71b455ea 100644 --- a/test/thermal.jl +++ b/test/thermal.jl @@ -196,7 +196,17 @@ end @info "Building a FixedHeatFlow with alpha=0.0" @mtkcompile test_model = TestModel() allow_parameter = false - prob = ODEProblem(test_model, [test_model.wall.Q_flow => nothing, test_model.wall.dT => nothing], (0, 10.0); guesses = [test_model.heatflow.port.T => 1.0]) + # A 1 W flow across the 1 K/W wall puts this port 1 K below the 300 K source. + prob = ODEProblem( + test_model, + [ + test_model.wall.Q_flow => nothing, + test_model.wall.dT => nothing, + test_model.heatflow.port.T => 299.0, + ], + (0, 10.0); + guesses = [test_model.heatflow.port.T => 1.0], + ) sol = solve(prob) heat_flow = sol[test_model.heatflow.port.Q_flow]