Initializing a uniform distribution of granular diameters within a simulation box


Can anyone help me with the commands to achieve what’s said in the title? Ideally, I would like to fill my simulation box with a distribution of granular diameters between a minimum diameter and maximum diameter such that a specific volume fraction is reached.

Is it possible to do this without writing a matlab or python script to generate a text file containing atom coordinates and IDs?

I think I have to use create_atoms random for example but it will only initialize one diameter that I can alter with the set command.

Any help will be much appreciated.

You want to avoid overlapping particles, so creating random positions is not a good idea.

The most direct option would be to use fix pour, which has almost all of the options you are asking for. Otherwise you can always set the diameter with “set” from an atom style variable, which you can initialize with a uniform distribution.