  A novel mesh refinement sensor is proposed for lattice Boltzmann methods
(LBMs) applicable to either static or dynamic mesh refinement algorithms. The
sensor exploits the kinetic nature of LBMs by evaluating the departure of
distribution functions from their local equilibrium state. This sensor is first
compared, in a qualitative manner, to three state-of-the-art sensors: (1) the
vorticity norm, (2) the Q-criterion, and (3) spatial derivatives of the
vorticity. This comparison shows that our kinetic sensor is the most adequate
candidate to propose tailored mesh structures across a wide range of physical
phenomena: incompressible, compressible subsonic/supersonic single phase, and
weakly compressible multiphase flows. As a more quantitative validation, the
sensor is then used to produce the computational mesh for two existing
open-source LB solvers based on inhomogeneous, block-structured meshes with
static and dynamic refinement algorithms, implemented in the Palabos and
AMROC-LBM software, respectively. The sensor is first used to generate a static
mesh to simulate the turbulent 3D lid-driven cavity flow using Palabos.
AMROC-LBM is then adopted to confirm the ability of our sensor to dynamically
adapt the mesh to reach the steady state of the 2D lid-driven cavity flow. Both
configurations show that our sensor successfully produces meshes of high
quality and allows to save computational time.
