How do I get information about the total volume or area #2963
-
Hi! I have created a geometry in Python, using the ansys mapdl package. The geometry is made of rectangular beam elements (1x1 mm). Is there a smart way for me to get the information on the total area/volume of the full geometry (of all elements)? ( I have attached a photo of the geometry). Hope you can help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hi @Deternanna so first, please be careful with the terminology as beams are not geometry in MAPDL. So when you say you created the geometry do you really have keypoints and lines, which were then meshed? Or did you create nodes and elements directly? Some combination? If there are lines you can use LSUM to calculate the total length of the selected lines. Then *GET (PyMAPDL get_value) to retrieve that sum. Length is not an property of a beam element that can be retrieved, but it can be calculated. If only the FEM exists then we can loop over the beam elements and calculate the length from the node positions. Unfortunately PyMAPDL Queries does not include the 'distnd' APDL short cut so you'll need to create your own function. Pretty straight forward with the nx, ny, nz queries using get to get the i and j nodes of the element. Mike |
Beta Was this translation helpful? Give feedback.
Hi @Deternanna so first, please be careful with the terminology as beams are not geometry in MAPDL. So when you say you created the geometry do you really have keypoints and lines, which were then meshed? Or did you create nodes and elements directly? Some combination?
If there are lines you can use LSUM to calculate the total length of the selected lines. Then *GET (PyMAPDL get_value) to retrieve that sum.
Length is not an property of a beam element that can be retrieved, but it can be calculated. If only the FEM exists then we can loop over the beam elements and calculate the length from the node positions. Unfortunately PyMAPDL Queries does not include the 'distnd' APDL short cut so yo…