post traitement
post traitement
(OP)
Hi,
i have a python script for abaqus model.Now i want to add at this script a post traitement to obtain the curve (force/displacement).
NB:in my model i have tow part,so i can't utlise this example 'xy0 = XYDataFromHistory(odb=odb,outputVariableName='Reaction force: RF3 at Node 1 in NSET NODE_BOUNDARY',steps=('Static_definition', ), suppressQuery=True) '
thanks!!
i have a python script for abaqus model.Now i want to add at this script a post traitement to obtain the curve (force/displacement).
NB:in my model i have tow part,so i can't utlise this example 'xy0 = XYDataFromHistory(odb=odb,outputVariableName='Reaction force: RF3 at Node 1 in NSET NODE_BOUNDARY',steps=('Static_definition', ), suppressQuery=True) '
thanks!!





RE: post traitement
RE: post traitement
import odbAccess
from abaqus import *
from abaqusConstants import *
session.Viewport(name='Viewport: 1', origin=(0.0, 0.0), width=275.579803466797,
height=177.84375)
session.viewports['Viewport: 1'].makeCurrent()
session.viewports['Viewport: 1'].maximize()
from viewerModules import *
from driverUtils import executeOnCaeStartup
executeOnCaeStartup()
odb=session.openOdb(name='cellule2015.odb')
session.viewports['Viewport: 1'].setValues(displayedObject=odb)
fichier = open("force.txt", "w") #créer le fichier
fichier.close() # Ferme le fichier
for j in verts # tu dois ici adapter en fonction de la façon dont tu as créer ton set
kk=odb.rootAssembly.instances['PART-1-1'].nodes[j] # cherche le noeud j du set
histPoint=odbAccess.HistoryPoint(node=kk) # convertir le noeud en point
RefPHistories=odb.steps['Step-1'].getHistoryRegion(point=histPoint) # lit les history output
force=RefPHistories.historyOutputs['RF3'] # selectionne les force des reactions
arrForce=[]
for dataPair in force.data :
arrForce.append(dataPair[1]) # sauvegarde dans un array
fichier = open("force.txt", "a")
fichier.write(" force noeud ")
fichier.write(str(j))
for fnoeud in range(1,len(arrForce)):
fichier.write(str(arrForce[fnoeud-1])) # Ecris les forces.
fichier.write(' ') # ecriture du symbole de séparations.
fichier.write("\n") # saute une ligne pour le prochain noeud.
fichier.close() # Ferme le fichier
RE: post traitement
You can request the reaction force and the displacement as history output in preprocessing. In postpreccessing you'll have then these xy (history) data. Then you can use a script to access those data and do whatever you want with them.
Or you access these data directly in A/CAE in postprocessing to create the force-vs-disp plot and export it into a .txt with the report functionality. Then you look into the .rpy file what the python command are of these action in the GUI.
What you have to do by yourself is learning python and how to use Python with Abaqus. The last thing is explained in the Abaqus Scripting Users Guide. There are also examples how to access history output.