#4254 closed defect (fixed)
Wrong numerical handling of conditional equations
Reported by: | Francesco Casella | Owned by: | Willi Braun |
---|---|---|---|
Priority: | blocker | Milestone: | 1.13.0 |
Component: | Backend | Version: | v1.12.0 |
Keywords: | Cc: |
Description
Please simulate the attached test model.
The variable s, which is the result of a double integration, crosses the zero threshold at time = 0.1.
Based on the equations, the variable Pw should be zero until that moment, and then start growing afterwards. The result reported in the attached figure is instead obtained:
- at the previous time step (time = 0.0741), Pw is zero
- at time = 0.1 before the event, Pw is shown to be 0.05
- at time = 0.1 after the event, Pw is again zero as it should be
The value of Pw just before the event is totally bogus. I'm not sure if this is a problem with the solver or with the result file generation.
Attachments (3)
Change History (17)
by , 8 years ago
comment:1 by , 8 years ago
by , 8 years ago
Attachment: | ticket4254.PNG added |
---|
comment:4 by , 8 years ago
Okay, now I can reproduce the signals. For some reason the simulationFlags annotation got not considered.
comment:5 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:7 by , 8 years ago
Replying to casella:
Aha, it seems it's the
noEquidistantTimeGrid
flag
Well, not really. If you omit that flag, then the difference is still present, but you have to zoom in to see the difference.
comment:8 by , 8 years ago
Right. With equidistantTimeGrid the last step before the event is much longer, so the effect is much bigger. Maybe that is a useful clue?
comment:9 by , 8 years ago
As far as I see, this is connected to #3851, since it's seems that the linear algebraic system evaluate a zerocrossing literally.
comment:10 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|
comment:11 by , 6 years ago
Milestone: | 1.13.0 → 1.14.0 |
---|
comment:12 by , 6 years ago
Component: | Run-time → Backend |
---|---|
Milestone: | 1.14.0 → 1.13.0 |
Owner: | changed from | to
Status: | accepted → assigned |
follow-up: 14 comment:13 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in PR2726.
It seems that the model doesn't fit to the plot, since it contains only variable x.