Live data from Hacker News

Modelica

modelica.org

51–60 of 118 posts

Re: Modelica

#52
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.

I would love to use Modelica but in my field Simulink is king

Re: Modelica

#53

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...)

Modelica underneath uses DAE (differential algebraic equations) [1,2].

Think of it like a solver for many coupled differential equations. The coupling happens through "linear" equality constraints. Such as "the output pressure variable of component A needs to be equal the input pressure variable of component B".

Something that Modelica doesn't do very well is stochastic systems. There you would need to go into SDE and that brings a lot of technicalities.

[1] Petzold, Linda R. Description of DASSL: a differential/algebraic system solver. No. SAND-82-8637; Sandia National Labs, 1982.

[2] Kunkel, Peter. Differential-algebraic equations: analysis and numerical solution. European Mathematical Society, 2006.

Re: Modelica

#54
post #26

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/

You could use it to model a CNC machine, but you'd probably need to make new components. It would also be difficult to model the changing load as the spinning tool plunges into metal, but you could model dynamic deformation and response of the machine given the loads. It is difficult to model changing 3D contacts in modelica, although a new approach to solving newton's equations, dialectic mechanics may fix this prob…

I know, but it was the first search term I thought of.

Turns out "stepper" would probably have been better:

https://mbe.modelica.university/components/components/rot_co...

Re: Modelica

#55

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…

This is a fair description. I want to use Modelica but I can't get out of the Simulink ecosystem just yet.

Do you know if there's a decent C autocoding solution like that of Simulink?

Re: Modelica

#58
post #53

Earlier quoted context omitted.

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...)

Modelica underneath uses DAE (differential algebraic equations) [1,2]. Think of it like a solver for many coupled differential equations. The coupling happens through "linear" equality constraints. Such as "the output pressure variable of component A needs to be equal the input pressure variable of component B". Something that Modelica doesn't do very well is stochastic systems. There you would need to go into SDE an…

Any chance you know of good DAE books/resources that go into combining symbolics and numerics or parametrized DAEs?

Re: Modelica

#59
post #7

Earlier quoted context omitted.

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...

Ah! You're the author of Modelica by example?

Re: Modelica

#60
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.

Downvoted but relevant...nothing says corporate bullshit like a niche programming language with logos and merch featured far more prominently than examples or explanation...
Post reply on HN