Shear flow loses atoms in 2024, but not in 2023

Dear LAMMPS developers and community,

when working with a sheared LJ fluid, I encountered lost atoms. For the shear flow, I use fix deform remap v. The full, simplified input deck is posted below. I ran it on one and on four cores.

This affects version stable_29Aug2024_update1, but the error does not occur in stable_2Aug2023, both compiled with cmake ../cmake -D PKG_OPENMP=yes -D BUILD_MPI=yes -D BUILD_OMP=yes -D LAMMPS_MACHINE=mpi on Debian 12.

Some notes:

  • The only way I found to avoid (or delay?) errors in the newer version is a neigh_modify every 1 delay 0 check no. Otherwise, the simulation crashes after only 60k steps due to one lost atom. In the older version, the simulation ran fine until I stopped it at >32M steps.
  • The choice of parameters (shear rate, time step, number of particles, box size …) leads to a comparably fast crash. Completely different parameter choices also lead to crashes, but possibly at later times.
  • Reducing the time step by a factor of 10 leads to a crash at the same time.
  • Reducing the shear rate by a factor of 10 leads to a crash after 10 times the simulation time. Does the crash have to do with box flips?
  • You can leave out the Langevin thermostat, this changes nothing, but supports a stable temperature for long runs.

I would be very grateful for any feedback you could provide.

in.wca (863 Bytes)

Thank you for reporting the issue and for adding a minimal example (very helpful). I was able to reproduce your bug and I think I narrowed down the issue. I’ll update once I confirm.

2 Likes

Thank you for your time and efforts. I am glad to hear you could reproduce the behavior.

Shall I open a bug report on GitHub and we continue the discussion there? Last time, it also started here and then moved.

I pushed a bugfix to this PR. Can you confirm this fixes the issues you are seeing? (specifically the changes to domain.cpp in this commit).

You are welcome to file an issue but maybe isn’t necessary. If you do though, I’ll add a link to the PR.

Thanks again

1 Like

Thank you for dealing with the matter so quickly. I can confirm the simulations runs fine for >60M steps.

I opened an issue here: issues/4408.

1 Like