Inline functions#
These are wrapped versions of inline APDL functions that perform operations like finding the x-coordinate of a node
given its number (Query.nx
).
- class ansys.mapdl.core.inline_functions.Query(mapdl)#
Class containing all the inline functions of APDL.
Most of the results of these methods are shortcuts for specific combinations of arguments supplied to
ansys.mapdl.core.Mapdl.get()
.Currently implemented functions:
centrx(e)
- get the centroid x-coordinate of element ecentry(e)
- get the centroid y-coordinate of element ecentrz(e)
- get the centroid z-coordinate of element enx(n)
- get the x-coordinate of node nny(n)
- get the y-coordinate of node nnz(n)
- get the z-coordinate of node nkx(k)
- get the x-coordinate of keypoint kky(k)
- get the y-coordinate of keypoint kkz(k)
- get the z-coordinate of keypoint klx(n, lfrac)
- X-coordinate of linen
at length fractionlfrac
ly(n, lfrac)
- Y-coordinate of linen
at length fractionlfrac
lz(n, lfrac)
- Z-coordinate of linen
at length fractionlfrac
lsx(n, lfrac)
- X-slope of linen
at length fractionlfrac
lsy(n, lfrac)
- Y-slope of linen
at length fractionlfrac
lsz(n, lfrac)
- Z-slope of linen
at length fractionlfrac
ux(n)
- get the structural displacement at node n in xuy(n)
- get the structural displacement at node n in yuz(n)
- get the structural displacement at node n in zrotx(n)
- get the rotational displacement at node n in xroty(n)
- get the rotational displacement at node n in yrotz(n)
- get the rotational displacement at node n in znsel(n)
- get the selection status of node nksel(k)
- get the selection status of keypoint klsel(n)
- get the selection status of line nasel(a)
- get the selection status of area aesel(n)
- get the selection status of element evsel(v)
- get the selection status of volume vndnext(n)
- get the next selected node with a number greater than n.kpnext(k)
- get the next selected keypoint with a number greater than k.lsnext(n)
- get the next selected line with a number greater than n.arnext(a)
- get the next selected area with a number greater than a.elnext(e)
- get the next selected element with a number greater than e.vlnext(v)
- get the next selected volume with a number greater than v.nnear(n)
- get the selected node nearest node n.knear(k)
- get the selected keypoint nearest keypoint k.enearn(n)
- get the selected element nearest node n.node(x, y, z)
- get the node closest to coordinate (x, y, z)kp(x, y, z)
- get the keypoint closest to coordinate (x, y, z)
Examples
In this example we construct a solid box and mesh it. Then we use the
Query
methodsnx
,ny
, andnz
to find the cartesian coordinates of the first node. We can access these through themapdl.queries
property.>>> 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') >>> q = mapdl.queries >>> q.nx(1), q.ny(1), q.nz(1) 0.0 20.0 0.0
|
Return node closest to coordinate |
|
Return keypoint closest to coordinate |
|
Return the x coordinate of the element centroid. |
|
Return the y coordinate of the element centroid. |
|
Return the z coordinate of the element centroid. |
|
Return the x coordinate of a keypont. |
|
Return the y coordinate of a keypont. |
|
Return the z coordinate of a keypont. |
|
Return the x coordinate of a node. |
|
Return the y coordinate of a node. |
|
Return the z coordinate of a node. |
|
Returns x-component of structural displacement at a node. |
|
Returns y-component of structural displacement at a node. |
|
Returns z-component of structural displacement at a node. |
|
Returns x-component of rotational displacement at a node. |
|
Returns y-component of rotational displacement at a node. |
|
Returns z-component of rotational displacement at a node. |
|
X-coordinate of line |
|
Y-coordinate of line |
|
Z-coordinate of line |
|
X-slope of line |
|
Y-slope of line |
|
Z-slope of line |
|
Returns selection status of a node. |
|
Returns selection status of a keypoint. |
|
Returns selection status of a line. |
|
Returns selection status of an area. |
|
Returns selection status of an element. |
|
Returns selection status of a volume. |