Skip to main content

Python scripting

Submitted by villa7 on

Hello

I am reading an abaqus odb which is solved for 2 time steps 'step1' and 'step2' and i want to read  the output at every last frame of these steps.  further, I have written python script to find change in dispacement. I have written this code which works fine to capture delta displacement

f1=odb.steps['step1'].frames[-1].fieldOutputs['U']

f2=odb.steps['step2'].frames[-1].fieldOutputs['U']



deltaf=f2-f1



nstep = odb.Step(name='dfield', description='user defined results', domain= TIME, timePeriod=0)

nframe = nstep.Frame(incrementNumber=0, frameValue=0.0)

nfield = nframe.FieldOutput(name='U', description='user disp',type=VECTOR)

nfield.addData(field=deltaf)

odb.save()

 Now I want to do know change in vonMises stresses i.e i want to find out delta von-mises stress. I have written similar code but its not working.

f1=odb.steps['step1'].frames[-1].fieldOutputs['MISES']  this also gives error. Please help.

  

Mises is a member in the fieldOutput of 'S'. So, the scripts look like this:

fieldS1 = step1.frames[-1].fieldOutputs['S']

fieldS2 = step2.frames[-1].fieldOutputs['S']

deltaS = fieldS2 - fieldS1        *everything under 'S' are subracted. you can use deltaS.values[0].__members__ to check the accessable member.

deltaValues = deltaS.values

deltaValues[0].mises   **this will give you thedeltaMises.

Mon, 12/20/2010 - 23:26 Permalink