Output the number of two particles in the grid

Hello,everyone!
I wanted to output the number of two different particles in the grid, I found that in des_granular_temperature.f file, I used the number of particles in the grid, I added the code to do a loop for the number of particles, but it showed an error in the build. Can you help me see what’s wrong?



Hi Xutong. If you want help with code, please post the files in full, rather than screenshots. Go to the main MFiX menu and select “Submit bug report”, this will create a ZIP file you can upload here.

I also think it’s possible that you can do what you want by using monitors, rather than writing your own code. You can define a region and then monitor the sum of some quantity like particle diameter, or particle mass, and then use that to deduce the number of particles. (Maybe we should add “particle count” to the monitors!).

– Charles

Thank you for your help!
I’m very interested in what you said about “monitor”, and I’d like to study it.

Monitors are covered in the MFiX manual here:

https://mfix.netl.doe.gov/doc/mfix/22.1/html/model_setup/monitor.html

Thank you for your help!@cgw