Tallying energy in NVT

Hello Lammps users

I am trying to calculate thermal conductivity of h-BN using direct thermosetting method. I have thermoset hot and cold regions using NVT thermostate. Now I want to tally/determine the energy added/subtracted from hot and cold regions, respectively. Is there any command in lammps that can tally energy for these two regions, like in fix langevin command, there is tally option.

Thank you.

Rajesh

The fix nvt command outputs info about its energy

behavior. See the bottom of the doc page, about

the “scalar” output.

Dear Steve

Thank you for your reply. If I use
fix_modify fix-id energy yes

Then, will it tally KE or PE or Total energy, in case of NVT? As doc says it tallies potential energy.

The fix_modify energy option is supported by these fixes to add the energy change induced by Nose/Hoover thermostatting and barostatting to the system’s potential energy as part of thermodynamic output.

Thanks

Rajesh.

I think the doc pages for fix nvt and fix_modify are clear

on what they do. I suggest you try the commands,

print out the values with thermo output, and you will

see for yourself what it does.

Steve

Dear Steve

Thank you for your suggestion. I did try it. It is giving energy values but there is some doubt. Why it is giving negative value of energy for hot reason and positive for cold region. They should be reverse, as I understand. Because energy is being added to hot reservoir to maintain its temperature at higher side while energy is being subtracted from cold reservoir to lower its temperature. Why this is reverse? The same thing is happening when I thermoset reservoirs with rescale/temp command.

Thank you.
Rajesh

Dear Steve

Can you please advise whether energy for hot reservoir will be negative or positive? Or negative means energy is flowing from hot reservoir to cold one?

Thank you.

Rajesh

The doc pages for fix temp/rescale, fix nvt, fix langevin all

say the same:

Dear Steve,

Thank you for your response. If this is the change in thermostat energy then its fine and it will be negative for hot reservoir and vice-versa.

Thank you

Rajesh