Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#2868 closed defect (fixed)

Slightly different simulation results

Reported by: lochel Owned by: wbraun
Priority: blocker Milestone: 1.9.2
Component: Run-time Version: trunk
Keywords: Cc: adrpo, ptaeuber

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 Changed 10 years ago by lochel

  • Cc ptaeuber added

comment:2 Changed 9 years ago by sjoelund.se

  • Milestone changed from 1.9.1 to 1.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 Changed 9 years ago by wbraun

  • Status changed from new to accepted

comment:4 follow-up: Changed 9 years ago by wbraun

  • Resolution set to fixed
  • Status changed from accepted to closed

fixed in r23096.

Last edited 9 years ago by lochel (previous) (diff)

comment:5 in reply to: ↑ 4 Changed 9 years ago by lochel

Replying to wbraun:

fixed in r23096.

Could you please briefly explain what the problem was?

comment:6 Changed 9 years ago by wbraun

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.