Skip to content

Kolmogorov Flow

2D incompressible Navier–Stokes on a periodic square, driven by a sinusoidal body force — the flow is unsteady and vortical:

ut+(u)u+pν2u=f,u=0,f=(2sin(4πy),0).

Results

vorticity error 4.2e-02recipe 4 time windows + fixed pseudo-time4 × 100k steps, single GPU

The vortical dynamics are tracked over the full horizon to a relative vorticity error of 4.2e-02 (stitched across all four windows), versus 0.59 when trained as a single global fit — the time-window curriculum is the decisive ingredient for this flow. Pseudo-time stepping composes cleanly with it: constant damping weights (step size 1.0) train stably through every window, and an adaptive-weight variant matches it (4.4e-02 even without windows in the single-window configuration). The animation shows the prediction staying phase-locked with the reference as vortices merge and stretch; the error concentrates in the thin filaments between vortices.

Reference, PINN prediction, and absolute error of the vorticity field over all four time windows.

Kolmogorov flow convergence

Training losses and per-variable errors across the four windows (each window warm-starts from the previous one's parameters).

Run

bash
cd examples/kolmogorov_flow
python3 main.py --config=configs/pseudo_time.py \
    --config.pseudo_time.strategy=constant \
    --config.training.num_time_windows=4
ConfigDescription
configs/baseline.pyPirateNet + causal weighting
configs/pseudo_time.pyAdaptive pseudo-time stepping
configs/fixed_pseudo_time.pyConstant pseudo-time weights

Notes

  • Uses time-window training with transfer learning between windows; the vorticity is computed from the velocity network by automatic differentiation (ω=vxuy).
  • The higher-Reynolds version of this problem is the Kolmogorov flow at Re 10⁶.

Released under the Apache 2.0 License.