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
2 answers

Modelica array of partial model

Let A be a partial model and C, D be models which extend A. Given a model partial model X A a[3]; end X; how can I instantiate X, e.g. something along the lines of A X.a = {C,D,C}; Update: I tried 2 variants. One is package P partial model A…
Mathabc
  • 175
  • 9
0
votes
1 answer

Does anybody can simulate fluid library (Modelica)

I have only one question. Can somebody simulate a heatexchanger example from Modelica standart library with OpenModelica? Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation. There are so many errors when I have tried to simulate it.
Ascold
  • 45
  • 6
0
votes
1 answer

Why the model "FourierAnalysis" does not run on OpenModelica? error: lvalue required as unary '&' operand

The test model "TestSine" from the package "Sensors.Tests.FourierAnalysis" from the Xogeny library: https://github.com/xogeny/Sensors does not run on OpenModelica. The error message is: "error: lvalue required as unary '&' operand". In the C-file…
Roland
  • 135
  • 1
  • 6
0
votes
1 answer

Polygon creation in OpenModelica

While creating a regular polygon in the Icon/Diagram Layer in OpenModelica, I can understand that the origin is the centre/centroid of the polygon and the co-ordinates of the points of the polygon are calculated using the origin as a reference. Can…
MSK
  • 448
  • 2
  • 5
  • 18
0
votes
2 answers

Reusable Templates

Instead of creating text boxes everytime for the displaying the name of the blocks, I thought of creating a reusable template for the same. Following is what I created partial block BlockTemplate annotation(Icon(coordinateSystem(extent =…
MSK
  • 448
  • 2
  • 5
  • 18
0
votes
1 answer

OpenModelicaText getting commented when adding Bitmaps in Icon/Diagram View

I've noticed that the OM Script gets commented when I add a bitmap in either the Icon/Diagram View. I'm using OpenModelica 1.9.1+dev (r18667) (RML version) Code for reference model Test annotation(Diagram(coordinateSystem(extent =…
MSK
  • 448
  • 2
  • 5
  • 18
0
votes
2 answers

Creating Replaceable models

I wanted to know if Modelica allows us to create replaceable models? I was trying to redeclare the Modelica.Blocks.Sources.Constant to a block which goves constant voltage. I only need to change the unit of the variable k. (from nothing to…
MSK
  • 448
  • 2
  • 5
  • 18
0
votes
1 answer

Close a file when multiple files open in OMEdit

I've just started to take a look at OpenModelica and I've been trying to get to grips with OMEdit. I currently have 2 files open (.mo files). Normally in an editor in this situation I can close a file by pressing the cross in the top right hand…
George Tomlinson
  • 1,871
  • 3
  • 17
  • 32
0
votes
0 answers

OpenModelica internal error reinit called with wrong args?

I'm writing a program that from an Functional Mock-Up Unit generates a complete Modelica model. It works just fine when I simulate the model in Dymola but in OpenModelica I get this error: internal error reinit called with wrong args I call…
FluxxSimon
  • 27
  • 5
0
votes
1 answer

Why parameters bounds are not respected using dymola optimization library?

I am trying to optimize (minimize) variable "emissions" using the ModelOptimization function in the library optimization for dymola using the following code: model opt parameter Real electricity=999; Real x2(start=0); Real x1(start=0); Real…
bmorvaj
  • 55
  • 1
  • 7
0
votes
0 answers

Dymola optimisation library constraints

Again me. Sorry for possibly stupid questions but I'm new to this so i Have this initial problems and dilemas. I would like to optimize carbon emission using dymola optimization library on this theoretical case. There is grid and PV as means of…
bmorvaj
  • 55
  • 1
  • 7
0
votes
1 answer

What is a theretical way to write i++ in Dymola? And have hybrid continous and discrete model?

I am just started to learn modelica and I have one (newbie) question. The problem for me is to change the way of thinking from convential programming thinking to modelica way of thinking. I want to do simple program. I have input array with PV…
bmorvaj
  • 55
  • 1
  • 7
0
votes
1 answer

OpenModelica svg icon for blocks

The svg icon of a block is not displayed. Here's how I set it: I switch to Icon view Click on Bitmap Draw a rectangle In Bitmap properties I select the svg file through Browse (the option for svgs exists). The svg file is in the same folder as the…
remus
  • 2,635
  • 2
  • 21
  • 46
0
votes
1 answer

How to use the real input connector in OpenModelica?

I would like to have a OpenModelica model like the following: On the left side there is a "Real Input Connector" called u and on the right side there is a "Real Output Connector" called y. The Porpose of the model is just to take a value (u)…
jonie83
  • 1,136
  • 2
  • 17
  • 28
0
votes
1 answer

Symbols not found in OpenModelica compile

I have hit a roadblock when trying to compile the current SVN trunk of OpenModelica on Mac OS X 10.8.5 without using ports, but rather using what is supplied with fink. I have successfully installed all the prerequisites mentioned in the…
chthonicdaemon
  • 19,180
  • 2
  • 52
  • 66