Hi Steve and Paul,
Thanks so much for your prompt and thorough responses. Thank you for the Sandia Report as well. After looking it over and fix_heat.cpp, it does seem to me that any linear momentum in a group of atoms undergoing fix_heat should experience linear momentum conservation.
From fix_heat.cpp
v[i][0] = scale*v[i][0] - vsub[0]
is equivalent to
Vi’ = scale*(Vi - Vcm) + Vcm
which is essentially what I hoped to do with multiple LAMMPS command lines. My system consists of two carbon nanotubes forming a cross junction. Two separate fix_heat routines are applied to all atoms in each tube, individually. There typically exists minor periodic oscillations of the two-tube structure, with the separation distance between the two tubes oscillating much like a diatomic pair.
Unfortunately there is a net linear and angular momentum imparted on each tube individually, with the introduction of the fix heat routine. As the fix heat routine is applied to all atoms in each tube, I would expect any small linear momentum values to be conserved. However, the momentum of each tube (and therefore the kinetic energy) is affected by the fix_heat routine in this configuration.
While the scaling routine above should conserve linear momentum, I suspect angular momentum about a center of mass would be improperly scaled. My current idea is that the fix_heat routine imparts an improper angular velocity to the tube each time, and this may cause the tubes to effectively “roll along” each other (thus, the introduction of linear momentum).
I have had difficulty resolving this issue for several reasons:
- The angular momentum adjustment must come at every time step to correspond to each incidence of fix_heat.
- My atom_style (atomic) prohibits the use of straight forward commands like “set angmom”.
- Any zeroing of angular momentum would artificial drain energy from the system. I believe I need an iterative procedure ie; a) removal of angular velocity, b) adjustment of energy through a scaling of velocities (fix heat) c) re-introduction of previous angular velocity.
I have tried to attached a movie file that demonstrates the non-zero linear momentum of individual tubes seen in the simulation. Though only a few sparse snapshots, the red tube is seen to transverse through periodic boundary conditions (right to left) and the blue tube goes through periodic boundaries into and out of the page. I’ve attached the LAMMPS script that produced this result. The tubes in the restart file did not have individual momentum, and I also zero total momentum by the “velocity all zero linear” command. Though I apply this command to all atoms at once in this file, I have seen the same behavior for all different types of momentum zeroing routines. For example, applying “fix momentum” to each tube individual initially suppresses the introduction of additional momentum, however the tubes develop an increasing momentum as soon as the “fix momentum” condition is relaxed. Unfortunately, “fix momentum” is not a valid solution b/c it drains kinetic energy from the system by quenching the natural oscillations between tubes.
I was hoping you could offer some advice or guidance:
Am I overlooking something?
Can you think of a way to resolve this issue using LAMMPS subroutines?
If your suggestion is altering the fix_heat routine, can you give some details about the relevant variables I need to adjust and their meaning?
Thanks again for your time and efforts.
-Rich Salaway
FLUXregppp.junction (1.95 KB)