Selecting only 3d elements #1372
-
I have a mesh file that contains both 3D volume elements and some contact elements. I require arrays containing strain energy density and volumes of the 3d elements. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
@mikerife, I'm going to leave this to you, but tentatively @manarshhjot I would recommend selecting by the solid element types using esel with:
Where |
Beta Was this translation helpful? Give feedback.
-
Hi @manarshhjot @pmaroneh @akaszynski Also we can create a function to unselect all the contact/target element types. Or maybe on to select all the 3D structural element types. Which to use will often be situationally dependent. Unselecting would be easier since we only need one selection type, whereas the other would have one selection and several also select. Here is an example: def no_contact(mapdl):
contact = [169, 170, 172, 174, 175, 177, 178]
for type in contact:
mapdl.esel('u','ename','',type)
return
mapdl.etable('volume','volu')
mapdl.allsel()
no_contact(mapdl)
vol = mapdl.pretab('volume').to_array()
print(vol) Running a very simple 2 solid element model with symmetric contact (so 2 each contact and target elements) results in this: Mike |
Beta Was this translation helpful? Give feedback.
Hi @manarshhjot @pmaroneh @akaszynski
The PRETAB command allows the use of the extra method .to_array so we don't need to dump the element table to a MAPDL array.
Also we can create a function to unselect all the contact/target element types. Or maybe on to select all the 3D structural element types. Which to use will often be situationally dependent. Unselecting would be easier since we only need one selection type, whereas the other would have one selection and several also select.
Here is an example: