Opened 4 years ago

Last modified 3 years ago

#6088 new defect

Remaining issues with HelmholtzMedia — at Version 6

Reported by: Francesco Casella Owned by: Francesco Casella
Priority: high Milestone:
Component: Third-Party Libraries Version:
Keywords: Cc: matthis.thorade@…, Karim Adbdelhak

Description (last modified by Francesco Casella)

As of 25 Aug 2020, we have 42 runnable models in the library, which all go through all phases of code generation.

One fails during C-code compilation, see #6087.

Another five fail at runtime

@matthis, feel free to further investigate and comment or ask for clarifications here.

Change History (8)

comment:1 by Francesco Casella, 4 years ago

Description: modified (diff)

comment:2 by Karim Adbdelhak, 4 years ago

I looked at HelmholtzMedia.Examples.Validation.Derivatives_SaturationBoundary and it looks like it has the same problem as HelmholtzMedia.Examples.ConvergenceTest.setSat because it is that very function that fails.

When running the compiled code multiple times and looking at the values i realized that this function always returns different values (with same setup!), so there is some uninitialized stuff happening. That lead me to think that there is something wrong with matching, the order does not seem to be correct and i tried DAEMode (--daeMode) which simulates without causalization and a wrong matching would only mess event handling up a little. And indeed it works with that setting.

Could someone try and verify the results? (see attached file) If you want to reproduce the results please update to the newest development version because some of my latest commits could have major impact here.

I will look into the function and its ordering and try to come up with a minimal model. Is there something special about this function in particular that differs from other functions?

comment:3 by Karim Adbdelhak, 4 years ago

The failing function is HelmholtzMedia.Interfaces.PartialHelmholtzMedium.setSat_T, the name of the function test confused me sorry!

Also i am on the train currently and the upload of the result file does not work. I will add that later.

by Karim Adbdelhak, 4 years ago

created with -d=newInst and --daeMode

comment:4 by matthis.thorade@…, 4 years ago

I tried loading the _res.mat file in Dymola, but it gives me the error message:

Error when reading matrix "data_2 (1001,62)" from file "C:/Users/matthis.thorade/Downloads/HelmholtzMedia.Examples.Validation.Derivatives_SaturationBoundary_res.mat",
because abscissa values are not strict monotonically increasing
((7,1) = -2147483648 < (8,1) = 1073741824).

by matthis.thorade@…, 4 years ago

results from Dymola simulation

in reply to:  4 comment:5 by Karim Adbdelhak, 4 years ago

Replying to matthis.thorade@…:

I tried loading the _res.mat file in Dymola, but it gives me the error message:

Error when reading matrix "data_2 (1001,62)" from file "C:/Users/matthis.thorade/Downloads/HelmholtzMedia.Examples.Validation.Derivatives_SaturationBoundary_res.mat",
because abscissa values are not strict monotonically increasing
((7,1) = -2147483648 < (8,1) = 1073741824).

I don't know if our result files are 100% compatible with Dymola. Opening it with OpenModelica works. But i compared it with your results and there are major differences, it looks like DAEMode just does not complain about the uninitialized values and just uses them.

Good for debugging though... i try to figure it out!

comment:6 by Francesco Casella, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.