MFIX-SQP automatic particle generation fails

Hello, everyone!
I used MFIX SQP to generate two particles to study the filling between spherical and non-spherical particles, but two unexpected problems arose.
First, the number of non-spherical particles is less than the set number.
Second, there is only one particle in the output vtk, which may be spherical or non-spherical.
Do you have a good way to solve this problem? Thank you for your help
packing.zip (2.2 MB)

Hi @Mfix1205

A few comments on this case:

  1. The VTK particle viewer is showing particles of both phases as with the same shape, because you are not saving “Particle phase ID” in the VTK output. We should probably save this always, but for now you should enable it in the Output/VTK pane

  2. Running your case in MFiX 24.3 it fails with the following message:

Generating initial particle configuration for Initial Region:  2
Phase  1: Number of particles to seed =         1000
  |-------------------------------------------------------------------|
  | IC Region:   2                                                    |
  |-------------------------------------------------------------------|
  | Phase |   Input   |   Input   | Number of |    EPs    |   Solid   | 
  |   ID  | Specified |   Value   | Particles |           |   mass    |
  |-------|-----------|-----------|-----------|-----------|-----------|
  |    1  |  PART NB  |      1000 |        72 |  1.57E-01 |  5.65E-02 |
  |-------|-----------|-----------|-----------|-----------|-----------|
Error from des/generate_particles_mod.f:1151
Initial condition  2, Phase  1: Unsuccessful seeding
Please adjust seeding volume fraction, or advanced seeding options (lattice, spacing).
To bypass this error (not recommended), set IC_DES_ABORT_ON_FAILED_SEEDING(ICV,M)=.FALSE.

You probably had a similar message in 23.1.1 which I see you are using, but in that version it’s only a warning, not a fatal error, and it was easily missed by many users. So we upgraded it from a warning to an error.

What you are asking for in the particle seeding is unreasonable:

    ic_des_np(2,1)          = 1000
    ic_des_np(3,2)          = 500

You are asking for 1000 particles of the first type, and 500 of the second.
Looking at the sizes of the particles and the regions:
Region “solid1”: 0.05 * 0.05 * 0.1 = 0.00025 m³
Particle “solid1”: Spherical, radius 0.005m. Volume = (4/3)𝜋 r³ = 5.235e-07m³
Ratio of volumes: 477.
So, it’s impossible to pack 1000 spheres into that volume. The densest packing of spheres, the hexagonal close packing, has an efficiency of 𝜋/3√2 ≈ 0.74 (neglecting edge effects), so the largest number of spheres you could reasonably epxect is 477x0.74 = 353

For the second particle shape, the volume (reported by the supeerquadric designer popup) is 7.02928e-07. The volume ratio this time is 355, but you have requested 500 particles.

However, the DEM particle generation is only able to seed 72 particles of type 1 and 4 particles of type 2. I do not understand the reason for this, I will follow up separately. It’s possible you might be able to do better by adjusting some of the “Advanced DEM seeding options” in the intial conditions pane.

Note that the particle generation code does not (yet) know about non-spherical particles and seeds SQP particles using a lattice based on the bounding diameter of the SQP. Your type-2 particles are cylinders, with semiaxes 0.004, 0.004, .008 but the seeding code treats them like spheres of diameter 0.01624.

I wrote a small script (1) to generate a particle_input.csv file, and was able to seed 144 of the spheres and 216 of the cylinders using a rectangular lattice. This packing could be improved by using a hexagonal close-packing.

Here’s a view of the initial particle configuration:


Note that I had to put a small space (‘eps’ in the code) between the particles to avoid a zero division error in the SQP particle collision detection computation - another topic to follow up on.

With the attached script and particle_input.csv I ran the case successfully and produce this animation.

Thanks for your interest in MFiX and your patience as we resolve these remaining issues.

(1) Note that currently, although we are just positioning the particles, the particle input file must contain diameter, density, velocity and shape parameters for all particles - this is a bit cumbersome and will be streamlined in a future MFiX release.

seed.py (1.3 KB)
packing.mfx (15.4 KB)
particle_input.csv (25.0 KB)

That run is somewhat unnatural in that the particles start off perfectly aligned and in the final configuration that stacking is retained. Here’s a modified version of the script where a small “wiggle” has been applied to the particle coordinates, preventing this stacking (while still maintaining a separation between particles). This leads to a more physically reasonable result.

seed2.py (1.5 KB)
particle_input.csv (26.1 KB)

Thanks a lot,it’s very useful for me to receive your reply.I will give a try under your answer.