Multiphysics simulation with lattice Boltzmann methods (LBM) requires a scheme hand-derived for each partial differential equation (PDE), a labor-intensive, error-prone bottleneck. We recognize our recently proposed class of LBM schemes as a discrete-kinetic relaxation approximation of conservation laws and generalize its hand derivation to an automated one for systems of hyperbolic, parabolic, and mixed-type conservation laws. The derivation splits into three steps: First, the PDE system is equivalently rearranged into a first-order cascade of conservation laws: every spatial derivative in flux or source becomes an auxiliary variable, recursively for higher derivatives, so all fluxes are algebraic and updates stay local. Second, the augmented system is approximated by a discrete-velocity kinetic relaxation model with linear, constant-coefficient transport: all nonlinearity resides in a local equilibrium embedding the flux exactly in its first moment, trading the low-Mach truncation for an a priori checkable sub-characteristic wave-speed bound. Third, the relaxation system is discretized by a standard LBM, yielding collide-and-stream algorithms running unchanged on existing solvers. A symbolic compiler using a domain-specific language encapsulates these steps: unlike existing LBM code generators, which start from the discrete scheme, it automatically derives equilibrium, gradient-tracking cascade, and grid scaling from the declared PDE alone. We exercise it across twelve PDE systems, including compressible Navier--Stokes--Fourier flow, resistive magnetohydrodynamics, and nonlinear elasticity. Manufactured-solution verification confirms convergence at or near second order in double precision, retained in single precision by a reference- and equilibrium-shifted formulation. Targeting OpenLB, the generated GPU kernels reach up to 96% of the memory-bandwidth roofline.
翻译:暂无翻译