- Query.lsz(n, lfrac)¶
Z-slope of line
nat length fraction
Fetches Z-slope of line
lfractimes the line length along the line.
0. <= lfrac <= 1.. This is equivalent to the rate of change of the z-coordinate with respect to the change of line length.
n (int) – The line number of the line to be considered.
lfrac (float) – The fraction of the length of the line along which to enquire.
0. <= lfrac <= 1.
- Return type
float – The Z-slope.
Here we construct a line between the coordinates
(0, 0, 0)and
(1, 2, 2)then find the Z-slope halfway along the line.
>>> from ansys.mapdl.core.inline_functions import Query >>> from ansys.mapdl.core import launch_mapdl >>> mapdl = launch_mapdl() >>> mapdl.prep7() >>> k0 = mapdl.k(1, 0, 0, 0) >>> k1 = mapdl.k(2, 1, 2, 2) >>> l0 = mapdl.l(k0, k1) >>> q = Query(mapdl) >>> q.lsz(l0, 0.5) 0.6666666667