-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the derivatives at boundaries in the 2D-table #3893
Conversation
The example is now fully updated; and it turns out that there were more subtle differences for the cases. The comment explains it:
|
Just to be clear: That is an existing issue, I just blindly copy-pasted. (But it is now corrected.)
|
@HansOlsson Will you rebase your branch to resolve the conficts or shall I? |
I can do it. |
Updated to current date
(and slight grammatical error).
31b9d0a
to
545efc6
Compare
@HansOlsson I added some minor formatting corrections and hope you agree on. We should squash the commits anyway before/during the merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HansOlsson I added some missing cases (to have it fully symmetric between ModelicaStandardTables_CombiTable2D_getDerValue and ModelicaStandardTables_CombiTable2D_getDer2Value). Feel free to reset if you skipped these cases intentionally.
We should also squash all commits before the merge.
@MartinOtter @sjoelund this PR has been stuck for about 2 months. |
Issue: That is best described using the new test-model plot input and output of the derivative-blocks and see that the inputs don't change with time, but still
half of themhave spikes in their outputs (*).Solution: If we are at boundaries between regions in the 2D-table we should ideally chose the branch we will be at in the future - or the one we were at in the past.
Detailed explanation:
For a 2D-table the problem is that we can be at a double boundary and the solution e.g., goes C->B, but in the middle we could select A or D, and in those regions the derivatives differ for linear interpolation.
This also explains why I ignored it for the 1D-tables; as we cannot be in such a point between four regions in a 1D-table.
*: All four variants now have the same issue. They didn't originally.
It might need a better explanation, better motivating example, and the actual code could be made less impactful.