Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Python script to obtain the Material name of each material in the Abaqus model

markusjbear

Mechanical
Mar 5, 2025
2
I have a model with many materials. ~10,000. I used lbf/in^3 for density and I need to convert it to Slugs/in^3.

I am working on a Python Script for Abaqus to change all 10,000 materials density. But Abaqus does not make it easy to change things unless you know the material name.

I would like to make a loop that goes through each material and changes the density. Could anyone help me with this loop to find the name of each material in the model?

Many Thanks,


Mark Warner
 
You should be able to get a list of all the material names via:

Python:
material_names = mdb.models['ModelName'].materials.keys()
 
Many thanks. That is what I needed.

Now I need to read the current value for the density. I am having a hard time finding a read values function. Do you know how to the current values? I have only found how to set the values.

Again, Thank you for your help.
 
Please delete this thread and post in the appropriate forum; there is an Abaqus forum for questions like this
 

Part and Inventory Search

Sponsor