Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Problems with using exported fmu

Problems with using exported fmu

Hello,

I am working with the generated FMU's and right now I am testing my program with some examples that are already implemented in OpenModelica Connection Editor, like "SpringWithMass", "PumpingSystem", "SimpleLiquidWater" and so on.

The program shall take the FMU and calculate the simulation.

And right now I have the problem that some FMU's work fine and some give me errors (different models are giving different errors).
I have already found out that models like "SimpleLiquidWater" are working directly while models like "SpringWithMass" give at first always the same kind of error.
When I say models like... I mean that the models have similarities in the graphical view. In the example of "SpringWithMass" there are shown the class Modelica.Mechanics.MultiBody.Parts.Body and the "Pictures" of Spring and World, while the "SimpleLiquidWater" is empty.
So models with that kind of Pictures like "SpringWithMass" in the graphical view are giving me at first a format exception in the XML-File. Where some values are set (in my cases it was always the value for "start") they are directly followed by something like this: "/*ENUM:StateSelect.prefer*/". I solved that kind of error with just deleting it. But after that some models work and some don't and those who don't work are giving different errors I cannot explain why they are there.

Has someone expierenced something similar and does know or has an idea how to solve that kind of problem?


Best regards,

kinzzoku

Re: Problems with using exported fmu

Hello kinzzoku

OpenModelica generates FMU for model exchange. Please describe the solver you use to run your FMU.

Best regards
Koldo

Re: Problems with using exported fmu

Hello,

I am using the forward Euler method to solve the differential equations. And the program should work with FMU for model exchange.


Best Regards

kinzzoku

Re: Problems with using exported fmu

Hello kinzzoku

Forward Euler can solve some systems but many other require more powerful methods as rungekutta or dassl and it is also important to manage the events like zero crossing.

Have you tried your models directly inside OpenModelica using Euler and they work fine?

Best regards
Koldo

Re: Problems with using exported fmu

Hey Koldo,

I just tried the models inside Openmodelica with euler and the rungekutta solver. And those models I had the problems with did also not work in openmodelica while using the euler method but rungekuuta works fine. So I guess it has to be the solver. Thanks a lot current/big_smile

Best regards
kinzzoku

Re: Problems with using exported fmu

Hello kinzzoku

You are welcome current/smile.  If you converted those models to FMU I suppose you wanted to run them coupled to other model so I propose you these options:
- Run your OpenModelica FMU for model exchange from a home made improved solver: Absolutely not advised
- Run your OpenModelica FMU for model exchange from a solver: OpenModelica or others
- Run your OpenModelica model as a standalone exe with sockets communication to other processes or even models.

Best regards
Koldo

There are 0 guests and 0 other users also viewing this topic
You are here: