The distribution problem of custom generated particles

Hello everyone, I know that the DES_Particle_Generator in the tools folder can generate custom particles, but the generated particles can only be distributed in the cuboid in the 3d model.If I want the particles to be distributed in the cylinder, how should I modify the characters in the pgen.in file? If I even need to modify the desparticlegen.f file? Do I have to reprogram myself to solve this problem? For example, in the figure below, the generated particles go beyond the established cylindrical geometry. Thanks very much for your reply.

I am assuming you plan to use an STL file to define the geometry in MFiX. If so, you can define a rectangular region and use it to set an initial condition. The solver will seed particles in the region and will automatically ignore the cells that are outside the cylinder.

Jeff’s is a better answer, but if you want to seed the particles yourself then, yes, you will have to write your own generator or modify the distributed fortran one. For a simple geometry like this, I would just personally hack the Fortran one. Put a conditional in the generator loop to cycle if the distance from the generated particle centroid to cylinder axis is greater than the cylinder radius - radp or something to that effect.

Thank you very much for your guidance. I have set a rectangular region called ‘bed’ as an initial condition.But I need to distribute a fixed number of particles in the calculation domain set by the STL file through the paticles_input.dat file instead of having the program automatically generate the particles.Whether I did not correctly understand your guidance?

1 Like

Thank you very much for your reply. I will try to adjust the Fortran one later.

Take a look at https://mfix.netl.doe.gov/doc/mfix/19.1.0/tutorials/tutorial_hopper.html for an example to initialize particles. You can adjust the solid volume fraction or the IC region extents to match the number of particles you need (may be difficult to get the exact count). Otherwise, you can edit desparticlegen.f, write your own code, or even use a spreadsheet (say Excel) to generate the data needed in particle_input.dat

1 Like