Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Challenges reading from ODB

Status
Not open for further replies.

moose613

Mechanical
Sep 7, 2014
3
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

 
Replies continue below

Recommended for you

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)
 
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
 
I create a list to store what I want to write to file, then use numpy.savetxt to write it to the file.
 
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?
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor