test request, mesh group object

About the development of the FEM module/workbench.

Moderator: bernd

HoWil
Veteran
Posts: 1270
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: test request, mesh group object

Post by HoWil »

bernd wrote: Wed Dec 28, 2016 9:05 pm It does not work for edges and vertices at the moment. Ahh we need an new icon for this !
Hi Bernd,
Is it possible to extend the mehs-grouping at least for edges? I would need it for some simpler 2D Elmer-benchmark examples.
I do not remember if there was a reason why edges were not implemented .... is it simply copy&paste or is there some issue with gmsh?
BR,
HoWil
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: test request, mesh group object

Post by bernd »

HoWil wrote: Tue Aug 08, 2017 6:54 pm
bernd wrote: Wed Dec 28, 2016 9:05 pm It does not work for edges and vertices at the moment. Ahh we need an new icon for this !
Hi Bernd,
Is it possible to extend the mehs-grouping at least for edges? I would need it for some simpler 2D Elmer-benchmark examples.
I do not remember if there was a reason why edges were not implemented .... is it simply copy&paste or is there some issue with gmsh?
Just had a look a this. Have a look at the geo file. The groups are made with "Physical Surface" command in GMSH for faces (http://gmsh.info/doc/texinfo/gmsh.html# ... l-surfaces) and with "Physical Volume" command for volumes. For groups of Edges "Physical Lines" needs to be used. The search algorithm in FreeCAD for the edges should be there too.

Means there is no limitation in neither GMSH nor FreeCAD, ahh there is one limitation ... the time of the one who does it :shock: ATM I do not have time for this. There is the GSoC (the new solver object) and the mixed meshes (I'd like to get them into 0.17). Give it a try yourself ...

There is a ToDo already ...
https://github.com/FreeCAD/FreeCAD/blob ... #L227-L228

Here is where you get the group elements. This should work for edges already.
https://github.com/FreeCAD/FreeCAD/blob ... ls.py#L236

Here is where the changes need to be made:
There you need to implement the physical type lines ...
https://github.com/FreeCAD/FreeCAD/blob ... #L432-L442

hope it helps, cheers bernd
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: test request, mesh group object

Post by bernd »

HoWil wrote: Tue Aug 08, 2017 6:54 pm Is it possible to extend the mehs-grouping at least for edges?
try this ...


https://github.com/berndhahnebach/FreeC ... /femgroups

https://github.com/berndhahnebach/FreeC ... diff=split


edges seam to work, but vertexes not. Would you give it a try?

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

Re: test request, mesh group object

Post by HoWil »

bernd wrote: Tue Aug 08, 2017 7:50 pm ... There is the GSoC (the new solver object) and the mixed meshes (I'd like to get them into 0.17). Give it a try yourself ...
hope it helps, cheers bernd
Wow, Thanks for this detailed explanation how to implement it!
And finally thanks for implementing it :o .... I am compiling ..... hope to be able to share nice results soon :D .

Thanks again,
HoWil
HoWil
Veteran
Posts: 1270
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: test request, mesh group object

Post by HoWil »

Hi Bernd,
The export does work now for edge -groups
For some unknown reason does ElmerGrid accept the mesh only if one selects 1st order elements in Fc.
Since I am on the way, I will post the detailed error message and a example later.

EDIT:

Code: Select all

$ ElmerGrid 8 2 export.unv -autoclean

Starting program Elmergrid
Elmergrid reading in-line arguments
Lower dimensional boundaries will be removed
Materials and boundaries will be renumbered
Nodes that do not appear in any element will be removed
Output will be saved to file export.

Elmergrid loading data:
-----------------------
Reading mesh from universal mesh file export.unv.
First round for allocating data
Units dataset content is currently omitted!
Part UID = 1
Part name = SMESH_Mesh
Coord system name = Global
There are 937 nodes in the mesh
Element type range in mesh [203,306]
Allocating mesh with 937 nodes and 501 6-node elements in 3 dims.
Physical index interval is [2,2]
Group index interval is [1,2]
Using offset 1 for physical indexes
Second round for reading data
Reading Coordinate system information
Reading node coordinates
Reading element topologies
Reading element groups in mode 2467
Reading 1:th group with index 1 with 13 entities: FEMMeshGroup
Element type range in group is [203 203]
Reading 2:th group with index 2 with 33 entities: FEMMeshGroup001
Element type range in group is [306 306]
Moving bulk elements to boundary elements
Leading bulk elementtype is 306
Trailing bulk elementtype is 203
There are 53 (out of 501) lower dimensional elements.
Node 107 belongs to maximum of 8 elements
Found 0 side elements, could have found 53
Removing 0 lower dimensional elements from the element list
************************** WARNING **********************
Adding 53 elements to boundary without parent information
Parent elements were reordered up to indx 448.
Moved 448 elements (out of 501) to new positions
The Universal mesh was loaded from file export.unv.


Elmergrid creating and manipulating meshes:
-------------------------------------------
Removing lower dimensional boundaries
Maximum elementtype is 306 and dimension 2
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
GetElementSide: unknown elementtype 0 (elem=0,side=0)
Removed 53 (out of 53) less than 2D boundary elements
All 937 nodes were used by the mesh elements
Initial body interval [2,3]
body index changed 2 -> 1 in 33 elements
body index changed 3 -> 2 in 415 elements
Mapping material types from [2 3] to [1 2]

Elmergrid saving data with method 2:
-------------------------------------
Saving mesh in ElmerSolver format to directory export.
Saving 937 coordinates to mesh.nodes.
Saving 448 element topologies to mesh.elements.
Saving boundary elements to mesh.boundary.
Saving header info to mesh.header.
Saving names info to mesh.names.
Saving entities info to entities.sif.

Thank you for using Elmergrid!
Send bug reports and feature wishes to elmeradm@csc.fi
Does anyone know what

Code: Select all

Maximum elementtype is 306 and dimension 2
GetElementSide: unknown elementtype 0 (elem=0,side=0)
means??

This is how it looks like when I simply switch to 1st order elements in FC

Code: Select all

ElmerGrid 8 2 export.unv -autoclean

Starting program Elmergrid
Elmergrid reading in-line arguments
Lower dimensional boundaries will be removed
Materials and boundaries will be renumbered
Nodes that do not appear in any element will be removed
Output will be saved to file export.

Elmergrid loading data:
-----------------------
Reading mesh from universal mesh file export.unv.
First round for allocating data
Units dataset content is currently omitted!
Part UID = 1
Part name = SMESH_Mesh
Coord system name = Global
There are 245 nodes in the mesh
Element type range in mesh [202,303]
Allocating mesh with 245 nodes and 501 3-node elements in 3 dims.
Physical index interval is [2,2]
Group index interval is [1,2]
Using offset 1 for physical indexes
Second round for reading data
Reading Coordinate system information
Reading node coordinates
Reading element topologies
Reading element groups in mode 2467
Reading 1:th group with index 1 with 13 entities: FEMMeshGroup
Element type range in group is [202 202]
Reading 2:th group with index 2 with 33 entities: FEMMeshGroup001
Element type range in group is [303 303]
Moving bulk elements to boundary elements
Leading bulk elementtype is 303
Trailing bulk elementtype is 202
There are 53 (out of 501) lower dimensional elements.
Node 54 belongs to maximum of 8 elements
Found 13 side elements that have two parents.
Found correctly 53 side elements.
Parent elements were reordered up to indx 448.
Moved 448 elements (out of 501) to new positions
The Universal mesh was loaded from file export.unv.


Elmergrid creating and manipulating meshes:
-------------------------------------------
Removing lower dimensional boundaries
Maximum elementtype is 303 and dimension 2
Removed 0 (out of 53) less than 2D boundary elements
All 245 nodes were used by the mesh elements
Initial boundary interval [1,3]
boundary index changed 3 -> 2 in 40 elements
Mapping boundary types from [1 3] to [1 2]
Initial body interval [2,3]
body index changed 2 -> 1 in 33 elements
body index changed 3 -> 2 in 415 elements
Mapping material types from [2 3] to [1 2]

Elmergrid saving data with method 2:
-------------------------------------
Saving mesh in ElmerSolver format to directory export.
Reusing an existing directory
Saving 245 coordinates to mesh.nodes.
Saving 448 element topologies to mesh.elements.
Saving boundary elements to mesh.boundary.
Saving header info to mesh.header.
Saving names info to mesh.names.
Saving entities info to entities.sif.

Thank you for using Elmergrid!
Send bug reports and feature wishes to elmeradm@csc.fi
BR, Howil
Attachments
2Dmodel.fcstd
model created with femgroups branch
(20.26 KiB) Downloaded 37 times
User avatar
HarryvL
Veteran
Posts: 1229
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: test request, mesh group object

Post by HarryvL »

Hi, thanks for this great development. I ran a few tests and find that if the mesh does not sit under an active analysis then the exported UNV file does not get properly translated by Calculix Launcher. In that case only face groups get captured and not edge groups. However, if the mesh does sit under an active analysis then all works well. Harry
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: test request, mesh group object

Post by bernd »

Hi HarryvL and welcome to FreeCAD FEM,

Do you have a simple example file to test with. What happens at reimport of the unv in FreeCAD ? Are the missing edge groups than there (in the mesh object as real mesh object groups) or not? If not than they might really be missing in the unv export of FreeCAD.

Bernd

BTW: you can directly export an inp file with nsets or elsets from groups too.
User avatar
HarryvL
Veteran
Posts: 1229
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: test request, mesh group object

Post by HarryvL »

Thanks Bernd. I attach the simple file. To replicate the issue the mesh needs to be move up the branch. Silly question, but how do I "directly export an inp file with nsets or elsets from groups"?
Attachments
Test20.fcstd
(6.45 KiB) Downloaded 23 times
User avatar
HarryvL
Veteran
Posts: 1229
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: test request, mesh group object

Post by HarryvL »

I found how to export INP from groups, but now get two sets named Eedges and Efaces, each with 4 "members". It looks like the full model rather than the groups I created (1 edge and 4 elements). I need to take some time to digest all of this.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: test request, mesh group object

Post by bernd »

Great, I will have a look at your file.

FYI: in the regard of groups, you need to set the prefs in import export pref for inp files. Menue edit --> prefs --> import export --> inp
Post Reply