Hello everyone,
Thank you in advance for your time and help!
I am currently working on a complex workflow for a transient thermal simulation. This workflow involves an iterative process where the solver is stopped at each timestep to perform some post-processing steps. The extracted information from these steps is then used to solve the next timestep.
Here’s my main challenge:
While I know this can be achieved by injecting APDL commands into the solver input file, I’d like to explore alternatives that are more Pythonic and easier to work with.
What I’ve tried so far:
Mechanical Scripting: As of my understanding it is high-level tool primarily designed for automating GUI processes, so it doesn’t seem to support this kind of workflow directly.
Python Objects with Get Solve Command Callback: While useful, this still requires injecting APDL commands, which I am trying to avoid.
PyMAPDL: I believe PyMAPDL could provide a more Pythonic approach to working with APDL, but I am unsure if it can be effectively coupled with a Mechanical instance.
Is it possible to replace the solver_input_file.WriteLine commands in the python object with PyMAPDL functions to achieve the same iterative process?
Can PyMAPDL work alongside an existing Mechanical instance, or would I need to export the Mechanical model/geometry to PyMAPDL and perform the workflow entirely outside Mechanical?
I would greatly appreciate any guidance or insights you can provide on how to achieve this workflow using Python or other alternatives to directly writing APDL commands.
Thank you!