×
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

Access labels of elements in specific element sets in odb with python

Access labels of elements in specific element sets in odb with python

Access labels of elements in specific element sets in odb with python

(OP)
Hello,

A few of the tet elements (2 specifically) in my model database have a volume near zero and cause my analysis submission to fail. An abaqus error message informs me that these elements have been placed in the element set ErrElemVolSmallNegZero.

I'd like to open the aborted job odb file and access the element labels so that I may delete them from my input file and resubmit using a python script.   

The area of the mesh that is faulty is not critical and has proven difficult to mesh without a few collapsed tetrahedrals.

I've attempted to access these bad elements with the following command:

openOdb(r'odbFilePath').rootAssembly.elementSets['ErrElemVolSmallNegZero'].elements

but while the erroneous element set exists it doesn't seem to contain any element label information. The object  doesn't seem to contain any members or keys.

When I open the odb file in the visualization module i can select the element set from the odb model tree, right click on it and "replace" to see the bad triangles. I can then do a tool>>query>>element to get the element label. This is great but I'd like to be able to automate this process using a python script.

I'd appreciate your help.  

RE: Access labels of elements in specific element sets in odb with python

(OP)
Just figured this out.

the object

openOdb(r'odbFilePath').rootAssembly.elementSets['ErrElemVolSmallNegZero'].elements

is a tuple.

Since the elementSet ErrElemVolSmallNegZero may contain elements from different parts abaqus needs two subscripts to identify each element it contains. The first for the part and the second for the actual element.

the object
openOdb(r'odbFilePath').rootAssembly.elementSets['ErrElemVolSmallNegZero'].elements[k][j]

is an OdbMeshElementArray object that does indeed contain a 'label' member which is easily accessed.

Hope I'm not talking to myself and this will help someone else out there.
 

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