FluxRender - Python CFD & Vector Field Visualization
A high-performance engine for mathematical vector field visualization and fluid dynamics.
FluxRender is a Taichi-powered evaluation engine designed for physicists, mathematicians, and engineers. It bridges the gap between complex mathematical definitions and real-time visual analysis.
By combining a zero-redundancy math engine with a built-in Lattice Boltzmann (LBM) fluid solver, native HSL color interpolation, and adaptive spatial grids, FluxRender allows you to explore chaotic attractors, aerodynamic flows, and topological tensors interactively.
Fluid Dynamics (Physics Engine)
- Lattice Boltzmann Solver: An integrated 2D fluid dynamics solver (D2Q9) that simulates aerodynamic flows, vortices, and fluid interactions directly on the GPU.
- Solid Colliders: Embed physical obstacles into the grid using mathematical inequalities (
EquationCollider) or external alpha-channel image files (ImageCollider). - Boundary Control: Configure perimeter behaviors, including velocity inflows, open outflows, and periodic (wrapping) spaces.
- State Baking: Save and load microscopic fluid distributions as binary
.npyfiles to bypass lengthy spin-up calculations and resume simulations instantly.
https://github.com/user-attachments/assets/6593610c-cd92-4071-ac0f-34c36b57952d
Mathematical Evaluation
- Zero-Redundancy Execution: Evaluates primary vector fields once per frame. Topological metrics (like divergence or curl) reuse pre-calculated vector data, preventing redundant GPU operations.
- Automatic Vectorization & Time Injection: Write mathematical logic in Python or NumPy. The engine inspects function signatures, handles vectorization fallbacks, and automatically injects simulation time (
t). - Interactive Data Probes: Map screen coordinates to mathematical space using
CursorRegionto sample local properties or emit particles in real-time.
https://github.com/user-attachments/assets/53c9c95d-02c4-493f-ab34-731bcfe57304
Core Architecture & Visualization
- Particle Dynamics: Simulate, render, and track tens of thousands of particles driven natively by either the LBM fluid solver or custom mathematical vector fields.
- Advanced Rendering Modes: Arrow-based vector fields feature multiple rendering strategies (e.g.,
SCREEN_FIXED,ZOOM_DENSITY_ADAPTIVE), dynamically recalculating grid spacing based on camera zoom. - Visual Granularity: Control the thickness, opacity, geometry, and anti-aliasing of visual elements. The
ColorMappermaps scalars directly through HSL space, avoiding RGB mid-tones. - UI Integration: A built-in UI system allows for attaching custom buttons and interaction listeners directly to the scene workspace.
https://github.com/user-attachments/assets/60d9f15f-900a-443e-af2b-55ffeb8ca285
Installation
FluxRender is available on PyPI and can be installed via pip:
pip install fluxrender
Quick Start
See the engine in action. This minimal setup creates a fully interactive, swirling vortex, evaluated and colored dynamically based on its rotational velocity.
import FluxRender as fr
import numpy as np
# Define flow mathematics (vector function)
def flow_vector(x, y):
X = np.sin(x) * y
Y = np.cos(y) * x
return X, Y
fr.quick_simulate(flow_vector) # This single line sets up a full interactive simulation with default settings.
Documentation
Dive deeper into the architecture, explore the rendering modes, and learn how to build complex physical environments in the official documentation:
Metadata
Release files for fluxrender 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fluxrender-0.3.2.tar.gz | 89.7 kB | Without provenance | Details for fluxrender-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fluxrender-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for fluxrender-0.3.2-py3-none-any.whl |
Total release size: 185.8 kB
Release files / fluxrender-0.3.2.tar.gz
| Download URL | fluxrender-0.3.2.tar.gz |
|---|---|
| Size | 89.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48fa96a104ab014db1c3face4581c9d3a02c78e59505816eb1dbe87a488dbd08
|
|
BLAKE2b-256 checksum How to use checksums |
56f0b726dab69113af38c855ae553911bc833108d4ea3b391be7b6efa7e5e321
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.14
|
Release files / fluxrender-0.3.2-py3-none-any.whl
| Download URL | fluxrender-0.3.2-py3-none-any.whl |
|---|---|
| Size | 96.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a38acffe7452b7997345e6624f553c3961c3c51fc24ab5802e02b65d9e66ec7
|
|
BLAKE2b-256 checksum How to use checksums |
eff0fb1598e96aa40d972b12114fea034e805145be06b4317907fc011e2afadf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.14
|
Security for fluxrender 0.3.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.