Question about restart file

Submitted by Sherif on Wed, 08/25/2021 - 11:32

I'm generating particles in script (1) then save a restart file. Then apply some forces on the particles in script (2) after reading the restart file.

My question is can I define different inter-particle interactions in script (2) without changing it in (1) or they must be the same since script (2) reads the restart file of (1).

I want to do that to avoid running script (1) each time I need to change these parameters to save time.

Daniel Queteschiner | Thu, 09/02/2021 - 13:24

Yes, you can change the pair style after restarting the simulation. If I remember correctly you need to run 1 time step with the original style to initialize everything properly, then you can redefine the pair_style command. However, at the point of switching the collision model, the particles should not be in contact since contact history probably will not be transferred properly between different models. So if you are, for example, creating a particle bed in script 1, you may use a larger particle size in script 1, then in script 2 scale down the particles to their original size and let them settle to their final configuration. Also, for changing particle-wall interaction you will have to unfix any original fix wall/gran and apply a new fix wall/gran with the desired pair style.