Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 bunch of lego blocks and the equations fall out automatically. You can also easily invert your models.

The closest analogy in the programming world is Haskell.



This approach seemed super interesting and we attempted to use it for modeling a fairly complicated fluid system (pipes, valves, tanks, etc). However, in the end the equations that fell out made the solver choke. We abandoned the effort since it seemed like an undebuggable black box. It's unclear to me whether we just didn't do it right or if the open source alternatives just aren't capable.


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.


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


There is an MIT course by the developers of MTK: https://sciml.github.io/ModelingToolkitCourse




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: