Why solving using API Python Script Take More Time Compared to GUI interface?

Stacky
Stacky Member Posts: 3
Name Dropper First Comment
**

Hi,
I have written a API Python script to repeatedly solve a FE model in Mechanical. I find that, per simulation, the total time (Mesh+Solve) with script is twice (and more) compared to GUI interface.

Am I the one facing this issue? Assuming this issue exists, what steps I have take to make the total time same at least, if not less.   

Answers

  • AlexGh
    AlexGh Member Posts: 26
    10 Comments First Answer Name Dropper
    **

    Hi Stacky! Could the issue be that the GUI is using multi-core processing? Could you please provide a bit more information about how you are running the calculations through Python?

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee, GitHub-issue-creator Posts: 302
    25 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭

    This is certainly not a universal problem with running Mechanical by script versus interactively. I agree with @Stacky that different parallel processing settings is the most likely culprit, but it is hard to say without more details. I recommend you compare the .out files for clues. If you are still stuck, please share more details, such as your script files.