ansys / pymapdl

Pythonic interface to MAPDL
https://mapdl.docs.pyansys.com
MIT License
423 stars 120 forks source link

Pyansys vs Ansys ACT #332

Closed CesarRodriguezPereira closed 3 years ago

CesarRodriguezPereira commented 3 years ago

Hi, first time posting an issue, idk if it's the right place to post, but I got no response on the discord server (so sorry if this isn't the place to ask this type of question).

I'm getting started with Ansys, as it seems it's what my department wants to use for a project where I will be doing most of the mechanical models. I was looking at pyansys because I will need to run a lot of models, with tons of variable parameters, and I thought using python would be the way to go. While looking into how to interface with Ansys from python I found 2 things: Pyansys and Ansys ACT.

I just wanted to ask what are the main features or advantages that Pyansys has that Ansys ACT doesn't. Seeing as ACT is officially supported, I'm guessing Pyansys has to have some advantages over the default implementation, something that it can do that ACT can't. I'm just trying to decide which interface to learn, as I will probably be using it for a long time, and once I start implementing functions I'll be somewhat locked into my choice.

akaszynski commented 3 years ago

Great questions!

Hi, first time posting an issue, idk if it's the right place to post, but I got no response on the discord server (so sorry if this isn't the place to ask this type of question).

Sorry about not posting on discord. I'm not sure if we'll continue using that or move over into using an Ansys forum, or just having questions and discussions on GitHub. I'll wait until the dust settles from this transition until we make a decision.

I'm getting started with Ansys, as it seems it's what my department wants to use for a project where I will be doing most of the mechanical models. I was looking at pyansys because I will need to run a lot of models, with tons of variable parameters, and I thought using python would be the way to go. While looking into how to interface with Ansys from python I found 2 things: Pyansys and Ansys ACT.

To answer your question, it all depends on your pipeline and software approach. Ansys Act is a workbench dependent approach where extensions are built from within the ACT App Builder and then run from within Ansys Mechanical. If you intend to vary parameters, you'll then need to use Ansys optiSLang to vary those parameters and batch your solutions.

I just wanted to ask what are the main features or advantages that Pyansys has that Ansys ACT doesn't. Seeing as ACT is officially supported, I'm guessing Pyansys has to have some advantages over the default implementation, something that it can do that ACT can't. I'm just trying to decide which interface to learn, as I will probably be using it for a long time, and once I start implementing functions I'll be somewhat locked into my choice.

In a few days, Ansys will be officially releasing support for the PyAnsys project, so both Ansys ACT and PyAnsys will be supported. The main advantages that PyAnsys has over Ansys ACT are:

The PyAnsys project is quite new, and we're adding features and additional functionalities to it based on customer requests, or if something's missing or you need to customize it, you can clone the project, add your own code, and submit a PR. Or simply import ansys.mapdl.core and then create a custom script within your Python environment.

In short, the best approach will depend on your workflow needs and how you'd like to develop software. Should you have any additional questions or need support regarding PyAnsys, please let me know.

CesarRodriguezPereira commented 3 years ago

Thanks for the quick answer!

Sorry about not posting on discord. I'm not sure if we'll continue using that or move over into using an Ansys forum, or just having questions and discussions on GitHub. I'll wait until the dust settles from this transition until we make a decision.

The Github option works fine, but I you want something that's forum-like I suggest making a subreddit. There's already plenty of FEM communities on reddit, including an Ansys one, and it's great for searchability and sorting of the questions by utility (thanks to community upvotes).

In a few days, Ansys will be officially releasing support for the PyAnsys project, so both Ansys ACT and PyAnsys will be supported. The main advantages that PyAnsys has over Ansys ACT are:

Official support for PyAnsys is great, that completely sold me on it. I already was leaning towards it (because python 3 >>>> IronPython), but knowing that I won't have to constantly explain to stakeholder why I'm using "some random python package instead of the expensive tool" is great.

  • Tight integration with python tools and open source modules alongside Ansys software.
  • Scripts are written in python. ACT uses .net and you can call ironpython, and potentially other tools available within Ansys Mechanical.
  • Being outside of Ansys Mechanical means that you can call our application workflow without opening up the GUI for user interaction. Should you desire a GUI, you can create your own via PyQt, or just output plots via matplotlib or vtk.

The PyAnsys project is quite new, and we're adding features and additional functionalities to it based on customer requests, or if something's missing or you need to customize it, you can clone the project, add your own code, and submit a PR. Or simply import ansys.mapdl.core and then create a custom script within your Python environment.

In short, the best approach will depend on your workflow needs and how you'd like to develop software. Should you have any additional questions or need support regarding PyAnsys, please let me know.

Thanks for these bullet points. They address everything I had in mind, and it completely sold me on going the pyansys way, instead of ACT. Having the possibility to work in my usual IDE, along with many libraries which I already use for visualization, data processing and the looks really promising, and it makes the task of learning the Ansys specific programing not look as daunting.

I've just istalled ansys.mapdl.core and it looks like I'm going to get to know it alongside Ansys. Thanks again for the response.

Cheers!

ghost commented 3 years ago

Hi. Just want to add that, IMO, developing and debugging in PyAnsys will be easier than using ACT with IronPython, because you won't be limited to only the debugger from within ACT-IronPython of the Ansys software that you are using : )

Regards, Yijin

akaszynski commented 3 years ago

I'm keeping this issue open to remind me to migrate this to a Q&A section in our docs. We cover a lot of technical features there, but we need to compare and contrast with other software packages and approaches.

jgd10 commented 3 years ago

I'll take this on and move the Q&A over if it hasn't already

akaszynski commented 3 years ago

Thanks for addressing this in #471