Skip to main content

A python wrapper for ansys Fluent visualization

Project description

PyAnsys Python PyPI GH-CI codecov MIT Black pre-commit.ci status

Overview

PyFluent-Visualization provides postprocessing and visualization capabilities for PyFluent using PyVista and Matplotlib.

Documentation and issues

For comprehensive information on PyFluent-Visualization, see the latest release documentation.

In the upper right corner of the documentation’s title bar, there is an option for switching from viewing the documentation for the latest stable release to viewing the documentation for the development version or previously released versions.

On the PyFluent Visualization Issues page, you can create issues to submit questions, reports burgs, and request new features. To reach the project support team, email pyansys.core@ansys.com.

Installation

The ansys-fluent-visualization package supports Python 3.10 through Python 3.13 on Windows and Linux.

If you are using Python 3.10, download and install the wheel file for the vtk package from here for Windows or from here for Linux.

Install the latest release from PyPI with:

pip install ansys-fluent-visualization

There are optional dependencies depending on the desired usage mode. To run the plotter in interactive mode, install with:

pip install ansys-fluent-visualization[interactive]

For interactive mode with graphics displayed in a single Qt window using multiple tabs, install with:

pip install ansys-fluent-visualization[single-window]

Alternatively, install the latest release from GitHub with:

pip install git+https://github.com/ansys/pyfluent-visualization.git

If you plan on doing local development of PyFluent-Visualization with Git, install with:

git clone https://github.com/ansys/pyfluent-visualization.git
cd pyfluent-visualization
pip install pip -U
pip install -e .

Dependencies

You must have a licensed copy of Ansys Fluent installed locally. PyFluent-Visualization supports Ansys Fluent 2022 R2 and later.

Getting started

Basic usage

The following code assumes that a PyFluent session has already been created and a Fluent case with input parameters has been set up. For a complete example, see Analyzing your results in the PyFluent-Visualization documentation.

from ansys.fluent.visualization import Contour, GraphicsWindow
from ansys.fluent.core.solver import VelocityInlets, PressureOutlets, using
from ansys.units import VariableCatalog

graphics_window = GraphicsWindow()

# Use an existing PyFluent solver session for the duration of this block
with using(solver_session):
   # Define a contour plot of static pressure across all velocity inlets and pressure outlets
    pressure_contour = Contour(field=VariableCatalog.STATIC_PRESSURE, surfaces=VelocityInlets() + PressureOutlets())
    graphics_window.add_graphics(pressure_contour)
    graphics_window.show()

Usage in a JupyterLab environment

PyFluent-Visualization uses PyVista, which has the ability to display fully featured plots within a JupyterLab environment using ipyvtklink. Find out about using ipyvtklink with PyVista here <https://docs.pyvista.org/user-guide/jupyter/ipyvtk_plotting.html>

License and acknowledgments

PyFluent-Visualization is licensed under the MIT license.

PyFluent-Visualization makes no commercial claim over Ansys whatsoever. This tool 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-Visualization requires a legally licensed local copy of Fluent.

For more information on 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

ansys_fluent_visualization-0.22.0.tar.gz (46.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_fluent_visualization-0.22.0-py3-none-any.whl (80.8 kB view details)

Uploaded Python 3

File details

Details for the file ansys_fluent_visualization-0.22.0.tar.gz.

File metadata

File hashes

Hashes for ansys_fluent_visualization-0.22.0.tar.gz
Algorithm Hash digest
SHA256 033cb913117229359eed01f6d2618897a29eef84766b753a6e73840e9f7dae87
MD5 91e00ee2642fe8a9e907941949a49697
BLAKE2b-256 3fd899da8c171452f18c5c2fdd5fefedd5dcd87ff4ea7a08d54e71421bac9c2b

See more details on using hashes here.

File details

Details for the file ansys_fluent_visualization-0.22.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_fluent_visualization-0.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c21e372d0c11bcd2fb1b16b8df29d291f3317a07ebfa2155d89a5c5d6942a8b
MD5 a68ff0259ac745500cb89dc3af225616
BLAKE2b-256 8030f0810fff412add6ac1756d2d0903f90ad7f010377c3f96eee36c20d1219c

See more details on using hashes here.

Supported by

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