[lammps-users] Thermostatting under shear conditions

My simulation set up is an upper and lower surface with a fluid layer between them. I assign velocities to the surfaces in the x direction, to perform shear simulations.

I am wondering how to correctly thermostat the fluid, such that the flow in the x direction caused by the shearing is unaffected by the thermostat.

I have set it up as follows but am unsure if this is correct for my current setup.

fix 1 fluid langevin 403 403 50 694853
compute myTemp fluid temp/profile 1 0 0 xyz 20 20 20
fix_modify 1 temp myTemp
fix 2 fluid nve

Is this a correct method to thermostat a fluid under my shear conditions or can anyone suggest a alternative way of doing it.

Thanks in advance,

Dear Michael,

Langevin thermostat usually affects the shear viscosity of the fluid,
so I would rather recommend to use a Nosé-Hoover thermostat with fix
nvt (but even a simple rescaling method with fix temp/rescale should
be better than Langevin).

Subtracting the velocity profile before applying the thermostat should
work, but I suggest trying a simpler way, namely applying the
thermostat only to the degrees of freedom perpendicular to the flow,
or even only to the degree of freedom perpendicular to the flow and
confinement, using e.g. :

compute myTemp fluid temp/partial 0 1 1
fix_modify 1 temp myTemp

Anyway, as shear rates in MD are always HUGE, it is important to check
that the thermostat is not affecting the flow too much, for instance
by trying different thermostating methods and checking that the
results are unaffected, varying the coupling of the thermostat to the
system, only thermostating one region of the system, etc.

And finally it is important to check that the system remains in the
linear response regime, i.e. results remain consistent if one change
the forcing...

Best regards,