I am attempting to extract the result data in the ODB file using a Python script, perform mathematical operations on the result data, and store the newly generated data as a new field variable in a frame. I have successfully completed these and stored them as a new field variable.
Following is my python sccript:
import odbAccess from abaqusConstants import * myOdb = odbAccess.openOdb(path=r"F:\abaqus project\test.odb", readOnly=False) myFrames = myOdb.steps["Step-1"].frames fieldoutput0 = myFrames[0].fieldOutputs myField0 = fieldoutput0["SDV6"] fieldoutput1 = myFrames[1].fieldOutputs myField1 = fieldoutput1["SDV6"] fieldoutput7 = myFrames[7].fieldOutputs myField7 = fieldoutput7["SDV6"] fieldoutput8 = myFrames[8].fieldOutputs myField8 = fieldoutput8["SDV6"] deltaD1 = myField1-myField0 deltaD2 = myField8-myField7 Num = 10 deltaDamage = deltaD2+(deltaD2-deltaD1)*Num/2 Damage = myField8+(deltaD2+deltaDamage)*Num/2 newField = myFrames[10].FieldOutput(name='TD',description='modified total damage',type=SCALAR) newField.addData(field=Damage) myOdb.close()
Then I want to use this frame(frame 10) as the starting frame for the restart calculation. The current problem is that I need to use the UMAT subroutine in my calculation. How can I call this new field variable in the subroutine?
When I directly used the name of this field variable in the UMAT subroutine, the result seemed not to have been successfully input into the subroutine.
Part of my UMAT subroutines are listed below:
egyn=props(1) egyt=props(2) deltn=props(3) delts=props(4) t=props(5) r=props(6) fk=props(7) xi=props(8) Dtt_old=TD !How can I call the new field variable? Smax0=egyn/deltn Smax=(1-Dtt_old)*Smax0
Thank you very much,
Pengcheng Xue