Skip to main content

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 .npy files 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 CursorRegion to 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 ColorMapper maps 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:

👉 Read the full API Reference & Guides here

Metadata

Release files for fluxrender 0.3.1

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

Source distribution (sdist)

Source distribution for fluxrender 0.3.1
File Size Uploaded
fluxrender-0.3.1.tar.gz 89.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fluxrender 0.3.1
File Interpreter ABI Platform
fluxrender-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 185.7 kB

Release files / fluxrender-0.3.1.tar.gz

Download URL fluxrender-0.3.1.tar.gz
Size 89.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3245ba67936f543156ff001369cc8a91262c9ca3963fbbb37a2c48e7c7da6a4d
BLAKE2b-256 checksum
How to use checksums
5b0ac29c64f4b6054cbac8c19aa39e13494548e9895bf8e941959559f49f3f38
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.1-py3-none-any.whl

Download URL fluxrender-0.3.1-py3-none-any.whl
Size 96.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e0c8616ed3d72dabe243ede62dcd15dabceb81ce7087dcca80bad21889d7e5d
BLAKE2b-256 checksum
How to use checksums
fb8170fba0948a0dc59d301774f8ce8072125fd25b6c19dff29d599f3fa9b827
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.14

Release history Release notifications | RSS feed

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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