← Latest papers
🔬 condensed matter

GEMSS: A C++ Library for Multi-Sphere Modeling in DEM Simulations

GEMSS is a header-only C++ library that converts 3D meshes or voxel grids into multi-sphere representations using the MSS algorithm, enabling the calculation of essential physical properties and on-the-fly particle generation for DEM and multibody dynamics simulations.

Original authors: Arash Moradian, Felix Buchele, Thorsten Poeschel

Published 2026-08-18
📖 5 min read🧠 Deep dive

Original authors: Arash Moradian, Felix Buchele, Thorsten Poeschel

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Granular materials, from the sand on a beach to the grains of coffee in a jar, behave in ways that are surprisingly difficult to predict. While a single grain of sand is simple, a pile of them acts like a fluid, a solid, or a gas depending on how it is moved. To understand these behaviors, scientists use computer simulations that track every individual particle. For decades, these simulations have relied on a simplifying assumption: that every particle is a perfect sphere. This makes the math easier, but it ignores the jagged edges, flat faces, and irregular bumps of real-world grains. When particles are not round, they lock together differently, roll differently, and break apart differently. To capture these nuances, researchers have developed methods to build complex shapes out of clusters of small spheres, stitching them together like a mosaic to mimic the true form of a rock or a grain of sand. However, until now, creating these complex models has been a slow, separate process that happens before the main simulation begins, making it nearly impossible to study how particles change shape while they are moving, grinding, or breaking.

A team of researchers at Friedrich-Alexander-Universität Erlangen-Nürnberg has introduced a new tool called GEMSS that changes how these simulations are built. This software acts as a generator that can take a digital description of a particle's shape and instantly convert it into a cluster of spheres, all while the main simulation is running. The researchers call this a "multi-sphere" approach, where a single irregular object is represented by a collection of overlapping balls. The key innovation is that this tool is designed to work directly inside the simulation loop. Previously, scientists had to stop their simulation, run a separate program to generate the particle shapes, calculate their physical properties like weight and balance, and then restart the simulation with the new data. GEMSS removes this stop-and-start workflow, allowing the computer to generate these complex shapes on the fly as the simulation progresses. This capability opens the door to studying dynamic processes, such as how a rock breaks into smaller pieces or how a surface wears down over time, without having to pause the virtual world to recalculate the shapes.

The tool works by taking a digital model of a particle, which can be a detailed 3D mesh or a grid of tiny cubes, and filling it with spheres. The software is careful to ensure that the cluster of spheres fits the original shape as closely as possible. It manages a specific type of roughness that naturally occurs when you try to approximate a smooth curve with round balls; if the balls are too far apart, the surface looks bumpy and jagged. The software adjusts the spacing of these spheres based on their size, ensuring a consistent level of detail across the entire particle. It also checks to make sure the resulting cluster is a single, connected object, removing any stray spheres that might get left behind in narrow crevices. Once the shape is built, the software immediately calculates the essential physical data needed for the simulation to run, such as the total volume, the center of mass, and how the mass is distributed. This means the simulation knows exactly how the particle will rotate and react to forces the moment it is created.

To test the accuracy of this new method, the researchers compared the properties of the generated sphere clusters against the exact mathematical properties of simple shapes like cubes, cylinders, and cones. They found that the volume of the generated particles was accurate to within a tiny fraction of a percent, and the way the mass was distributed was accurate to within three percent. Even the center of mass, the point where the particle balances, was calculated with an error of less than one percent. These results held true even for complex, real-world shapes, such as a grain of sand from Hamburg, which the researchers modeled using hundreds of spheres. The software proved capable of handling these intricate forms with high precision, confirming that the simplified sphere clusters could faithfully represent the physical behavior of the original irregular shapes.

One of the most significant findings is how the software balances the number of spheres used against the smoothness of the resulting shape. If the user asks for a very smooth surface, the software uses many small spheres, which is computationally expensive. If the user allows for a slightly rougher surface, the software can use fewer, larger spheres, which speeds up the simulation. The researchers demonstrated that even with a very small number of spheres, the software could capture the overall structure and key features of a complex particle. This flexibility allows scientists to choose the right level of detail for their specific needs, whether they are studying the slow settling of sand or the violent collision of rocks. The tool is written in a modern programming language that allows it to be easily plugged into existing simulation frameworks, and it has already been integrated into a popular open-source simulation package, where it can generate these particles with a single command.

The impact of this work lies in its ability to simulate change. In many industrial processes, particles do not stay the same; they are crushed, ground, or worn down. With GEMSS, a simulation can now watch a large rock break into smaller fragments and immediately generate the new shapes of those fragments as they appear. This eliminates the need for pre-calculated libraries of shapes and allows for a continuous, fluid simulation of how materials evolve over time. The researchers showed that their tool is significantly faster than previous methods, especially when high levels of detail are required. By making the generation of complex shapes a seamless part of the simulation process, this tool provides a more realistic and efficient way to study the behavior of granular materials, offering a clearer window into the physics of the messy, irregular world of sand, soil, and rock.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →