π€ AI Summary
In two-dimensional smoothed particle hydrodynamics (SPH), boundary integrals are notoriously difficult to evaluate analytically, severely limiting both accuracy and computational efficiency. Method: This paper proposes a closed-form area integration method for SPH kernel functions and their gradients over triangular boundaries. We derive, for the first time, a general analytical integral formula for arbitrary-degree compactly supported polynomials over arbitrary triangular domains, enabling numerically stable evaluation via Chebyshev polynomials and the Gaussian hypergeometric function $_2F_1$. By discretizing boundaries into triangular elements and embedding differentiable analytical integration modules, the method supports high-order boundary conditions and flexible coupling with SPHβmesh hybrid schemes. Contribution/Results: Experiments demonstrate a five-order-of-magnitude speedup in integral and gradient evaluations over conventional numerical quadrature, achieving machine precision. The implementation is open-source, significantly enhancing boundary treatment efficiency in SPH and enabling robust multi-paradigm method integration.
π Abstract
We present a fully analytic approach for evaluating boundary integrals in two dimensions for Smoothed Particle Hydrodynamics (SPH). Conventional methods often rely on boundary particles or wall re-normalization approaches derived from applying the divergence theorem, whereas our method directly evaluates the area integrals for SPH kernels and gradients over triangular boundaries. This direct integration strategy inherently accommodates higher-order boundary conditions, such as piecewise cubic fields defined via Finite Element stencils, enabling analytic and flexible coupling with mesh-based solvers. At the core of our approach is a general solution for compact polynomials of arbitrary degree over triangles by decomposing the boundary elements into elementary integrals that can be solved with closed-form solutions. We provide a complete, closed-form solution for these generalized integrals, derived by relating the angular components to Chebyshev polynomials and solving the resulting radial integral via a numerically stable evaluation of the Gaussian hypergeometric function $_2F_1$. Our solution is robust and adaptable and works regardless of triangle geometries and kernel functions. We validate the accuracy against high-precision numerical quadrature rules, as well as in problems with known exact solutions. We provide an open-source implementation of our general solution using differentiable programming to facilitate the adoption of our approach to SPH and other contexts that require analytic integration over polygonal domains. Our analytic solution outperforms existing numerical quadrature rules for this problem by up to five orders of magnitude, for integrals and their gradients, while providing a flexible framework to couple arbitrary triangular meshes analytically to Lagrangian schemes, building a strong foundation for addressing several grand challenges in SPH and beyond.