Hi, all,
I'm quite sure we can use Python read displacement and load for certin node set from Abaqus odb result file and then plot X-Y data (That's all I need). I has been struggling for a whole week to find out a good solution. I've many resources out there but nothing has been worked out though. So, I wonder if anyone knows how to address this issue or even share me a link. I really appreciate it!
Thanks.
Aaron
Hi Aaron, I happened to
Hi, It is fairly
Hi,
It is fairly simple.
A simple way to learn python scripting for ABAQUS is by reading *.rpy files in your odb folder. Any operation that you do in ABAQUS Visulization module is stored in the file. You can read the file to get an idea on how to fetch and plot the data. Let me know if you have questions
Use this to fetch the nodal displacements and forces for the nodeset 'ALL NODES'
from abaqusConstants import *
from odbAccess import *
from math import *
import sys
path='<>'
odbfile='*.odb'
outputfile='*.dat'
odb=openOdb('%s/%s'%(path,odbfile))
file1 = open('%s/%s'%(path,outputfile),'w')
#-------------------------------------------------------------------------------
framelen=len(odb.steps['Step-1'].frames)
nodes=odb.rootAssembly.nodeSets[' ALL NODES']
#Displacement
disp=session.xyDataListFromField(odb=odb, outputPosition=NODAL, variable=(('U',NODAL, ((COMPONENT, 'U1'), (COMPONENT, 'U2'), )), ), nodeSets=(' ALL NODES', ))
force=session.xyDataListFromField(odb=odb, outputPosition=NODAL, variable=(('RF',NODAL, ((COMPONENT, 'RF1'), (COMPONENT, 'RF2'), )), ), nodeSets=(' ALL NODES', ))
you can write the data ito .dat file and open it in matlab using 'dlmread' and plot the data
In reply to Hi, It is fairly by brunda
Wow. It look very simple.
Wow. It look very simple. For the code you present here, is that mean "disp" and "force" will be wrote into dat. file? And if I'm only interested U3 for a specific set, called "V_dis" and RF3 for a set name "V_rea". How should I modify that.
Also, if I want to run this part in my Matlab code to call abaqus run this Python script. How should I do that.
Thanks for hinting me on this issue. Really appreciate it!
Aaron