-
-
August 12, 2019 at 8:27 am
Marek11x
SubscriberHey there,
I do a transient structural mechanics in ANSYS Workbench and want to export the results of a defined path for each time step. Can anyone help me with this command?
Thank you so much -
August 12, 2019 at 4:09 pm
Sandeep Medikonda
Ansys EmployeeWhat are you already using?
You can try using something like this:
set,last
set,list
*get,total_sets,active,0,set,nset -
August 14, 2019 at 1:15 pm
Marek11x
SubscriberHey, thank you for tip,
currently I try it this way, but it doesn't work:
/POST1
set, first
node2=node(100,0,0)
node1=node(100,50,0)
PATH,TPATH,2,30,100
PPATH,1,node1
PPATH,2,node2
PDEF,PfadSigX,S,X,AVG
PAGET,PathData,TABLE
*GET,nline,PARM,PathData,DIM,1 !retrieve the number of values of the paget table
*GET,nsets,ACTIVE,0,SET,NSET
*DIM,PATHSig,array,nline,nsets+1
*do,i,1,nline
PATHsig(i,1)=PathData(i,4)
*enddo
*do,i,1,nsets ! do it for every time
PDEF,CLEAR
PDEF,PfadSigX,S,X,AVG
PAGET,PathData,TABLE
*do,j,1,nline
PATHsig(j,i+1)=PathData(j,5)
*enddo
set,next
*enddo
*MWRITE,PATHsig(1,1),RESULTS_PathSig,txt,,JIK,,, 1 !write it on a file
(98(F15.10))
*CFCLOS -
August 15, 2019 at 1:40 am
Sandeep Medikonda
Ansys Employeeecho what you have for in 'nline' and 'nsets' and double-check? You are not using the set commands as specified earlier. Refer to the *GET help on what each argument means.
Let's say I want to export 2 columns of data (substep, max equivalent stress) into an external file.Â
I would use something as follows (not for the path):
!Beginning of script
set,last
*get,total_sets,active,0,set,nset
*dim,seqv_max,array,total_sets,1
*dim,substep,array,total_sets,1
*do,i,1,total_sets
set,,,,,,,i
*vget,all_seqv,node,,s,eqv
*vscfun,mymax,max,all_seqv
*get,substep(i,1),active,0,set,sbst
seqv_max(i,1) = mymax
*enddo
*cfopen,seqv_data,txt
*vwrite,substep(1),seqv_max(1)
(f3.0,tl1,F10.6)
*cfclose
!End of script
Â
-
July 7, 2020 at 6:16 pm
fredjahnert
SubscriberI did this and it worked. I had 1503 sets.Â
Â
SET, first
PATH,TTTPATH,2,30,100
PPATH,1,,5.6896E-22,-2.0355E-21,0
PPATH,2,,5.6896E-22,-2.0355E-21,0.5
PDEF,StrainZ,EPTO,Z,AVG
PAGET,PathData,TABLE
*GET,ndat,PARM,PathData,DIM,1Â
*GET,total_sets,active,0,set,nset Â
*DIM,PATHStrain,array,ndat,total_sets+1
Â
*do,i,1,ndat
PATHStrain(i,1)=PathData(i,4)
*enddo
Â
*do,i,1,total_sets ! do it for every time
set,,,,,,,i
PDEF,CLEAR
*del,PathData,,nopr
PDEF,StrainZ,EPTO,Z,AVG
PAGET,PathData,TABLE
*do,j,1,ndat
PATHStrain(j,i+1)=PathData(j,5)
*enddo
*enddo
Â
*MWRITE,PATHStrain(1,1),RESULTS_,txt,,,,, !write it on a file
(1505E)
*CFCLOSE
-
December 2, 2020 at 4:28 pm
bojandimeski1
SubscriberI would like to ask you something about the code, that you wrote before. When I use it and compare the results I see that the results, which have been output with APDL differ from those in Ansys Workbench. The equivalent stress in my txt file is always lower that the one in the solution in Workbench. For the last substep in solution I have a value 4798.8 MPa and in txt file is around 2500Mpa... How do I know that the node with the maximum value has been chosen? n
-
- The topic ‘ANSYS APDL: Get Path results for each Substep and export this?’ is closed to new replies.
-
3190
-
1024
-
962
-
858
-
798
© 2025 Copyright ANSYS, Inc. All rights reserved.