1

I have exported the model PhotoVoltaics_TGM.TGM_Comax_Measurement_20160808 of Photovoltaics_TGM library as fmu and when I am trying to simulate it in python through FMPy with the command simulate_fmu 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

The model info is the following:

Model Info

  FMI Version       2.0
  FMI Type          Co-Simulation
  Model Name        PhotoVoltaics_TGM.TGM_Comax_Measurement_20160808
  Description       Measured irradiance model on 2016-08-08; Comax modules at TGM building in Vienna, Austria
  Platforms         c-code, win64
  Continuous States 3
  Event Indicators  2
  Variables         413
  Generation Tool   OpenModelica Compiler OpenModelica v1.16.5 (64-bit)
  Generation Date   2021-06-03T20:14:20Z

Default Experiment

  Stop Time         86400
  Tolerance         1e-08

Variables (input, output)

Name                Causality              Start Value  Unit     Description

Any idea of what is going on?

Kosmylo
  • 436
  • 1
  • 6
  • 20
  • Could you share the source code? – Jakob F Jun 03 '21 at 18:51
  • @JakobF Which source code do you mean? – Kosmylo Jun 03 '21 at 19:14
  • This model simulates fine when exported as FMI 2.0 ME in OMSimulator. So we would need a lot better details on exactly how this was exported/imported to be able to guess what is wrong. – sjoelund.se Jun 04 '21 at 05:28
  • @sjoelund.se I expoted the model as FMI 2.0 for co-simulation in OMEdit. Then I am just trying to simulate it in python through FMPy by using the following commands: from fmpy import *, fmu = fmu_name, results = simulate_fmu(fmu) and I am getting the error that I mentioned. – Kosmylo Jun 04 '21 at 06:14
  • Have you tried with ME instead? – sjoelund.se Jun 05 '21 at 07:07
  • 1
    @sjoelund.se Yes, I have tried to export it as fmu for model exchange and I do not get the error. But I was wondering why this is happening for the co-simulation choice. – Kosmylo Jun 05 '21 at 09:22
  • Have you tried simulating the FMU with other tools, e.g. the FMU compiance checker? – Christian Bertsch Jun 09 '21 at 18:42

0 Answers0