{"id":165120,"date":"2023-03-17T08:59:28","date_gmt":"2023-03-17T08:59:28","guid":{"rendered":"\/knowledge\/forums\/topic\/how-to-output-the-distance-or-change-in-distance-between-two-nodes-in-ls-dyna\/"},"modified":"2023-07-31T12:30:38","modified_gmt":"2023-07-31T12:30:38","slug":"how-to-output-the-distance-or-change-in-distance-between-two-nodes-in-ls-dyna","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-output-the-distance-or-change-in-distance-between-two-nodes-in-ls-dyna\/","title":{"rendered":"How to output the distance or change in distance between two nodes in LS-DYNA?"},"content":{"rendered":"<p>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.  &#8211; 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.)  &#8211; 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.)  &#8211; 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 LS-PrePost, 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.<\/p>\n","protected":false},"template":"","class_list":["post-165120","topic","type-topic","status-publish","hentry","topic-tag-ls-dyna","topic-tag-ls-dyna-suite","topic-tag-lsdyna","topic-tag-r13-x","topic-tag-structural-mechanics"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_last_active_time":["3\/15\/2023 20:20"],"_bbp_forum_id":["27789"],"_bbp_author_ip":["23.56.168.180"],"_btv_view_count":["4990"],"siebel_km_number":["2067335"],"product_version":["R13.x"],"km_published_date":["2022-03-08T00:00:00.000Z"],"family":["Structural Mechanics"],"application_name":["LS-DYNA Suite"]},"test":"articlesansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/165120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/165120\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=165120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}