Pysammos 1.0.0: a discrete-to-continuum transformation Python tool to analyse the rheology of granular materials
Abstract. Granular flow processes involving different interstitial fluids and coupling regimes are widespread in both natural systems (e.g., landslides, rock avalanches, river sediment transport) and industrial applications (e.g., aggregates in concrete manufacturing, powder technology, animal feed). Despite this, the behaviour of complex granular flows is not fully understood. Modelling of granular media through software packages that couple the Discrete Element Method with Computational Fluid Dynamics (DEM-CFD) enables a comprehensive description of granular small-scale mechanics through simulations of particle-particle and particle-fluid interactions at high temporal and spatial resolution. These approaches are pivotal in the development of constitutive models that represent the bulk rheology of granular media. While DEM-CFD simulations provide particle-scale information (e.g., particle velocities and forces), extracting continuum fields requires a discrete-to-continuum (D2C) transformation that applies a mathematical approach termed coarse-graining. Although some DEM software packages include built-in D2C capabilities, others, such as MFiX-DEM, do not. Consequently, users are often required to develop custom D2C workflows or adapt simulation outputs to the requirements of other D2C tools. Hence, we introduce Pysammos, a Python package that performs discrete-to-continuum transformations and is designed to be user-friendly, open-source, and computationally efficient. Pysammos is able to process polydisperse granular mixtures of any particle shape, while also offering the option to analyse different particle phases separately. It post-processes output files from MFiX-DEM software and produces vtkhdf outputs ready for visualisation in ParaView, as well as a more generic h5 format for further data analysis. Pysammos is able to operate on standard desktop computers as well as on HPC systems. Finally, we showcase a variety of exemplar applications such as sediment erosion, crystals and magma in a conduit, bedload transport and impact cratering.
This contribution presents Pysammos, a software that can be used to post-process the results of any Discrete Element Modelizations (DEM). Indeed, the discrete particle data obtained with the DEM can be transformed into continuous fields, more accessible for visualization purposes and deeper analysis. The architecture, the abilities, the validity, and the performances of Pysammos are depicted in this paper. This method appears user-friendly, computationally efficient, and flexible to the DEM software used.
The article is well written and well structured.
Even if I am positive about this article, I have a few queries to consider during this minor revision.
L. 55: I would change “force displacement law” to “contact law”.
L. 116: There is no verb in “Similarly, to enhance DEM analysis by extracting continuum fields without the need to handle inner-level source code”. Could you reformulate this sentence to ease the reading?
L. 149: I would not refer to Eq. 9 solely, as you use multiple functions for the coarse-graining function \Psi. Is a reference to Section 3.4.3 more accurate?
Eq. 5: Could you check this Equation? In the current version, an individual contact is computed twice. I guess that the second sum should start at j=i+1, in agreement with the formulation depicted in Weinhart et al. (2012).
L. 170: It appears in L. 385 that you made a different choice than other D2C software (MercuryDPM, for instance) for the particle search (particle vs contact point). A justification of this assumption can be relevant here.
L. 264: I would start with the Section “Data reading and handling” as the format of the input data is described. Please consider reorganizing your Sections.
Figure 6: Could you check this plot? Indeed, the Heavyside function does not verify the formulation detailed in Eq. 11. The function should be =0 for w<r, while the plot shows a non-null value for w<r<2w. This verification should be conducted for the Lucy and Gaussian functions.
Figure 6: I guess that W(r) should be Psi(r). If not, could you specify the definition of W(r)?
Figure B2: Same remark as Figure 6: I guess that W(r) should be Psi(r). If not, could you specify the definition of W(r)?
L. 529: This depth-independence of the vertical pressure is controversial. I agree with the Authors that Fig. 13 does not show a clear increase in the pressure. However, the relation P=rho.g.h is well established in the literature. I guess this relation is retrieved for the configuration depicted if a larger height h or a larger density rho is considered. Could you add limitations to the conclusion raised concerning the homogeneous vertical pressure with depth?
Figure 12: Could you consider modifying the scale used for the right map? The color assigned to the value -6.6 does not seem to be employed in the map. The range used for the scale can be shorter.
L. 574: As discussed with Section 4.4.3, the default value of w (=0.75*d_43) may not be the accurate choice to make. Maybe a default value of w that depends on the mean distance of the particles is a more resilient selection. In particular, if this code is used by a standard user (see the definition of the profile in Section 3.1.3). This remark is more a hint to the Authors, the text of the article does not have to be changed. I have not tried; maybe it is a bad idea.
L. 683: The consideration of the particle-wall interactions seems in Equation 5 to be already conducted (with the particles between N+1 and N+Nb). If it is finally not the case, could you delete this part of the Equation?