christiankral / PhotoVoltaics

Modelica library for the simulation of photo voltaic cells and modules
Other
25 stars 17 forks source link

Problem simulating via FMPy #45

Open kosmylo opened 3 years ago

kosmylo commented 3 years ago

I have exported the model PhotoVoltaics_TGM.TGM_Comax_Measurement_20160808 as fmu and when I am trying to simulate it in python through FMPy I am getting the following error:

assert | debug | Model error: Argument of sqrt(converter.iAC.re ^ 2.0 + converter.iAC.im ^ 2.0) was nan should be >= 0

Any idea of what is going on?

christiankral commented 3 years ago

Could you possibly add your fmu file (for Linux) so that I can double check it.

kosmylo commented 3 years ago

Here it is: FMU.zip

Just to mention that if I export it as FMU for ME it simulates fine. The problem appears when I export it as FMU for CS.

christiankral commented 3 years ago

I investigate this issue with the nightly build version OpenModelica 1.19.0~dev-47-gd4b39c9

Case 1

Investigated model: PhotoVoltaics_TGM.TGM_Trina_Measurement_20160808

Case 2

Investigated model: PhotoVoltaics_TGM.TGM_Comax_Measurement_20160808

Case 2 FMU_linux64.zip

christiankral commented 3 years ago

So I cannot reproduce the FMPy error message for Case 2 processing the co-simulation FMU. Possible causes are:

kosmylo commented 3 years ago

I am getting the same error when I am trying to simulate the CS model at both fmpy 0.2.14 and fmpy 0.3.0.