FEM Mesh Export

About the development of the FEM module/workbench.

Moderator: bernd

tcsut
Posts: 5
Joined: Wed Oct 21, 2020 6:10 am

FEM Mesh Export

Post by tcsut »

So far I was using freecad 0.18.
I played with the electrostatic two ball example in freecad 0.19.

When I define mesh groups for all the boundaries small_sphere1 and small_sphere2, do the meshing, export the mesh in TwoBallsExport.unv-file and load the file in elmergui, one of the sphere boundaries is not available anymore.
TwoBallPic1.PNG
TwoBallPic1.PNG (47.48 KiB) Viewed 2078 times
TwoBallPic2.PNG
TwoBallPic2.PNG (130 KiB) Viewed 2078 times

On the other hand if use the original ball example in freecad 0.19 and execute the write button in the SolverElmer task. Afterwards I loaded the generated mesh.unv-file into elmergui, which contains all boundaries (taken from the constraints).
TwoBallPic3.PNG
TwoBallPic3.PNG (96.46 KiB) Viewed 2078 times
I attached mesh.unv and TwoBallsExport.unv in the TwoBalls.zip
What is the difference? What do I need to do (region, boundary, group) to get the same .unv file with a manual mesh export?
Thanks for any hints!
Attachments
TwoBalls.zip
(400.09 KiB) Downloaded 45 times
tcsut
Posts: 5
Joined: Wed Oct 21, 2020 6:10 am

Re: FEM Mesh Export

Post by tcsut »

Now I found out if I use ElmerGrid command:
ElmerGrid 8 2 TwoBallsExport.unv -autoclean

which generates TwoBallsExport folder out of the imported unv file, contains all boundaries as expected
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM Mesh Export

Post by bernd »

:) great you found a solution.

BTW: Welcome to FreeCAD FEM forum.

cheers bernd
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: FEM Mesh Export

Post by HoWil »

tcsut wrote: Fri Oct 23, 2020 3:10 pm Now I found out if I use ElmerGrid command:
ElmerGrid 8 2 TwoBallsExport.unv -autoclean

which generates TwoBallsExport folder out of the imported unv file, contains all boundaries as expected
Hi tcsut,
Do I see it right, that it is possible to import an .sif and the connected unv into ElmerGui recently.
Did not know that. If so many things are becoming easier.
Br
tcsut
Posts: 5
Joined: Wed Oct 21, 2020 6:10 am

Re: FEM Mesh Export

Post by tcsut »

Hi HoWil

My understanding of ElmerGrid is that there are some compatibility issues with the .unv format FreeCAD is exporting.
There should be some experts around, who can explain that more elaborate.

I prefere generating the mesh with FreeCAD and exporting it to ElmerGui to have more control of the workflow.
With ElmerGrid you could also convert (and -autoclean) it into a .msh file:

Code: Select all

ElmerGrid 8 4 TwoBallsExport.unv -autoclean
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: FEM Mesh Export

Post by HoWil »

tcsut wrote: Mon Nov 23, 2020 3:54 pm My understanding of ElmerGrid is that there are some compatibility issues with the .unv format FreeCAD is exporting.
Do you experience any issues or do you simply want to indicate that there could be some issues? Please see also https://forum.freecadweb.org/viewtopic. ... nv#p195056
tcsut wrote: Mon Nov 23, 2020 3:54 pm There should be some experts around, who can explain that more elaborate.

I prefere generating the mesh with FreeCAD and exporting it to ElmerGui to have more control of the workflow.
With ElmerGrid you could also convert (and -autoclean) it into a .msh file:

Code: Select all

ElmerGrid 8 4 TwoBallsExport.unv -autoclean
raback wrote: ping
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM Mesh Export

Post by bernd »

tcsut wrote: Mon Nov 23, 2020 3:54 pm My understanding of ElmerGrid is that there are some compatibility issues with the .unv format FreeCAD is exporting.
There should be some experts around, who can explain that more elaborate.
FYI: FreeCAD uses Salome SMESH library to export the unv.
raback
Posts: 75
Joined: Fri May 08, 2020 4:02 pm
Location: Finland
Contact:

Re: FEM Mesh Export

Post by raback »

Hi

UNV format is certainly too complicated to be fully parsed with any reasonable effort: Hundreds of fields annoying layout. Our strategy for ElmerGrid has been to use samples and make them work. When the set of samples is large enough the odds that the next case would also work increases.

The UNV files so far have mainly come from HyperMesh and Salome. FreeCAD may use partly different fields. Hence if you have a non-working UNV file please make a minimal sample of it and sent it to me.

-Peter
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM Mesh Export

Post by bernd »

raback wrote: Mon Nov 30, 2020 9:56 am Hi

UNV format is certainly too complicated to be fully parsed with any reasonable effort: Hundreds of fields annoying layout. Our strategy for ElmerGrid has been to use samples and make them work. When the set of samples is large enough the odds that the next case would also work increases.

The UNV files so far have mainly come from HyperMesh and Salome. FreeCAD may use partly different fields. Hence if you have a non-working UNV file please make a minimal sample of it and sent it to me.

-Peter
As said FreeCAD uses Salome SMESH code to export unv. Means A unv mesh exported from Salome and from FreeCAD should be identical!
raback
Posts: 75
Joined: Fri May 08, 2020 4:02 pm
Location: Finland
Contact:

Re: FEM Mesh Export

Post by raback »

Ok. Elmer should then be able to read most of the meshes but there can always be some exception. Still it is a good idea to sent the non-working example.

Btw, it is pretty alarming that it seems to be very difficult to find the UNV standard online. While googling a few minutes many of the old links seemed to be dead and the only document I was able to find was this one from 1987.

https://www.google.com/url?sa=t&rct=j&q ... TXlLGeCLVE

It would really be nice if there was some proper standard that does not assume fixed format with 80 character lines :(

-Peter
Post Reply