Skip to main content

Plot3D Utilities

A python plot3D library for reading, writing, finding connectivity, and post processing for Plot3D data files.

Install Instructions

To install simply do a pip install plot3d

Link to documentation

Building the docs

  1. From the repo root, run pip install uv (if you don't already have uv) then uv sync --extra docs (and commit the refreshed uv.lock) to capture the new Sphinx dependencies.
  2. Build locally with uv run sphinx-build -b html docs docs/_build/html or use uv run sphinx-autobuild for live previews.
  3. Push the branch to main, then enable GitHub Pages (Settings → Pages → “GitHub Actions”) so the new workflow can deploy your merged Sphinx docs automatically.

Metis

Metis is used to group the blocks to be evaluated. So say you have 1000 blocks and 8 CPU. The blocks are split up and sent to the CPU or GPU. The split is done with weighting to block size and connectivity this way each processor is evaluating similar number of nodes. Plot3D Library will work without metis but metis functionality wont be available.

Partitioning is backed by metis-rs, a pure Rust reimplementation of METIS with Python bindings. It ships as a prebuilt wheel, so pip install plot3d (which pulls in metis-rs) is all that's needed on Linux, Mac, and Windows — no separate METIS install, no compiler, and no METIS_DLL/LD_LIBRARY_PATH setup required.

Tutorials

Reading Writing and Viewing Plot3D files

Read/Write File Formats (Binary, ASCII, Fortran, Endianness)

Periodicity with axially rotated and copied blocks

Translated periodicity

Merging Blocks

Flatten a mesh into a finite-volume graph, and solve on it: a converging-diverging duct (this notebook's graph comes from plot3d.flatten_mesh — an unstructured, multi-block 3D finite-volume graph; not to be confused with plot3d.meridional_flatten, a different, 2D axisymmetric collapse used internally by the same duct example's Euler solver stage)

Cross-plane connectivity: why some face matches need more than lb/ub

Learning Python with VSCode

Learning Bash for Automating Tasks

Tips

Never use jupyter notebook unless you are done with your .py file and want to demo code. Jupyter is painful for debugging.

Useful VS Code Extensions

Contributors

Name Position Dates Contribution
Paht Juangphanich Owner 2021- Creator https://github.com/pjuangph
David Rigby Advisor Fall 2021 Block splitting help
Christopher Keokot Intern Fall 2021 Plot3D ReactJS GUI
Tim Beach Advisor Fall 2021 Block splitting help

Connectivity & Orientation

connectivity_fast() finds matching faces between blocks and returns orientation data for each match. When two faces lie on different constant planes (e.g., a K-face connects to a J-face), the varying axes differ and an axis swap may be needed. This is encoded as a permutation_index (0–7) using 3 bits:

Bit Flag Meaning
0 u_reversed Flip first varying axis
1 v_reversed Flip second varying axis
2 swapped Transpose u and v axes

Each face match includes an orientation dict:

face_matches, outer_faces = connectivity_fast(blocks)
# Each match in face_matches has:
#   match['orientation'] = {
#       'permutation_index': int,   # 0-7
#       'plane': str,               # 'in-plane' or 'cross-plane'
#       'permutation_matrix': list  # 2x2 signed permutation matrix
#   }

The 8 permutation matrices are also available as plot3d.PERMUTATION_MATRICES.

Documentation

Rust Version

The rust version is available here. This version of the code is useful for creating CFD solvers in rust Plot3D-RS It has most of the functionality of the python version except for some of the GlennHT pre-processing code.

Funding

The development of this library was supported by NASA AATT (Advance Air Transport Technology). The development is supported by NASA Glenn LTE Branch. Anyone is welcome to contribute by submitting a pull request.

License

NASA Open Source Agreement

Metadata

Release files for plot3d 1.14.1

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

Source distribution (sdist)

Source distribution for plot3d 1.14.1
File Size Uploaded Provenance Actions
plot3d-1.14.1.tar.gz 77.4 MB With provenance Details for plot3d-1.14.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plot3d 1.14.1
File Interpreter ABI Platform Actions
plot3d-1.14.1-py3-none-any.whl Python 3 none any Details for plot3d-1.14.1-py3-none-any.whl

Total release size: 77.6 MB

Release files / plot3d-1.14.1.tar.gz

Download URL plot3d-1.14.1.tar.gz
Size 77.4 MB
Tags Source
SHA-256 checksum
How to use checksums
3ce50bdd334cf046146eef8cc5877204d89c0c3fd88fd33793243829a7f5dcaf
BLAKE2b-256 checksum
How to use checksums
22e890022c9f15fde0b0b867ac5b8167bfe8832868e0cc13e6ee14acf1d3db93
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 25, 2026.

Transparency log

Release files / plot3d-1.14.1-py3-none-any.whl

Download URL plot3d-1.14.1-py3-none-any.whl
Size 199.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52cfc99c752e58ab3a0932fc12eb8d7e4e9593180c15a180261cb4ea67b45deb
BLAKE2b-256 checksum
How to use checksums
b740789eb2b2bb0fe1f252c15a7c6a631fc396c5dfc2c7ef52e8fbe5d5286d3d
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 25, 2026.

Transparency log

Security for plot3d 1.14.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for plot3d-1.14.1.tar.gz

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

1.14.1 This release

2 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