-
I am currently experimenting with a python tool, that can load an existing model (.dat file) generated in Ansys Mechanical using the mapdl.input() function. Once loaded into mapdl, I am using pyMAPDL comments to do scoping and exporting of certain model results. It generally works fine, but the loading of the .dat file seems to take a very long time when working with a larger model. Does anybody know what the reason for this could be? Does the mapdl.input() command issue a rerun of the simulation? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Hi @Jaar00n The PyMAPDL 'Input' is not the same as the APDL '/input' command. It's an new method for inputting into MAPDL aaS - see the following: https://mapdl.docs.pyansys.com/version/stable/mapdl_commands/session/_autosummary/ansys.mapdl.core.Mapdl.input.html#input I think you can revert back to the original APDL /input command using the "orig_cmd = /inpu" option. I really don't ever use pre-built FEMs so I'm not sure about the performance of the PyMAPDL input versus APDL /input. It would be interesting if you could time its use and compare to MAPDL running interactively (with the GUI) and using /input to read in the file. Just how large of a ds.dat file are we talking here? If you can't run the timing tests can you share the model so I can here? Mike |
Beta Was this translation helpful? Give feedback.
Hi @Jaar00n
Well, mapdl.input() does not issue anything so no, it (input command) is not rerunning the solve. WB Mechanical does write APDL commands to *get the 'interactive' state of MAPDL and write a *if/then statement to determine whether to bypass the solve command or not. If the state is 'interactive' then it bypasses, if not it will solve. MAPDL aaS that PyMAPDL launches is a interactive instance in this regard.
The PyMAPDL 'Input' is not the same as the APDL '/input' command. It's an new method for inputting into MAPDL aaS - see the following: https://mapdl.docs.pyansys.com/version/stable/mapdl_commands/session/_autosummary/ansys.mapdl.core.Mapdl.input.html#input
I think you can re…