fix: correct interior-node convection term in Rod_VectorNotation (MIC-66)#475
Open
mtiller wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes MIC-66.
The middle vectorized energy-balance equation in
Rod_VectorNotation.mohad two problems:T[i]— should be the interior sliceT[2:n-1].(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
checkModeland simulates successfully (DASSL).🤖 Generated with Claude Code