A GPU-accelerated matrix-free FAS multigrid solver for Navier-Stokes equations with memory-efficient implementations
Description
We develop a matrix-free Full Approximation Storage (FAS) multigrid solver based on staggered finite differences and implemented in MATLAB with GPU acceleration. To improve single-GPU efficiency, intermediate variables are reused and an X-shape Multi-Color Gauss–Seidel (X-MCGS) smoother is introduced. In the present MATLAB GPU setting, this parity-based multicolor organization enables regular vectorized updates and avoids the masking-style implementation that is less convenient for GPU array execution. Restriction and prolongation operators are also implemented in MATLAB GPU arrays. Algebraic and asymptotic convergence tests verify the solver’s robustness and accuracy, while benchmark studies on large-scale problems show effective multigrid execution on large grids. To overcome GPU memory limitations, we further design memory-efficient implementations of first- and second-order projection schemes for the Navier–Stokes equations using a dynamic reuse strategy, which reduces GPU-resident variables from 12 (first-order scheme) and 15 (second-order scheme) to only 8, lowering memory footprint and improving performance by 20–30%. This enables 512^3 Navier–Stokes computations on a single RTX 4090, where classical implementations exceed device memory. The applicability of the solver is further demonstrated through large-scale simulations. Grain growth simulations on a 512^2 grid accommodate up to q = 1189 orientations in 2D and q = 123 in 3D, with fitted growth exponents reproducing the expected scaling laws. Moreover, the memory-efficient Navier–Stokes implementations, coupled with the Cahn–Hilliard equations, enable air–water two-bubble coalescence simulations on a 256 × 256 × 1024 grid using a single RTX 4090 GPU, yielding results in close agreement with experimental observations.