How to access the data of all the particles with USR function in parallel computing

Hi, everyone. I copied the code from calc_force_dem.f to usr1_des.f to output the contact information, i.e., particles positions and contact forces. The usr file has been attached online. usr1_des.f (7.6 KB)

However, when I use parallel computing in Linux system, I find that the parameters in USR file like MAX_PIP are local values. It means that the information of only part of the particles is outputted. I wonder if there are some methods capable of outputting the information of all the particles.

I think you will need to look through the parallelization and broadcasting routines in MFIX to answer this question. PARTICLES, for example, contains all of the particles in the simulation, whereas PIP is only local (current processor) particles. I have found the “monitors” modules and subroutines helpful when figuring out how to access/use local vs global variables.

Thanks very much for your valuable comments.

Hi ahjinger,
I have the same question and have you solved this problem?

Regards
Yuanhe

Sorry, I have not solved this question, yet. I carried out the calculation without parallel computing to access the data of all the particles.


you can try this code and see if it go through all you particles.

Thanks very much for your valuable reply.