Title: Generating Mixed Particles with Specific Size Distributions in LAMMPS

Hi everyone,

I’m working on a simulation that requires generating a mixed system of particles with two distinct size distributions and equal weight ratios. Specifically, I need:

  • Particle Type 1: Sizes following a normal (Gaussian) distribution.
  • Particle Type 2: Sizes following an exponential distribution.
  • The overall composition should be 50/50 by weight.

I’ve looked through the internal commands in LAMMPS, but I haven’t found any fix that can directly generate particles with these specific size distributions. It appears that using a read_data file might be the only feasible method.

I have a few questions:

  1. Is there any internal command or fix in LAMMPS that can directly generate such a mixed particle system?
  2. If not, is manually creating a read_data file the only practical approach, or are there alternative methods or plugins that can simplify this process?
  3. What are the best practices for ensuring that the generated particles do not overlap during initialization?

I appreciate any insights or suggestions. Thank you for your help!

You could create an atom-style variable to create the size distribution. For gaussian distribution, there is a direct implementation, for an exponential distribution you would have to derive it from a uniform distribution. You can then set the particle diameters with the set command.

Whatever is available in LAMMPS is documented. How well you can make it work for your purposes is a matter your creativity and willingness to experiment.

See my previous comments.

If you create your own algorithm to build the system, you can ensure that whatever conditions you require are fulfilled. It is not really LAMMPS’ job. Please note, that your request is rather unusual, so don’t expect ready-to-use solutions and “do this, not that” kind of advice. This is the nature of science. If we knew all the answer up front, there would be no need to do research.

Note you can transform a uniform random distribution on (0,1) to an exponential distribution: Exponential distribution - Wikipedia

Thank you all for your suggestions! After some testing, I ultimately decided to use an external algorithm and the fix pour command, which gave me the result I was looking for.