Skip to content

fix: correct interior-node convection term in Rod_VectorNotation (MIC-66)#475

Open
mtiller wants to merge 1 commit into
masterfrom
michaeltiller/mic-66-fix-rod_vectornotation-undefined-index-ti-in-vectorized
Open

fix: correct interior-node convection term in Rod_VectorNotation (MIC-66)#475
mtiller wants to merge 1 commit into
masterfrom
michaeltiller/mic-66-fix-rod_vectornotation-undefined-index-ti-in-vectorized

Conversation

@mtiller

@mtiller mtiller commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Fixes MIC-66.

The middle vectorized energy-balance equation in Rod_VectorNotation.mo had two problems:

  1. It referenced an undefined scalar T[i] — should be the interior slice T[2:n-1].
  2. (T[2:n-1] - Tamb) subtracts a scalar from a vector, which strict Modelica / OMC 1.24 does not broadcast with -. Uses the element-wise operator (T[2:n-1] .- Tamb).

Verified with OpenModelica 1.24.0 / MSL 3.2.3: passes checkModel and simulates successfully (DASSL).

🤖 Generated with Claude Code

The middle vectorized energy-balance equation referenced an undefined
scalar `T[i]`; it should operate on the interior slice `T[2:n-1]`. In
addition, the convection term subtracts the scalar ambient temperature
from a vector, which strict Modelica does not broadcast with `-`, so use
the element-wise operator: `(T[2:n-1] .- Tamb)`.

Verified with OpenModelica 1.24.0 / MSL 3.2.3: the model now passes
checkModel and simulates successfully.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant