  This work presents retQSS, a novel methodology for efficient modeling and
simulation of particle systems in reticulated meshed geometries. On the
simulation side, retQSS profits from the discrete-event nature of Quantized
State System (QSS) methods, which enable efficient particle tracking algorithms
that are agnostic of the application domain. On the modeling side, retQSS
relies on the standardized Modelica modeling language, yielding compact and
elegant specifications of hybrid (continuous/discrete) dynamic systems.
Combined together, these features offer a sound, general-purpose framework for
modeling and simulation of particle systems. We show how the state-events that
arise when particles interact with a reticulated mesh are seamlessly translated
into easily tractable time-events. The latter can substantially improve
simulation performance in scenarios where discontinuities dominate the
computational demand. We showcase the flexibility of our approach by addressing
four case studies arising from different application domains. Performance
studies revealed that retQSS can perform similarly to, and even outperform,
well-known domain-specific particle simulation toolkits while offering a clear
and sound accuracy control interface.
