Packing3D.jl: An open-source analytical framework for computing packing density and mixing indices using partial spherical volumes
收藏资源简介:
Accurate quantification of local packing density and mixing in simulations of particulate systems is essential for many industrial applications. Traditional methods which simply count the number of particle centres within a given volume of space (cell) introduce discontinuities at cell boundaries, leading to unreliable measurements of packing density. We introduce Packing3D.jl, an open-source Julia package providing analytic partial-volume calculations for spheres intersecting Cartesian and cylindrical meshes. We derive closed-form solutions for single, double and triple spherical-cap intersections, plus sphere-cylinder overlaps. We implement efficient mesh-generation routines, principal-cell indexing, and data-splitting functions for time-series analyses. Performance and accuracy were validated against simple cubic and face-centred cubic lattices and via boundary-shift continuity tests. Packing3D.jl converges exactly to theoretical lattice densities, eliminates discontinuities at sub-particle resolution, and scales linearly with particle count. Memory usage remains modest (40 B per particle, 48 B per cell). Packing3D.jl provides researchers with continuous, reproducible volume-fraction fields and robust mixing indices at high performance, facilitating sensitivity analyses and optimisation in granular process engineering.
在颗粒系统的模拟工作中,精准量化局域堆积密度与混合程度,对诸多工业应用而言均具有关键意义。传统方法仅统计给定空间单元(cell)内的粒子质心数量,这类方法会在单元边界处引入不连续性,进而导致堆积密度的测量结果缺乏可靠性。我们研发了开源Julia程序包Packing3D.jl,可对与笛卡尔网格、圆柱网格相交的球体开展解析偏体积计算。我们推导了单、双、三球形帽相交场景以及球-圆柱重叠场景的闭合形式解。本工具还实现了高效的网格生成例程、主单元索引以及用于时序分析的数据拆分功能。我们通过简单立方、面心立方晶格,以及边界位移连续性测试,验证了Packing3D.jl的性能与计算精度。Packing3D.jl可精准收敛至理论晶格密度,消除了亚粒子分辨率下的边界不连续性,且计算耗时随粒子总数呈线性缩放。其内存占用始终维持在较低水平:单粒子内存占用为40字节(B),单单元内存占用为48字节(B)。Packing3D.jl可为研究人员提供高性能的连续、可复现体积分数场与可靠的混合指数,助力颗粒过程工程中的敏感性分析与优化工作。



