[lammps-users] Changing the size of particles during the simulation

Dear lammps user,

My lammps version is 29 Oct 2020 .

I would like to ask a question:

Is there a command in LAMMPS where it can change the size of the particles during the simulation?

For example, can someone start from ellipsoid particles with an aspect ratio 1. Then, increase the diameters during the run as (1.5,1,1) , (2,0,0) , (2.5,1,1) , (3,1,1) ending up in setting a random configuration for ellipsoid particles.

I know that it could be done by using the set command several times. Clearly, I am interested in using the fix/adapt command. However, it seems to only be valid for the atom_style sphere. Could you please tell if someone can use a similar fix but for ellipsoids .

Best regards
Mohammed

What is available in LAMMPS is documented in the manual. If it is not mentioned in the manual, it doesn’t exist in the distribution.

Fix adapt is the command to be used for changing properties during a run. If you are looking to modify settings or properties not supported by fix adapt you have to adapt it (pun intended), i.e. modify the C++ source code. Many features in LAMMPS exist because somebody (just like you now) needed them, did the programming, and then contributed the changes to be included into the distribution.

Dear Axel,

Sorry for replying to your email. I send the message again to the lammps-users email.

“Thanks for your email. I have found that setting the particle diameters as variables , using the “set command”, can do the job properly.”

Mohammed

but using the set command is doing exactly what you said you didn’t want to do.

while you may be able to use a variable to apply the values, its values will be taken immediately and NOT updated during the run in case the variable changes.
that is what fix adapt does (and only fix adapt).

Sorry Axel for sending the reply to your own email again.

Also, you are right concerning the contradiction between the solution I follow below and my first email when I insisted that I did not want the solution to be done using the “set command”.

Now it works, and thanks for your help. Here is the message sent to you directly: