Skip to main content

Pythonic interface to Ansys Fluent

Project description

PyAnsys PyPI GH-CI MIT Black

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
session = pyfluent.launch_fluent(mode="solver")
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 Fluent release that you would like to use. For example, v222 uses release 2022 R2.

Basic Usage

You can use the session.solver.tui interface to run all Fluent TUI commands:

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)

You can also install and use these PyFluent libraries:

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.11.dev2.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

ansys_fluent_core-0.11.dev2-py3-none-any.whl (3.6 MB view details)

Uploaded Python 3

File details

Details for the file ansys-fluent-core-0.11.dev2.tar.gz.

File metadata

  • Download URL: ansys-fluent-core-0.11.dev2.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • 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.11.dev2.tar.gz
Algorithm Hash digest
SHA256 d5266852f03e69b9165416229c9163851e4a258605c92221bc6d57a83e37fd11
MD5 2015dd1f4d361e8e9a329a447c620eba
BLAKE2b-256 866536e72f7719c20dd3fc3d0468c479991df461b53cad87742d39ca0d3e224c

See more details on using hashes here.

File details

Details for the file ansys_fluent_core-0.11.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_fluent_core-0.11.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 99f2e3b707e53328cb5734defd0c105b15fd74d9aead018c884ffdc748c85e3c
MD5 a8b3fceaa9161472596c2ad34dc75545
BLAKE2b-256 14dbc92ab7de254c1f597775b4071f8bc6dedde0246b3800422b7c59a73cc474

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