# Energy /Temperature "loss" when in NVE ensemble during Müller-Plathe viscosity calculations

Dear all,

I am experiencing a "loss“ in total energy and temperature when doing simulations in the NVE ensemble during Müller-Plathe viscosity calculations.

It’s simply my extension of the 2-dimensional Lenard-Jones Müller-Plathe example. While the 2d example runs just fine,
my 3d-version suffers from decreasing total energy / temperature as documented in the attached .log file. Here is my
input file….

I am happy to receive any pointers and hints as to what might be wrong or what I might have missed.

Thanks and regards!

Philipp

in.mp.3d.log (210 KB)

in.mp.3d.debug (1.54 KB)

You should not be using fix langevin, or any thermostat.

The Mulller-Plathe alg is meant to be used with pure NVE,

as the velocity swap itself also conserves energy. If you

thermostat a flowing system in the manner you are doing

it you will alter the flow profile, which destroys the effect

you are trying to induce (a V-shaped vel profile).

Also, 1000 atoms is small and 2M steps is big, you may want to use a larger

system. You should be able to establish a steady-state V-shaped

profile in much less than 2M steps, for most systems.

Steve

You should not be using fix langevin, or any thermostat.
The Mulller-Plathe alg is meant to be used with pure NVE,
as the velocity swap itself also conserves energy. If you
thermostat a flowing system in the manner you are doing
it you will alter the flow profile, which destroys the effect
you are trying to induce (a V-shaped vel profile).

steve,

the langevin thermostat is turned off after the initial equilibration (unfix 2).
i don't know much about the M-P method, so i didn't reply originally,
but there are two issues that may be worth looking into.
1) a cutoff of 2.5sigma is quite short. perhaps using 4-5sigma may
give better energy conservation
2) it might be worth checking, if there is a center of mass drift and
remove that (using the velocity command).

axel.

oops, didn’t see the “unfix 2” command - good catch.

To Axel’s hints I would add, try a smaller timestep.

The 2d script in examples/'VISCOSITY are just

toy problems to illustrate. It could be that the timestep

is too big (esp if high velocities) when running for 2M steps.

Also 20x20 for 2d is much “larger” than 1K for 3d - you probably

need more like 16-32K atoms in 3d to have the same physical

dimensions.

Steve