We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

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

    • Marek11x
      Subscriber

      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

    • Sandeep Medikonda
      Ansys Employee

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


      set,last
      set,list
      *get,total_sets,active,0,set,nset
    • Marek11x
      Subscriber

      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

    • Sandeep Medikonda
      Ansys Employee

      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

       

    • fredjahnert
      Subscriber

      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

    • bojandimeski1
      Subscriber
      I 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
Viewing 5 reply threads
  • The topic ‘ANSYS APDL: Get Path results for each Substep and export this?’ is closed to new replies.