Hi!
I am new to Ansys and Workbench/Mechanical, but I am a long time FEA and Python user, so apologies if my terminologies and descriptions are a little off.
!!_ I am restricted to using Ansys 2022R1 because of internal verification requirements etc, I have the feeling newer version might fix this, but I can't change version this year !!
I am trying to automate a workflow where we have a slice of a pressure vessel model with 7 unit load static cases (Fx, Fy, Fz, Mx, My, Mz, Internal Pressure), and then use a Solution Combination to apply 96 combinations of the loads, each representing one of 96 similar components that have different system loads (the system loads come from a large piping model via Excel). As well as it being 96 combos, I need to do this for 3 load cases, and 4 different sizes, hence my enthusiasm to automate.
This is what I want/need to do:
- loop through the combinations in the solution combination
- find the point of maximum stress in region of interest
- create path through wall thickness to nearest point (on other side of wall)
- linearise the stress
- export to file
I have all of that working so far, apart from item 1 - the looping. I just can't figure out how to iterate through the solution combination. I can find the solution combinations object in the Tree, and I can check its name to make sure I have the right one, and I can find the stress object in its children that I can search through to find the Max, but I can't iterate, or specify which combination to process. I've tried recording the scripting, but nothing is written out for those actions.
My method at the moment, it to pick the combination I want to process in the tabulated data, "Retrieve This Result", and then run my script.
Any suggestions? Is there anything undocumented that can let me iterate?
Plan B is put an audio book on and spend 4 hours click/run/click/run/click/run... (but you know there will always be rework...).
I haven't posted any code, but let me know if you think that would help.
Thanks,
James