Skip to content
Discussion options

You must be logged in to vote

I think that's not a Python leak, the growth is in the ANSYS process. nodal_principal_stress() / nodal_eqv_stress() both pull a full-model array every call and only mask down to your selection afterward in Python, so cmsel/nsle don't reduce what ANSYS computes. You're re-fetching the whole model once per element set instead of once per load step.

I suggest pulling the three arrays once per load step, then slicing per element set locally (also swapped mc.selednum('node') for len(sel_nodes) since I couldn't find that as a pymapdl API):

node_numbers_all = mapdl.mesh.nnum_all
node_to_idx = {n: i for i, n in enumerate(node_numbers_all)}
stress_out_dic = {}
for timei in range(1, numstep + 1):
    

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@war16641
Comment options

Answer selected by war16641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants