  The abundance of data has given machine learning considerable momentum in
natural sciences and engineering, though modeling of physical processes is
often difficult. A particularly tough problem is the efficient representation
of geometric boundaries. Triangularized geometric boundaries are well
understood and ubiquitous in engineering applications. However, it is
notoriously difficult to integrate them into machine learning approaches due to
their heterogeneity with respect to size and orientation. In this work, we
introduce an effective theory to model particle-boundary interactions, which
leads to our new Boundary Graph Neural Networks (BGNNs) that dynamically modify
graph structures to obey boundary conditions. The new BGNNs are tested on
complex 3D granular flow processes of hoppers, rotating drums and mixers, which
are all standard components of modern industrial machinery but still have
complicated geometry. BGNNs are evaluated in terms of computational efficiency
as well as prediction accuracy of particle flows and mixing entropies. BGNNs
are able to accurately reproduce 3D granular flows within simulation
uncertainties over hundreds of thousands of simulation timesteps. Most notably,
in our experiments, particles stay within the geometric objects without using
handcrafted conditions or restrictions.
