Skip to main content

phiPICT Logo

Python PyTorch CUDA License Release Docs

φ-PICT: Differentiable GPU-Accelerated Solver for Hydrodynamic & Magnetohydrodynamic Flows



Flow Past a Cylinder Rayleigh-Bénard Convection Airfoil Turbulent Channel Flow
Vortex structures in the wake of a cylinder Temperature in 3D Rayleigh-Bénard convection Vortex structures behind an airfoil Vortex structures in turbulent channel flow
Fusion Reactor Blanket Cooling (MHD) MHD Rayleigh-Bénard Convection
Temperature in a fusion reactor blanket cooling duct Temperature in Rayleigh-Bénard magnetoconvection

Key Features

  • Differentiable Physics: Fully end-to-end differentiable solver supporting Backpropagation Through Time (BPTT/APG), Short-Horizon Actor-Critic (SHAC) and more.
  • Massively Batched Execution: Efficiently parallelize over 100 of independent fluid environments on a single GPU.
  • MHD & Standard Hydrodynamics: Simulates both magnetohydrodynamic (MHD) flows and standard hydrodynamic fluid mechanics.
  • RL Framework Integration: Seamlessly integrated into FluidGym for plug-and-play benchmarking of control algorithms.

Installation

phiPICT needs Linux, an NVIDIA GPU with a driver for CUDA 12.8 (≥ 570) and Python 3.11–3.13.

📦 Installation from PyPI

pip install phipict

This also installs the matching PyTorch (2.10, built with CUDA 12.8), pyamg, and the remaining runtime dependencies (NumPy, SciPy, matplotlib, imageio, psutil). There is no need to install PyTorch first: the compiled extension only works with the PyTorch version it was built against, so pip replaces any other version. For other PyTorch or CUDA versions, use a prebuilt wheel from our wheel index or build from source (see below).

Optional extras:

pip install "phipict[dev]"   # linters, type checking, and tests
pip install "phipict[docs]"  # Sphinx, to build the documentation

Reading VTK formats other than .vts/.vtm needs pip install pyvista.

🎡 Other PyTorch Versions

Prebuilt wheels for other PyTorch/CUDA combinations are available from our wheel index:

PyTorch CUDA 12 (driver ≥ 570) CUDA 13 (driver ≥ 580)
2.10 PyPI default (pip install phipict) –
2.13 – ✓
2.14 ✓ ✓
2.15 – ✓

Install PyTorch first, then the phiPICT wheel matching its version, e.g. for PyTorch 2.14 with CUDA 12.6:

pip install "torch==2.14.*" --index-url https://download.pytorch.org/whl/cu126
pip install phipict -f https://upb-sciml.github.io/phiPICT/whl/torch-2.14+cu12.html

The page name is torch-<PyTorch minor>+cu<CUDA major>.html. For the PyTorch already installed in your environment:

pip install phipict -f "https://upb-sciml.github.io/phiPICT/whl/torch-$(python -c 'import torch; v = torch.__version__.split("."); print(f"{v[0]}.{v[1]}+cu{torch.version.cuda.split(".")[0]}")').html"

🧱 Build from Source

Building from source compiles the CUDA kernels against the PyTorch installed in your environment. Here is an example for Python 3.12 and CUDA 12.8.

  1. Create a new conda environment and activate it:
conda create -n phipict python=3.12
conda activate phipict
  1. Install the CUDA toolkit from conda-forge. This also installs a gcc/g++ that the chosen nvcc supports, so no separate compiler install is needed. The CUDA major version must match the one your PyTorch build uses (12 here):
conda install -c conda-forge pip cuda-toolkit cuda-version=12.8
conda env config vars set CUDA_HOME="$CONDA_PREFIX"
conda activate phipict  # re-activate so CUDA_HOME takes effect
  1. Install PyTorch for the same CUDA version via pip. Any version ≥ 2.9 works; the extension is then bound to this version:
pip install "torch==2.10.*" --index-url https://download.pytorch.org/whl/cu128
pip install "setuptools>=77"  # the build uses the environment's setuptools
  1. Clone the repository and enter the directory, then compile the custom CUDA kernels and install the package (this might take several minutes):
make install

For development, use make install-dev instead, which installs the package in editable mode together with the development dependencies.

The documentation dependencies are installed via pip install ".[docs]".

Getting Started

See the examples directory for example simulations.

License

This repository is published under the Apache-2.0 license.

Metadata

Release files for phipict 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for phipict 0.1.1
File Interpreter ABI Platform Actions
phipict-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for phipict-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
phipict-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for phipict-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
phipict-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for phipict-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Total release size: 97.6 MB

Release files / phipict-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL phipict-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 32.6 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c1fdfe1bdb42a0118d7eda475fe4c26e6e47a1d36b633ba797e6a0cea70e385a
BLAKE2b-256 checksum
How to use checksums
06fee7347f33dfd301cedcd26626764f0f900b9db3328bdc346169389d053c3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / phipict-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL phipict-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 32.6 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
350d8327d86854fa703f4b7af5758f724b952d5d7dc6f0cfe97ee74e726a8496
BLAKE2b-256 checksum
How to use checksums
a381eddb2ad1d72fd9e21ea8db648dd298df59f599bf7e1f2ea7410af971caa6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / phipict-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL phipict-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 32.5 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f93cd064f55fd9c3957c686a54f867b33088a670a7d7d1ffe526aa5dad64ae85
BLAKE2b-256 checksum
How to use checksums
a15ddd5a079553d61484fe0f079ec0027f216aa4deb035e91c81883966ef86a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for phipict 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for phipict-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

3 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page