Analyzing and exporting results from a large number of load steps
Analyzing and exporting results from a large number of load steps
(OP)
Hello,
I am working on an analysis which requires data from >100 load steps. I understand how to do everything in a single step with the GUI/commands, but not iteratively.
I am trying to do the following:
-Define the load steps
-Analyze with each load step
-Export certain results from each load step (into Excel or Matlab)
Conceptually, this is a straightforward operation, but I haven't yet figured out how to do it in the MAPDL through a for/do loop
Any help would be appreciated
Thanks in advance
Will
I am working on an analysis which requires data from >100 load steps. I understand how to do everything in a single step with the GUI/commands, but not iteratively.
I am trying to do the following:
-Define the load steps
-Analyze with each load step
-Export certain results from each load step (into Excel or Matlab)
Conceptually, this is a straightforward operation, but I haven't yet figured out how to do it in the MAPDL through a for/do loop
Any help would be appreciated
Thanks in advance
Will





RE: Analyzing and exporting results from a large number of load steps
There are a few ways to solve it described here: https://www.sharcnet.ca/Software/Ansys/17.0/en-us/help/ans_bas/Hlp_G_BAS3_10.html. My personal preference is Multiple Solve Method.
See the help files for the following commands for exporting results: SET, *CFOPEN, *GET or *VGET, *VWRITE and *CFCLOS.
Good luck,
Jason
RE: Analyzing and exporting results from a large number of load steps
/solu
*do,ls,1,100
time,ls
f,,,,,
d,,,,,
etc.
solve
*enddo
/post1
*do,ls,1,100
set,ls
*dim,data,,,,,,
*vfill,data(1,1),ramp,1,1
*vget,data(1,2),node,1,s,eqv
*vget,data(1,3),node,1,u,x
etc.
*cfopen,stress%ls%,dat
*vwrite,data(1,1),data(1,2)
fortran format statement
*cfclose
*cfopen,defl%ls%,dat
*vwrite,data(1,1),data(1,3)
fortran format statement
*cfclose
*enddo
The *cfopens will create files named stress1.dat,stress2.dat, defl1.dat, etc. You can just as easily put them in one file if you prefer.
Rick Fischer
Principal Engineer
Argonne National Laboratory
RE: Analyzing and exporting results from a large number of load steps
Both replies have helped a bunch.
However, I'm still hung up on applying loads. I want to apply a pressure function on a set of nodes, and haven't gotten it to work through commands, only the gui. My approach is sf, [array of nodes], pres, [pressure function] but this fails at the array. The nodes are valid/have valid geometry. The documentation suggests a P51x, but I haven't figured out what that means.
Thanks again,
Will
RE: Analyzing and exporting results from a large number of load steps
Kind regards,
Jason