Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Extraction of deflection values

Status
Not open for further replies.

sylesej

Mechanical
Jun 27, 2016
4
0
0
DK
I am trying to export my data from the .odb file for further processing. My approach looks something like this:
[tt]displacement = lastFrame.fieldOutputs['U'] #So far so good
fieldValues = displacement.values[/tt]
But when I now tries to access the values as shown in the Scripting users manual
[tt]print fieldValues.data[0][/tt]
I get the error
[tt]AttributeError: 'FieldValueArray' object has no attribute 'data'[/tt]
At this point I looked around a little and found that according to numpy fieldValues is an array with the shape [tt](424L,)[/tt]. However when I tries to access these values the answer is always
[tt]print fieldValues[113]
openOdb(r'C:/.../outputdatabase.odb').steps['Step-1'].frames[1].fieldOutputs['U'].values[113][/tt]
Which is not for much help.
I am able to plot and probe the values using the gui, so I know they are there. So, can you help me accessing my deflection values?
I also tried recording a macro with the gui where I probed for the values I wanted, but the probe part did not get recorded in the macro.
My model is a three dimensonal model, while the approach I have used is from the users manual and is based off a 2d model, so that might be one cause for the errors.
Alternative solutions are also welcome, I don't need the deflection values at all points, but it would be an advantage.
 
Replies continue below

Recommended for you

For [tt]print fieldValues[/tt] i recieve
[tt]'FieldValue object'[/tt] a lot of times. I'd guess once for every node but I haven't counted.
For [tt]print fieldValues.data[/tt] abaqus returns
[tt]AttributeError: 'FieldValueArray' object has no attribute 'data'[/tt] just like when I try to request a specific datapoint.
 
I found this post with a script accomplishing what I'm trying.
The only problem is that this is node based while I've tried, and made stresses work, in an element based method. But it should be possible to achieve my goal (objective function for optimisation) nonetheless.
However, I'm still wondering what I'm doing wrong, but the problem is no longer imminent for me.
Thanks for your help!
 
That sounds an awful lot like I shouldn't?
I am mostly concerned with reading both stresses and displacements in a fast and reliable way. It seems to me like reading the different outputs are not as simple as changing the argument in [tt]fieldOutputs['S'][/tt] between 'S' and 'U' which I would have expected. Do you know what the reason is for this?
 
Status
Not open for further replies.
Back
Top