ShockFLOW - a GPU based 1D/2D Transonic CFD solver
Shock flow is a purely GPU-based transonic 1D/2D CFD solver based on the Entropic Lattice Boltzman Methods. This module implements the interface via python to the backend, build
entirely in CUDA/C++ with OpenGL support. It can be used to simulate complex transonic and supersonic 1D and 2D problems, remaining stable and well posed up until Mach 5.0.
|
|
|
GPU Architecture Support
As of the latest release, the currently supported compute modes and architectures are:
| Architecture | Compute Capability | FP32 | FP64 | Linux | Windows | shockFLOW | shockFLOW-cu129 |
|---|---|---|---|---|---|---|---|
| Pascal | 6.x | Yes | No | Yes | No | x | |
| Volta | 7.0 | Yes | No | Yes | No | x | |
| Turing | 7.5 | Yes | No | Yes | Yes | x | x |
| Ampere | 8.x | Yes | No | Yes | Yes | x | x |
| Ada Lovelace | 8.9 | Yes | No | Yes | Yes | x | |
| Hopper | 9.0 | Yes | No | Yes | Yes | x |
Note that FP64 is currently unavailable on all architectures. This is due to the large file size required for the pip repository. This will be fixed in the near future.
Requirements
For the module to function correctly, make sure you have:
- An NVIDIA GPU
- NVIDIA driver version ≥ 580
- ffmpeg
Installation
The package is available via pip:
For CUDA 13.3 Versions (supporting GPUs with compute capability of >=7.5
pip install shockFLOW
For older GPUs, use a build with CUDA 12.9:
pip install shockFLOW-cu129
after installation, run a simple test program:
import shockFLOW.solver as solver
solver.getDeviceProperties()
Validation
While still being an experimental solver, we have performed a few validation runs and comparisons with existing software. For more details on the problems and detailed results, please see https://arc.aiaa.org/doi/abs/10.2514/6.2026-5123
Gaussian Pulse Advection
Riemann Problem
A classical Riemann problem, defined initially as a density discontinuity, splits into three waves. See https://en.wikipedia.org/wiki/Riemann_problem. This validation problem can be run by a builtin function of the solver.
The initial discontinuity is defined as:
$$ \frac{\rho}{\rho_0} = 4, \qquad \frac{T}{T_0} = 1, \qquad \frac{p}{p_0} = 4 $$
And the freestream conditions:
$$ \begin{aligned} T_\infty &= 300.0 \ \text{K} \ R &= 287.058 \ \text{J/(kg·K)} \ p_\infty &= 100000 \ \text{Pa} \ \rho_\infty &= 1.118 \ \text{kg/m}^3 \ \gamma &= 1.4 \ \mu &= 1.886109\times10^{-4} \ \text{Pa·s} \end{aligned} $$
Running the simulation for 200us (in physical time) produces the result:
|
|
|
Schardin's problem: a shock - vortex interaction.
See more details: https://link.springer.com/article/10.1007/s001930000061
Similarly to the Riemann problem, the initial discontinuity is defined as:
$$ \frac{\rho}{\rho_0} = 4, \qquad \frac{T}{T_0} = 1, \qquad \frac{p}{p_0} = 4 $$
while the wedge is selected as an equilateral triangle, with:
$$ \begin{aligned} L_c &= 20 \ \text{mm} \ N_v &= 256 (voxels) \end{aligned} $$
Measuring time after the first shock impacts the wedge, density gradients are extracted and compared with both existing solvers and Schielern experimental photography. For detailed analysis and comparison, please see https://arc.aiaa.org/doi/abs/10.2514/6.2026-5123.
|
|
|
License
The Python interface in this repository is licensed under the MIT License. The compiled CUDA/C++ backend distributed via PyPI is proprietary — free to use, but reverse engineering, decompilation, or redistribution as a standalone product is not permitted. See LICENSE-BINARY.md for full terms.
Future Development
I really hope to eventually expand this solver to work in 3D
Metadata
Release files for shockFLOW 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shockflow-1.0.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details |
Release files / shockflow-1.0.0-cp312-abi3-win_amd64.whl
| Download URL | shockflow-1.0.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 64.0 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
313803e782bbfd80b6774e7e061d0dfba8bfc5a1b72c6246612580c8f8c5e5f3
|
|
BLAKE2b-256 checksum How to use checksums |
1779e10f6b531c1401ed11f451cdf3bf555576eadec01a6d50bf010930e0041f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Security for shockFLOW 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.