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

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

 From: Axel Kohlmeyer Date: Fri, 25 May 2018 20:20:06 -0400

On Fri, May 25, 2018 at 8:18 PM, Xiaoyu Wang wrote:
Dear Axel,

Thanks for your suggestions. I forgot to mention that I did some post-process for c_ke to calculate temperature. So I did not use the c_ke/1.5 as the temperature. I understand the part that DOF are overestimated for water molecules. But why fix chunk/atom gives right temperature for water but wrong for copper?

​there is more information missing here. i cannot give you an explanation. most likely, you are making a mistake here and not LAMMPS.

axel.​

Best wishes

Sent from my iPhone

On May 25, 2018, at 5:13 PM, Axel Kohlmeyer <akohlmey@...24...> wrote:

On Fri, May 25, 2018 at 4:27 PM, Xiaoyu Wang 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.

axel.

Thanks in advance for any suggestions or ideas.

Andy
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users

--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.

--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.