我正在使用Abaqus(6.13)运行python脚本,我编写了一个循环以在每次交互中提交Job,在Job成功完成后,我使用功能“ xyDataListFromField”在两个唯一节点上创建了xy数据。最初它运行良好,但是在第二次报告中报告了错误消息。
while math.fabs(temp2[3]-temp[3])>0.001:
mdb.models['Beam'].ConcentratedForce(name='MyLoad', createStepName='Step-1', region=region3,cf1=temp[0], cf2=temp[1],
cf3=temp[2], distributionType=UNIFORM, field='', localCsys=None)
JobName='Job-'+str(i)+str(name_num)
mdb.Job(name=JobName, model='Beam', description='', type=ANALYSIS,
atTime=None, waitMinutes=0, waitHours=0, queue=None, memory=90,
memoryUnits=PERCENTAGE, getMemoryFromAnalysis=True,
explicitPrecision=SINGLE, nodalOutputPrecision=SINGLE, echoPrint=OFF,
modelPrint=OFF, contactPrint=OFF, historyPrint=OFF, userSubroutine='',
scratch='', multiprocessingMode=DEFAULT, numCpus=1, numGPUs=0)
mdb.jobs[JobName].submit(consistencyChecking=OFF)
mdb.jobs[JobName].waitForCompletion()
session.mdbData.summary()
o3 = session.openOdb(name='E:/Graduation/WokrDirectory/'+JobName+'.odb')
session.viewports['Viewport: 1'].setValues(displayedObject=o3)
session.viewports['Viewport: 1'].odbDisplay.display.setValues(plotState=(
DEFORMED, ))
session.viewports['Viewport: 1'].odbDisplay.display.setValues(plotState=(
CONTOURS_ON_DEF, ))
session.viewports['Viewport: 1'].odbDisplay.setPrimaryVariable(
variableLabel='U', outputPosition=NODAL, refinement=(INVARIANT,
'Magnitude'), )
session.viewports['Viewport: 1'].viewportAnnotationOptions.setValues(
triadFont='-*-verdana-medium-r-normal-*-*-140-*-*-p-*-*-*',
legendFont='-*-verdana-medium-r-normal-*-*-140-*-*-p-*-*-*',
titleFont='-*-verdana-medium-r-normal-*-*-140-*-*-p-*-*-*',
stateFont='-*-verdana-medium-r-normal-*-*-140-*-*-p-*-*-*')
print '**',Position+1, Position_2+1
print JobName
odb = session.odbs['E:/Graduation/WokrDirectory/'+JobName+'.odb']
session.xyDataListFromField(odb=odb, outputPosition=NODAL, variable=(('U',
NODAL), ), nodeLabels=(('BEAMINSTANCE-1', (Position+1, Position_2+1,)), ))
x0 = session.xyDataObjects['U:Magnitude PI: BEAMINSTANCE-1 N: ' + str(Position+1)]
x1 = session.xyDataObjects['U:U1 PI: BEAMINSTANCE-1 N: ' + str(Position+1)]
x2 = session.xyDataObjects['U:U2 PI: BEAMINSTANCE-1 N: ' + str(Position+1)]
x3 = session.xyDataObjects['U:U3 PI: BEAMINSTANCE-1 N: ' + str(Position+1)]
deformation=math.fabs(x3[len(x3)-1][1]*(-1))
print deformation
if ContactPoints[i][0]==5:
deformation_2=0.0
else:
x00 = session.xyDataObjects['U:Magnitude PI: BEAMINSTANCE-1 N: ' + str(Position_2+1)]
x11 = session.xyDataObjects['U:U1 PI: BEAMINSTANCE-1 N: ' + str(Position_2+1)]
x22 = session.xyDataObjects['U:U2 PI: BEAMINSTANCE-1 N: ' + str(Position_2+1)]
x33 = session.xyDataObjects['U:U3 PI: BEAMINSTANCE-1 N: ' + str(Position_2+1)]
deformation_2=math.fabs(x33[len(x33)-1][1]*(-1))
print deformation_2
del session.xyDataObjects['U:Magnitude PI: BEAMINSTANCE-1 N: ' + str(Position+1)]
del session.xyDataObjects['U:U1 PI: BEAMINSTANCE-1 N: ' + str(Position+1)]
del session.xyDataObjects['U:U2 PI: BEAMINSTANCE-1 N: ' + str(Position+1)]
del session.xyDataObjects['U:U3 PI: BEAMINSTANCE-1 N: ' + str(Position+1)]
del session.xyDataObjects['U:Magnitude PI: BEAMINSTANCE-1 N: ' + str(Position_2+1)]
del session.xyDataObjects['U:U1 PI: BEAMINSTANCE-1 N: ' + str(Position_2+1)]
del session.xyDataObjects['U:U2 PI: BEAMINSTANCE-1 N: ' + str(Position_2+1)]
del session.xyDataObjects['U:U3 PI: BEAMINSTANCE-1 N: ' + str(Position_2+1)]
# delt_d=(deformation-deformation_2)/(CurrentContactPoint[0]-mid_Point[0])
Cut_F=cuttingForce(ContactPoints[i][:],ContactPoints[i+1][:],deformation,deformation_2)
print Cut_F
temp2=temp
temp=Cut_F
name_num=name_num+1
o3.close()
del mdb.jobs[JobName]