HFSS Analysis progress in non-graphical mode #4774
-
When HFSS is launched in non-graphical mode, and from pyaedt import Hfss
with Hfss(non_graphical=True, close_on_exit=True) as aedtapp:
# Solve
aedtapp.analyze(blocking=False)
# Monitor solution progress here, while performing other tasks
# Save
aedtapp.save_project() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @nathmay , If blocking=False as you know, the script will not stop. You can get the profile info: desktop.get_monitor_data or just check if it is running: are_there_simulations_running You can also stop the simulation: stop_simulations |
Beta Was this translation helpful? Give feedback.
-
@nathmay My bad, you are right, this is only for Icepak and monitors. You can directly obtain the data if it is already solved:
If it is not solved yet (if it is still doing the initial mesh), it will fail, so need to wait until you have a 1st adaptive mesh. For that reason, I have discovered a nice way to get the profile info, that I will add in PyAEDT in the coming week, you can test it just doing: from pyaedt.modeler.cad.elements3d import BinaryTreeNode tree = BinaryTreeNode("profile", app.odesign.GetChildObject("results/profile")) Tree contains all the Profile information, so you can get all the progress in real time :) Best regards |
Beta Was this translation helpful? Give feedback.
Hi @JonathonMcMullan,
Actually, the method get_profile is doing exactly this :)
https://aedt.docs.pyansys.com/version/stable/API/_autosummary/pyaedt.modules.SolveSetup.Setup.get_profile.html
If you check the code, you can also see how to get the information.
tree.GetChildNames()
tree.GetChildObject(...)