0

I'm working on thermal simulations in Abaqus. I only need to animate the even frame numbers, so instead of the animation going 1,2,3,4,5 I need it to go 2,4,6,8,10. Is there a way to only show the even frames? If so, how?

Redsan16
  • 45
  • 4

3 Answers3

1

Go to Result --> Active Steps/Frames and deselect the frames that you don't want to be displayed and animated.

FEA-eng
  • 106
  • 6
  • Thanks for the answer, the only thing is that there are 560 steps in the results. This rules manual deselection of frames pretty much out. Especially if I want even more simulation steps in the future – Redsan16 Aug 19 '22 at 09:25
0

You can easily do this using Abaqus Python script.
Following is the overview of steps:

# getting current viewport object
vpName = session.currentViewportName
viewport = session.viewports[vpName]

# get odb object from viewport
odb= viewport.displayedObject

# Get all the steps available in the odb
stepNames = odb.steps.keys()

# Create animation object
ani = session.ImageAnimation(fileName='animation' ,format=AVI)

# add required frame to the animation object
for stepName in stepNames:
    stpID = odb.steps[stepName].number - 1
    nfrm = len(odb.steps[stp].frames)
    for frmID in range(0, nfrm, 2): # 2 --> even frames will be added
        viewport.odbDisplay.setFrame(step=stpID,frame=frmID)
        ani.writeFrame(canvasObjects=(viewport, ))
ani.close()
Satish Thorat
  • 584
  • 1
  • 5
  • 13
0

This is a short script that does what you want for all steps in the current Odb:

odbName=session.viewports.values()[0].odbDisplay.name

steps = session.odbData[odbName].steps
for step_key in steps.keys():
    num_frames = len(steps[step_key].frames)
    even_frames = tuple([i for i in range(0, num_frames, 2)])
    session.odbData[odbName].setValues(activeFrames=((step_key, even_frames), ))
Mike
  • 191
  • 7