
Why Python?
So why Python? The Ansys Parametric Design Language (APDL) has long provided extensive scripting and control capabilities for interacting with Ansys products. Individuals can write scripts in APDL (or Mechanical APDL [MAPDL], a finite element analysis program built on APDL), that facilitate setup, execution, and post-processing of simulations. The Ansys Customization Tool Kit (ACT) also provides features for controlling and automating simulations in Ansys Mechanical. But that was just it: One could only use the scripting features of these tools from within the tools. There was no mechanism for interacting programmatically with any Ansys products from outside APDL, MAPDL, or ACT. That changed in 2016 when a Python developer and Ansys MAPDL user named Alex Kaszynski created a code library that enabled him to interact with MAPDL using Python. The Python language is widely taught in schools and embraced enthusiastically by innumerable developers, and the Python ecosystem has an abundance of public and private code repositories that developers can draw from to create their own applications. Kaszynski posted his code library — called PyMAPDL — to GitHub, the open source online code repository, where interested users could download it and incorporate its functionality into their own projects that involved using MAPDL. And download it they did. PyMAPDL was made available at no cost to users — though users intending to interact with Ansys MAPDL needed to license that application — and it soon became clear that Ansys users very much wanted the ability to interact more programmatically with the Ansys simulation stack. This enthusiasm was clear to Ansys as well, which hired Kaszynski and encouraged him to continue the work he had begun.

Moving Forward Pythonically
That work today is ongoing. As of this writing, the PyAnsys page on GitHub offers a range of packages that can be used to interact “Pythonically” with Ansys products:- Electronics simulation: PyAEDT
- Solid mechanics simulation: PyMAPDL
- Fluids simulation: PyFluent, PyFluent-Parametric, PyFluent-Visualization
- Post processing: PyDPF-Core, PyDPF-Post
- Materials management: Granta MI BoM Analytics

