Random Vibration simulations are often used to assess an assembly's ability to withstand the vibrations in transportation. A Random Vibration analysis utilizes frequency and mode content from a preceding Modal analysis to perform a linear superposition over a spectrum of frequencies and power content defined via a Power Spectral Density (PSD) load. In most assembly models, bolted connections (that become BEAM188 elements by the solver) are typically used in place of 3D solid-meshed bolts in order to drive computational efficiency; in most analysis systems, i.e., Static or Transient Structural, Beam Probes are available to postprocess the reactions and stresses in Beam Connections. (In a previous article, we detailed how the Bolt Tools Add-On in Ansys Mechanical can be used to extract such reactions and stresses.) However, Beam Probes are not available to postprocess Beam Connection reactions and stresses from within a Random Vibration analysis. In this article, we will explain how PyAnsys DPF, from within Ansys Mechanical, is able to retrieve these items from the results file and export the results to a CSV file.
In a previous article, we investigated how to automatically create equivalent stress results objects using Python from within Mechanical for a simple bolted flange assembly.
Here, we will extend our analysis of the same bolted flange assembly with a Random Vibration analysis using the vertical PSD from MIL-STD-810H for common carrier US highway truck vibration:
In order to retrieve the results, we will utilize the Ansys Python Data Processing Framework (DPF) from within Ansys Mechanical (implemented in version 2024 R2). Pseudocode of the algorithm, typical of a DPF script, is as follows:
After running the script, the files are stored in the user_files folder as shown here:
For a Random Vibration analysis, multiple result sets are output, but only results set = 2 has useful information: the 1-sigma level results. Thus, one will simply filter the Set column = 2 to get the desired results. A snippet of the resulting CSV file is shown here (with more columns to right not shown):
The (Ansys 2024 R2) script that was demonstrated in this article provides an automated way to obtain reaction and stress results for Beam Connections that are not available in the Ansys Mechanical GUI for Random Vibration analyses. Additionally, the same script can obtain the results for Static and Transient Structural analysis systems. Using standard formulae, the stress resultants are also computed and included in the CSV output file. In conclusion, utilizing Ansys DPF from within Mechanical to automate repetitive tasks and/or retrieve data that are not available from within the Mechanical GUI is a powerful addition to one's simulation workflow.
Script and example output file.