investigating different rolling friction models

Submitted by msandli on Wed, 05/17/2017 - 17:57

I'm trying to investigate how the different rolling friction models in LIGGGHTS effect my simulations. My initial simulation used the cdt model for the particles and walls, and I wrote restart files to prevent me from having to run multiple simulations from the very beginning.

However, when I change the rolling_friction model on the wall/gran fixes, I get an error:

ERROR: Fix contacthistory/mesh (id tracker_mesh1): saved simulation state used different contact history model - can not restart (../fix_contact_history.cpp:528)

I've used the echo command to confirm that the simulation appears to update the rolling_friction model used for my pair_style command just fine. What is the proper procedure to change rolling_friction styles for granular walls without having to completely restart a simulation? I've tried writing data files instead of restart files, but I must not know how to use them properly, because I always get an error message about "Incorrect atom format in data file," or "Could not locate a fix/property storing value(s) for coefficientRollingFriction as requested by rolling_model epsd." The 2nd error is especially puzzling because the value is obviously there; the command line is leftover from the simulation using the cdt model!

Is there a way to restart a simulation with different types of rolling_friction? Or do I need to start a completely new simulation for each kind?

msandli | Thu, 05/18/2017 - 03:43

The 2nd error - can't find coefficientRollingFriction - was due to a typo in my input script, so that isn't an issue. However, I've tried everything I can think of to solve this issue:

1. Changing the fix id of the walls between sims. Still have the contact history error
2. Unfixing the walls before writing the restart file.
3. Unfixing the walls and the RE-fixing them to have the same type of rolling friction as what I eventually want them to be.

The last method loads everything OK, but when my simulation actually reaches the run command, the simulation exits and I get an mpirun error (but nothing from LIGGGHTS itself).

I can change the rolling friction model on the particles after a restart just fine, but my walls all have to retain their old collision styles. This means my walls don't use the rolling_friction flag.

Is this the correct/intended behavior? When reading a restart file, any walls made with a fix wall/gran command have to maintain the same rolling_friction state between simulations?

Is there a way to erase this "contacthistory" between simulations? Or tell me how to correctly use write/read_data commands to get rid of the "incorrect atom format" error? I've looked at the example, but I can't figure out how my data file is different than the example file.

msandli | Thu, 05/18/2017 - 05:41

Sorry for all the posts, but the forum can act like a virtual notebook for me, and hopefully this will help someone else.

My simulations were periodic in the y direction, so my data files had the nx ny nz values at the end of each "atom" line (i.e. 0 -1 0, 0 -2 0, etc). The example script uses fixed boundaries in every direction, so those variables aren't in the example data file, but I made a guess that these were the numbers that were causing trouble.

To fix this, I used a set image command and set nx ny nz = 0 on the line right before I wrote my data file.

This seems to have done it! I can now read that data file into essentially any simulation I want, but most importantly, I can read the particle positions and velocities into a simulation with walls of any property I want.

As always, if anyone has a more elegant solution to this, I'm all eyes, but I think that resetting that periodic shift variable seems to have fixed it.

enrique | Thu, 10/26/2017 - 16:20

Hi msandli,
could you please share your code or an example of this, I'm recently trying to use write/read data files and it's not totally clear to me yet. I'd also like to know if the rolling friction model helps with a problem of not having non-spherical particles. In the problem I'm working on, particles feel a centrifugal force and the fact that they're spherical make them roll through the wall of the container more easily than if they were not spherical, which efect I'd like to avoid.
Greetings

agupta87 | Sun, 11/05/2023 - 22:00

I'm glad you were able to resolve the issue. I encountered the same error as you, except the source of my error was mixing different versions of LIGGGHTS. I originally created a restart file a long while back with a certain version of LIGGGHTS. I modified my LIGGGHTS code to perform certain statistical computations. When I ran an input script with the modified version of LIGGGHTS to read the same restart file, the error came up.

Very silly in retrospect, but hope it might save someone else some time. :-)