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
7
votes
4 answers

Unit testing Modelica component library?

I'm creating a library of components in Modelica, and would appreciate some input on techniques for unit testing the package. So far I have a test package, consisting of a set of models, one per component. Each test model instantiates a component,…
Jack Welch
  • 115
  • 6
7
votes
1 answer

Agent Based Modeling in Modelica

Is it possible to simulate multi-agent systems in Modelica? I'm talking about a system such MASON written in Java. How easy or difficult it would be? As I understand, Modelica is not a typical programming language, so would it be particularly…
7
votes
2 answers

Generate white noise in Modelica (SystemModeler)

I am trying to add measurement noise to a simulation. This is possible to do in for example Simulink but seems to be more difficult in Modelica and SystemModeler. Any ideas on how to do this?
sebnil
  • 113
  • 8
7
votes
3 answers

conditional component declaration and a following if equation

I am trying to build a model that will have slightly different equations based on whether or not certain components exist (in my case, fluid ports). A code like the following will not work: parameter Boolean use_component=false; Component component…
Yigal
  • 113
  • 1
  • 6
6
votes
1 answer

How to make the dynamic model in Dymola agree with the steady-state design result?

Modelica modeling is the first principle modeling, so how to test the model and set an effective benchmark is important, for example, I could design a fluid network as my wish, but when building a dynamic simulation model, I need to know the…
Jack
  • 1,094
  • 6
  • 16
6
votes
1 answer

Running Conversion Script - Modelica 4.0

Does anyone have experience converting Modelica 3.x files to the new 4.0 library standard? There is a link to a script, yet I am not sure how to apply…
Chris B
  • 61
  • 1
6
votes
1 answer

Does Dymola have the similar function of "equation browser" like Wolfram system modeler?

Wolfram system modeler has a function called "equation browser", the youtube video here(at 20:58) gives an introduction about "equation browser", I am wondering if Dymola has the same function, it would be helpful to debug nonlinear system. Also, it…
Jack
  • 1,094
  • 6
  • 16
6
votes
3 answers

Is there a way to list of parameters of FMU (or of submodel in FMU) using the python libraries FMPy or pyFMI?

I have a FMU of a model and the use case is to change parameter values of the FMU to see the impact on the results. Is there a way to list top level parameters of the FMU using either FMPy or pyFMI if I dont' have access to the Modelica model? One…
Kaustubh
  • 391
  • 2
  • 10
6
votes
2 answers

Use the result values from previous simulation result as guess values for next simulation in Dymola

Initialization could be very cumbersome and easily lead to divergence. A simple strategy is to run the simulation when building a part of the whole system and use the simulation results to modify guess values. Here is what I got in the PPT from…
Jack
  • 1,094
  • 6
  • 16
6
votes
3 answers

Replacement of deprecated function cardinality(c) in Modelica

In the documentation it is indicated, that cardinality() function is deprecated and should no longer be used. However, it is still used in the libraries such as ThermoSysPro. e.g. if (cardinality(C) == 0) then some code end if; where C is…
Tomillo
  • 157
  • 7
6
votes
1 answer

Modelica events and hybrid modelling

I would like to understand the general idea behind hybrid modelling (in particular state events) from a numerical point of view (although I am not a mathematician :)). Given the following Modelica model: model BouncingBall constant Real g=9.81 …
AssMero
  • 239
  • 1
  • 5
6
votes
5 answers

initialising array with unknown size in modelica

I need a little help with initialising arrays in openmodelica. I created a modelica class which should generate an array with variable size. The size is to be set as a parameter and is of type integer. Below is an example of what i want to do. I…
Gladson
  • 97
  • 5
6
votes
1 answer

Version control using git with Dymola/Modelica

At work I use git as a version control system and Dymola for modeling and simulation. One major Issue I have is that once I touch or by mistake move a connection (more exactly the position of a part of the connecting wire) in a diagram without…
Medi1Saif
  • 285
  • 7
  • 19
6
votes
3 answers

Teaching Modelica Medical Non-SI Units

I want to use non-SI units in a Modelica model in a medical context. I am using Modelica in Dymola. Being an engineer I prefer the SI units. But my model parameters are sourced from medical publications and I want to avoid conversion mistakes.…
Jay_At_Play
  • 136
  • 10
6
votes
1 answer

Propagating packages using inner/outer

I would like to place a "System" component in my simulation (similar to Modelica.Fluid.System and Modelica.Mechanics.MultiBody.World) from which all other components can access the Medium package, in order to set the working fluid only once for the…
1
2
3
87 88