Abaqus scripting
Abaqus scripting
(OP)
Hi guys,
I have a very simple question for engineers who areexpert in using Abaqus.
I'm running some parametric studies, therefore I have to write some scripts in Python which is something completely new for me.
I need to plot some results of the last step of my job. The problem that writing like this:
dy.output(file=ODB, instance='Part-1-1', request=FIELD, step=4, inc=LAST)
I create a table with the results just of the last increment of the step.
What I have to write in order to report the data of each the increments?
What are the commands to create an XY plot?
THanks in advance!
I have a very simple question for engineers who areexpert in using Abaqus.
I'm running some parametric studies, therefore I have to write some scripts in Python which is something completely new for me.
I need to plot some results of the last step of my job. The problem that writing like this:
dy.output(file=ODB, instance='Part-1-1', request=FIELD, step=4, inc=LAST)
I create a table with the results just of the last increment of the step.
What I have to write in order to report the data of each the increments?
What are the commands to create an XY plot?
THanks in advance!





RE: Abaqus scripting
If you want to automate the XY plot, I'd recommend doing it manually, then opening up the abaqus.rpy to find the commands needed and modify for whatever looping you need to do.
RE: Abaqus scripting
RE: Abaqus scripting
RE: Abaqus scripting
http://www.eng-tips.com/viewthread.cfm?qid=385072
When you create a XY-plot manually in the GUI, you can look at the abaqus.rpy in the work directory to get the python commands.
RE: Abaqus scripting
I'll show you what I am doing. Basically I am running some parametric studies of a simple buckling study of a beam. In order to run parametric studies, you have to add in the input file, which was generated from the Abaqus CAE, a parameter definition, (*PARAMETER/ dy1=-0..05), and in the parameter usage instead of the value, <dy1> must be written. In my case was the vertical displacement of one of the beam extremity is the parameter:
**
*PARAMETER
dy1=-0.05
** MATERIALS
**
*Material, name=Al
*Density
2.7e-09,
*Elastic
70000., 0.3
**
** BOUNDARY CONDITIONS
**
** Name: END1 Type: Displacement/Rotation
*Boundary
Set-9, 1, 1
Set-9, 2, 2
Set-9, 6, 6
** ----------------------------------------------------------------
**
** STEP: ENDs Rotation
**
*Step, name="ENDs Rotation", nlgeom=YES
*Static
0.1, 1., 1e-05, 1.
**
** BOUNDARY CONDITIONS
**
** Name: END1 Type: Displacement/Rotation
*Boundary
Set-9, 6, 6
** Name: END2 Type: Displacement/Rotation
*Boundary
Set-10, 1, 1
Set-10, 2, 2
Set-10, 6, 6
**
** OUTPUT REQUESTS
**
*Restart, write, frequency=0
**
** FIELD OUTPUT: F-Output-1
**
*Output, field, variable=PRESELECT, frequency=10
**
** HISTORY OUTPUT: H-Output-1
**
*Output, history, variable=PRESELECT, frequency=10
*End Step
** ----------------------------------------------------------------
**
** STEP: Vetical displacement
**
*Step, name="Vetical displacement", nlgeom=YES
*Static
1., 1., 1e-05, 1.
**
** BOUNDARY CONDITIONS
**
** Name: END2 Type: Displacement/Rotation
*Boundary
Set-10, 2, 2, <dy1>
**
** OUTPUT REQUESTS
**
*Restart, write, frequency=0
**
** FIELD OUTPUT: F-Output-1
**
*Output, field, variable=PRESELECT, frequency=10
**
** HISTORY OUTPUT: H-Output-1
**
*Output, history, variable=PRESELECT, frequency=10
*End Step
** ----------------------------------------------------------------
**
** STEP: Precompression
**
*Step, name=Precompression, nlgeom=YES
*Static
1e-15, 1., 1e-15, 1.
**
** BOUNDARY CONDITIONS
**
** Name: END2 Type: Displacement/Rotation
*Boundary
Set-10, 1, 1, -0.03
**
** OUTPUT REQUESTS
**
*Restart, write, frequency=0
**
** FIELD OUTPUT: F-Output-1
**
*Output, field, variable=PRESELECT, frequency=10
**
** HISTORY OUTPUT: H-Output-1
**
*Output, history, variable=PRESELECT, frequency=10
*End Step
** ----------------------------------------------------------------
**
** STEP: plot
**
*Step, name=plot, nlgeom=YES, inc=1000000000
*Static, riks
1e-06, 1., 1e-08, 0.005, , END2, 1, 1e-08
**
** BOUNDARY CONDITIONS
**
** Name: END2 Type: Displacement/Rotation
*Boundary
Set-10, 1, 1
**
** OUTPUT REQUESTS
**
*Restart, write, frequency=0
**
** FIELD OUTPUT: F-Output-1
**
*Output, field, variable=PRESELECT
**
** HISTORY OUTPUT: H-Output-1
**
*Output, history, variable=PRESELECT, frequency=10
*End Step
After that, to run parametric study a psf file in Python must be written:
dy = ParStudy(par='dy1', name='Istatedy')
dy.define(CONTINUOUS, par='dy1', domain=(-0.7, -1))
dy.sample(NUMBER, par='dy1', number=2)
dy.combine(MESH)
dy.generate(template='Istatedy')
dy.execute(ALL)
dy.output(file=ODB, instance='Part-1-1', request=FIELD, step=4, inc=1)
dy.gather(results='n257_u', variable='U', node=257)
dy.report(PRINT, par='dy1', results=('n257_u.2'))
It automatically generates different jobs which can me automatically submitted.
Now the problem I have, is that I want to create a file with all the displacement values of each increment of the step 4(plot). This should be done in this line: dy.output(file=ODB, instance='Part-1-1', request=FIELD, step=4, inc=1) but instead of inc=1, something that will give me all increments, I tried with inc=ALL and many others.
Thanks :)