Elmer Integration (GSoC) - Activity Log

About the development of the FEM module/workbench.

Moderator: bernd

m42kus
Posts: 159
Joined: Tue Sep 02, 2014 9:41 am

Re: Elmer Integration (GSoC) - Activity Log

Postby m42kus » Thu Dec 20, 2018 1:54 pm

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

Postby m42kus » Thu Dec 20, 2018 2:10 pm

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

Postby Chum4k3r » Wed Dec 26, 2018 8:00 pm

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
Posts: 5949
Joined: Thu Jan 05, 2017 9:03 pm

Re: Elmer Integration (GSoC) - Activity Log

Postby Kunda1 » Sat Jan 05, 2019 11:37 pm

Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
bernd
Posts: 8489
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Elmer Integration (GSoC) - Activity Log

Postby bernd » Sun Jan 06, 2019 7:11 am

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

Re: Elmer Integration (GSoC) - Activity Log

Postby JamesMarine » 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?

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
Posts: 1972
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Elmer Integration (GSoC) - Activity Log

Postby Jee-Bee » Tue Jul 23, 2019 4:33 pm

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

Postby m42kus » Tue Jul 23, 2019 4:49 pm

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
Posts: 1972
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Elmer Integration (GSoC) - Activity Log

Postby Jee-Bee » Tue Jul 23, 2019 5:23 pm

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: 11
Joined: Tue May 21, 2019 2:07 pm

Re: Elmer Integration (GSoC) - Activity Log

Postby JamesMarine » Wed Jul 24, 2019 4:18 am

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