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!

History output automatic exportation

Status
Not open for further replies.

n3l3

Mechanical
Dec 28, 2010
69
Hi all,

I´m carring out a dynamic simulation and would like abaqus to create automatically a list of values XY in a file.

i know how to create an XY graph/table and so, but I have to do seeeeeeeeeveral times, so would like to know how to automate.

Any Idea is welcomed

cheers![bigsmile]
 
Replies continue below

Recommended for you

Actually I would like to create an txt file or so with that XY data
 
Hi,
you can create textfiles from XY-Data with the Report function in the Visualization module.
Record a Macro while creating and saving the data - look at it and edit the python file for your purpose (by adding loops, nodes numbers etc.). Scriping is a very powerful tool if you have to do things repeatedly !
Kind regards,
Rupert.
 
Thanks Rupert, will work on it. but sure I will come back XD
cheers!
n3l3 =)
 
Ok, I have the solution now.

Here I give you an example:

1 Open Abaqus CAE
2 Start recording a macro (better to work always in a work directory, check in internet how to change scarthc directory)
the macro will be recorded in abaqusmacros.py or so, in your work directory.
3 open your abaqusmacros.py and copy it in a new file for example: myscript.py
4 edit it in the next way:
eliminate all macros unless the one you want to execute, do no t eliminate the first 3 or so lines.
eliminate the first line of the macro (title)
unindent the rest of commands
save it (myscript.py)
5 if you want you can run this script from the CAE window or from the dos:
abaqus cae script=macro_cae_prueba.py

here it is the example of how it should appear:

Myscript.py:--------------------------------------------------------------------------------

# Do not delete the following import lines
from abaqus import *
from abaqusConstants import *
import __main__
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import assembly
import step
import interaction
import load
import mesh
import optimization
import job
import sketch
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
import connectorBehavior
o1 = session.openOdb(name='C:/Datos/Abaqus_work_dir/cae_prueba.odb')
session.viewports['Viewport: 1'].setValues(displayedObject=o1)
odb = session.odbs['C:/Datos/Abaqus_work_dir/cae_prueba.odb']
session.xyDataListFromField(odb=odb, outputPosition=INTEGRATION_POINT,
variable=(('SF', INTEGRATION_POINT), ), elementSets=('SET_SALIDA', ))
x0 = session.xyDataObjects['SF:SF1 PI: PART-1-1 E: 2 IP: 1']
x1 = session.xyDataObjects['SF:SF2 PI: PART-1-1 E: 2 IP: 1']
x2 = session.xyDataObjects['SF:SF3 PI: PART-1-1 E: 2 IP: 1']
session.writeXYReport(fileName='Reporte_prueba.rpt', appendMode=OFF, xyData=(
x0, x1, x2))
-----------------------------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor