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!

Abaqus scripting

Status
Not open for further replies.

gaetano89

Aerospace
Apr 22, 2015
18
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!
 
Replies continue below

Recommended for you

You would change inc=LAST to each increment number you want.

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.
 
Hi thanks for the answer. I want to plot all the increments not just the last or one of those writing a number. I mean, the step is composed of n increments and I need a datasheet with the value of each increments. If I writ inc=(1:LAST) it gives me error. I hope I have been enogh clear
 
Posting a full example of what you currently have working will help. I have no clue what you're trying to do with the dy.output command since I see nothing similar in the reference manual. Worst case scenario, you could always save the data from each increment, then use MATLAB or Python to do the plotting.
 
first of all thanks again for your replies.
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 :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor