Reputation: 77
I am trying to extract the Strain data from an obd file. I have found out that I can use these commandlines:
odb.steps[ stepname ].frames[-1].fieldOutputs['LE'].values[1].data[0]
odb.steps[ stepname ].frames[-1].fieldOutputs['LE'].values[1].data[1]
to access LE11 and LE22. But how do i get where these strains are located? In oher words; how do I get the coordinates associated with these values?
Kind regards, Theo
Upvotes: 1
Views: 1219
Reputation: 6989
It is actually more tedious than you would imagine. I'll just outline here:
assuming you have requested integration point field data, obtain element and integration point from
val=odb.steps[ stepname ].frames[-1].fieldOutputs['LE'].values[1]
lab=val.elementLabel
ip=val.integrationPoint
get the element and connectivity:
el=instance.getElementFromLabel(lab)
c=el.connectivity
then the nodal coordinates..
instance.getNodeFromLabel(c[0]).coordinates
finally you need to manually calculate the integration point coordinate from the nodal coordinates and your knowledge of the element type / shape function. If you want the deformed position you need to grab the nodal displacements and do that math as well.
Its a bit simpler if you request nodal average field values, but the same basic procedure.
Note depending on your output requests you can have both integration point and nodal data. In that case you need to check val.position
to see what type you have.
Upvotes: 1