Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products

Postprocessing using /POST26 Commands from failed or terminated simulations

    • Mark Petkov
      Subscriber

      Hi all, I am currently running some simplified analysis probing some constitutive models in Mechanical. I am testing a workflow on WB currently; transient quasi-static analysis is performed. There is a large number of parametrized simulations being run and to do postprocessing I use the following APDL set of commands in the Solution tree of WB. The commands output a text file of some results (in the example below, these are time-histories for stress, strain, temperature; example only). 

      The command works fine outputting results when the simulation does not terminate prematurely and the desired simulation end time is reached, but if the simulation fails before predefined simulation (say, if the constitutive model for the given simulation reaches failure), the command sets below are not triggered. As example - running a quasi-static simulation which fails at 500.0 sec as compared to maximum simulation time of 1000.0 does not trigger the /POST26 and commands that follow. I did some digging on this:

      • it appears that these command works directly on the .DB file which is created in successful runs, can be read by /POST26 and depending on the condition preset, can be either kept or deleted.
      • it seems that .DB is not created when the simulation fails prematurely; hence the command not acting. 
      • I did find some suggestions online that a .RST file instead of the .DB can still be read via APDL commands instead of the .DB (it makes sense) - and the approach to do is via SET command. I did try to use the SET command but was unclear on precisely how this fits in with calling the command sets below. 

      My question is - does anyone know how to modify the command set attached to allow for the results of a failed simulation to be read (I assumed from a .RST file) for all substeps up until the last converged one and output the selected results in the desired format. I refuse to believe that there is no way for some APDL commands to be included in the below which can trigger the incomplete results file to be loaded and read by post26 anyway. 

      Thanks in advance; I can provide more details if needed. M

       

      ADPL Scripting below:

      ! Needs time history postproc
      /post1
      /post26
      ! Obtain the substeps after step 2
      *get,STEPN_2,ACTIVE,0,SET,SBST
       
      ! Set a param STEPALL which includes sum of all substeps
      *set,STEP_ALL,STEPN_2
       
      ! Extracted to be stored for time history outputs 
      ESOL,2,1,,EPPL,EQV,EPS_C
      ESOL,3,1,,S,EQV,SEQV_var    
      ESOL,4,1,,BFE,TEMP,TEMP_ARRAY
      ! Store results for use below
      STORE,MERGE
       
      XVAR,1   
      PLVAR,EPS_C,SEQV_var,TEMP_ARRAY
       
      *DEL,_P26_EXPORT
      *DIM,_P26_EXPORT,TABLE,STEP_ALL,3
       
      ! Values are extracted and prepped in array 
      VGET,_P26_EXPORT(1,0),1     ! time - set to zero column 
      VGET,_P26_EXPORT(1,1),2     !  
      VGET,_P26_EXPORT(1,2),3     !  
      VGET,_P26_EXPORT(1,3),4     ! 
       
      *dim,TEMP_ALL,ARRAY,STEP_ALL,1
      VGET,TEMP_ALL(1,1),4     ! temp - extract for reading
      *set,TEMP_CURR,TEMP_ALL(1,1)
       
      *dim,STRESS_ALL,ARRAY,STEP_ALL,1
      VGET,STRESS_ALL(1,1),3    
      *set,STRESS_CURR,STRESS_ALL(STEP_ALL,1)
       
       
      STRESS_TXT  = CHRVAL(STRESS_CURR)
      TEMP_TXT    = CHRVAL(TEMP_CURR)
       
      *set,TXT_NAME,'SIM_%TEMP_CURR%_C_%STRESS_CURR%_MPA'
       
      /OUTPUT,TXT_NAME,'txt','C:\temp\res'
      *VWRITE,'TIME/s','EPSC/ -/-','Stress/MPa','Temp / C', TEMP_TXT, STRESS_TXT
      %14C %14C %14C %14C %14C %14C
      *VWRITE,_P26_EXPORT(1,0),_P26_EXPORT(1,1),_P26_EXPORT(1,2),_P26_EXPORT(1,3)
      %14.5G %14.5G %14.5G %14.5G
      /OUTPUT,TERM

       

    • Audrey J. Davis
      Subscriber

      I have the same problem with you when I design for shell shockers. However, because this porject can not continue, this problem is still solved. Now, I read your post and I'm also curious about it. I's great if there is any answer for this issue.

    • Mark Petkov
      Subscriber

      Thanks for the feedback Audrey, indeed this is an inconvenience. As far as I am aware there are some ways to postprocess RSTs via python wrappers outside APDL but these extra steps add development time to something which should be easy to address via built-in commands of the software. Let's see if the community has something to share!

Viewing 2 reply threads
  • You must be logged in to reply to this topic.