Shindey
Geotechnical
- Dec 29, 2010
- 39
I have a model wherein I have 92 cases of Linear Perturbation Static steps.
Each step produces a map of Von Mises Stresses S.
I want a composite map , showing the Max Von Mises Stresses over all the 92 steps.
I used toolset "create field outputs from frames " in the vsiualization mode.
There are foloowing troubles Iam having.
Inputting all 92 steps was time consuming, so I input about 5 steps, and then checked out the abaqus.rpy file.
It looks like this :
"
#: ---- Creating Field Output From Frames ----
odbFullPath = 'C:/Temp/2019_04_20Rev1.odb'
frames_in_step_0=session.odbs[odbFullPath].steps['LCMB1101 _C'].frames
frames_in_step_1=session.odbs[odbFullPath].steps['LCMB1102 _C'].frames
frames_in_step_2=session.odbs[odbFullPath].steps['LCMB1103 _C'].frames
frames_in_step_3=session.odbs[odbFullPath].steps['LCMB1104 _C'].frames
frames_in_step_4=session.odbs[odbFullPath].steps['LCMB1106 _C'].frames
s0f1_S=frames_in_step_0[1].fieldOutputs['S']
s1f1_S=frames_in_step_1[1].fieldOutputs['S']
s2f1_S=frames_in_step_2[1].fieldOutputs['S']
s3f1_S=frames_in_step_3[1].fieldOutputs['S']
s4f1_S=frames_in_step_4[1].fieldOutputs['S']
(tmpField_S, tmpIndex_S) = visualization.maxEnvelope([s0f1_S, s1f1_S, s2f1_S,
s3f1_S, s4f1_S], MISES)
sessionStep = session.scratchOdbs[odbFullPath].steps['Session Step']
sessionLC = sessionStep.LoadCase(name='MaxVonMises')
sessionFrame = sessionStep.Frame(loadCase=sessionLC,
description='Load Case: MaxVonMises; The maximum value over all selected frames')
sessionField = sessionFrame.FieldOutput(name='S_max',
description='Stress components (maximum envelope) using Mises',
field=tmpField_S)
sessionField = sessionFrame.FieldOutput(name='S_max_Index',
description='Indices into list of S fields selected for maximum envelope',
field=tmpIndex_S)
#: ---- End of Creating Field Output From Frames ----
"
If I try to run this as a python script I get an error
NameError: name 'visualization' is not defined referring to line
(tmpField_S, tmpIndex_S) = visualization.maxEnvelope([s0f1_S, s1f1_S, s2f1_S,
s3f1_S, s4f1_S], MISES)
Can someone help me wityh this. If I can make it work, then I intend to write a python script to generate session step tp show max envelope of Von Mises Stresses
Each step produces a map of Von Mises Stresses S.
I want a composite map , showing the Max Von Mises Stresses over all the 92 steps.
I used toolset "create field outputs from frames " in the vsiualization mode.
There are foloowing troubles Iam having.
Inputting all 92 steps was time consuming, so I input about 5 steps, and then checked out the abaqus.rpy file.
It looks like this :
"
#: ---- Creating Field Output From Frames ----
odbFullPath = 'C:/Temp/2019_04_20Rev1.odb'
frames_in_step_0=session.odbs[odbFullPath].steps['LCMB1101 _C'].frames
frames_in_step_1=session.odbs[odbFullPath].steps['LCMB1102 _C'].frames
frames_in_step_2=session.odbs[odbFullPath].steps['LCMB1103 _C'].frames
frames_in_step_3=session.odbs[odbFullPath].steps['LCMB1104 _C'].frames
frames_in_step_4=session.odbs[odbFullPath].steps['LCMB1106 _C'].frames
s0f1_S=frames_in_step_0[1].fieldOutputs['S']
s1f1_S=frames_in_step_1[1].fieldOutputs['S']
s2f1_S=frames_in_step_2[1].fieldOutputs['S']
s3f1_S=frames_in_step_3[1].fieldOutputs['S']
s4f1_S=frames_in_step_4[1].fieldOutputs['S']
(tmpField_S, tmpIndex_S) = visualization.maxEnvelope([s0f1_S, s1f1_S, s2f1_S,
s3f1_S, s4f1_S], MISES)
sessionStep = session.scratchOdbs[odbFullPath].steps['Session Step']
sessionLC = sessionStep.LoadCase(name='MaxVonMises')
sessionFrame = sessionStep.Frame(loadCase=sessionLC,
description='Load Case: MaxVonMises; The maximum value over all selected frames')
sessionField = sessionFrame.FieldOutput(name='S_max',
description='Stress components (maximum envelope) using Mises',
field=tmpField_S)
sessionField = sessionFrame.FieldOutput(name='S_max_Index',
description='Indices into list of S fields selected for maximum envelope',
field=tmpIndex_S)
#: ---- End of Creating Field Output From Frames ----
"
If I try to run this as a python script I get an error
NameError: name 'visualization' is not defined referring to line
(tmpField_S, tmpIndex_S) = visualization.maxEnvelope([s0f1_S, s1f1_S, s2f1_S,
s3f1_S, s4f1_S], MISES)
Can someone help me wityh this. If I can make it work, then I intend to write a python script to generate session step tp show max envelope of Von Mises Stresses