# Question about sllod implementation

Dear All,

We are currently performing NEMD simulations using fix nvt/sllod in LAMMPS. Upon a recent discussion with a colleague, there is now some confusion among us regarding which sllod algorithm lammps is implementing. Does fix nvt/sllod implement the p-sllod algorithm, or the sllod algorithm (as described in Daivis and Todd’s work, referenced in the LAMMPS documentation), or another version of sllod?

Regards,

Tim O’Sullivan.

Hello Tim,

It is my belief that the implementation of nvt/sllod is consistent with the p-SLLOD (or GSLLOD) algorithm. See this code:

fx_nvt_sllod.cpp:
116 for (int i = 0; i < nlocal; i++) {
117 if (mask[i] & groupbit) {
118 vdelu = h_two*v[i] + h_two*v[i] + h_two*v[i];
119 vdelu = h_two*v[i] + h_two*v[i];
120 vdelu = h_two*v[i];
121 temperature->remove_bias(i,v[i]);
122 v[i] = v[i]factor_eta - dthalfvdelu;
123 v[i] = v[i]factor_eta - dthalfvdelu;
124 v[i] = v[i]factor_eta - dthalfvdelu;
125 temperature->restore_bias(i,v[i]);
126 }
127 }

Before temperature->remove_bias(…) is called, the velocity includes the streaming and thermal velocity
v = v_stream + v_thermal
v = dot(x,h_two) + v_thermal
(h_two is the rate-of-deformation tensor)

The computed correction factor is then:
vdelu = dot(v,h_two) = dot(x,h_two,h_two) + dot(v_thermal,h_two)

This is the GSLLOD correction. If temperature->remove_bias(…) is moved up three lines, you should get the regular SLLOD equations.

I’m not sure that this point is of great importance important though, since the majority of simulations using this routine are going to be for planar shear. In planar shear, GSLLOD and SLLOD are equivalent, since dot(h_two,h_two) = 0. In the USER-UEF package for NEMD under extensional flow, where GSLLOD != SLLOD, the regular SLLOD equations are implemented.

-David

I took a look at the edit history for nvt/sllod, and I found that earlier versions of the code had the “temperature->remove_bias(…)” line before the calculation of vdelu. It was switched to its current place in this patch (almost 9 years ago):

https://github.com/lammps/lammps/commit/586440171aa0af2f2a2a045aa11da451d8f5ceb9#diff-53d85db6374d93f6ebd97f8db7b2ae18

The patch notes discuss changes made to the default value for tchain, but are not clear on why the calculation of vdelu was changed too.

24 Aug 2010
Changed the default Nose/Hoover chain setting for the fix nvt/sllod command to 1, instead of 3. This effectively turns off NH chains which seems to work better for most systems being driven in shear mode by the SLLOD model.
This patch file can be applied to the 23 Aug 2010 version. This is the list of changed files.

-David