Number of particles per grid

I added code to the des_granular_temperature. f file to output the number of particles within each grid.In the calculation domain, there are 3054 large particles and 14141 small particles, but the sum of the large particles in each grid is only more than 1000, which is not equal to the total number of large particles. However, the number of small particles is correct, and the sum of small particles in each grid is equal to the total number of small particles. Do you know why? (4.3 MB)

As is, ReactionRates gets overwritten in the M-loop.

You either need to move the assignment of ReactionRates outside the M-loop:

or use the M index in the loop:

Success,thank you for your help!@jeff.dietiker
Happy Dragon Boat Festival