ansys / pyprimemesh

Pythonic Meshing Client for Ansys Prime Server
https://prime.docs.pyansys.com/
MIT License
19 stars 9 forks source link

Element Type & Control #501

Open mcMunich opened 1 year ago

mcMunich commented 1 year ago

Hey, I noticed that pyprime works so well I don't have to think about the element type in pymapdl. Then I realized, I always need to think about element type in FE. What is the logic of the default elements when generating a cdb and is there any way to control the element types?

ninad-kamat commented 1 year ago

@mcMunich Currently, we have a mapping of element types to mesh elements that we use. For example, Tet elements are written as Solid285 elements. We do not apply any keyopts at present on the element types. There are enhancements that are being planned for this in some external FE workflows that I would be happy to discuss offline. This will probably be available in 24R1. Given below is the current mapping.

Beam188 -> Line2 Beam189 -> Line3 Shell181 -> Tri3 Shell181 -> Quad4 Shell281 -> Tri6 Shell281 -> Quad8 Solid285 -> Tet4 Solid185 -> Hex8 Solid187 -> Tet10 Solid186 -> Hex20

Did you have anything specific in relation to how element types need to be defined?

hlee0122 commented 1 year ago

@mcMunich As for cdb, in (Py)MAPDL there's a save_as_archive function which does the same conversion with default element types for solid and shell element. You can also refer to the element guide in ANSYS_Mechanical_APDL_Element_Reference for more information. On a separate note, the element type is most likely physics dependent - e.g. a suitable structural element type may not be suitable for acoustics so we might need to consider physics type in PyPrimeMesh when it comes to element export control. For the current default element type in cdb we consider mainly for structural element. In addition, MAPDL supports an "etmod" command that users sometimes add in command snippets in mechanical to change the element type if we don't pick the right one as default.