×
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

Challenges reading from ODB

Challenges reading from ODB

Challenges reading from ODB

(OP)
Hi,

I am relatively new to using python with Abaqus, typically I will use the CAE GUI.

I am doing a large number of models, and need to use scripting to output E33 strain at unique nodes along a line.
In each model, there is a nodeset that contains the nodes along the line, and this nodeset is found in odb.rootAssembly.nodeSets['example_nodeset_name']

I would like the Z-coordinate and E33 strain written to an output file, for each node in the nodeset.

This is what I have so far:

strains = frame.fieldOutputs['E']
nodes = odb.rootAssembly.nodeSets['example_nodeset_name']
strain_at_nodes= strains.getSubset(region=nodes, position=NODAL)

outputFile = open('example_file_name.txt','w')
for k in range(len(strain_at_nodes)):
outputFile.write((strain_at_nodes[k]))
outputFile.close()


I know this doesnt work, but it should give an idea of what I am trying to achieve.
Any ideas as to how achieve my objectives would be greatly appreciated.

Cheers,

Moose

RE: Challenges reading from ODB

Having done something similar with nodal displacements, off the top of my head, my code reads something like this (along with the odb opening and such)

topnodes=odb.rootAssembly.instances['InstanceName'].nodeSets['NSETTOP']
results=odb.steps.values()[-1].frames[-1] # References the last frame of the last step
defs=results.fieldOutputs['U].getSubset(region=topnodes)

RE: Challenges reading from ODB

(OP)
Thats essentially what I have so far,but I am having problems.

so far:

step1 = odb.steps['Step-1']
frame = step1.frames[-1]
strains = frame.fieldOutputs['E']
nodes = odb.rootAssembly.nodeSets['example_nodeset_name']
strain_at_nodes= strains.getSubset(region=nodes, position=NODAL)

How can I output E33, node label, and z coordinate to an output file?

Thanks in advance

RE: Challenges reading from ODB

I create a list to store what I want to write to file, then use numpy.savetxt to write it to the file.

RE: Challenges reading from ODB

(OP)
So it seems that there arent any strain values saved for unique node locations.

Can anyone confirm whether is is possible to request nodal strains from abaqus, or do I need to get the strain at the integration points and then convert that to unique nodal?

RE: Challenges reading from ODB

I typically used the strain averaged at the nodes option when I write the strain values to a (.fil) file. If not, then I think you might have to use the integration points and then unravel it all later.

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