I am trying to know a material name from its'part instance' of ABAQUS ODB file. As of now i know how to get the particular instance name, I put the code below. Please let me know how to access it. I have gone through abaqus scripting guide manual but i was not able to find out. The thing is that we may input numerable materials property names in Model Data Base(mdb)file but do not assign it to the materials. So we can get what we want easily by accessing the ODB FILE.
instance1 = odb.rootAssembly.instances['instance_name']
Thank you for your time in advance
In Abaqus, in order to use a material, you must do the following:
Therefore, to retrieve all materials assigned to any part of an instance, you need to:
Section assignments can exist on assembly, part, and instance levels. Since you are talking about instances, I'm going to concentrate on that.
odb = session.odbs[yourOdbName]
root_assembly = odb.rootAssembly
sections = odb.sections
instance_name = 'yourInstanceName'
section_assignments = root_assembly.instances[instance_name].sectionAssignments
materials = []
for section_assignment in section_assignments:
section_name = section_assignment.sectionName
section = sections[section_name]
materials.append(section.material)
The list materials
should now contain the materials you are looking for.
For more details on scripting access to these objects, consult chapters "44.1 SectionAssignment object" and "46.1 Section object" in the Abaqus 6.14 documentation; or the appropriate chapters from the Abaqus version you are using.