Home > Back-end >  How to only animate the even frames in Abaqus?
How to only animate the even frames in Abaqus?

Time:08-24

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?

CodePudding user response:

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

CodePudding user response:

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()
  • Related