Free surface and two-phase flow¶
English | Japanese
OpenRheo has two water models. The single-phase free surface computes only the water and treats the air as an atmospheric-pressure boundary, so the gauge pressure comes out directly; it is the main line for dam breaks, tsunamis and wave loads. The two-phase phase field computes water and air together; it is for air entrainment, bubbles and contact angles. This page says why the main line moved from two-phase to free surface, what each model does today, what was measured and what is still open.

From two-phase to free surface¶
The first water model (2026-07-10) was the phase field (two_phase.hpp). It
passed the Laplace-pressure test and was stable at a density ratio of 1000
with MRT, but on the Koshizuka & Oka dam break the front ran 20–25 % slow, and
on SPHERIC test 2 it missed the first impact (11 kPa at 0.42 s measured).
A survey of the literature (2026-07-11) showed that LBM work on tsunamis and wave loads uses the single-phase free surface. It removes three problems seen with two-phase by construction: the pressure offset of trapped air, the blow-up of the run-up, and the instability at high Mach number. It was built in steps: Körner/Thürey interface cells, a global mass correction (mass drift 6–10 % down to about 1e-15), MRT and Smagorinsky, and then the dam break again.
The remaining error of the column height came from the wall condition: with no-slip walls the column stuck to the wall. Free-slip (mirror) walls with a smaller lattice gravity (Mach about 0.35) settled it; they are the default of the dam-break driver.
The free-surface model today¶
free_surface.hpp: each cell is gas, interface or fluid; an interface cell
carries its mass and fill fraction; missing populations at the interface are
rebuilt from the atmospheric pressure. Each step exchanges mass across the
interface, updates the fill, converts cells and keeps the interface layer
closed.
The stabilisers matter, and not in the obvious way: on the collapsing column, Smagorinsky on its own made things worse than nothing. MRT, Smagorinsky and the removal of isolated splash cells together give the smallest error.

- A D3Q27 cumulant version (
free_surface_d3q27.hpp) applies gravity with the exact-difference method, which fixed the interface mass loss of the D3Q19 cumulant. It has no solid obstacles, splash removal, surface tension or PLIC. - Surface tension (
sigma) and PLIC advection exist as hooks but are off: the curvature is not robust enough yet. - There is no contact-angle model in the free surface; that is two-phase only.
Two-phase today¶
two_phase.hpp: a conservative Allen–Cahn interface with Fakhari's
high-density-ratio model, D3Q19. MRT (s_ghost >= 0) is needed for high
density ratios. Contact angles use the Ding–Spelt wetting condition or a
general wall wetting; both are off by default.
AMR for the free surface¶
The free surface needs fine cells only near the thin front (a grid study at na = 48 showed this), so it is a natural case for AMR. What exists is a slab prototype: a fine slab at the bottom, a horizontal coarse/fine seam and a seam flux correction, static or moving with the water. It conserves mass (drift per step at most 4.5e-14 over 6000 SPHERIC steps) but is slow:

The coupling runs on the host every substep, so the slab is 2.7 times slower than the uniform fine grid despite 41.4 % fewer cell updates, and its shape caps the saving at about 40 % (2026-07-27). The decision was to build the production free-surface AMR on the leaf-block forest and keep the slab as the reference. That forest version has not been built.
Measured¶
| what | result | record |
|---|---|---|
| Koshizuka & Oka dam break, free surface, free-slip, na = 48 | front z/a +2.5 % at T = 2, −1 % at T = 3; column height b/2a +1.2 % at T = 2.06, +2.2 % at 2.5, +6.7 % at 3.1 (no-slip: +27 to 61 %) | native-amr-backend.md, 2026-07-11 |
| Same, na = 48 against na = 64 | b/2a within 0.6 % | native-amr-backend.md |
| Global mass correction | drift 6–10 % → about 1e-15 | native-amr-backend.md |
| Laplace pressure, two-phase | ratio to theory 0.956 (BGK), 0.959 (MRT) | native-amr-backend.md, 2026-07-10 |
| SPHERIC test 2, free surface with splash removal, res 48 | first impact about 15 kPa at t = 0.4 s (measured 11 kPa) | native-amr-backend.md, 2026-07-11 |
Still open¶
- Free-surface AMR on the forest (and on D3Q27 and MPI after it).
- The pressure noise on SPHERIC after the first impact; the gallery still reports the impact peak as too high.
- A robust curvature, so that surface tension can be turned on.
- A time-dependent inflow (the analytic Stoker solution) was designed; it is not built, and there is no outflow boundary.
Design records¶
Frozen; they are not updated and are not translated.
- native-amr-backend.md — the history of the water models (2026-07-10 and 11, Japanese)
- freesurface-dynamic-amr-design.md — dynamic AMR for the free surface
- fs-amr-stages-design.md — the slab prototype and the plan for the forest
- fs-inflow-design.md — the Stoker inflow