Skip to content

Commit dc1d11a

Browse files
Initialize the FixedHeatFlow algebraic state
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 parent 2a9fc95 commit dc1d11a

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

test/thermal.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,17 @@ end
196196

197197
@info "Building a FixedHeatFlow with alpha=0.0"
198198
@mtkcompile test_model = TestModel() allow_parameter = false
199-
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])
199+
# A 1 W flow across the 1 K/W wall puts this port 1 K below the 300 K source.
200+
prob = ODEProblem(
201+
test_model,
202+
[
203+
test_model.wall.Q_flow => nothing,
204+
test_model.wall.dT => nothing,
205+
test_model.heatflow.port.T => 299.0,
206+
],
207+
(0, 10.0);
208+
guesses = [test_model.heatflow.port.T => 1.0],
209+
)
200210
sol = solve(prob)
201211

202212
heat_flow = sol[test_model.heatflow.port.Q_flow]

0 commit comments

Comments
 (0)