Simulation of flow via creation/elimination of atoms at boundaries?

Hi All,

In a thread from May 2018 a similar question was discussed under the thread “Helium flow” but I did not get a clear enough answer from reading that thread.

I am new to LAMMPS but have done extensive MD modeling and have even written my own QMD code in the past.

I want to simulate Lennard-Jones or similar gaseous flow through various shaped channels by introducing new atoms, with a specified average net velocity, in the upstream side of a simulation cell. On the downstream side, I want the old atoms (that have passed through already) to be either eliminated to be replaced by “new” upstream atoms. I worry that atoms that have passed through the channel will have a hysteresis (turbulence?) that will affect their subsequent passages through the channel if I were to use periodic boundary conditions (PBC). Equivalently, if PBC are used, the velocities would have to be reset to avoid hysteresis.

Is there a mechanism in the current LAMMPS to allow this kind of control?

If not, could I create an external module “add-on” to do this?

If not either, is there a NEMD code that could do this?

Any advice would be very helpful.

Derrick E. Boucher, Ph.D.
Associate Professor of Physics and Physics Coordinator
Florida Gulf Coast University
10501 FGCU Blvd. South
Fort Myers, FL 33965
Phone: (239) 590-7170 Office: Whitaker Hall 255
----------------- Required legal notice for Florida State employees----------------------------
Florida has a very broad public records law. As a result, any written communication created or received by Florida Gulf Coast University employees is subject to disclosure to the public and the media, upon request, unless otherwise exempt. Under Florida law, e-mail addresses are public records. If you do not want your email address released in response to a public records request, do not send electronic mail to this entity. Instead, contact this office by phone or in writing.

Adding and removing particles is tricky.

The simplest way to do the kind of setup you are looking for is to have periodic boundary conditions and then split your box into 3 parts:

  1. a part where you apply both, a driving force with fix addforce and do a dissipative thermostatting, e.g. using fix langevin, with a fairly short time constant to remove all memory of what happened before. by balancing the added force and the time constant of the thermostat, you should be able to set up a constant flow
  2. a region where nothing happens and the particles can relax/equilibrate. not strictly needed, but when using a rather aggressive thermostat, this just feels like it is a good idea.
  3. a region with your “channel”

the critical part would be that the region 1) would be large enough, that all effects of passing through the channel can be dissipated by the thermostat.