Elmer Integration (GSoC) - Activity Log

Contributions from the participants, questions and answers to their projects.
Discussions of proposals for upcoming events.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Elmer Integration (GSoC) - Activity Log

Post by m42kus »

bernd wrote: Wed Dec 19, 2018 3:47 pm Would be cool if Markus could give some hints ...
Certainly :)
Chum4k3r wrote: Wed Dec 19, 2018 1:48 pm Hello! Regards from Brazil :D

I'm an acoustical engineering and since my discovering of FreeCAD i've been trying to adapt all my CAD work to the software...

My latest deed was adding the Helmholtz Equation to Elmer solver, but i'm facing some issues with the write.py file, seems like some settings of this equation aren't similar to any other already built in.

How can I add the Frequency I wish to analyse? And how can I add a GUI input to set this analysis step?

Do I need to create a GmshFemMesh by my own within the Analysis object, or the Elmer solver make its own FemMesh?
Hi, congrats for your first post :D Did you actually add a new equation type to FreeCAD? Heat, flow and so on are all equation types represented as sub-objects of the solver. Those sub-objects can than have all kinds of properties that are required for the equation. In the write.py file you can than access those properties. I wrote a little tutorial on how to add new equation types some time ago: https://www.freecadweb.org/wiki/Add_FEM ... n_Tutorial. The tutorial uses some old module names. They are now lower case - i should probably update that at some point.

In case you did add the equation object you just have to add new properties to the equation object. The equation object should be coded in the file Mod/Fem/femsolver/elmer/equations/helmholtz.py or something similar. Look at https://www.freecadweb.org/wiki/Scripted_objects for information about properties of python objects.

If you have any questions please don't hesitate to ask :)
Chum4k3r wrote: Wed Dec 19, 2018 1:48 pm Also, at some point of the Elmer models documentation provided by CSC, there is the Simulation keyword (for Helmholtz eq) and two options, Frequency and Angular Frequency, I presume is to choose wether the analysis variable will be shown as Hz or rad/s.
Well, I'm not familiar with acoustical stuff so I guess just choose which one is more commonly used in that field.

regards Markus
My GSoC Devlog: ceeli.github.io/gsoc
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Elmer Integration (GSoC) - Activity Log

Post by m42kus »

Chum4k3r wrote: Wed Dec 19, 2018 1:48 pm Do I need to create a GmshFemMesh by my own within the Analysis object, or the Elmer solver make its own FemMesh?
No you don't need to, that is handled by the elmer solver framework.
My GSoC Devlog: ceeli.github.io/gsoc
Chum4k3r
Posts: 2
Joined: Wed Dec 19, 2018 1:25 pm

Re: Elmer Integration (GSoC) - Activity Log

Post by Chum4k3r »

Well, thanks for your welcoming and clarifying answers!

it has been a while since my post and i've just re-read it and i think i did some confused asking, sorry guys :oops:
bernd wrote: Wed Dec 19, 2018 3:47 pm Which FreeCAD version do you work with? You should work with latest 0.18 dev version if you do coding for FEM!!!
I'm using the 0.18, not sure if it's the -dev version, though. I think i've used a source code from the freecad-daily repository... I was doing it just as a test and then it worked and surprised me a lot, it was the first time i've ever build a software from source, and already with some "customization" and it worked!!! (or almost...)
m42kus wrote: Thu Dec 20, 2018 1:54 pm In case you did add the equation object you just have to add new properties to the equation object. The equation object should be coded in the file Mod/Fem/femsolver/elmer/equations/helmholtz.py or something similar. Look at https://www.freecadweb.org/wiki/Scripted_objects for information about properties of python objects.
Yes, I did add the equation object from Elmer to FreeCAD, and not an equation "to" Elmer!
I've followed the tutorial, and although some names were different, it wasn't a problem to identify the correspondent file of the version.
I tried to copy the elasticity equation object, but did not compared the properties of the object with those used on Elmer solver to adjust properly the properties of the helmholtz equation object.

I'll check what should be added to the helmholtz.py file and update my equation status. At the moment it just gives me and empty fremresult object

Hope to make it work and give my contribution to the FreeCAD FEM
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Elmer Integration (GSoC) - Activity Log

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Elmer Integration (GSoC) - Activity Log

Post by bernd »

JamesMarine
Posts: 12
Joined: Tue May 21, 2019 2:07 pm

Re: Elmer Integration (GSoC) - Activity Log

Post by JamesMarine »

Can anyone kindly suggest where can I find some step-by-step tutorial regarding how to use Elmer silver in FC?

Another question is that do FC Elmer solver support netgen or imported meshes? I am looking to import my nastran BDF file to FC and solve it using Elmer, is this possible?
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Elmer Integration (GSoC) - Activity Log

Post by Jee-Bee »

Can you Explain what elmersilver is? i can't find it back
https://github.com/ElmerCSC/elmerfem

FreeCAD isn't able to add constraints on meshes. FreeCAD needs geometry for adding the constraints. If you have a mesh and a step file(= geometry) you can use any mesh from any mesher you like.
m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Elmer Integration (GSoC) - Activity Log

Post by m42kus »

Jee-Bee wrote: Tue Jul 23, 2019 4:33 pm Can you Explain what elmersilver is? i can't find it back
https://github.com/ElmerCSC/elmerfem
I think he ment elmer solver ;)
Jee-Bee wrote: Tue Jul 23, 2019 4:33 pm FreeCAD isn't able to add constraints on meshes. FreeCAD needs geometry for adding the constraints. If you have a mesh and a step file(= geometry) you can use any mesh from any mesher you like.
Yep and this not only a restriction of FreeCAD. Elmer needs some way of assigning the constraints to elements and this is handled by ElmerGrid (mesh program of elmer). As far as I know you can't directly use meshes in elmer even if you use it without FreeCAD.
JamesMarine wrote: Tue Jul 23, 2019 4:19 pm Can anyone kindly suggest where can I find some step-by-step tutorial regarding how to use Elmer silver in FC?
There is not really a step-by-step tutorial at the moment. There is a video in which I create a thermodynamic simulation. I posted it earlier in this topic: https://forum.freecadweb.org/viewtopic. ... 60#p187879. If you have a specific request I could maybe create something :)
My GSoC Devlog: ceeli.github.io/gsoc
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Elmer Integration (GSoC) - Activity Log

Post by Jee-Bee »

to be honest the FEM packages i have seen none have the possebility to add constraints on meshes(Ansys, comsol, internal fem of ptc creo).
JamesMarine
Posts: 12
Joined: Tue May 21, 2019 2:07 pm

Re: Elmer Integration (GSoC) - Activity Log

Post by JamesMarine »

@m42kus Many thanks for the help! I am looking to do some FSI analysis using elmer solver and FreeCAD (such as flow through pipes), do you have any material for that purpose? By the way, if I want to use shell and beam/rod element in the structure analysis, can Elmer solve do the analysis as well?

Regarding the apply constrants and forces on imported meshes, in NASTRAN, I usually use element groups or select the specified elements / nodes and apply the constrants and forces. Can this be achived in FreeCAD as well (e.g. select elements through GUI).
Post Reply