- Index
- » Users
- » ankiagg
- » Profile
Posts
Posts
Can confirm that the way I tried works.
This work around works. Thanks. Also, a similar work around is required while running it inside a linux docker container?
Also, is it possible to export cosimulation FMUS with Cvode as their solver via OMPython call? I saw that Cvode has been added in 1.16.0 release. Not sure, how to set
setCommandLineOptions("--fmiFlags=s:cvode").
Would this work (after I have set the default from me to cs, the way you suggested?
load_modelica = ModelicaSystem(test.mo, 'test', ['Modelica'],commandLineOptions="--fmiFlags=s:cvode")
ffmu = load_modelica.convertMo2Fmu()
Hi,
I am trying to compile a cosimulation FMU via omc by using the OMpython.
load_modelica = ModelicaSystem(test.mo, 'test', ['Modelica'],commandLineOptions="fmuType=cs")
ffmu = load_modelica.convertMo2Fmu()
I still get the default Model exchange FMU and not a cosimulation FMU. Have I set any flags wrong here?
Hope you can help me.
Best,
Great, thanks.
Hi,
Thanks for your quick response. Is there any workaround to run the FMUs compiled via omc in a streaming mode? That I pass the input data through windows of 10s, then second window should start the simulation from the last values/states of the first window and third window should start the value from the last value of the second window. Is it possible to do that?
Thank you
Best,
Hi,
Is it possible to set enable canGetAndSetFMUstate and canSerializeFMUstate as True while compiling modelica models to FMU via omc compiler? Because, when I run the compiled FMU via FMPy, I would like to store and serialize the FMU states at different stages of the simulation.
Best,
I am using this linux kernel: Linux 4.19.76-linuxkit. I have also tried with ubuntu:14.04 instead of bionic, but still experiencing the same issue. I will try with gdb and memtest86+ and would let you know, if I still experience it. But, quite strange that it is working for you but not for me (I am using docker version 2.3.0.2 on a windows machine). Which version of docker and linux kernels are you using?
Thanks!
Thank you for your reply. I have tried it. But, I am getting segmentation error. I am attaching the screenshot of the segmentation fault. I am attaching my modelica model, test.mos script and docker file here. Hope you can clarify what i am doing wrong. Is there anything wrong in my docker file? Environment variables, users?
Any help would be really appreciated. Thank you in advance!
testopenmodelica.mo
test.mos
Dockerfile.
Hi,
I have installed openmodellica via docker image by using:
for deb in deb deb-src; do echo "$deb http://build.openmodelica.org/apt `lsb_release -cs` stable"; done | tee /etc/apt/sources.list.d/openmodelica.list
wget -q http://build.openmodelica.org/apt/openmodelica.asc -O- | apt-key add -
apt update
export DEBIAN_FRONTEND=noninteractive
apt install -y openmodelica
Now, I would like to compile my modelica models (in .mo format) to .fmu (both model exchange and cosimulation). I am afterwards using fmpy python package to run generated fmu's. But, I am facing problems in generation of fmu from .mo. It works fine if I do it via GUI (OMEdit), but would like to make it work via docker. Thanks in advance!
Best,
Anki
It works. Thanks a lot Carlos!
Best,
Anki
Thanks a lot CTG for your help and suggestions.
After a lot of testing and trials, I found out that one of the reasons I was getting error was because of my Openmodellica version, I was using 1.13.1. Now, it started running with the 1.14.1 version. But, now when I replace the input to valve opening from a predefined constant value to a real input interface block (because I would like to give that as an external input), I get errors in compilation. Attached is the model.
Thanks!
Best regards
Hi,
Thanks for your reply.
As per your suggestions, I tried with a different valve opening. I also added the system, and increased the value of flow (also tried removing the pipe and connecting pump directly to the valve, but it does not seem to solve the issue. I still get the same errors. Did by changing these values, the model work for you?
Regards
Hi,
I am trying to simulate a model, where tank one is initialized with water level and then a valve is attached to it controlled by a signal. The water then flows through a pipe to a pump and is circulated back to tank. The model gets compiled, but when I try to simulate it with valve signal I get initialization errors. I have just started using modellica, any help would be truely appreciated. Attached is my model.
Thanks
Best regards,
Anki
Hi,
I am trying to simulate a model, where tank one is initialized with water level and then a valve is attached to it controlled by a signal. The water then flows through a pipe to a pump and is circulated back to tank. The model gets compiled, but when I try to simulate it with valve signal I get initialization errors. I have just started using modellica, any help would be truely appreciated. Attached is my model.
Thanks
Best regards,
Anki
- Index
- » Users
- » ankiagg
- » Profile