Hi,
I am experiencing an issue with momentum conservation when employing the “fix heat” routine to create a thermal flux across the interface of two nano-particles. Thermal energy is added to all atoms from one nano-particle and removed from all atoms in another particle:
Remove energy from particle 1
fix Qout 1 heat 1 -${flux}
Apply heat to particle 2
fix Qin 2 heat 1 ${flux}
The particles develop an increasing center-of-mass velocity in the periodic computational cell. Total energy is roughly conserved, but kinetic energy increases with time. I have ensured that there is no net initial momentum of the system, but the nature of the physical configuration necessitates some harmonic oscillations between the two particles, so each particle may have some nominal momentum individually. However, I would not expect a velocity scaling routine to systematically increase any initial momentum value, and the routine description mentions that aggregate momentum of the system should be conserved. This effect is only seen with the introduction of the “fix heat” routine, however. The particles remain in the center of the simulation cell when the “fix heat” routine is removed and all other conditions are kept constant.
Momentum fixes, like
Fix momentum of each particle individually
fix mv1 1 momentum {mvfix} linear 1 1 1 angular fix mv2 2 momentum {mvfix} linear 1 1 1 angular
do not work, since they drain energy from the system by effectively damping the harmonic oscillations of the two-particle system.
My current solution idea involves calculating the linear and angular velocities of each nano-particle, subtracting these values from each atom’s velocities, performing the energy flux routine (either by “fix heat” or an alternative) and adding back the linear and angular velocities calculated from the initial step to avoid energy damping. My problem here is that “fix heat” is a recurring or looped command and the “velocity” command is only performed a single time. In addition, the problem will become more difficult if I still find the “fix heat” routine is imparting some momentum to each particle even after explicitly zero-ing it before each scaling step.
Question #1: Can you explain/show the mathematics of the “fix heat” routine? Are all velocities scaled linearly? Do you have any idea why a net momentum is imparted or aggregate momentum is not conserved?
Question #2: Regarding my plan to explicitly subtract and then re-add momentum into each particle, is there a way to perform “velocity set” commands for every time step, before and after each instance of “fix heat” implementation?
Thanks for your time and efforts.
-Rich Salaway