Skip to Main Content

      

ANSYS BLOG

August 25, 2022

Providing Open-Source Access to Ansys Fluent with PyFluent

When you think of commercial engineering simulation software, you usually think of the software you are familiar with and all the workflows supported within it. You can think of these workflows as recipes to solve your engineering challenges, designed just for you by your software vendor of choice.

However, you may want to create your very own recipes to address your unique engineering challenges without being limited by packaging. Maybe you want to create automated workflows that seamlessly use additional, specialized third-party libraries or create your very own user interface (UI).

That’s why Ansys is providing direct application programming interface (API) access to the raw ingredients of these recipes, enabling the development ecosystem to build specialized solutions using the Python programming language they know and love while using Ansys functionalities at the core of their scripts. Whether you are a developer with an idea that could disrupt the market or an established company looking to customize and automate your simulation workflows to reduce time to market, PyFluent is for you.

What is PyFluent?

Python + Ansys Fluent = PyFluent

It’s that simple. When you combine the virtually limitless possibilities and flexibility of Python with the market-leading accuracy of Fluent, you unlock a new way of performing fluid-dynamic simulations. With PyFluent, developers now have access to the full breadth and depth of Fluent capabilities, from pre-processing to post-processing using Python scripting.

PyFluent combines a robust community of peers, a programming language such as Python that encourages reuse, and Ansys' state-of-the-art simulation stack to create endless possibilities.

How to get PyFluent

PyFluent is not bundled with the Fluent installation, but if you are familiar enough with Python, you can access PyFluent the same way you access all other Python libraries: on GitHub.

To minimize dependencies in the core package (making it maximally portable), the PyFluent APIs are split into three different packages:

How to Install PyFluent

After installing a supported Python distribution, the first step is to create and activate a local virtual environment:

Setup Python

At this point you can install any of the three PyFluent API packages using the standard PIP procedure:

Pip install

How to Use PyFluent

Once your environment is configured and the PyFluent API packages have been installed, you can create your Python scripts using the Fluent APIs in the same way you would use any other Python library, such as NumPy, TensorFlow, or Pandas. The PyFluent library module is open source, so you can fork the repository, build on it, distribute your own applications, or even share the code with Ansys.

You can also use Fluent functionalities in a Jupyter notebook — an open-source web application to create and share documents that contain live Python code, equations, text, and visualizations.

 

Notebook

You can download a fully working Jupyter notebook for the mixing elbow simulation shown above or watch the step-by-step video.

What Do I Need to Use PyFluent?

You will need a valid license for the capabilities you are using in your Python scripts and Fluent 2022 R2 or later installed locally.  

If you want to learn more about PyFluent and the endless possibilities it provides to the development ecosystem, attend the Ansys Fluent 2022R2 release update webinar and check the PyFluent online documentation

Scopri cosa Ansys può fare per te

Contattaci subito

* = Campo obbligatorio

Grazie per averci contattato!

Siamo qui per rispondere alle tue domande e non vediamo l'ora di parlare con te. Un membro del nostro team di vendita Ansys ti contatterà a breve.

Immagine del footer