Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Abaqus script for creating a video

Status
Not open for further replies.

friedmind

Mechanical
Feb 10, 2009
10
0
0
AR
I need to automatize a video creation process using a python script. I have a odb and need to create a script capable of:
- Define common plot options and Contour plot options
- Define active frames
- Animate time history
- Save image animation

I have little experience with abaqus scripting. Has anyone done anything similar with python scripts or have any examples I can take a look at?

Thank you in advance.
matias
 
Replies continue below

Recommended for you

I've obtained a solution from another Abaqus group. I paste it here in case someone else find it useful:

---------------------------------------------

This should be relativley straight forward. Just click the appropriate buttons to do what you want, then look in the *.rpy file. It should have the code that you can modify for your needs. Below is an example

o3 = session.openOdb(name='C:/Scratch/Job-1.odb')
session.viewports['Viewport: 1'].setValues(displayedObject=o3)
session.viewports['Viewport: 1'].odbDisplay.display.setValues(plotState=(
UNDEFORMED, ))
session.viewports['Viewport: 1'].odbDisplay.display.setValues(plotState=(
CONTOURS_ON_DEF, ))
session.viewports['Viewport: 1'].odbDisplay.contourOptions.setValues(
numIntervals=10, outsideLimitsAboveColor='#FF0000',
outsideLimitsBelowColor='#0000FF', maxAutoCompute=OFF, maxValue=80000,
minAutoCompute=OFF, minValue=40000)
session.animationController.animationOptions.setValues(
timeHistoryMode=TIME_BASED, minTimeAutoCompute=True,
maxTimeAutoCompute=True)
session.animationController.setValues(animationType=TIME_HISTORY, viewports=(
'Viewport: 1', ))
session.animationController.play(duration=UNLIMITED)
session.animationController.setValues(animationType=NONE)
session.animationController.setValues(animationType=TIME_HISTORY, viewports=(
'Viewport: 1', ))
session.animationController.play(duration=UNLIMITED)
session.imageAnimationOptions.setValues(vpDecorations=ON, vpBackground=OFF,
compass=OFF, timeScale=1, frameRate=20)
session.writeImageAnimation(fileName='Video', format=AVI, canvasObjects=(
session.viewports['Viewport: 1'], ))
session.animationController.setValues(animationType=NONE)
 
Status
Not open for further replies.
Back
Top