AJFR
Bioengineer
- May 1, 2014
- 4
Hello All,
I want to obtain Mises stress values from ODB through Python for shell elements.
When I read values of Mises for a given element in visualization mode by creating XY data out of field output directly in visualization, I get TWO values for each element. One is for the top thickness integration point and the other for the bottom integration point (S Mises SP:1 and SP:5, SP being section point. By default you have 5 integ. point in thickness of shell element if you use Simpson method though you can increase this number).
These two values are close but not identical (as expected. Thickness is minute but not zero). I need to know both of them.
However, when I try to use Python to print out the Mises values for Elements, it just gives me the Mises Stress at the last Integration point (SP:5) for all elements. Therefore, due to my geometry, I can not compare stresses of different elements just by SP:5 Mises. The reason is that on top elements, stress at SP:5 is higher than the bottom SP:1. On bottom elements its the opposite.
Anyways, below is a draft of a simple script that I use (Its basic but does the job. I am somehow beginner in Python).
Any Idea much appreciated what I should add to the code to bring up Mises for both SP:1 and SP:5 separately or at least their average me an average of both and not just one of them?
odb = session.odbs[session.odbs.keys()[0]]
lastStep = odb.steps[odb.steps.keys()[-1]]
lastFrame = lastStep.frames[-1]
stress = lastFrame.fieldOutputs['S']
for s in stress.values:
print s.elementLabel, s.mises
Many thanks in advance....
A
I want to obtain Mises stress values from ODB through Python for shell elements.
When I read values of Mises for a given element in visualization mode by creating XY data out of field output directly in visualization, I get TWO values for each element. One is for the top thickness integration point and the other for the bottom integration point (S Mises SP:1 and SP:5, SP being section point. By default you have 5 integ. point in thickness of shell element if you use Simpson method though you can increase this number).
These two values are close but not identical (as expected. Thickness is minute but not zero). I need to know both of them.
However, when I try to use Python to print out the Mises values for Elements, it just gives me the Mises Stress at the last Integration point (SP:5) for all elements. Therefore, due to my geometry, I can not compare stresses of different elements just by SP:5 Mises. The reason is that on top elements, stress at SP:5 is higher than the bottom SP:1. On bottom elements its the opposite.
Anyways, below is a draft of a simple script that I use (Its basic but does the job. I am somehow beginner in Python).
Any Idea much appreciated what I should add to the code to bring up Mises for both SP:1 and SP:5 separately or at least their average me an average of both and not just one of them?
odb = session.odbs[session.odbs.keys()[0]]
lastStep = odb.steps[odb.steps.keys()[-1]]
lastFrame = lastStep.frames[-1]
stress = lastFrame.fieldOutputs['S']
for s in stress.values:
print s.elementLabel, s.mises
Many thanks in advance....
A