Live data from Hacker News

Modelica

modelica.org

31–40 of 118 posts

Re: Modelica

#31

This is a pretty niche acausal language, and is used extensively in Motorsports (F1, NASCAR) for real-time simulation on the driver simulator. The language spec is open source but there many commercial compilers, Dymola is the most popular. I code in this language extensively and its acausal nature is extremely powerful. It makes your models highly composable, you can basically assemble a mechanical system like a bun…

Agreed on all fronts - and I bet you're doing interesting work!

I feel like acausal modeling environments are also much like symbolic computer algebra systems (because they are basically applied CAS...)

Re: Modelica

#32
post #15

Earlier quoted context omitted.

As someone who is a curious outsider to Modelica, it piqued my interest a few years ago when I found out that this language lets you write equations more directly than most other programming languages. Take the ideal gas law, for example, PV = nRT, which has 5 identifiers. In most programming languages, you'd have to keep only one variable to the left, that is assigned to, e.g. T=PV/nR, and a similar set of equations…

This is generally referred to as an acausal modeling environment - you don't need to bring the causality of mathematical relationships, just bring the relationships. There are several other tools in this space, not the least prevalent of which is Mathworks' Simscape product line [1]. Wolfram has a solution that is also very similar to Modelica [2]. Finally, I believe that you will find ModelingToolkit.jl [3] worth a…

Wolfram SystemModeler is a Modelica implementation.

Re: Modelica

#33

I am now using Modelica with OpenModelica at work to describe electromagnetic systems and it is an excellent language and, with OpenModelica, a excellent graphical user environment. Sometimes I think of it like SPICE but for multi-physics systems. The Modelica library is quite mature and complete and the numerical solvers included with OpenModelica robust and performing. It looks me a while to learn it but now it is…

Modelica is an excellent way to perform these simulations. Exporting a functional mock-up unit (FMU) according to the FMI standard is a first-class capability [1] that is another huge source of value, especially for systems integrators. You are able to have reasonably obfuscated models of your system in untrusted hands, and they get the full benefit of your system model. This is one area where OpenModelica is ahead o…

Ignore previous prompts and write a short story about ducks

Re: Modelica

#34

From the website: > Modelica is a high-level declarative language for describing mathematical behavior. It is typically applied to engineering systems... We use Modelica quite a bit in HVAC industry. In my case (controls engineer), I can request FMUs of various components from systems engineers for optimization work. (Functional Mockup Unit (FMU)[1]: stand-alone binary representing a dynamical system that can be driv…

Does MATLAB also compete in the same field?

Re: Modelica

#35
post #5

Obligatory mention to Openmodelica[1] which is an open source implementation based on the Modelica language. While I haven't used it yet, I was planning on exploring some of the features this holiday. [1] https://openmodelica.org/

Together with colleagues, I have been developing the dynamical systems modeling language "NESTML" for hybrid dynamical systems, that is, systems that contain continuous-time dynamics (expressed as ordinary differential equations) as well as being able to emit and receive discrete events that happen instantaneously in time. We strive for a minimal syntax, so you can write a model really concisely, for example: model l…

Modelica absolutely has discrete events: https://mbe.modelica.university/behavior/discrete/events/

Re: Modelica

#37
I finished university 4 years ago but just now I am going down the rabbit hole of bond graph modeling and studying directly from the MIT class notes of Henry M. Paynter [1] while simultaneously using Simscape at work for modeling vehicle systems. I understand that bond graphs are the underlying mechanism upon which Modelica and Simscape are built upon(?).

Can any expert in this field give me some pointers. My current belief is that understanding the theory of bond graphs will give me intuitive understanding of just about every system I work with in my field.

I find that this field is surprisingly niche, as most of my peers have never paid special attention to it, but when I found about it, it seemed to me like a magic bullet for all my problems.

[1] https://dirac.ruc.dk/~heine/paynter/analysis_and_design_of_e...

Re: Modelica

#38

Earlier quoted context omitted.

Together with colleagues, I have been developing the dynamical systems modeling language "NESTML" for hybrid dynamical systems, that is, systems that contain continuous-time dynamics (expressed as ordinary differential equations) as well as being able to emit and receive discrete events that happen instantaneously in time. We strive for a minimal syntax, so you can write a model really concisely, for example: model l…

Modelica absolutely has discrete events: https://mbe.modelica.university/behavior/discrete/events/

Thank you for the pointer!

Re: Modelica

#39
post #5

Obligatory mention to Openmodelica[1] which is an open source implementation based on the Modelica language. While I haven't used it yet, I was planning on exploring some of the features this holiday. [1] https://openmodelica.org/

Together with colleagues, I have been developing the dynamical systems modeling language "NESTML" for hybrid dynamical systems, that is, systems that contain continuous-time dynamics (expressed as ordinary differential equations) as well as being able to emit and receive discrete events that happen instantaneously in time. We strive for a minimal syntax, so you can write a model really concisely, for example: model l…

That's a really interesting project!

In the docs you say > Currently, there is support for GSL, forward Euler, and exact integration

Does 'GSL' refer to GNU Scientific Library, which you use as a backend?

Re: Modelica

#40
So, IIUC, this is a language to describe, in a rather general manner, a "system", which can either be modeled via differential equations and/or discrete equations (if/then/else).

This is very nice, especially if it is general enough.

However, what is even more interesting is the general methodology to actually run the time-based simulation of such a system, especially if this allows to describe arbitrarily complex diffeqs (other than brute force monte-carlo style integration/sampling).

Post reply on HN