Use the following command to retrieve the example script: abaqus fetch job=compDispMagHist The fetch command also retrieves an input file that you can use to generate the output database that is read by the example script. # HistoryOutput operators example problem.
#
# Compute magnitude of node displacement history from
# displacement components and scale relative to given
# allowable displacement.
#
from odbAccess import *
#
# get historyRegion for the node in nodeSet TIP
#
odb = openOdb(path='compDispMagHist.odb')
endSet = odb.rootAssembly.instances['BEAM-1-1'].nodeSets['TIP']
histPoint = HistoryPoint(node=endSet.nodes[0])
tipHistories = odb.steps['Step-2'].getHistoryRegion(
point=histPoint)
#
# Compute and scale magnitude.
#
maxAllowableDisp = 5.0
sum = 0
componentLabels = ('U1', 'U2', 'U3')
for name in componentLabels:
sum = sum + power(tipHistories.historyOutputs[name], 2.0)
sum = sqrt(sum) / maxAllowableDisp
#
# Print magnitude.
#
print('History:', sum.name)
print('Time Magnitude')
for dataPair in sum.data:
print("%5.4f %5.2f"%(dataPair[0], dataPair[1]))
|