Modelica

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Modelica

Post by saso »

looo wrote: Mon Dec 03, 2018 10:19 pm I guess a big part is solving ode's.
Yes, it is not as generic as python, it is all about solving ode's, but it is trying to be super efficient at solving them, it compiles the system equations to C executable code and does a lot of optimization at compile time (shown and partly explained in the videos above).

looo wrote: Mon Dec 03, 2018 10:19 pm But I think such an interface is not only about modeling systems. There are endless possibilities that can be done with this...
So in my opinion a node-editor would be a generic tool which fits perfectly between the gui-functionality and scripting and would be a perfect addition for FreeCAD. The gui-stuff done with modelica can be done with a good node-editor too. That's why I think a node-editor is one of the most essential things needed for FreeCAD. But this should eventually go into another topic, as this topic should be about modelica.
I fully agree, and this gets mixed a lot. A node interface is just UI/UX elements, that can be used for different type of implementations. Personally I would say that we could probably even have different node systems in FreeCAD, for example one that is more specific for system modeling (ex. modelica, pse,...) and one that is more like re-implementation of the freecad macro environment with nodes (ex. grasshopper, dynamo, sverchok, generativecomponents)

looo wrote: Mon Dec 03, 2018 10:19 pm I guess not everyone is a big fan of monsters. Especially maintainers fear them a lot...
But for sure having modelica as an addon somehow integrated into FreeCAD would be a really nice addition.
True :) Well, for now I mostly wanted just to make it a bit less unknown. Some of the first implementations could most probably be done in a similar way how we use some of the FEM solvers, so to say just a connection to OpenModelica. Maybe for example the flamingo WB could be a first interesting test candidate, to automatically dimension / optimize / simulate the systems that are modeled with it... ? If such a deeper integration in to FreeCAD, as for example in the above examples with Catia, is really needed or would make sense is questionable and far in the future.
Last edited by saso on Sat Dec 22, 2018 3:21 pm, edited 1 time in total.
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Modelica

Post by saso »

EkaitzEsteban wrote: Thu Dec 06, 2018 6:42 am Maybe this can help in the integration of Modelica in FreeCAD...
Thanks EkaitzEsteban, this are some really great links! I have already been looking a bit also in to FMI and OMPython, in fact OpenModelica has actually quite a lot of very interesting tools https://www.openmodelica.org/openmodelicaworld/tools
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Modelica

Post by saso »

Here is another series of videos, this time more on the background theory on systems modeling, system dynamics... Maybe not exactly for everyone :) but can be useful for those that are not familiar with it and want to get a more general understanding on the topic.
https://www.youtube.com/playlist?list=P ... N8Oy5OMbUA

Systems Modeling Languages
https://www.youtube.com/watch?v=CTVFDb44ses

Here is also a link to last year OpenModelica annual workshop presentations from https://www.openmodelica.org/events/ope ... ogram-2018 ... Do we have some FreeCAD users from Sweden? :roll:

And there is a new release of OpenModelica 1.13.0 https://www.openmodelica.org/newss/195- ... 0-released :)
Last edited by saso on Thu Jul 25, 2019 11:07 pm, edited 2 times in total.
Dorantor
Posts: 14
Joined: Wed Aug 15, 2018 1:44 pm

Re: Modelica

Post by Dorantor »

Hello everyone,

I'm really pleased to see that more people like the idea of the Modelica-Freecad connection. I'm not a programmer but I've played with some basic read/write commands in Openmodelica, like retrieving data of an object drawn in Freecad (things like inertia, center of mass etc.) and using these parameters for my Modelica multibody project.

Commercial software such as Matlab's Simscape (also known as SimMechanics) also provides an add-on for software like Solidworks. This add-on generates the whole multibody diagram for Simscape, based on the assembly in Solidworks. Example is shown here in this video:
phpBB [video]


Here's another cool example that shows the power of combining this kind of software with each other:
phpBB [video]
Dorantor
Posts: 14
Joined: Wed Aug 15, 2018 1:44 pm

Re: Modelica

Post by Dorantor »

Once again, I don't have a lot of knowledge on programming so I don't know how feasible this is but I was wondering if a Freecad-Blender connection wouldn't be nice. Because Freecad has FEA and Blender physics, wouldn't it be possible to combine those things into a more powerful modelling and simulation program/workbench?

Anyway, a Freecad-(open)Modelica connection is still a great idea in my opinion, since openmodelica is focused on the modelling and simulation and blender seem to have more focus on making nice animations but with nice physics.
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Modelica

Post by saso »

Book of Abstracts of the 13th International Modelica Conference
https://www.modelica.org/events/modelic ... tracts.pdf

more of this, from the past years, can be found at
https://www.modelica.org/events/modelica2019/index_html

and presentations from the OpenModelica Annual Workshop 2019
https://www.openmodelica.org/events/ope ... ogram-2019
EkaitzEsteban
Posts: 108
Joined: Wed Sep 12, 2018 1:31 pm

Re: Modelica

Post by EkaitzEsteban »

User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Modelica

Post by saso »

Few examples from Siemens Amesim
https://www.youtube.com/watch?v=PClHusLxf5Y Linking a battery cooling system with the air conditioning system
https://www.youtube.com/watch?v=XpehXCWNiNA Pre-sizing a hybrid aircraft propulsion
https://www.youtube.com/watch?v=vUNwlw1JxlE Creating and reusing Modelica models
https://www.youtube.com/watch?v=Z1TUEhQq3V4 Designing directional control valves
https://www.youtube.com/watch?v=2qG43N5_1s8 Assessing the behavior of a rocket engine
https://www.youtube.com/playlist?list=P ... 1uwhRPR2wK

Model Based System Engineering with LMS AMESim
https://www.youtube.com/watch?v=Vk_RgZYth2M
Last edited by saso on Sun Feb 14, 2021 10:38 am, edited 5 times in total.
Dorantor
Posts: 14
Joined: Wed Aug 15, 2018 1:44 pm

Re: Modelica

Post by Dorantor »

In the last few months I've picked up a programming tutorial for Python. I'm now trying to make a simple script to import a Freecad Assembly model into OpenModelica as a multibody system.

I hope it works and my code will definitely be messy but it would be a nice first step. Maybe in the future I or someone else can work on it further (possibly using the nice Openmodelica Python API: OMPython).
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Modelica

Post by microelly2 »

Dorantor wrote: Wed Jul 17, 2019 6:41 pm I hope it works and my code will definitely be messy but it would be a nice first step. Maybe in the future I or someone else can work on it further (possibly using the nice Openmodelica Python API: OMPython).
the first steps are always the most time consuming ones.
having a wobbly prototype is better than 50 pages of a scientific paper.
thank you for supporting FreeCAD and Keep us informed.
Post Reply