Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

post traitement

Status
Not open for further replies.

chourouk

Mechanical
Sep 15, 2016
41
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!!
 
Replies continue below

Recommended for you

Your description/question is very generic. It is impossible to help with these informations.
 
to obtain the curve force/displacement i need to add at my script a post traitement but i don't know how can i writ this post and i don't have any idea how obtain this curve because it is my first example.i have an example how extract text file from python but i can't adapt this with my script.
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

 
From what I understand...

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor