Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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 Lennart Ochel, 10 years ago

Cc: Patrick Täuber added

comment:2 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

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).

comment:3 by Willi Braun, 10 years ago

Status: newaccepted

comment:4 by Willi Braun, 10 years ago

Resolution: fixed
Status: acceptedclosed

fixed in r23096.

Last edited 10 years ago by Lennart Ochel (previous) (diff)

in reply to:  4 comment:5 by Lennart Ochel, 10 years ago

Replying to wbraun:

fixed in r23096.

Could you please briefly explain what the problem was?

comment:6 by Willi Braun, 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.

Note: See TracTickets for help on using tickets.