APDL commands to save results for each of applied load step
I'm new in APDL and I'm looking for a script which I can apply to automatically export Frequency Response results to a .xls file. I have two frequency responses - one depends on X-axis and the other depends on Y-axis of the Global Coordinate System. I have 180 load steps and I need to export those file for every step - doing it manually would be a nightmare.
Frequency response is applied to these two bodies (bolts are not included):
Please help me in writing the script. I've found a script which is above, but I completely don't know how to change it.
/post26 !Use Time-History postprocessor
file,file,rth !Read file.rth
*do,i,1,2 !Loop over three coordinate system
csys,cs%i% !Change active coordinate system to cs1, cs2, cs3 and so on
mynode=node(0,0,0) !Get node number for node closest to origin
nsol,2,mynode,temp !Get teperature results for node
store,merge !Store the results in the database
*get,size,vari,,nsets !Get number of timesteps
*dim,temps_cs%i%,array,size !Create array parameter
vget,temps_cs%i%(1),2 !Store time-history data of variable 2 into temps_cs1 *enddo !End loop
*dim,timearr,array,size !Define array for time values
vget,timearr(1),1 !Store time values
! Search the location of the first folder name starting with 'dp'
dpFolder = '\dp'
dpLoc = STRPOS(_wb_SolverFiles_dir(1),dpFolder)
! Get the 6 characters after \dp
CutPath = STRSUB(_wb_SolverFiles_dir(1),dpLoc+3,6)
! Get the string position of the next directory separator
DirSepLoc = STRPOS(CutPath,'\')
! Remove the characters starting from the directory separator
dpNb = STRSUB(CutPath,1,DirSepLoc-1)
*cfopen,'%_wb_userfiles_dir(1)%\Temperature_curves_dp%dpNb%',csv !Write results to Temperature_curves.csv
*vwrite,timearr(1),temps_cs1(1),temps_cs2(1),temps_cs3(1) ! Write array in given format to file (f12.3,';',f12.3,';',f12.3,';',f12.3)