Questions tagged [modelica]

Modelling language for multi-domain physical and control systems.

The free Modelica language is developed by the non-profit Modelica Association. The Modelica Association also develops the free Modelica Standard Library.

1319 questions
6
votes
3 answers

MATLAB is unable to load MAT-file created by Dymola

My problem is to open some MAT-files generated by Dymola. Some times for small models MATLAB has no problem to open the created MAT-file. Then I can see the structure in the workspace. But I have also a huge simulation model with 31.536.000 data…
Patrick
  • 63
  • 1
  • 4
5
votes
5 answers

Searching for a concept like 'verbosity' in Modelica

I'm struggling with the size of output files for large Modelica models. Off course, I can protect some objects in order to remove them completely from the result file. However, that gives rise to two problems: it's not possible to redeclare…
saroele
  • 9,481
  • 10
  • 29
  • 39
5
votes
1 answer

How to initialize a record type by a function in synchronous models (modelica)

I wrote a function, with return value of type record. Normally I would initialize an instance of type record by an initial equation, using this function. But as I want to use this function in a clocked model, initial equations are not possible. For…
5
votes
1 answer

Export FMU with large parameter array from Dymola

How can I create an FMU with a large parameter array using Dymola? I discovered that when the array size exceeds 100 elements, the array loses the causality="parameter" and the start value attributes in the modelDescription.xml file. Is there a…
gtfjet
  • 63
  • 4
5
votes
1 answer

Modelica total time calculation of simulation and equation initialization

I would like to measure the total simulation and initialization time of a system of DAEs. I am interested in the wall-clock time (like the one given in Matlab by the function tic-toc). I noticed in Modelica there are different flags for the…
5
votes
3 answers

When to use noEvent operator in Modelica language?

The noEvent operator in Modelica doesn't use iteration to find the precise time instant in which the event was triggered. It seems this would cause calculation error, here is an example I find on the following…
Jack
  • 1,094
  • 6
  • 16
5
votes
3 answers

How to eliminate dead code in Dymola/Modelica

I am trying to slim down a very complex model to improve performance, and noticed big performance changes when I add or remove variables into the signal bus, especially multi-body frames. I am wondering if there is any setting that can eliminate…
5
votes
2 answers

Set Parameter based on start/initial value of Continuous variable

Task: I have a variable y1 whose derivative is driven by some law e.g. y1 = sin(time) and for which I set the starting value e.g. y1 = 3.0 I have a second variable y2 that is defined by y2 = y1 + offset Now, I want this offset to be a Parameter…
DarioMangoni
  • 301
  • 1
  • 10
5
votes
4 answers

CVodeError while simulating with pyFMI

I try to set up the pyFMI on Anaconda (Python 3.6.8) Installed all the required packages listed on the pyFMI site. The fmu is loaded without the issue but while I try to simulate the fmu I get an error: Could not find cannot import name…
kelamahim
  • 577
  • 1
  • 4
  • 21
5
votes
3 answers

Fixed attribute when instantiating a model as parameter

I want to instantiate a complex model as a parameter in another model and initialize it within the initial equation section, like I am able to do with any Real parameter. For a simple Real parameter I would just write parameter Real y(fixed =…
oliver
  • 2,771
  • 15
  • 32
5
votes
2 answers

Solving static equations (or systems thereof)

I wanted to do the following in Modelica: in a specific model I have several parameters h and I want to deduce some time independent values k from them by solving a set of implicit equations between the parameters and the other values. Since the…
oliver
  • 2,771
  • 15
  • 32
5
votes
2 answers

Exclude directories in .gitignore which contain a particular file

When a package, e.g., Examples, is deleted in OpenModelica, the underlying directory is not removed. Instead, directory Examples contains a file named package.bak-mo to indicate that the directory is not used any more. So a backup is kept. If a file…
christiankral
  • 393
  • 2
  • 7
5
votes
2 answers

Sensitivity Analysis using PyFMI - FMU in for-loop

Main goal Sensitivity analysis of a district heating network. Approach Modelica model of the system (in Dymola) using the AixLib and BuildingSystem libraries Export model as FMU co-simulation Use SALib (sensitivity analysis python library) to…
T. Sergi
  • 203
  • 2
  • 9
5
votes
1 answer

Factors that Impact Translation Time

I have run across issues in developing models where the translation time (simulates quickly but takes far too long to translate) has become a serious issue and could use some insight so I can look into resolving this. So the question is: What are…
Scott G
  • 2,194
  • 1
  • 14
  • 24
5
votes
2 answers

Seven-body-mechanism in Modelica

I have to model a "seven-body-mechanism" in Modelica: The initial angles are given: Starting with the left side (K5 and K7): The Modelica Model: Is it possible to model for example K5 as one body-shape and just specify the center of mass? Where…
lars111
  • 1,233
  • 4
  • 12
  • 21
1 2
3
87 88