CPU-Based Semi-Lagrangian Advection for Viscous Incompressible Fluids on Adaptive Grids with GPU-Assisted Visualization
Abstract
The paper proposes an efficient semi-Lagrangian scheme on a CPU for simulating two-dimensional viscous incompressible fluids with GPU-assisted visualisations. We solve the Navier-Stokes equations on a quadtree adaptive grid where certain cells are subdivided if the velocity gradient, along any of the axes, exceeds a certain value. Generally speaking and in our tests, it results in a 66% reduction in active cells compared to a uniform grid with the same maximum resolution on average. During a test on an Intel Core i7-9700K processor with a static obstacle (Re=100), the implementation achieves 60 fps with an effective resolution of 256×256. (The GPU is used only for rendering through SFML). By using an adaptive grid, we achieved a speed-up of 2.7× over a uniform grid while maintaining vortex shedding and wake regions' visual effects. We demonstrate fluid interaction with static objects and achieve quantified boundary leakage below 1.2%. In addition, a sensitivity analysis of the method justifies a choice of five Gauss-Seidel iterations per time step. The technique is suitable for real-time interactive computing environments, games and high-res visuals.