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

Modelica evaporation of water into air within a closed vessel (pressure cooker)

Goal Modelica model of a pressure cooker: I want to model how the liquid water is first heated up to the saturation point. Then water evaporates and mixes with the air. At start the liquid water has a volume of one liter and the air a volume of 100…
T. Sergi
  • 203
  • 2
  • 9
4
votes
1 answer

Apply 1D Torque to 3D Revolute Joint without back reaction

the model is as simple as this: I'd like to apply a torque to the Rotational Flange of a Revolute Joint. However, the torque reaction should not be applied to the Support Flange of the Revolute Joint. The torque reaction is indeed counterbalanced…
DarioMangoni
  • 301
  • 1
  • 10
4
votes
1 answer

What is the non-linear solver used in Dymola initialization process?

I often meet the initialization problem shown below, it says that some kind of non-linear solver will attempt to handle this problem. As I know it, Dymola uses Newton Method to solve the equation after getting the BLT form of the original DAE…
Jack
  • 1,094
  • 6
  • 16
4
votes
2 answers

In Dymola to solve DAEs, why use the DASSL algorithm after performing the Patelides algorithm?

I am confused about the solving DAEs process in Dymola. So I made an example to explore it. Here is the screenshot of the example scheme and control equations Based on the following definition of variables, I think the solving DAEs process is…
Jack
  • 1,094
  • 6
  • 16
4
votes
1 answer

All branches in if equation with non-parameter tests must have the same number of equations - Modelica

I get an error on Modelica saying: All branches in if equation with non-parameter tests must have the same number of equations The source of the error is following section of the code: equation if der(Posit2.s)<=0 then …
alimuradpasa
  • 135
  • 1
  • 10
4
votes
2 answers

Dymola, whitespace and version control

I opened a Modelica library in Dymola, changed one line, closed Dymola and clicked "Save all", now TortoiseSVN is showing several hundred changed files instead of just one file with the one line changed I intended to do. All these changes are either…
Priyanka
  • 559
  • 3
  • 13
4
votes
1 answer

Modelica Expandable Connector Best Practices

Here is a minimum working example of some expandable connector usage occuring in my models: model TestExpandableConnector expandable connector ControlBus extends Modelica.Icons.SignalBus; Real signal1; Real signal2; end ControlBus; …
Matt
  • 363
  • 1
  • 7
4
votes
2 answers

Modelica - iterator with exception?

Slightly generalised example: How do I make a for loop with exceptions when I define model equations? The following works: model Test Real[9] q; equation q[2] = 1.2; q[4] = 1.4; for i in {1,3,5,6,7,8,9} loop q[i] =…
janpeter
  • 681
  • 8
  • 22
4
votes
1 answer

How to understand the ill-conditioned Jacobian problem in Modelica models?

I change the parameter in my model, but sometimes it would cause the simulation stopped because of ill-conditioned Jacobian, I am not sure what this error means. My question is: Is there any explanation about how to solve DAE equations in Modelica…
Jack
  • 1,094
  • 6
  • 16
4
votes
2 answers

Modelica I/O blocks vs. Functions

Blocks and functions in Modelica have some similarities and differences. In blocks, output variables are most likely expressed in terms of input variables using equations, whereas in functions output variables are expressed in terms of input…
Atiyah Elsheikh
  • 568
  • 3
  • 12
4
votes
1 answer

Exchanging Modelica FMU Models

I tried to exchange my Modelica model with one of my colleagues but ran into difficulties regarding paths to CSV-Files. When I create the FMU the paths to some of the CSV files are set and point to folders on my computer. For example…
Phil
  • 624
  • 7
  • 19
4
votes
2 answers

Tolerance criteria Brent's method

Stop criteria for Brent's method is if abs(m) <= tol or fb == 0.0 then // root found (interval is small enough) found := true; However, what if abs(m) reaches below said tolerance but the value of f(b) is no where close to zero? Will this…
4
votes
1 answer

use ClaRaLib with OMEdit

I came across the feature rich modelica library ClaRa. It seems to need Dymola to run properly. Is there a way to make it run with OMEdit or any other free editor? I keep getting errors "with no error message".
knobber
  • 63
  • 3
4
votes
2 answers

Is it possible to compile Linux runnable fmus from Dymola on Windows machine?

I am trying to export a FMU from windows machine using Dymola, to be used on both Linux and Windows OS. I guess such fmu will have linux64 and linux32 binaries along with win32 and win64 ones. However, I am not sure how to trigger Dymola to generate…
Kaustubh
  • 391
  • 2
  • 10
4
votes
2 answers

How to access model jacobian from FMU or Dymola without analytical jacobian

I am trying to find a way to access the jacobian for a model in dymola either through a compiled FMU or from the exported Dymola source code. The final objective is to use the same procedure to access the jacobian for a much more complex multibody…