TAGGED: mesh-nodes, nodal-displacement, nodes-problem
-
-
August 25, 2023 at 4:58 pm
Yassine Naffeti
SubscriberHi,
I am using PyMAPDL on python to process a modal analysis and optimize it.Â
I solved the same model previously on the software ANSYS Mechanical directly and the number of nodes was 616169 in the software.Â
Then I exported the simulation file using cdwrite with the option "ALL" containing all geometry, material property, load, and component data. Then I loaded it with python and solved it again but I get a small difference in the number of nodes, but the results like eigenfrequencies are the same. The problem is not only the number of nodes is different from what I could see on ANSYS Mechanical, it is also incoherent within some arrays/variables that I get from APDL. I will explain this more as follows, this is a python code:Â
1) print(mapdl.mesh)Â
Output:
ANSYS Mesh
 Number of Nodes:        616211
 Number of Elements:      322069
 Number of Element Types:    220
 Number of Node Components:   0
 Number of Element Components: 0
2)Â also when getting the number of nodes using mapdl.mesh.n_node it gives back the same number
number_nodes = mapdl.mesh.n_node
print(number_nodes)Â
Output: 616211
3) However when I store the nodes in an array the length of it which should correspond to the number of nodes is different from we got previously
nodes = mapdl.mesh.nodes
print(len(nodes))
Output: 616256
4) using mapdl.db.nodesÂ
print(mapdl.db.nodes)
MAPDL Database Nodes
Number of nodes: 616256
Number of selected nodes: 616256
Maximum node number: 616256
5) and again when I retrieve the displacements for all the nodes I get an array not matching the number of nodes that I get previously from mapdl.mesh.nodes ; I get the displacements for 616211 nodes only which is different from 616256all_displacements = mapdl.post_processing.nodal_displacement("ALL")
print(len(all_displacements))
Output: 616211To put you in context: this is causing me a problem because I have the coordinates of some points where I want to get the displacement. But first what I do is that I determine the closest node to the point and then get the displacement of it from the array all_displacement. But in this case the number of nodes is varying in this interval [1, 616256] and the displacements I get are for only for 616211 nodes. So let's say I want the displacement for the node number 600000, if I use the nodal displacement array that I get from postprocessing I don't know if it actually corresponds to the same node.Â
Every help is appreciated. Thank very much in advance. -
September 5, 2023 at 2:53 pm
Aniket
Forum ModeratorPyAnsys project is developed and supported through GitHub. You can post issues and request new features on the Issues page for each package, or contact PyAnsys support. For more details, please refer to PyAnsys GitHub page:
https://github.com/pyansys-Aniket
-
- The topic ‘Number of nodes incoherent’ is closed to new replies.
-
3407
-
1057
-
1051
-
896
-
882
© 2025 Copyright ANSYS, Inc. All rights reserved.