Very often in structural simulations, the reaction force that results from an applied displacement or velocity boundary condition is desired. Moreover, it is often desirable to resolve the reaction force components with respect to a user-defined coordinate system. In this article, the process of retrieving and transforming reaction force components with respect to a user-defined coordinate system in Workbench (WB) LS-DYNA is detailed.
The example model that we utilize is that of a steel pin bonded into a steel block, rotated by a 30° angle about the global Y-axis, fixed at the base, and on which a prescribed displacement of 0.01 in normal to the face of the pin.
The following images show the orientation and boundary conditions:
The coordinate system named `Origin` is that about which the displacement is oriented and about which the reaction force will be transformed.
To obtain the reaction force for the applied displacement, WB LS-DYNA requires a Result Tracker and three Binout Trackers scoped to the faces(s) to which the displacement is applied, along with output of Nodal Interface Forces. Each Binout Tracker outputs a force component in one specific global coordinate direction, thus requiring scripting to transform the components into the desired output coordinate system direction. The following images show the definition of the Trackers and Time History Output Controls that output Nodal Interface Forces:
The final required objects are three Directional Deformation Results Objects, scoped to the same faces as the applied displacement/velocity, oriented with respect to the user-defined coordinate system, and grouped into a folder called `Directional Deformations` that distinguish them from other Directional Deformation Results Objects, scoped to other geometry. The following images illustrate the definition of the one in the X direction; the other two are similarly defined:
After the simulation is complete, the following Mechanical Script will be used to postprocess the reaction force, outputting its components to a .csv file in the project's `user_files` directory, and creating a plot for reaction force magnitude versus total deformation.
The basic algorithm is as follows:
At the top of the script, the user must specify several items: analysis number, user-defined coordinate system name, directional deformations results folder name, and desired output length and force units:
Once the script is completed, the Force Magnitude vs. Total Deformation Line Chart is created, and the spreadsheet output is stored in the project's `user_files` directory. The following images show the Line Chart and a snippet of the output spreadsheet. Note: At the time of this writing, when using Bin units, the force units in the Line Chart are not in lbf, but in slug-in/s^2.
In conclusion, Binout Tracker force reaction results in WB LS-DYNA are only output in global coordinate directions. Therefore, to transform them to user-defined directions or even compute the magnitude requires Python scripting from within Ansys Mechanical. However, as seen from the example in this article, it is straightforward to run the downloadable code as a Mechanical script to obtain the desired results.
2025 R1 and R2 Mechanical Script
Ozen Engineering Inc. leverages its extensive consulting expertise in CFD, FEA, optics, photonics, and electromagnetic simulations to achieve exceptional results across various engineering projects, addressing complex challenges such as antenna design, signal integrity, electromagnetic interference (EMI), and electric motor analysis using Ansys software.
We offer support, mentoring, and consulting services to enhance the performance and reliability of your electronics systems. Trust our proven track record to accelerate projects, optimize performance, and deliver high-quality, cost-effective results. For more information, please visit https://ozeninc.com.
If you want to learn more about our consulting services, please visit: https://www.ozeninc.com/consulting/
CFD: https://www.ozeninc.com/consulting/cfd-consulting/
FEA: https://www.ozeninc.com/consulting/fea-consulting/
Optics: https://www.ozeninc.com/consulting/optics-photonics/
Photonics: https://www.ozeninc.com/consulting/optics-photonics/
Electromagnetic Simulations: https://www.ozeninc.com/consulting/electromagnetic-consulting/
Thermal Analysis & Electronics Cooling: https://www.ozeninc.com/consulting/thermal-engineering-electronics-cooling/