nx#

Query.nx(n)#

Return the x coordinate of a node.

Fetches X-coordinate of node n in the active coordinate system.

Parameters:
nint

Node number

Returns:
float

Coordinate of node

Return type:

float

Examples

Here we construct a simple box and mesh it with elements. Then we use the nx method from the queries attribute to find the x-coordinate of the 10th node.

>>> from ansys.mapdl.core import launch_mapdl
>>> mapdl = launch_mapdl()
>>> mapdl.prep7()
>>> mapdl.et(1, 'SOLID5')
>>> mapdl.block(0, 10, 0, 20, 0, 30)
>>> mapdl.esize(2)
>>> mapdl.vmesh('ALL')
>>> mapdl.queries.nx(10)
0.0