node#

Query.node(x, y, z)[source]#

Return node closest to coordinate (x, y, z).

Number of the selected node nearest the x, y, z point. (In the active coordinate system, lowest number for coincident nodes.) A number higher than the highest node number indicates that the node is internal (generated by program).

Parameters:
xfloat

X-coordinate in the active coordinate system

yfloat

Y-coordinate in the active coordinate system

zfloat

Z-coordinate in the active coordinate system

Returns:
int

Node number

Return type:

int

Examples

In this example we construct a solid cube and mesh it. Then we use queries.node to find the node closest to the centre of the cube. Using this we can extract the coordinates of this node and see how close to the centre the node is.

>>> from ansys.mapdl.core import launch_mapdl
>>> mapdl = launch_mapdl()
>>> mapdl.prep7()
>>> mapdl.et(1, 'SOLID5')
>>> mapdl.block(0, 10, 0, 10, 0, 10)
>>> mapdl.esize(3)
>>> mapdl.vmesh('ALL')
>>> node_number = mapdl.queries.node(5., 5., 5.)
>>> node_number
112
>>> x = mapdl.queries.nx(node_number)
>>> y = mapdl.queries.ny(node_number)
>>> z = mapdl.queries.nz(node_number)
>>> (x, y, z)
(5.0, 5.0, 5.0)