Pierre de Buyl's homepage

A paper on the Lees-Edwards method

A few years ago[ref]Four years almost day to day actually[/ref], Sebastian contacted me to help with simulations. Great, I like simulation studies, so we start discussing the details. The idea: use an established method, the Lees-Edwards boundary condition, to study colloids under shear.

In principle, we should be able to use an existing implementation and I would help setting everything up. Simple, right? It is only about computer simulations anyway.

Is this new at all?

Let's go back in time. 1972. Lees and Edwards find a way to modify the rules at the boundary of an otherwise fully periodic simulation cell that lead to a shear in the system. The article is well cited, and the method is used in plenty of articles.

In principle, we should find the method available in established simulation packages. In practice there was no such resource. Worse, the principle on which the method is based is questioned: the simulated system should display nothing unusual close to the boundary but an author claims that one needs to turn off thermostatting in that region of space. Judging such results without availability of the source code is difficult. [ref]Spoiler: the method does not generate spurious effects.[/ref]

The novelty of our work did not lie in the method but in making it available. This was a good reason to use an existing package, EPResSo, so that our code could be re-used by others in combination with useful features (polymer models, parallel execution, input-output routines, etc).

What did we do?

There had been a first attempt to implement Lees-Edwards in ESPResSo, which was advertised and influenced our choice of software. We soon realized that the best way forward was to rewrite an implementation from scratch, litterally removing everything that was related to Lees-Edwards. So we [ref]Mostly Sebastian, with the help of our collaborators from Stuttgart.[/ref] start working on the method with the ESPResSo simulation package developed in Stuttgart.

Changing the nature of the boundary conditions has consequences in many parts of the simulation code:

  • The computation of the distances, and importantly of the relative velocities between particles, must take into account the crossing of the shear plane boundary.
  • Building of neighbor lists is fundamentally different if the simulations cells move with respect to each other.
  • The time-stepping of the particles' positions must include the detection of jumps across the boundary.

While working on these modifications of the code, in an iterative process to try to decouple as much as possible the Lees-Edwards code from the established codebase, we also realized that we could track the physical trajectories of the particles by recording the position jumps as they occur. This is an unexpected bonus of our work and a nice way to verify the physics of diffusion under shear flow.

Our article also shows the convergence of the Green-Kubo integrals in some situations, which is sometimes dismissed as trivial in other works. Nothing is hidden!

"Impact"

Our work is now published by Physics of Fluids. We were not sure were to submit so I am glad that the article ended up in a journal where the readers might pick up our "methods section" or download our source code. Of course, all of the code used to produce the results is in the Zenodo supplementary data!

We measured the viscosity of the DPD fluid with two methods, the Green-Kubo formulas and the direct measure of stress under shear, which is not often done in the literature. Finding authoritative work on the viscosity of DPD fluids is not as easy as I would have expected. Sometimes the details matter also: the availability of routines to compute separately the components of the stress is not guaranteed in all codes. Indeed, computing the stress due to the DPD force relies on random numbers so that you want to get that right!

All in all, I hope that our work enables others to use the method and will have as much "impact" [ref]Whatever impact means.[/ref] as a paper reporting on a new physical effect. The reason I put the story on my blog is that, often, the simulation study that is requested to support a theory or experiment is considered either easy or quick to do. In practice, numerical simulations form a dedicated part of scientific research and should be valued as such. The same holds for the development of scientific software in general.[ref]On the topic of open-source scientific software, make sure to check out the Journal of Open Source Software.[/ref]

References

Comments !

Comments are temporarily disabled.

Generated with Pelican. Theme based on MIT-licensed Skeleton.