Skip to content

Backward-facing Step

Steady channel flow over a backward-facing step at Re=800 — a boundary-value problem with separation and reattachment:

(u)u+pν2u=0,u=0.

Problem setup

The channel spans x[0,15], y[12,12]. Flow enters only through the upper half of the inlet plane: the parabolic profile u(y)=24y(12y), v=0 is positive for y(0,12) (peaking at u=1.5 at y=14) and zero below, so the lower half of the inlet acts as the vertical face of a backward-facing step of height 12 — an expansion ratio of 2. The kinematic viscosity is ν=1/800, giving Re=800. Downstream of the step the flow separates, forms a recirculation bubble along the lower wall, and reattaches several step heights downstream — the quantity PINN training must get right.

Backward-facing step setup

Geometry and boundary conditions (streamwise axis compressed; the channel is 15 units long).

Boundary conditions, exactly as they enter the loss:

  • Inflow (x=0): u=24y(12y) for y>0 (zero on the step face), v=0 — terms u_in, v_in.
  • Walls (y=±12, and the step face): no-slip u=v=0 — terms u_noslip, v_noslip.
  • Outflow (x=15): p=0 — term p_out.

Together with the three momentum/continuity residuals, that is eight loss terms balanced by grad-norm weighting; collocation points are drawn from the unstructured reference mesh with MeshSampler since the geometry is non-rectangular.

Backward-facing step velocity magnitude

Reference velocity magnitude: recirculation bubble behind the step.

Results

relative L2 error 0.016recipe fixed pseudo-timeRe 800, 100k steps, single GPU

The baseline never finds the recirculation bubble: it settles at a relative L2 error of 0.28 in u (0.83 in v), an attached-flow spurious solution. Pseudo-time stepping recovers the separation, and here the constant-weight variant wins: 0.029 in u and 0.106 in v0.016 in the velocity magnitude, a ~17× improvement over the baseline. The adaptive variant helps but lands mid-way (0.15 in u) and is seed-sensitive on this problem; the recirculating flow develops slowly enough that the adaptive step-size estimate keeps shrinking the damping too early.

Backward-facing step prediction vs reference

Reference and predicted velocity magnitude, and the absolute error — concentrated along the shear layer and reattachment region.

Backward-facing step convergence

Training losses and per-variable relative L2 errors of the showcase (fixed pseudo-time) run.

Run

bash
cd examples/bfs_flow
python3 main.py --config=configs/fixed_pseudo_time.py
ConfigDescription
configs/baseline.pyPirateNet baseline
configs/pseudo_time.pyAdaptive pseudo-time stepping
configs/fixed_pseudo_time.pyConstant pseudo-time weights (showcase)

Notes

  • Reading the .vtu reference data requires pip install pyvista.

Released under the Apache 2.0 License.