Live data from Hacker News

Modelica

modelica.org

41–50 of 118 posts

Re: Modelica

#41

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?

Sounds like Simulink to me, which is one of the major MATLAB programming environments.

ETA: Apparently MathWorks has Simscape in this category.

Re: Modelica

#42
post #3

As someone who has no idea what this is about bar the landing page explanation, and isn't in this space -- it would be great if the front page had examples, or links to examples. 30 seconds of clicking around and I've failed to find sth compelling.

Another day, another nondescript product name on HN for Russian roulette clicking. Dare to say anything about it, get downvoted into a smoking hole in the ground (e.g. by webdevs who assume everyone else is), yadda yadda... I'm pretty convinced by now that it will never change.

Re: Modelica

#43
post #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…

I actually would disagree that Bond Graphs are the "underlying mechanism" in Modelica. The Modelica community and the Bond Graph community are a bit at odds in fact. My side of this story can be found at [1] and [2]. I disagree with the idea that Bond Graphs will give you an intuitive understanding of just about every system. What it will give you is an appreciation for the elegance of the Bond Graph formulation. But the analogies drawn there are, in my experience of 30 years of modeling in industry, extremely superficial. The analogies all break down once you get past passive, linear elements (e.g., why isn't there momentum in thermal systems, what if I have an compressible fluid, what is the analogy of a clutch in an electrical system, etc). Bond Graphs also aren't really acausal either, they are just a different causal formulation that is closer to the physics.

I'm sure Bond Graph fans will disagree. I am just sharing my personal, subjective opinion here.

[1]: https://www.linkedin.com/feed/update/urn:li:ugcPost:72725163... [2]: https://mbe.modelica.university/components/connectors/simple...

Re: Modelica

#44

AFAICT the docs don't seem to be directly searchable: https://doc.modelica.org/Modelica%204.0.0/Resources/helpDymo... Are NEMA motors modeled? Could one use this to simulate/model a CNC machine? EDIT: Apparently not, given that "NEMA" doesn't show up searching: https://mbe.modelica.university/

Modelica by Example is a textbook on Modelica, not a searchable index of models. It doesn't even cover the Modelica Standard Library in any details much less the many other Modelica libraries out there. To determine if something has been done in Modelica your best bet is to Google about it. All the proceedings from all Modelica conferences are available free online and open to be crawled by any search engine. That's where you'll find what has really been done.

Re: Modelica

#45
post #7
post #3

As someone who has no idea what this is about bar the landing page explanation, and isn't in this space -- it would be great if the front page had examples, or links to examples. 30 seconds of clicking around and I've failed to find sth compelling.

Here are some examples. Looks like a simplified framework for writing physical and electrical system simulations. https://mbe.modelica.university/

Over 20 years ago I modeled an internal combustion engine, an automatic transmission and a multibody chassis model all in a single model. IIRC, the model had something like 250,000 equations in it and it modeled combustion, hydraulics, friction, and 3D rigid body motion. It is capable of far more than simple models.

https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d...

Re: Modelica

#46
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 not only has discrete events (see other comment), it includes support for synchronous (clocked) systems of equations directly in the language. These kinds of language semantics are necessary if you want to have unambiguous discrete models.

https://specification.modelica.org/maint/3.6/synchronous-lan...

Re: Modelica

#47
post #41

Earlier quoted context omitted.

Does MATLAB also compete in the same field?

Sounds like Simulink to me, which is one of the major MATLAB programming environments. ETA: Apparently MathWorks has Simscape in this category.

And Mathematica has this: https://www.wolfram.com/system-modeler/

Re: Modelica

#48

How does this compare to Spice/verilog-A/Simulink?

OK, those are three quite different things.

Modelica allows you to create models in a similar way to spice by describing components and how they are connected. But instead of a netlist of nodes, Modelica has a concept of connectors. But otherwise it is fairly similar. However, Modelica's scope is well beyond that of Spice or Verilog-A. Those languages claim that by analogy they can do other domains but you are mainly limited to simple "equivalent" circuit models for thermal systems and their analogies to mechanical systems are (in my opinion), hopelessly flawed. Not to mention that there are high quality libraries in Modelica for modeling multibody systems and two phase fluid systems...things I would never attempt in Spice or Verilog-A.

As for Simulink...that is an entirely different beast. Simulink's focus is on modeling of dynamics using a representation of the _math_, not the physics. What this means in practice is that when you build a model you translate the text book equations into a _causalized_ mathematical representation of your system. The problem with this is that changing even very basic assumptions will require you to re-causalize the system of equations and this is quite tedious, time-consuming and error prone. The way I always describe it is that Simulink is like performing long division (you do all the tedious, time consuming and error prone work yourself) whereas Modelica is like a calculator (it does all that stuff for you and just helps you get to the answer quickly). But the key point about Modelica is that it leverages a compiler that does a ton of work for you (not just causlization but state selection, index reduction, etc). Now MathWorks has Simscape that supports this "acausal" approach that Modelica uses, but in my opinion Modelica is not only technically better and more powerful, but also more open (see OpenModelica, for example).

Re: Modelica

#49
post #3

As someone who has no idea what this is about bar the landing page explanation, and isn't in this space -- it would be great if the front page had examples, or links to examples. 30 seconds of clicking around and I've failed to find sth compelling.

I wonder if anyone is keeping a list of the new languages that come out every year.

Modelica is nearly 30 years old, BTW.

Re: Modelica

#50
post #4
post #3

As someone who has no idea what this is about bar the landing page explanation, and isn't in this space -- it would be great if the front page had examples, or links to examples. 30 seconds of clicking around and I've failed to find sth compelling.

It apparently sells merchandising for their own brand though.

The Modelica Association is a non-profit that publishes the specification, the standard library and all conference proceedings for free. We sell merch in part because people in the Modelica community like the language and like to show it but also as a way to fund the not for profit activities.
Post reply on HN