LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Disagreement between compute temp/region and fix ave/chunk temp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Disagreement between compute temp/region and fix ave/chunk temp

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Fri, 25 May 2018 18:13:17 -0400

On Fri, May 25, 2018 at 4:27 PM, Xiaoyu Wang <xwang181@...5819.....> wrote:
Dear all,

I am trying to simulate a non-equilibrium system to measure the thermo conductivity. Our system has two hot copper plates and one cold plate in the middle and between each of them is filled with water. We use eam for copper, SPC/e for water and lj for cross term. Since we are interested in local temperature in the system, I copied the idea in the examples by using fix Langevin. Here is my thermostat part.

compute Thot1   all temp/region hot1
compute Thot2   all temp/region hot2
compute Tcold   all temp/region cold
fix             1 all nve
fix hot1 all langevin ${thi} ${thi} 1.0 557667 tally yes
fix hot2 all langevin ${thi} ${thi} 1.0 59804 tally yes
fix cold all langevin ${tlo} ${tlo} 1.0 287859 tally yes
fix_modify  hot1 temp Thot1
fix_modify  hot2 temp Thot2
fix_modify  cold temp Tcold

Then I used several compute commands.

compute ke all ke/atom
variable    temp1    atom    c_ke/1.5
compute pencils all chunk/atom bin/2d x lower 0.5 z lower 0.5
fix     2 all ave/chunk 1000 10 10000 pencils v_temp1 ave running file temp1.profile
fix     5 all ave/chunk 1000 10 10000 pencils temp ave running file temp2.profile

What I found out is that the log file which shows the c_Thot1 c_Thot2 c_Tcold are right compared to our thermostat temperature. But either the c_ke or fix ave/chunk temp are not giving the right temperature for copper but seems to be right for water. Is it because of the DOF are different for copper and water?

​dividing ke/atom by 3/2 is not correct to compute the temperature contribution here, as it assumes that k_B is 1.0, which is only correct for reduced units.
fix ave/chunk only considers individual atoms, so it cannot correctly compute the temperature for molecules, where degrees of freedom are removed due to fix shake, as it is ambiguous how the removed DOFs should be distributed across the individual atoms. for a 3-site water model, you can correct rather easily, as you can assume to remove 1 DOF per atom and correct the result by a suitable scaling factor. the computed temperature for the copper atoms should be correct, as you have no removed DOFs there.



Thanks in advance for any suggestions or ideas.

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...92......
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.