[lammps-users] peculiar velocities in temperature

Hi all.

I wrote a fix (based loosely on fix_nvt_sllod) to do gradient dynamics (no inertia) in a shear flow. Velocity of i-th particle=force on i-th particle. The idea would be to use this gradient dynamics with fix_deform in lieu of fix_nvt_sllod. This is then like the mean-field version of Durian's bubble model for people who know about that...

The fix seems to be working, but I would like to have thermo report the mean squared *peculiar* velocity rather than the mean squared *absolute* velocity in the KE field. The former thing is precisely the energy dissipation rate in gradient dynamics which is what I'm after.... the latter thing is not so useful.

This was the default behavior in some previous version of LAMMPS when using fix_volume_rescale (which has been deprecated in favor of fix_deform) since fix_volume_rescale wouldn't touch particle velocities (it would only update positions), and the only thing fix_nvt ever knew about or touched were the peculiar velocities and the scaled positions. I think that in SLLOD dynamics, the temperature gets reported properly using the "vtherm" variables from fix_nvt_sllod, but I can't figure out exactly how this happens.

I can always just dump the forces on the particles into a custom dump (or subtract off the background flow from vx, vy), but I'd like something "online". Any ideas would be appreciated.


(I include my fix_overdamp)


fix_overdamp.cpp (3.2 KB)

All of the compute temperatures in LAMMPS have the
ability to subtract off a "bias" velocity. Which is like
the background flow you mention. Compute temp/deform
does it for a rescaling box (taking out the components
due to box motion). If none of the temps do what
you want, you could write your own following this


Hi Steve.

This is exactly what I was looking for, thanks!

Maybe someone could update examples/nemd/in.nemd to demonstrate this feature?