  This paper presents a spatially and temporally adaptive boundary condition to
specify the volumetric flux for lattice Boltzmann methods. The approach differs
from standard velocity boundary conditions because it allows the velocity to
vary over the boundary region provided that the total flux through the boundary
satisfies a prescribed constraint, which is a typical scenario for laboratory
experimental studies. This condition allows the boundary pressure to adjust
dynamically to yield a specified boundary flow rate as a means to avoid
unphysical mismatch between the boundary velocity and the interior flow field
that can arise when a constant velocity boundary condition is applied. The
method is validated for simulation of one- and two-fluid flow in complex
materials, with conditions determined to match typical experiments used to
study flow in porous media.
