##############################################################
## Extract Deformation Modes from Linear Buckling Analysis
## https://anning003.com/print-buckling-modes/
##############################################################
from abaqus import *
from abaqusConstants import *
session.Viewport(name='Viewport: 1', origin=(0.0, 0.0), width=222.166656494141,
height=132.252319335938)
session.viewports['Viewport: 1'].makeCurrent()
session.viewports['Viewport: 1'].maximize()
from caeModules import *
from driverUtils import executeOnCaeStartup
executeOnCaeStartup()
session.viewports['Viewport: 1'].partDisplay.geometryOptions.setValues(
referenceRepresentation=ON)
odb = session.openOdb(name=jobName + '.odb')
session.viewports['Viewport: 1'].setValues(displayedObject=odb)
session.viewports['Viewport: 1'].view.fitView()
session.viewports['Viewport: 1'].odbDisplay.commonOptions.setValues(
visibleEdges=FREE, deformationScaling=UNIFORM, uniformScaleFactor=0.4)
session.viewports['Viewport: 1'].viewportAnnotationOptions.setValues(triad=OFF,
legend=OFF, title=OFF, state=OFF, annotations=OFF, compass=OFF)
session.viewports['Viewport: 1'].odbDisplay.display.setValues(plotState=(
DEFORMED, ))
session.pngOptions.setValues(imageSize=(4096, 1818))
session.printOptions.setValues(vpDecorations=OFF)
for i in range(1,11,1):
session.viewports['Viewport: 1'].odbDisplay.setFrame(step=0, frame=i)
session.printToFile(fileName='Mode_' + str(i), format=PNG, canvasObjects=(
session.viewports['Viewport: 1'], ))
odb.close()