Skip to main content

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. image

Density Field
Density Gradient
For examples, usage and documentation, see the official example repository https://github.com/DKrasauskas/shockFLOW-examples:

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:

Comparison with analytical results
Density gradient showing 1: rearwards moving expansion fan 2: contact discontinuity 3: shock

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. image

92us after impact
105 us after impact

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 0.6.0

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

Built distribution (wheel)

Table of built distributions (wheels) for shockFLOW 0.6.0
File Interpreter ABI Platform
shockflow-0.6.0-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details

Release files / shockflow-0.6.0-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL shockflow-0.6.0-cp312-abi3-manylinux_2_28_x86_64.whl
Size 80.2 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
0f8f8c76352ca0879bc50d7226e133f21ad9861290210ca40950f990e85068d7
BLAKE2b-256 checksum
How to use checksums
f85316439d0c1fde15b7c97cf1045994444de34b50b93788aa7a5c06fa5c4a08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for shockFLOW 0.6.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.

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