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
Building the docs
- From the repo root, run poetry install --with docs (and commit the refreshed poetry.lock) to capture the new Sphinx dependencies.
- Build locally with poetry run sphinx-build -b html docs docs/_build/html or use poetry run sphinx-autobuild for live previews.
- 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.
Ubuntu
Metis needs to be installed and configured as part of your METIS_DLL or LD_LIBRARY path
- Download Metis http://glaros.dtc.umn.edu/gkhome/metis/metis/download
- Follow the compiling instructions
Add to your profile for Ubuntu
# metis
export PATH="/home/[username]/metis:$PATH"
export LD_LIBRARY_PATH="/home/[username]/metis:$LD_LIBRARY_PATH"
Mac
For Mac. install homebrew and do brew install metis then add this to your ~/.zprofile
# Metis
export METIS_DLL=/opt/homebrew/Cellar/metis/5.1.0/lib/libmetis.dylib
- Install metis python library
pip install metis
Tutorials
Reading Writing and Viewing Plot3D files
Read/Write File Formats (Binary, ASCII, Fortran, Endianness)
Periodicity with axially rotated and copied blocks
Export a mesh to the GlennHT-GPU graph format
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
- Better comments https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments
- Python syntax highlighting https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance
- Remote Development https://code.visualstudio.com/docs/remote/remote-overview
- Python doc string generator https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring
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
- Face Orientation: Cross-Plane Connectivity — why cross-plane face connections need orientation flags beyond lb/ub, and how the 8-permutation system works
- Presentation (PowerPoint) — visual walkthrough of 2D→3D diagonal combinatorics
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plot3d-1.10.0.tar.gz.
File metadata
- Download URL: plot3d-1.10.0.tar.gz
- Upload date:
- Size: 122.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4afc796f96b8fdeb62d0d2879c10bfc77ea08a1726fbeeddbb42a968c5de7a94
|
|
| MD5 |
c8660ec0233ed4475433aeb91bf3c3d5
|
|
| BLAKE2b-256 |
9e908e39dab02f4f6c9d38895f0cfb8216a2f48f7982679e6b2491172b6be858
|
File details
Details for the file plot3d-1.10.0-py3-none-any.whl.
File metadata
- Download URL: plot3d-1.10.0-py3-none-any.whl
- Upload date:
- Size: 132.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d590151300bc1a372a47d9c7d46c87c6b0bfb96f32d6202d4f7491fb36c4332
|
|
| MD5 |
eb2d74534445aa70675b36fc52f7430f
|
|
| BLAKE2b-256 |
28ea1bdc18c12e3df93e7d196d5fa4cb5bfcdf7d895fe01aa29af813d7fccd7d
|