Pythonic interface to Ansys Fluent
Project description
Overview
The PyFluent project provides Pythonic access to Ansys Fluent. The package provides features to enable seamless use of Fluent within the Python ecosystem as well as broad access to Fluent features including:
Ability to launch Fluent using a local Ansys installation
Ability to use Fluent TUI commands for both meshing and solver features
Ability to use Fluent’s in-built post processing capabilities
Documentation and Issues
Please see the latest release documentation page for more details.
Please feel free to post issues and other questions at PyFluent Issues. This is the best place to post questions and code.
Installation
The ansys-fluent-core package currently supports Python 3.7 through Python 3.10 on Windows and Linux.
If you want to use PyFluent please install the latest from PyFluent GitHub via:
pip install git+https://github.com/pyansys/pyfluent.git
If you plan on doing local “development” of PyFluent with Git, then 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, requires Fluent
Dependencies
You will need a locally installed licensed copy of ANSYS to run Fluent, with the first supported version being Ansys 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 install location set the PYFLUENT_FLUENT_ROOT environment variable to the <version>/fluent directory where <version> is the Ansys release version you would like to use (eg: v222).
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 and the PyFluent Visualization package provides post-processing 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. This tool extends the functionality of Fluent by adding a Python interface to the 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 Ansys.
To get a copy of Ansys, please visit Ansys.
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.10.0.tar.gz
.
File metadata
- Download URL: ansys-fluent-core-0.10.0.tar.gz
- Upload date:
- Size: 643.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 | 9c80961a706eb37f2edae248157a7acbd0d971de9ca3f1e94735c67d4735f7d0 |
|
MD5 | 02508bc404ba35eaaaa1892983269724 |
|
BLAKE2b-256 | a763ff68c73fa277d9f519896877eaa60681eda6e3eeee99501ac313d8ecbc4e |
File details
Details for the file ansys_fluent_core-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: ansys_fluent_core-0.10.0-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 | 976d881a7e23ce3b1871d18e73173aacc6fd18d7ed775e9d4a1b6639840f0be9 |
|
MD5 | a04a0c2e2219a02e1ee9193e8333a20d |
|
BLAKE2b-256 | 8f028fb632c3d8b0573028292b9b91416594a7d462d3dec462725cc6ca7ea4c5 |