strange phenomenon with compute temp/deform

Hi All,

I have been experiencing a very strange thing since yesterday, and still can’t figure out why until so far and thus posted again to ask for you all’s suggestions.

It’s a simple LJ testing system. What I found bizarre is that the temperature after streaming velocity has been deducted (thermal velocity only) is even higher than the temperature from both streaming velocity as well as thermal velocity.

I had my colleague tested with another version of Lammps, and it gives the same output. The input script is so simple that it’s hard to go wrong anywhere. I turned off the shear, and found compute temp/deform and compute temp gives me the same value, which is correct. So the error took place when streaming velocity is deducted.

I posted it here in case anyone would take a look:

units lj
atom_style atomic
neighbor 0.6 bin
neigh_modify delay 0 every 10 check no
read_data coord.n4000_long

fix 1 all nve

pair_style lj/cut 3.0
pair_coeff * * 1.0 1.0 3.0

compute myTemp all temp
compute stream all temp/deform

fix shear all deform 1 xy erate 0.05 remap v

thermo 500
thermo_style custom step temp c_stream c_myTemp
timestep 0.0001
run 10000

I attached the coord file here in case anyone is interested in running this simple system.

I appreciate in advance for any suggestions in getting me out of this confusion.

coord.n4000_long (128 KB)

Hi Ling,

I think this can be rationalised (but I'm not sure!).

Let v_i be the velocity of atom i, and v_si be its streaming velocity.

T_K = (alpha / N) * sum(v_i ** 2) = alpha * <v_i**2> (this is the temperature c_myTemp)

T_D = (alpha / N) * sum([v_i - v_si] ** 2) = alpha * <(v_i - v_si)**2> (this is the temperature c_stream)

Expanding the average,

T_D = alpha * <v_i**2> + alpha * <v_si**2> - 2 * alpha * <v_i * v_si>

If we then think about the difference T_D - T_K:

T_D - T_K = alpha * <v_si**2> - 2 * alpha * <v_i * v_si>

If v_i and v_si are uncorrelated (I think they are), then the second term disappears, and

T_D - T_K = alpha * <v_si ** 2>, which is positive.