Rheon

RUST → WEBASSEMBLY → ACCEPTED STATE

Compute a step. Publish it whole.

Begin with a prediction

Four unit cells form a 2 × 2 × 1 sealed box, initially at rest, with density 1 kg/m³. A prescribed acceleration of 2 m/s² acts in the x direction on the lower row for 0.25 s. Only its interior x face receives an impulse. Without pressure correction, that face would reach 0.5 m/s and the cell fluxes would not balance.

Predict the circulation that can remain after pressure correction. The orange region marks the force support. Teal arrows show accepted velocity at a fixed scale; there is no interpolated animation.

Run one actual timestep

Press Run one step. The existing Rust Simulation::step_with_forces executes in a browser worker through WebAssembly: velocity advection, force application, pressure solve, corrected-field acceptance and tracer update precede publication. Advection starts from rest and tracer stays zero in this fixture.

The forced interior vector is q = (½, 0, 0, 0). The divergence-free cycle is c = (1, −1, −1, 1). Its projection is c(q·c)/(c·c) = c/8. Compare all four speeds with (+⅛, −⅛, −⅛, +⅛) m/s. Force-stage work is ⅛ J; accepted kinetic energy is 1/32 J. The pressure report and stored-field divergence measure different stages.

Both listed pressure methods use the existing settings and acceptance gates. Changing the method starts a new run. Only one step may be accepted per reset: repeating the force would activate nontrivial advection and invalidate this first-step oracle.

A rejected candidate is not a new state

Press Reject before commit, before or after acceptance. The real native callback rejects at BeforeCommit. The candidate is discarded; every accepted field bit, time and generation must stay unchanged. This is a scheduled rejection probe, not a promise that JavaScript can interrupt a synchronous WASM call.

After rejection from rest, a retry should match an uninterrupted first step. Reset state uses the native reset operation: it clears the fields and time while incrementing generation. Scrolling, switching phone layouts and moving the camera preserve the simulation state.

Scope. This is one fixed-box force/projection integration fixture. It demonstrates no evolving liquid surface, viscosity, buoyancy, variable density, moving geometry or contact physics. The root solver and pressure API are unchanged. Native and browser agreement for this fixture does not qualify arbitrary grids or all WebAssembly engines.

Read state ownership and publication → · Inspect the capability audit and theory visualization backlog

Chapter introduction

Loading 3D…