thermostat in LAMMPS

Hello,

I have questions in usage of thermostat. I am trying to simulate a
gravity driven flow with 0.2 reduced acceleration units. Upper and
lower walls are at rest (using setforce) and thermostat is applied to
the fluid. Streaming direction is x while the channel width is along
z, and is 20 molecular diameter. I am calculating the temperature
using temp/profile and temp/partial methods.

In temp/partial the arguments for [x y z] are [0 1 1] (Case 1)
respectively, no thermostat acts in the streaming direction. To test
the accuracy of this computation with profile unbiased thermostat
(PUT), two separate tests using temp/profile are performed, where
arguments for [x y z] are [0 1 1] (Case 2) and [1 1 1] (Case 3,
temp/partial acts in streaming direction too). Number of bins (not
averaging bins) are kept 20 for temp/partial case in z dimension.

The resulting velocity profile for Case 1 matches exactly with Case 3,
while Case 2 results in less streaming velocity. My questions are:

1. I would expect Case 1 and Case 2 to produce similar results, if my
interpretation is wrong, please correct me here.

2. Does the value of acceleration complies with linear response
regime. Decreasing the value of acceleration by tenfold (0.02) leads
me to matching velocity profiles within simulation errors, while the
original case (0.2), streaming velocities differ significantly.

3. Which of the above three ways of computing temperature is recommended?

Here is a little excerpt from the script for Case 2. OW is the working
fluid, WW is wall. Units are LJ.

compute mobile OW temp/profile 0 1 1 z 20
fix 1 WW setforce 0.0 0.0 0.0
fix 2 OW nvt temp 3.7622 3.7622 0.128433
fix 3 OW gravity 0.2 vector 1 0 0
fix_modify 2 temp mobile

Ravi Bhadauria

Dear Ravi,

I have questions in usage of thermostat. I am trying to simulate a
gravity driven flow with 0.2 reduced acceleration units. Upper and
lower walls are at rest (using setforce) and thermostat is applied to
the fluid. Streaming direction is x while the channel width is along
z, and is 20 molecular diameter. I am calculating the temperature
using temp/profile and temp/partial methods.

In temp/partial the arguments for [x y z] are [0 1 1] (Case 1)
respectively, no thermostat acts in the streaming direction.

OK

To test
the accuracy of this computation with profile unbiased thermostat
(PUT), two separate tests using temp/profile are performed, where
arguments for [x y z] are [0 1 1] (Case 2)

If the streaming direction is x, why subtract the streaming velocities
in the y and z directions? It should be the contrary: compute mobile
OW temp/profile 1 0 0 z 20, so that the streaming velocity (in the x
direction) is removed before the thermostat is applied, and re-added
after.

and [1 1 1] (Case 3, temp/partial acts in streaming direction too).

You seem to be confused here. Please read again carefully the
documentation on temp/partial and temp/profile, which do very
different things.

1. I would expect Case 1 and Case 2 to produce similar results, if my
interpretation is wrong, please correct me here.

It is wrong, as in case 2 you didn't use temp/profile correctly.

2. Does the value of acceleration complies with linear response
regime. Decreasing the value of acceleration by tenfold (0.02) leads
me to matching velocity profiles within simulation errors, while the
original case (0.2), streaming velocities differ significantly.

0.2 may indeed be a little bit too much. But the fact that case 3
(where in fact only the x correction is relevant) and case 1 agree is
rather encouraging. It is easy to check that you are in the linear
regime: increasing the driving force by a factor of 2 should produce a
velocity profile that is everywhere twice the previous one. When this
is not working anymore, then you are out of the linear response
regime.

3. Which of the above three ways of computing temperature is recommended?

Both

compute mobile OW temp/partial 0 1 1
fix 2 OW nvt temp 3.7622 3.7622 0.128433
fix_modify 2 temp mobile

and

compute mobile OW temp/profile 1 0 0 z 20
fix 2 OW nvt temp 3.7622 3.7622 0.128433
fix_modify 2 temp mobile

should be okay. And it can be interesting to try both and check that
they give the same result.

Best,
Laurent