Implementing open boundaries through microchannels channels

Greetings LAMMPS users,

I am trying to implement open boundary conditions to simulate fluid flow through open channel. The algorithm shall depend on a two buffering regions where new particles are continuously added at the inflow to maintain constant number density.

This should be achieved by defining a threshold at the exit of the inflow region and calculate the distance when some particles cross the threshold and enter the main fluid domain. Based on this distance i insert the same number again but at the begin of inflow region. This would ensures always having constant number and also fixed particles distribution.


Any ideas to implement that i would be highly grateful.

PS: Probably can not use PBC instead as the flow is controlled from both boundaries. Where fixed velocity and temperature is prescribed at the inflow while the pressure/density is prescribed at the outflow.

Ali Gad

There are several fixes that add atoms during a simulation.

Fix deposit, fix pour. Also src/SHOCK/fix_append_atoms

which is probably most similar to what you are asking.

So I suggest you look at that one for ideas.