FluxRender
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
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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fluxrender-0.3.0.tar.gz | 89.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fluxrender-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 185.6 kB
Release files / fluxrender-0.3.0.tar.gz
| Download URL | fluxrender-0.3.0.tar.gz |
|---|---|
| Size | 89.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9c505de7fff93a4de91bbb8b18d8b9e8f2d0daf06e7ffd23d617c41bdf4bd1f
|
|
BLAKE2b-256 checksum How to use checksums |
9165aa5f1bbdced4b9d92aa2e828be7c19a928cdc792a44b487ef0ad196e1348
|
| 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.0-py3-none-any.whl
| Download URL | fluxrender-0.3.0-py3-none-any.whl |
|---|---|
| Size | 96.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32d98a126eb0072db26d8862aa652db0aa526d947b785181e7b8ac123833dd6e
|
|
BLAKE2b-256 checksum How to use checksums |
2024cb069466fabf2af9739f30b57649bd144d48eac66716b6e97c5739f0d776
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.14
|