Skip to main content

Pythonic interface to Ansys Fluent

Project description

PyAnsys PyPI GH-CI MIT Black

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.

Install the latest release from PyPI with:

pip install ansys-fluent-core

Alternatively, 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

ansys-fluent-core-0.10.1.tar.gz (644.7 kB view details)

Uploaded Source

Built Distribution

ansys_fluent_core-0.10.1-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file ansys-fluent-core-0.10.1.tar.gz.

File metadata

  • Download URL: ansys-fluent-core-0.10.1.tar.gz
  • Upload date:
  • Size: 644.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for ansys-fluent-core-0.10.1.tar.gz
Algorithm Hash digest
SHA256 65db9959ab0d38d247e11c7500d9a88ef6ef218f7357e1079c8b805bae926413
MD5 9e505f915acb6246ef23d00b65dfe0b7
BLAKE2b-256 55794bb9e21dcc8bf61b8b6e27cc6cfc1e0009542caf539a950c72c34915400c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ansys_fluent_core-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4310bd8fb775831f91a1b8b644c30f4f533afc85f94cfac0ef602b317bceb851
MD5 695229c1f2c73a167857b8c4150d3678
BLAKE2b-256 bd6242f3bfae43b3ed7f0c86961fc344614539f6ae6c2a1edd81f84d895e6d3c

See more details on using hashes here.

Supported by

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