Hi,
I have a model that contains two parts, and I would like to write field output report for one part only by a python script.
I tried the following but didn't work.
Thanks in advance for your help,
Farah
Abaqus
from abaqus import *
from abaqusConstants import *
session.Viewport(name='Viewport: 1', origin=(0.0, 0.0), width=300.557281494141,
height=229.28889465332)
session.viewports['Viewport: 1'].makeCurrent()
session.viewports['Viewport: 1'].maximize()
from viewerModules import *
from driverUtils import executeOnCaeStartup
executeOnCaeStartup()
odbName='AAA.odb'
o2 = session.openOdb(name='AAA.odb')
session.viewports['Viewport: 1'].setValues(displayedObject=o2)
odb = session.odbs['C:/Users/22650254/Desktop/Patient1_high_quality/BioPARR/AAA.odb']
session.viewports['Viewport: 1'].odbDisplay.basicOptions.setValues(
computeOrder=EXTRAPOLATE_AVERAGE_COMPUTE)
session.fieldReportOptions.setValues(printTotal=OFF, printMinMax=OFF)
nf = NumberFormat(numDigits=6, precision=0, format=ENGINEERING)
session.fieldReportOptions.setValues(numberFormat=nf)
# get access to the nodal displacement data
frame = o2.steps[ 'Pressure' ].frames[-1]
# get access to the part instance -- thru which u can access the undeformed nodal position coordinates
my_part_instance = o2.rootAssembly.instances['WALL1']
allNodes = my_part_instance.nodeSets['ALLNODES']
numNodesTotal = len(allNodes.nodes)
# Extrapolate stresses at nodes
session.odbData[odbName].setValues(activeFrames=(('Pressure', (-1, )), ))
xyData = session.xyDataListFromField(odb=o2, outputPosition=NODAL, variable=(('S',
INTEGRATION_POINT, ( (INVARIANT, 'Max. Principal'), )), ),
nodeSets=('WALL1.ALLNODES', ))
session.writeFieldReport(fileName='test.dat')