I am currently working on a script to automate my Ansys Mechanical thermal simulation. For that, i am using pyMechanical to export Ansys Mechanical capabilities in a script. It works ! That's the good news ! However, i have more than 2000 simulations to do and the script never go above 100 calculations and crash before...
You will find attached the code (I do not how add code on this forum...)
Sorry my comments are in French but it is quite straightforward.
I have been finally able to use exactly this code in Ansys Mechanical Scripting using CPython (beta) and replacing Quantity by the full link attached to this last function and it works very well without crash...
So i think the code is not so bad (of course not very great, i am a very young developper, and even not developper...) but it appears that work with Ansys Mechanical Scripting (so with the graphical interface open) is a bit smaller than pyMechanical. So, it could be interesting to make this code working...
I am using Spyder 5.5.0 and python 3.8.10 as development environnement.
Generally speaking, when it crashes, two types of message appear (not at the same time!):
- fatal python error: aborted (then a reference to the Python kernel)
- windows fatal exception: access violation
Thank you for your help !