Hello everyone, I am working on python Scripting in ABAQUS. I wanted to know the displacements of all the nodes pertaining to just a particular nodeset(PU-NODES-FATIGUE).
I try to access it by writing the following code but encountered an error saying
"keyError : PU-NODES-FATIGUE".
I tried to even change the name to different set so as to check the output but it is still the same error. It would be very greatful if anyone can throw some light on this. Thank you in advance.
The entire code :
from odbAccess import *
from abaqusConstants import *
step1 = odb.steps.values()[0]
lastFrame = odb.steps['Step-1'].frames[-1] displacement=lastFrame.fieldOutputs['U']
>>> print 'Node sets = ',odb.rootAssembly.nodeSets.keys()
Node sets = [' ALL NODES', 'BC-PU-SYM-Z', 'PU-NODES-FATIGUE', 'SET-8']
fatigue = odb.rootAssembly.instances['PU-1'].nodeSets[' PU-NODES-FATIGUE ']
fatigueValues = fatigueDisplacement.values for v in fatigueValues: print v.nodeLabel, v.data
>>> fatigue = odb.rootAssembly.instances['PU-1'].nodeSets['PU-NODES-FATIGUE']
KeyError: PU-NODES-FATIGUE