EPSILON-PHASE is an interactive wind-simulation physics engine with a built-in frontend, powered by a numeric robustness layer for quantization and noise handling.
You can open a local wind tunnel UI, choose a shape (circle, square, triangle, or airfoil), set wind conditions, and immediately see the simulated flow field.
Under the hood, EPSILON-PHASE runs a 2D fluid-style simulation and stabilizes its numeric updates with stochastic resonance + subtractive dithering.
In practical terms, it can:
- run wind simulation on multiple shapes,
- visualize speed fields and flow vectors in a frontend canvas,
- estimate drag/lift proxies and wake deficit,
- reduce quantization artifacts that create "steppy" numeric behavior,
- inject controlled noise when progress is flat,
- keep error less correlated with the original signal,
- report clear metrics (SNR change, MSE, stability norms),
- plug into real-time or offline systems through a stable
pull_chunk()noise-input contract.
- Primary API:
epsilon_phase.architecture.NumericRobustnessLayer - Physics API:
epsilon_phase.physics.simulate_wind_field - Local wind-lab frontend:
epsilon-phase-windlab - Adaptive stochastic resonance gain control
- Subtractive dithering for quantization decorrelation
- Optional GPUDirect-compatible ring ingestion
- Reproducible robustness and flow benchmarks
This section captures the key equations implemented by the code.
Environmental noise is centered and scaled before mixing:
where
The deterministic signal
Let
Draw dither from a uniform distribution:
Quantize with step size
Apply subtractive dither:
This reduces signal-correlated quantization error.
Output error:
Mean squared error:
Signal-to-noise ratio form used by the layer:
with benchmark delta:
The stability benchmark tracks iterative boundedness with:
and reports
For users who need stochastic state updates, EPSILON-PHASE also provides:
with optional post-step subtractive dithering and norm clamping.
The wind engine uses a fluid-style velocity update with diffusion, advection, and pressure projection:
Obstacle boundary condition (no-slip approximation inside obstacle mask):
Tracer transport used for wake visualization:
Numeric robustness can be applied to velocity channels each step:
where
- Base resonance gain is small (
0.02) to avoid overwhelming the signal. - Gain is bounded (
0.005to0.30) for numerical safety. - Quantization step defaults to
1/4096as a practical fine-grain baseline.
- src/epsilon_phase/: Python package (numeric layer, runtime hooks, benchmarks)
- src/epsilon_phase/physics/: wind simulation engine
- src/epsilon_phase/windlab/: local frontend server and web UI assets
- tests/: Python tests for robustness behavior and benchmark execution
- docs/: architecture and roadmap for numeric robustness
- rust/epsilon_prefetch/: optional experimental prototype track
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install -e .[dev]pytest -qepsilon-phase --benchmark quantization --steps 8 --dim 128
epsilon-phase --benchmark stability --steps 8 --dim 128epsilon-phase-windlabOpen your browser at http://127.0.0.1:8787 if it does not auto-open.
import numpy as np
from epsilon_phase.architecture import NumericRobustnessLayer
from epsilon_phase.runtime import GPUDirectRDMARing
layer = NumericRobustnessLayer(vector_dim=128)
ring = GPUDirectRDMARing(seed=42)
noise = ring.pull_chunk(128)
signal = np.linspace(-1.0, 1.0, 128)
result = layer.process(signal, noise, progress_metric=1.0)
print(result.snr_delta_db, result.mse)EPSILON-PHASE now targets a concrete end-to-end goal: an interactive wind physics engine for trying multiple shapes in a frontend, with numeric robustness built directly into the simulation pipeline.
This repository is software-first and integration-ready. The current ring layer
is a compatibility hook with simulation fallback. Replace the producer side
with your transport while preserving the pull_chunk() API.
MIT