nx

Query.nx(n)

Return the x coordinate of a node.

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

Parameters

n (int) – Node number

Return type

float

Returns

float – Coordinate of node

Examples

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

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