Filter particle_input.dat for the SQP particles

Bug report

Hi developers! I have an particle_input.dat for the SQP particles and the particles are in a region of scope x: 0-0.1, y:0-0.06, z:0-0.1. Using MFiX24.1.1, when I try to generate particles from this file, there’s no problem if I don’t use Filter particle_input.dat, but not if I do. For example, if you want to import particles with x between 0.05 and 0.1, Error 495: There is no particles left in the system after filtering the data. If you want to import particles with z between 0 and 0.05, the imported particles are obviously abnormal. I think there’s a bug.

t2.mfx (6.2 KB)
particle_input.dat (301.5 KB)

Thanks for the report. It does look like something is not right. The job output has:

The following filters are applied to particle data:
z-coordinate: KEEP    data between 0.00000000E+00 and 0.50000000E-01
Number of particles read from particle_input.dat  =      1903
Number of particles left after filtering the data =        83

but this little script

#!/usr/bin/env python
import numpy as np
particles = np.loadtxt('/tmp/jinl/particle_input.dat', skiprows=38)
filtered = [p for p in particles if 0<p[2]<0.05]
print(len(particles), len(filtered))

says there should be 933.

Thanks for the bug report. We will follow up when we have a fix.

– Charles

Thanks for the bug report. This will be fixed in 24.2 release. In the meantime, please use the attached, put it in your project directory and rebuild the solver. Let us know if this works for you.
read_particle_input.f (162.1 KB)

Thank you for your reply! Another approach is to filter the particles when saving them at the end of the previous simulation. Any way, expect the next release to be even better.

1 Like