-
-
July 3, 2026 at 12:02 pm
lucas.bienert
SubscriberHi,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/post1set,previousÂ(...)Â! get average element stressesetable,sigma_x,s,xetable,sigma_z,s,zetable,tau_xz,s,xzÂ! calculate tsai-wu values and the next load(...)Â! clear element tableetable,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 roundr,101,P,P_nxtÂ! go to the solution processor/soluÂ! reselect everythingallselÂ! scale the load to the new Pfactor_P = P_nxt / 10000sfscale,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.
Innovation Space
Trending discussions
Top Contributors
-
6790
-
1906
-
1490
-
1332
-
1152
Top Rated Tags
© 2026 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
