For a better description of my problem, I would like to present my script here.
from odbAccess import*
odb=openOdb(path='MembraneTest.odb', readOnly=True) #odb
step1=odb.steps['Loading'] #step
node1=odb.rootAssembly.instances['PART-2-1'].nodeSets['MEMBRANE_SIDEX']
outputFile=open('output.dat','w')
coordSys = odb.rootAssembly.DatumCsysByThreePoints(name='cylC',
coordSysType=CYLINDRICAL, origin=(-1000,-1000,0),
point1=(-999,-1000.0, 0), point2=(-1000.0, -999.0, 0.0) ) #coordinate
frameRepository=step1.frames #temporary variable to hold the frame repository
numFrames=len(frameRepository) #total frame number
for i in range(numFrames):
frame=frameRepository
u=frame.fieldOutputs['U'] #variable
u_at_node=u.getSubset(region=node1)
cylindricalDisp = u_at_node.getTransformedField(
datumCsys=coordSys)
Time=frame.frameValue
for uVal in cylindricalDisp.values:
outputFile.write('%1.1E\t'%Time)
outputFile.write('%E\n'%(uVal.data[0]))
outputFile.close()
odb.close()
the line of highlight can only be run for the first loop. It stops when it is being read again. Very strangely, sometimes, but at a very low chance, the computer managed to run through the whole loop, but most time it crashed. This is very frustrating as I need this script to work with tons of odb files. Can anybody give any suggestions?
Lang