Pythonic interface to Ansys Fluent
Project description
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
For comprehesive information on PyFluent, see the latest release documentation.
On the PyFluent Issues page, you can create issues to submit questions, report bugs, and request new features. To reach the PyAnsys support team, email pyansys.support@ansys.com.
Installation
The ansys-fluent-core package supports Python 3.7 through Python 3.10 on Windows and Linux.
Install the latest release from PyPI with:
pip install ansys-fluent-core
If you plan on doing local development of PyFluent with Git, install the latest release with:
git clone https://github.com/pyansys/pyfluent.git
cd pyfluent
pip install pip -U
pip install -e .
python codegen/allapigen.py # Generates the API files
Dependencies
You must have a licensed copy of Ansys Fluent installed locally. PyFluent supports Fluent 2022 R2 and later.
Getting started
Launching Fluent
To launch Fluent from Python, use the launch_fluent method:
import ansys.fluent.core as pyfluent
solver_session = pyfluent.launch_fluent(mode="solver")
solver_session.health_check_service.is_serving
On Windows systems the environment variable AWP_ROOT<ver>, is configured when Fluent is installed, where <ver> is the Fluent release number such as 232 for release 2022 R2. PyFluent automatically uses this environment variable to locate the Fluent installation. On Linux systems configure AWP_ROOT<ver> to point to the absolute path of an Ansys installation such as /apps/ansys_inc/v232.
To use a non-default installation location set AWP_ROOT<ver> or set the PYFLUENT_FLUENT_ROOT environment variable to the <install location>/<version>/fluent directory, where <version> is the Fluent release that you would like to use. For example, v232 uses release 2022 R2.
Basic Usage
You can use the solver_session.tui interface to run all Fluent TUI commands:
solver_session.tui.file.read_case('elbow.cas.h5')
solver_session.tui.define.models.unsteady_2nd_order("yes")
solver_session.tui.solve.initialize.initialize_flow()
solver_session.tui.solve.dual_time_iterate(2, 3)
You can also install and use these PyFluent libraries:
PyFluent Parametric, which provides access to Fluent’s parametric workflows.
PyFluent Visualization, which provides postprocessing and visualization capabilities using the pyvista and matplotlib packages.
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
Built Distribution
File details
Details for the file ansys-fluent-core-0.12.dev13.tar.gz
.
File metadata
- Download URL: ansys-fluent-core-0.12.dev13.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8b8b9eb7f83a356ddfc76c3a5966942cf9bd1c3479b58e1e7026ac4787f4f2f |
|
MD5 | 93d9d1482d5552845746fbf178050e78 |
|
BLAKE2b-256 | d9f907d58451e183cb9d805abb1bd451eed6e904fa9745f1ecea9d2cdce567fb |
File details
Details for the file ansys_fluent_core-0.12.dev13-py3-none-any.whl
.
File metadata
- Download URL: ansys_fluent_core-0.12.dev13-py3-none-any.whl
- Upload date:
- Size: 5.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77288e1f9cab9b4d7db702651f5e0255696808066e2aaa679ed32ad429f5ad6f |
|
MD5 | 6537e91c301cab21369865ff105c6534 |
|
BLAKE2b-256 | 714fc189eaabc036ea7e8a97d8f950ce99c19b41465d987b8c4b265a075c2cc4 |