paper

A fast incompressible Navier-Stokes solver for non-uniform grids

arXiv:2603.09528

Abstract

We present a scalable incompressible Navier--Stokes solver for three-dimensional Cartesian grids with non-uniform spacing. A direct tensor-product--Thomas method solves the constant-coefficient Poisson and Helmholtz equations arising from pressure projection and implicit diffusion, without approximate factorization. On uniform grids, the method recovers the classical eigenfunction-expansion method evaluated with fast Fourier transforms (FFTs). On stretched grids, diagonal scaling symmetrizes the one-dimensional Laplace operators, and the resulting numerical eigenbasis transforms are evaluated as general matrix--matrix multiplications (GEMMs). FFTs and GEMMs can be selected independently in each diagonalized direction while retaining the pencil decomposition, collective transposes, and tridiagonal machinery of an established FFT-based solver. The elliptic solver is verified to round-off accuracy, and the complete flow solver is validated against benchmark flows. Against geometric multigrid and block cyclic reduction with FFT diagonalization, the present method achieves the lowest time-to-solution among the tested approaches; at fixed grid dimensions, its cost is insensitive to grid stretching. CPU and multi-GPU tests show that GEMM-rich variants attain higher strong-scaling efficiency by better amortizing communication. On a single GPU, the fully GEMM-based variant increases the Poisson cost by but the complete Navier--Stokes step cost by only . Weak scaling exposes the trade-off: dense-transform costs grow with the global transform dimension, whereas non-uniform meshes can reduce the required number of grid points. The resulting open-source solver, \texttt{CaNS-EIGEN}, extends an FFT-based Navier--Stokes solver to large-scale simulations on grids stretched in multiple directions.

A fast incompressible Navier-Stokes solver for non-uniform grids · wovepaper