×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

sectionCategory vs Material
2

sectionCategory vs Material

sectionCategory vs Material

(OP)
I'm trying to extract the material assigned to a particular element (i.e. label # 100). It seems like a very simple command:

elementMaterial = odb.rootAssembly.instances['Part-1'].elements[99].sectionCategory.name

This works flawlessly when the instance has a single section assignment. However, when the instance has two section assignments (i.e. a part with weld overlay), the "section category name" extracted is incorrect (it grabs the other section's material). There are more ways to get to ".elements[#].sectionCategory.name" but they all yield the same result.

In this example, Section-1's elements are from 1 - 75 and Section-2's elements are from 76 - 125 so I can't see how it is grabbing the Section-1 material. The only thing i can think of is that there is a distinct difference between a material and a section category.

Is there a better way to get the material used by an element?

RE: sectionCategory vs Material

I made a simple test block with two materials and it worked fine. Both were solid section but with different materials. This is then shown in the name when I check two elements.

You can access the section assignments and get the regions (elements) used for them:
print session.odbs['Job-1.odb'].rootAssembly.instances['PART-1-1'].sectionAssignments[0].region.elements
In this case the 0 indicates the first section assignment and you can check if there are other.


You can check all existing section in the odb with these and ongoing commands:
print session.odbs['Job-1.odb'].sections
print session.odbs['Job-1.odb'].sectionCategories

RE: sectionCategory vs Material

(OP)
If I manually check the section assignments using:

print session.odbs['Job-1.odb'].rootAssembly.instances['PART-1-1'].sectionAssignments[0].region.elements[0].sectionCategory
print session.odbs['Job-1.odb'].rootAssembly.instances['PART-1-1'].sectionAssignments[1].region.elements[0].sectionCategory

it shows the same section category name for both sections. However, the CAE assembly/part and ODB show two different material names in the color coding.

I made the file in 6.11 and have been using it as a template. Could it just be something that got messed up in the conversion to 6.13?

RE: sectionCategory vs Material

(OP)
Nevermind on the version thing. I made a test block from scratch and I get the same issue. This block has two solid sections with two materials. Abaqus shows one material when I use:

print session.odbs['Job-1.odb'].sectionCategories

I've attached this simple block in case anyone wants to figure out what I'm doing wrong.

RE: sectionCategory vs Material

2
Ahh, now I see the issue. I've run your model and made a test with:

CODE -->

elems = session.odbs['Job-1.odb'].rootAssembly.instances['PART-1-1'].elements
for a in elems:
	print a.sectionCategory.name 

You are correct, the output is wrong. It always shows only the first section with the first material.

I had a look into the support database and found an old service request of a colleague. It seems that the 'wrong' behavior is made on purpose to reduce the size of the odb. Identical section categories are merged automatically to one when storing this information in the odb, even when the material within is different.
It is possible to deactivate that behavior with an environment setting in the abaqus_v6.env.

CODE -->

import os
os.environ['SECTION_DEF_MERGE'] = 'no' 

RE: sectionCategory vs Material

(OP)
I couldn't find the abaqus_v6.env file in my 2016 installation (it exists in my older installations though) so I made a new one in the current directory with only the code you mentioned. Works perfectly now!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources