Distance Between Two Nodes – Lesson 4

How to output the distance or change in distance between two nodes in Ansys LS-DYNA® nonlinear dynamics structural simulation software?

The distance or change in distance between two nodes can be obtained with one of the following approaches.

1) *DEFINE_CURVE_FUNCTION can be employed as follows.

- Define a curve function that calculates the current distance between two nodes n1 and n2 as:
SQRT((CX(n2)-CX(n1))**2.+(CY(n2)-CY(n1))**2.+(CZ(n2)-CZ(n1))**2.)

- Define a curve function that calculates the initial (at t=0) distance between the two nodes as:
SQRT((CX(n2)-DX(n2)-CX(n1)+DX(n1))**2.+(CY(n2)-DY(n2)-CY(n1)+DY(n1))**2.+
(CZ(n2)-DZ(n2)-CZ(n1)+DZ(n2))**2.)

- Given the above two functions, define a curve function that calculates the change in distance. Assuming the curve id is 1 and 2 for the first and second curve function respectively, the change in distance can be calculated with the curve function:
LC1-LC2

The curve function value with respect to the time is written in the output file CURVOUT (*DATABASE_CURVOUT).

2) If a discrete spring element (*ELEMENT_DISCRETE, *SECTION_DISCRETE) is defined between the two nodes, the change in length of the spring is available in the output file DEFORC (*DATABASE_DEFORC).

3) In Ansys LS-PrePost® capability, the length or change in length between two nodes can be plotted with respect to the time using Element Tools > Measure > Dist N2N. The output time interval will be that of the binary database d3plot.