Questions tagged [openmodelica]

OpenModelica is an open-source Modelica-based modeling and simulation environment.

OpenModelica is an open-source Modelica-based modeling and simulation environment intended for industrial and academic usage. Its long-term development is supported by a non-profit organization – the Open Source Modelica Consortium (OSMC).

The goal with the OpenModelica effort is to create a comprehensive Open Source Modelica modeling, compilation and simulation environment based on free software distributed in binary and source code form for research, teaching, and industrial usage.

698 questions
0
votes
3 answers

Vary frequency of sin voltage source in Modelica

I am working with open Modelica now a days and i wanted to know if there is any way to change the frequency of the sine voltage source e.g the frequency of the source doubles or triples every 3 seconds so that when i draw the graph for a low pass…
danny
  • 400
  • 2
  • 18
0
votes
2 answers

Why same OpenModelica code behaves differently in two files?

I'm trying to model the trajectory of projectile in modelica, but when I model air_pressure dependency on the height I get weird result, now if I simply copy only the air_pressure's code to another file, I get pretty fine output. Why's that so? This…
Salman Azmat
  • 298
  • 6
  • 18
0
votes
1 answer

Modelica : variables of class during instantiation

The variables of Modelica classes are instantiated per object. Can anyone clarify this statement?
shilu
  • 135
  • 1
  • 6
0
votes
2 answers

Modelica - mapping non modelica function to model

If i have a non-modelica function which has no input and no output like void foo(void) { variable1; variable2; for loop { if conditions } variable2=foobar(); // another function call, foobar() is not modelica function } then can…
shilu
  • 135
  • 1
  • 6
0
votes
1 answer

How to select a subset from Python for parsing purpose

I am working on assignment and need to develop a python to openmodelica translator. For which I am using flex and bison in initial stages. Initially I need to define a subset of python language on which I could perform a whole demo. I am new to…
0
votes
2 answers

How can I execute 2 models one by one in one simulation?

I was trying to execute 2 models one by one in a simulation via state chart. The pseudo-code follows. In model test, there are two blocks, stateA and stateB. At the beginning of the simulation, stateA is executed. 10 seconds later, stateA is stopped…
Rui
  • 3
  • 2
-1
votes
1 answer

OpenModelica - .mo file is broken after forced restart

My .mo file is broken after is had to do a forced restart, because my computer froze. When I want to open my file, I get this error: 18:33:15 Syntax Error [D:/ModelicaModel/MyMoFile.mo: 1:0-1:0]: Lexer failed to recognize '' Can anyone help me to…
-1
votes
1 answer

How do I set the working directory in OMPython?

When I use OMPython to run a model using the ModelicaSystem object the output files where stored in my user directory instead of a temporary directory which I can easily delete. I would like to set the directory in which this files are storing which…
Alberto
  • 1
  • 1
-1
votes
1 answer

why package does not open in modelica after rename it

I had a package of models that worked perfectly until I duplicated it and gave it a new name. The new package now won't open and displays an error message. [C:/Users/moi/Desktop/VCR_model_29_12_2022/package.mo: 2:1-3:14]: I expected the package to…
-1
votes
1 answer

How to build openModelica project with cmake-gui?

enter image description here I tried to build pthreas and generate pthreadsConfig.cmake,but it doesn't work in openmodelica project? I have tried to build pthread4w with cmake because of lacking it when I building openmodelica project? enter image…
-1
votes
1 answer

Summation of a variable variation values in Modelica

In my model i have the evolution of a variable lets say the electric power during time and i want to calculate the summation of the total electric power during the simulation time ,if anyone have an idea of how i will be thankfull.
-1
votes
1 answer

Transform OpenModelica code to a schematic model

I created my personal program of a system similar to a heat pump. Can I transform this code to a schematic model where I can see the changes happening within a system in a sort of animation for example let's say a liquid variation level in a tank?
-1
votes
1 answer

Installing of solartherm

I am using this guideline to install solartherm: https://github.com/SolarTherm/SolarTherm/wiki/Running-SolarTherm-on-Windows-%28MSYS2%29 I reach the point where I need to install Dakota and I get this error: -bash: unzip: command not found cp:…
kshimnos
  • 1
  • 1
-1
votes
1 answer

Modelica example "Interaction1" not working as expected

I encountered the following issue when simulating the example "Interaction1" from Modelica library ("Modelica.Blocks.Examples.Interaction1") in OpenModelica: This examples contains a block "Modelica.Blocks.Interaction.Show.RealValue", thus I was…
-1
votes
1 answer

Pressurized vessel in modelica

I've been trying to create a pressurized vessel in openmodelica but i'm stuck. The block i'm trying to build is a simple vessel for liquid pressurized by gas. So two input ports (liquid input, gas input) and an output port for pressurized liquid…
1 2 3
46
47