Implementing open boundaries through microchannels

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.

image.png

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

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.

!image.png|671x397

Any ideas to implement that i would be highly grateful.

​building this kind of setup for liquids is extremely tricky​, since you
need to find a way to safely extend the system without creating systematic
artifacts like phonons from adding atoms with close contact or imploding
vacuum bubbles and you need to include a proper equilibration in your
"inflow zone" as well. since you cannot easily and safely extend
unstructured liquid for those reasons, you'd have to extend a crystal and
then melt and equilibrate it. at that point, it would be just as well to
keep a periodic boundary and define a zone between the inflow and outflow
regions, where you apply a strong dissipative thermostat (e.g. langevin,
gle, temp/csld) to "destroy" any memory of the system from the outlet area
coming back into the inlet area. you might also apply fix oneway to that
thermostat zone to enforce that there is no backflow.

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.

​you'll have to find a way to determine the proper driving force for the
flow to achieve the desired density at the outlet. that is not trivial
either.
it might be possible to utilize the fix controller command for this
purpose. overall, this is a rather complex dynamical equilibrium that you
have to set up, so it is advisable to approach this in small steps and do
lots of testing and validation for each part of the setup required.

axel.​