I am developing a script that can assign the highest density material property of adjacent elements to an element for surface elements.
However, I am having trouble computationally writing a script that is fast enough. I have over 200,000 elements and I believe my approach is computationally inefficient.
Right now, this is the process of my script:
- Import Abaqus script that has material sets, sections, and sets of elements set up already.
- The material IDs and set IDs are named in the order highest to lowest density.
- Find the assigned material property of a set through sections.
- Find elements and adjacent elements and store in a dictionary.
- Assign each element in a dictionary its material ID and set ID.
- Determine from the surface elements which element has the highest density by checking its dictionary material ID value.
- Then use its set ID to have the target element's set ID remove and assigned to that ID, which correlates to the highest density.
I understand this is a very computationally expensive process but I have been unable to figure this out.
As far as I tried, I have been unable to find an elegant way to find the material property associated with each element, so I have to go through a convoluted method.
If anyone has an idea of how to tackle this