ANSYS APDL: Get Path results for each Substep and export this?

Hey 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

Comments

  • edited August 2019

    What are you already using?
    You can try using something like this:

    set,last
    set,list
    *get,total_sets,active,0,set,nset
  • Marek11xMarek11x Member
    edited August 2019

    Hey, 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

  • edited August 2019

    echo 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

     

  • fredjahnertfredjahnert Member
    edited July 7

    I 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

Sign In or Register to comment.