How to only animate the even frames in Abaqus?

218 views Asked by At

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?

3

There are 3 answers

1
FEA-eng On

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

0
Satish Thorat On

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()
0
Mike On

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), ))