Pyramid element with ElmerGrid
Pyramid element with ElmerGrid
Dear all,
I tried to convert .unv file (I made this by Salome-meca) to Elmer format using ElmerGrid.
But after conversion, some elements were lost, and they seemed to be pyramid elements.
ElmerGrid cannot convert pyramid element? If not, could anybody tell me the alternative tool?
Regards,
Satoshi
I tried to convert .unv file (I made this by Salome-meca) to Elmer format using ElmerGrid.
But after conversion, some elements were lost, and they seemed to be pyramid elements.
ElmerGrid cannot convert pyramid element? If not, could anybody tell me the alternative tool?
Regards,
Satoshi
-
- Posts: 2369
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Pyramid element with ElmerGrid
Issue is that salome does not export pyramid elements to a unv file, the salomeToElmer script will.
- Attachments
-
- pyramid.png (20.25 KiB) Viewed 6507 times
-
- Site Admin
- Posts: 4841
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Pyramid element with ElmerGrid
Hi,
Great script by Juris! Also has support for entity names. This was news also to me or maybe I had just forgotten about it...
-Peter
Great script by Juris! Also has support for entity names. This was news also to me or maybe I had just forgotten about it...
-Peter
Re: Pyramid element with ElmerGrid
Thank you very much for so helpful script. It works!
Re: Pyramid element with ElmerGrid
I also tried to convert quadratic element.
Taking a quick look at salomeToElmer.py, it didn't have names of quadratic elements in elemTypeNames dict. (original Line 96)
So I simply added quadratic element name items.
But the program resulted in index error.
I found this error came from the failure in getting elements by point.(original Line 187)
This array was empty in some points. Probably some points belong to no volume elements. But I have no idea to modify so far.
Taking a quick look at salomeToElmer.py, it didn't have names of quadratic elements in elemTypeNames dict. (original Line 96)
So I simply added quadratic element name items.
Code: Select all
elemTypeNames = {'202': 'Entity_Edge', '303': 'Entity_Triangle', \
'203': 'Entity_Quad_Edge', '306': 'Entity_Quad_Triangle', \
'404': 'Entity_Quadrangle', '504': 'Entity_Tetra', \
'408': 'Entity_Quad_Quadrangle', '510': 'Entity_Quad_Tetra', \
'605': 'Entity_Pyramid', '706': 'Entity_Penta', \
'613': 'Entity_Quad_Pyramid', '715': 'Entity_Quad_Penta', \
'808': 'Entity_Hexa', \
'820': 'Entity_Quad_Hexa'}
I found this error came from the failure in getting elements by point.(original Line 187)
Code: Select all
parents = mesh.FindElementsByPoint( x,y,z, bodyType )
-
- Site Admin
- Posts: 4841
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Pyramid element with ElmerGrid
Hi
The annoying thing is that every FEM project has given different numbering to local nodes in elements. When you're working with linear elements it is more difficult to go wrong. In fact the linear elements have same node numbering. For quadratic numbering look at UnvToElmerIndx subroutine in:
https://github.com/ElmerCSC/elmerfem/bl ... emfilein.c
Another annoying thing that the crappy UNV file save point clouds - not boundary elements. So one has to find the elements using the points.
So I cannot much more help. For simply finding the elements you could use just the linear basis. However, you need to consider the ordering of local nodes carefully in the Python routine since otherwise the elements will be totally tangled.
If you start coding I suggest first deal with the bulk elements only and when ordering is ok you may have better luck with the search.
-Peter
The annoying thing is that every FEM project has given different numbering to local nodes in elements. When you're working with linear elements it is more difficult to go wrong. In fact the linear elements have same node numbering. For quadratic numbering look at UnvToElmerIndx subroutine in:
https://github.com/ElmerCSC/elmerfem/bl ... emfilein.c
Another annoying thing that the crappy UNV file save point clouds - not boundary elements. So one has to find the elements using the points.
So I cannot much more help. For simply finding the elements you could use just the linear basis. However, you need to consider the ordering of local nodes carefully in the Python routine since otherwise the elements will be totally tangled.
If you start coding I suggest first deal with the bulk elements only and when ordering is ok you may have better luck with the search.
-Peter
-
- Posts: 2369
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Pyramid element with ElmerGrid
having written translation programs for FEA codes I found there is no standard for quadratic elements.
- Attachments
-
- node order.png
- (60.96 KiB) Not downloaded yet
-
- Site Admin
- Posts: 4841
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Pyramid element with ElmerGrid
And as if that was not enough it is often very difficult to find what ordering is being used. Oh how many times I've looked at just a few elements trying to figure it out. To make things more interesting some codes have also degenerated elements that should be detected somehow. Like tetrahedrons can be expressed as degenerated hexahedron. I never figured out why...kevinarden wrote: ↑09 Jun 2020, 20:25 having written translation programs for FEA codes I found there is no standard for quadratic elements.
-Peter
Re: Pyramid element with ElmerGrid
sato,
can you try exporting linear elements form Salome and then calling
ElmerGrid manual says that the option
can you try exporting linear elements form Salome and then calling
Code: Select all
ElmerGrid 2 2 -increase .............
The original SalomeToElmer script cannot export quadratic elements. If you can figure it out that would be very useful! I will add changes and list you as a co-author.-increase : increase element order from linear to quadratic