Introduction
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.
Example Model
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.
Boundary Conditions and User-defined Coordinate System
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.
Result Tracker, Binout Trackers, and Time History Output Controls
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:
![]() |
![]() |
![]() |
![]() |
![]() |
Directional Deformation Results Objects
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:
![]() |
![]() |
Python Script
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.
Pseudocode
The basic algorithm is as follows:
- Get the direction vectors of the user-defined coordinate system and create a transformation matrix.
- For the analysis, get the current model units and desired units for the spreadsheet output.
- Record the data from the Directional Deformation Results Trackers, checking that the correct coordinate system is chosen and adjusting if necessary.
- Compute the total deformation.
- Read each of the Binout Trackers and store the results in a dictionary. If a Binout Tracker is filtered, then use the filtered values, and linearly interpolate to align the output times to the Directional Deformations.
- Create Vector3D objects to store the force components and transform them to the user-defined coordinate system directions.
- Place rection forces in both global coordinates and transformed coordinates, time, and directional deformation components in a dictionary and write to .csv file.
- Create line chart of force magnitude versus total deformation.
User Configuration
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:
Script Output
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.
![]() |
![]() |
Conclusion
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.
Downloadable Content
2025 R1 and R2 Mechanical Script
Going Further
- Extend the script to create Binout Trackers, Directional Deformations, and obtain results for any number of desired force reactions in the same model.
- Contact Ozen Engineering for your Ansys scripting needs.
Ozen Engineering Expertise
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/
Aug 22, 2025 2:05:34 PM