#2868 closed defect (fixed)
Slightly different simulation results
Reported by: | Lennart Ochel | Owned by: | Willi Braun |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.2 |
Component: | Run-time | Version: | trunk |
Keywords: | Cc: | Adrian Pop, Patrick Täuber |
Description
If tearing is activated, then LinearColdWater
and LinearWater_pT
fail due to slightly different simulation results.
./simulation/libraries/msl32/Modelica.Media.Examples.Tests.MediaTestModels.LinearFluid.LinearColdWater.mos ./simulation/libraries/msl32/Modelica.Media.Examples.Tests.MediaTestModels.LinearFluid.LinearWater_pT.mos
Reasons for that could be:
- Different scaling due to different (or at least less) iteration variables
- Issues with solver tolerances
- ???
Currently, I disabled tearing for both model to test them anyway. But this should be fixed until the final release.
Change History (6)
comment:1 by , 10 years ago
Cc: | added |
---|
comment:2 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
comment:3 by , 10 years ago
Status: | new → accepted |
---|
follow-up: 5 comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
fixed in r23096.
comment:5 by , 10 years ago
comment:6 by , 10 years ago
For the solution of the linear systems we create residual equations which calculate res = Ax-b and a jacobian matrix is generated. But we used different functions with different features to create the residual equations for the jacobian matrix and the residual equations (res = Ax-b).
So there is one function in BackendEquation.mo and the other in SimCodeUtil.mo. The one in SimCodeUtil uses some numerical tricks to make the transformation and the one in BackendEquation does not.
It's now fixed by using one the same basis function which is now Expression.createResidualExp().
But actually we need to move all the symbolic manipulation that are right now done in the SimCode phase into the Backend transformation phase.
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).