[HN Gopher] All about Modelica: An equation-based language for m... ___________________________________________________________________ All about Modelica: An equation-based language for modeling physical systems Author : macro-b Score : 92 points Date : 2020-06-30 15:05 UTC (7 hours ago) (HTM) web link (marcobonvini.com) (TXT) w3m dump (marcobonvini.com) | pflanze wrote: | There's a project to create a language similar to Modelica as a | DSL in Julia, Modia[1]. I'm not currently a user of either | language, but saw a presentation at JuliaCon about it[2] and | thought it looked interesting. | | [1] https://github.com/ModiaSim/Modia.jl [2] | https://youtu.be/hVg1eL1Qkws | zokier wrote: | okay, its neat and all, but I missed seeing any _output_ from the | models, or examples how you use the models you built to analyze | something? How do you interact with it, what sort visualizations | you get etc etc?? | ptrott2017 wrote: | You can plot variable outputs in 2D and 3D plots, use values to | drive simulation based animations (2D and 3D) and via | Functional Mockup interface standard (fmi-standard.org) you can | interconnect external simulations and interactive | visualizations (2D, 3D, VR etc). For examples of these in | OpenModelica see the user guide here: | https://www.openmodelica.org/doc/OpenModelicaUsersGuide/Open... | | There is also a notebook UI that lets you do a lot of | Ipython/Jupyter style dev with feedback plots and | visualizations, in addition to code tools and visual authoring. | amatic wrote: | Is there a graphical interface, like Simulink, for Modelica? | vsskanth wrote: | OpenModelica is free. There are many commercial IDEs like | Dymola from Dassault, Wolfram System Modeler etc. | choeger wrote: | Many. Dymola is probably the go-to solution, but also | openmodelica, simulationX and wolfram, I think. | | Here is a list: https://www.modelica.org/tools | ptrott2017 wrote: | There are commercial ones like ones like Altair SolidThinking, | Wolfram System Modeller, ESI's SimulationX and there are open | source ones such as OMedit. Which meets your needs will be | partly budget / workflow / toolbox support based. If your new | to Modelica - then OpenModelica and OMEdit (OMEdit comes as | part of the OpenModelica download) are great starting points. | To get an idea of the available commercial and open source | options see: | | https://www.modelica.org/tools | | and https://openmodelica.org/openmodelicaworld/tools | ptrott2017 wrote: | This is a great overview of Modelica. For those looking to get | started - check out OpenModelica (https://openmodelica.org/) and | if you are curious how to approach deploying and using Modelica | in web services the article's author as a rather awesome open | source project called LambdaSim | see(https://github.com/mbonvini/LambdaSim) | jwilber wrote: | Stellar example of naming gone right in software. | vsskanth wrote: | a quick intro for programmers - Modelica is basically the | equivalent of Haskell for engineers - the compiler does most of | the work for you and produces highly performant code. You can | compose a very complex system from individually modeled elements. | The Modelica compiler will check constraints and basically come | up with a system of equations. If it compiles, it is probably | correct. The model wont compile if a particular variable is being | modified in two places. Models have full introspection where you | can observe any variable you choose. | dang wrote: | Is Modelica used for economic modeling as well? | dongping wrote: | I don't know enough about economic modeling, but if the models | can somehow be expressed as driven by a "potential" and a | "flow" variable (like electric voltage and electric currents), | then it would definitely make sense to try that out in | Modelica. | vsskanth wrote: | Been working in Modelica for a couple of years. Modelica | compilers generate C code since they're heavily used in the | embedded and real-time space. Kinda amazing to see systems with | hundreds of thousands of equations simulate faster than real | time. | choeger wrote: | One thing about Modelica is quite important and might confuse | newcomers: the language specification mostly only covers the | model, not the equations. That is, when you evaluate your model | under, e.g., Dymola and Openmodelica you will (most of the time) | end up with equal (or rather similar) systems of equations. The | meaning of these equations, i.e., the actual simulation can | easily differ, though (except for the most trivial models). | | The reason for this is that the equations are extremely powerful | (you can express pretty much anything computable inside an | equation) and their numerical solution is often driven by | heuristics (e.g., finding initial values). This makes it | extremely difficult to come up with a common standard for the | solution of Midelica's hybrid DAEs. Hence you will find little | written information about what exactly happens during a | simulation that applies to more than one implementation. | dang wrote: | If curious see also (from 2017): | https://news.ycombinator.com/item?id=16013179 | budadre75 wrote: | does anyone know any industry usage of Modelica? | vsskanth wrote: | energy companies (powerplants, building systems etc.), | aerospace, automotive, motorsports, robotics | JPLeRouzic wrote: | Maybe also in physiology (BTW I would be happy if someone | could point out similar or better resources) | | https://www.physiolibrary.org/doc/Physiolibrary.html#Physiol. | .. | rhodin wrote: | Check the vendors user stories: https://www.wolfram.com/system- | modeler/customer-stories/ Check the Modelica conferences (https | ://modelica.org/events/modelica2019/proceedings/html/Mo...) and | you'll see a lot of automotive companies (Toyota, Volvo, Bosch, | etc) ___________________________________________________________________ (page generated 2020-06-30 23:00 UTC)