Particle ID numbers

Do the particle Id’s in the output data from MFIX always refer to the same particle throughout the run?
E.g. does particle ID no 1 always correspond to the same particle or are these just arbitary values assigned in each time step to any particle?

Their ID should be constant with time in the vtk outputs.

The property in the subroutines that is constant with time and across partitions is: iGlobal_ID(LL)

In DMP, LL will change but iGlobal_ID(LL) will not.

Does that help?

You can easily see that in paraview by tracking one particle based on their ID (use threshold filter and restrict its value to the particle ID of interest)

2 Likes

Thank you for your reply.

I thought this was the case, but a conversation with a colleague made me second guess it.

What happens to the particle ID if particles leave the model? Does the whole ID disappear from the spreadsheet?

I think the ID is not there anymore yes. But the other particles ID remains the same. Try it with the fluid_bed_2D tutorial by increasing the inflow vel to get particles going through the PO at the top

Ok I will try that.

My model is a DEM, and I’m using it to look at individual particle trajectories, hence my question.

Sure. FYI: there is a fluid_bed_2d DEM tuto and a fluid_bed_2d TFM tuto

When you refer to these properties, are these something I have to select or if it standard?

It is there by default. If you go in the GUI to output, vtk, particle data, select the Global ID box. That is what you need

Thank you I’ve found it.

I’ve noticed that when particles leave my model all the particle ID numbers change.
Is there a way to get the ID’s to be constant and not change even when some leave?

How/where are you getting the particle ids?

What do you mean? Using my output I tracked one particle in paraview, and when it left the model I noticed the same particle ID was jumped to another particle.

1 Like

Make sure you track the Particle_ID written out by MFiX, not the Point ID, which is internal to Paraview. The Point ID always goes from zero to the number of particles minus one.

I have selected the Global Id box in the GUI output if that is what you mean by Particle_ID in MFIX.

Will Global Id always keep the Id the same per particle even if it leaves? As in If particle 100 leaves the model, I dont want any other particle to become particle 100.

Yes, when you select the Global ID box in the GUI, it will write the Particle_ID variable in the vtp file. What I was saying is Paraview indexes the particle using Point ID which is not the same as the Particle_ID. Point ID is the array index in Paraview (it starts at zero and increments by one) whereas Particle_ID is the value of the array. Think of this as Particle_ID(123) = 657. Here the Point ID is 123, whereas the Particle_ID is 657.

If there are no inlets or outlets, the Point ID and Particle_ID are only offset by one because Paraview starts counting at zero while MFiX starts at one, so if you have 100 particles, Point ID will go from 0 to 99 and Particle_ID will go from 1 to 100:

Particle_ID(0) = 1
Particle_ID(1) = 2
Particle_ID(2) = 3
.
.
.
Particle_ID(98) = 99
Particle_ID(99) = 100

The global particle ID stays attached to the same particle until it leaves the domain. If there are no inlets, the global ID of a leaving particle is not reassigned to existing particles. In this case, if particle 100 leaves, no other particles will be assigned the global ID 100 (they will just keep their own global ID).

If there is an inlet, a new particle gets assigned a global ID equal to the maximum global ID plus one. For example if among all particles in the system, the maximum global ID is 567 (note that there could be less than 567 particles), then the new particle will be assigned a global ID of 568.

This means that if there is an inlet and particle 100 leaves the domain, then a new particle could be assigned a global ID of 100, provided the max global ID among all particles remaining in the system is 99 (say you have 53 particles in the system and the max global ID is 99).

I hope this makes sense.

1 Like

Thank you for that explanation, it clears up my confusion