Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
General Mechanical

General Mechanical

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

How to evaluate results between load steps in Ansys Mechanical?

    • lucas.bienert
      Subscriber
      Hi,
      I have created a code snippet in my static structural analysis, which is executed at every load step. The point is to evaluate the results of the previous load step and change the load for the next load step accordingly (in my case, iteratively determine the load where the first element reaches a Tsai-Wu failure criterion value of 1). To do this, I have to add the commands /post1 and set,previous to read the results from the previous load step. Now, the problem is that Ansys then gets stuck at this load step and solves the selected load step again instead of the next one, as it should. How can I tell Ansys to procede with the next load step? Or is there a different workaround? Any help weill be appreciated! Here is my code so far... If it helps, I can share more information. Thanks in advance!
       
      -------------------------------------------------------------------------
      ! Commands inserted into this file will be executed just prior to the ANSYS SOLVE command.
      ! These commands may supersede command settings set by Workbench.
       
      ! Active UNIT system in Workbench when this object was created: Metric (mm, kg, N, s, mV, mA)
      ! NOTE: Any data that requires units (such as mass) is assumed to be in the consistent solver unit system.
      ! See Solving Units in the help system for more information.
       
      ! check the load step
      *get,load_step,active,,set,lstp
       
      ! start the iteration after the first load step
      *if,load_step,ge,1,then
       
      (...)
       
      ! start the postprocessor and activate the previous load step
      /post1
      set,previous
       
      (...)
       
      ! get average element stresses
      etable,sigma_x,s,x
      etable,sigma_z,s,z
      etable,tau_xz,s,xz
       
      ! calculate tsai-wu values and the next load
      (...)
       
      ! clear element table
      etable,eras
       
      ! go to the preprocessor to save the loads for the next round
      /prep7
       
      ! save the current load (P) and the determined next load (P_nxt)
      ! as real constants for the next round
      r,101,P,P_nxt
       
      ! go to the solution processor
      /solu
       
      ! reselect everything
      allsel
       
      ! scale the load to the new P
      factor_P = P_nxt / 10000
      sfscale,pres,factor_P,factor_P
       
      ! activate the next load step .......
       
      *endif
      -------------------------------------------------------------------------
Viewing 0 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]