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
Ansys EmployeePyAnsys 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
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- how to improve the inflation quality at sharp corners?
- ANSYS Workbench Measuring within Design
- check element type
- The mesh file exporter could not resolve cyclic dependencies in overlapping contact regions error
- execution error inside the mesher. The process suffered an unhandled exception or ran out of memory
- Conformal vs Non-Conformal Mesh
- Meshing Error
- Error in meshing
- inflation created stairstep mesh at some location
- How to resolve Mesh Failure
-
7690
-
4484
-
2957
-
1435
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.