×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Abaqus script for creating a video

Abaqus script for creating a video

Abaqus script for creating a video

(OP)
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

RE: Abaqus script for creating a video

(OP)
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)  

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources