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, you can create issues to submit questions, report bugs, and request new features. To reach the project support team, email pyansys.support@ansys.com.
Installation
The ansys-fluent-core package currently supports Python 3.7 through Python 3.10 on Windows and Linux.
Install the latest release from PyPI with:
pip install ansys-fluent-core
Alternatively, install the latest version from the PyFluent GitHub repository with:
pip install git+https://github.com/pyansys/pyfluent.git
If you plan on doing local “development” of PyFluent with Git, install 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 locally-installed, licensed copy of Ansys to run Fluent. The first supported version is 2022 R2.
Getting started
Launching Fluent
You can launch Fluent from Python using the launch_fluent function:
import ansys.fluent.core as pyfluent
session = pyfluent.launch_fluent()
session.check_health()
To use a non-default installation location, set the PYFLUENT_FLUENT_ROOT environment variable to the <version>/fluent directory, where <version> is the Ansys release version that you would like to use. For example, v222 uses version 2022 R2.
Basic Usage
You can run Fluent TUI commands using the session.tui interface:
session.solver.tui.file.read_case(case_file_name='elbow.cas.h5')
session.solver.tui.define.models.unsteady_2nd_order("yes")
session.solver.tui.solve.initialize.initialize_flow()
session.solver.tui.solve.dual_time_iterate(2, 3)
In addition to all TUI commands being available, there are the PyFluent Parametric and PyFluent Visualization packages.
The PyFluent Parametric package provides access to Fluent’s parametric workflows.
The PyFluent Visualization package provides postprocessing and visualization capabilities using pyvista and matplotlib.
License and acknowledgments
PyFluent is licensed under the MIT license.
This module, ansys-fluent makes no commercial claim over Ansys whatsoever. PyFluent extends the functionality of Fluent by adding a Python interface to Fluent without changing the core behavior or license of the original software. The use of the interactive control of PyFluent requires a legally licensed local copy of Fluent. For more information about Fluent, visit the 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.11.dev0.tar.gz
.
File metadata
- Download URL: ansys-fluent-core-0.11.dev0.tar.gz
- Upload date:
- Size: 654.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 173e8cb848904ee719da4b8cb1f0631829a68a527c960a986a55bfb71dac6715 |
|
MD5 | 6c98ac9a7c1720fc76b01df6115ee7b2 |
|
BLAKE2b-256 | 4adc97368de0e470e3d0fba0d8a8863a1525a15af2503ccc7afab6b67a894490 |
File details
Details for the file ansys_fluent_core-0.11.dev0-py3-none-any.whl
.
File metadata
- Download URL: ansys_fluent_core-0.11.dev0-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd2d3c430c06e7d57301e0112ec791df8251270860104d17e0ef4b3df55aa6ad |
|
MD5 | ec6015482c0bfc49869cefa9a6104b0b |
|
BLAKE2b-256 | 24ebd4f0d71428af9a6e8cd2cc83ef22fa62cf3c47a54f1ef396b5d68049fe01 |