How do I calculate Axial Stress of LINK180 elements using PyDPF?
Axial Stress of LINK180 elements is stored as an ETABLE result, accessible via the Item "LS" which is not directly supported by DPF. This can however be reconstructed using the Axial Force on the Link element and the cross section area, both of those are available as SMISC and NMISC results in the RST respectively.
Below is an example code:
from ansys.dpf import core as dpf dpf.start_local_server(ansys_path=r"C:\Program Files\ANSYS Inc\v252") rst_path = r"D:\…\LINK180\link180_files\dp0\SYS\MECH\file.rst" model = dpf.Model(rst_path) ds = dpf.DataSources(rst_path) fx = dpf.operators.result.smisc(data_sources=ds, item_index=1) area = dpf.operators.result.nmisc(data_sources=ds, item_index=29) sx = dpf.operators.math.component_wise_divide_fc(fields_containerA=fx, fields_containerB=area).eval() print(sx[0])