Skip to main content

PyFluent provides Pythonic access to Ansys Fluent.

Project description

PyAnsys Python PyPI GH-CI codecov MIT Black pre-commit.ci status

Overview

PyFluent provides Pythonic access to Ansys Fluent. Its features enable the seamless use of Fluent within the Python ecosystem and broad access to native Fluent features, including the ability to:

  • Launch Fluent using a local Ansys installation

  • Use Fluent’s TUI (text user interface) commands for both meshing and solver features

  • Use Fluent’s built-in postprocessing capabilities

Documentation and issues

Documentation for the latest stable release of PyFluent is hosted at PyFluent documentation.

In the upper right corner of the documentation’s title bar, there is an option for switching from viewing the documentation for the latest stable release to viewing the documentation for the development version or previously released versions.

You can also view or download the PyFluent cheat sheet. This one-page reference provides syntax rules and commands for using PyFluent.

On the PyFluent Issues page, you can create issues to report bugs and request new features. On the PyFluent Discussions page or the Discussions page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.

To reach the project support team, email pyansys.core@ansys.com.

Installation

The ansys-fluent-core package supports Python 3.10 through Python 3.14 on Windows and Linux.

Install the latest release from PyPI with:

pip install ansys-fluent-core

Using a virtual environment

It is recommended to use a virtual environment when installing PyFluent to avoid conflicts with other Python packages. A virtual environment can be created and activated with the following commands:

python -m venv .venv

On Windows:

.venv\Scripts\activate

On Linux and Mac OS:

source .venv/bin/activate

Then, install PyFluent in the virtual environment with:

python -m pip install ansys-fluent-core

Dependencies

You must have a licensed copy of Ansys Fluent installed locally. PyFluent supports Fluent versions 2024 R2 SP05, 2025 R1 SP04, 2025 R2 SP03, 2026 R1, and later versions. The Windows installation of Ansys Fluent automatically sets the required environment variables so that PyFluent can find the Ansys Fluent installation. Using Fluent 2025 R2 (or 25.2) installed in the default directory as an example, the installer automatically sets the AWP_ROOT252 environment variable to point to C:\Program Files\ANSYS Inc\v252. On Linux, the required environment variable is not set automatically, and can be set for the current user in the current shell session, using Fluent 2025 R2 in the default installation directory as an example, before running PyFluent, with:

export AWP_ROOT252=/usr/ansys_inc/v252

For this setting to persist between different shell sessions for the current user, the same export command can instead be added to the user’s ~/.profile file.

For developers

If you plan on doing local development of PyFluent with Git, install the latest release with:

git clone https://github.com/ansys/pyfluent.git
cd pyfluent

Create and activate a virtual environment:

python -m venv .venv

On Windows:

.venv\Scripts\activate

On Linux and Mac OS:

source .venv/bin/activate

Then, install PyFluent in the virtual environment in editable mode with:

pip install pip -U
pip install -e .

To generate API files, run one of the following commands:

python codegen/allapigen.py
python codegen/allapigen.py -v

The -v option displays the paths of the generated API files.

Getting started

Launching Fluent

To launch Fluent from Python, use the launch_fluent function:

import ansys.fluent.core as pyfluent
solver_session = pyfluent.launch_fluent()
solver_session.is_server_healthy()

Basic usage

The solver_session interface provides a convenient way to launch and interact with Fluent.

import ansys.fluent.core as pyfluent

solver_session = pyfluent.launch_fluent()

For more information on using the solver_session interface, see the PyFluent documentation.

For postprocessing and visualization, you can also install:

License and acknowledgments

PyFluent is licensed under the MIT license.

PyFluent makes no commercial claim over Ansys whatsoever. This library extends the functionality of Ansys Fluent by adding a Python interface to Fluent without changing the core behavior or license of the original software. The use of the interactive Fluent control of PyFluent requires a legally licensed local copy of Fluent.

For more information on Fluent, see the Ansys Fluent page on the Ansys website.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansys_fluent_core-0.40.1.tar.gz (22.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_fluent_core-0.40.1-py3-none-any.whl (7.0 MB view details)

Uploaded Python 3

File details

Details for the file ansys_fluent_core-0.40.1.tar.gz.

File metadata

  • Download URL: ansys_fluent_core-0.40.1.tar.gz
  • Upload date:
  • Size: 22.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ansys_fluent_core-0.40.1.tar.gz
Algorithm Hash digest
SHA256 5a9144df4689c9d714363a099cdd326d85d6180d23ac2382f3843352ea56204c
MD5 6057f5d3428ce586e4080a35679bfc8d
BLAKE2b-256 cd27d233f97c3718787557419c252d12dbb3e9452c291bec262d9b86bdf96180

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_fluent_core-0.40.1.tar.gz:

Publisher: ci.yml on ansys/pyfluent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansys_fluent_core-0.40.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_fluent_core-0.40.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d439e0ddfe013429e95ae60292be79545ec16d44d5689660e984ca30af1564f
MD5 d98150e0e62b9cc4dcb2ed864a1f3c9f
BLAKE2b-256 5a4a950a3f9a759509ae54c4071b634f879d175b4eba4958fef6d8010e684eae

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_fluent_core-0.40.1-py3-none-any.whl:

Publisher: ci.yml on ansys/pyfluent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page