how to setup velocity inlet boundary condition in lammps

10.10.2013, 00:30, "Fubing BAO" <[email protected]>:

Hi Oleg, Thank you for your suggestion. But in my opinion, the fix append/atoms command is used to enlarge the box in one direction by appending the atoms, e.g., zhi

Yes. And you would have to "melt" this added part.

In my case, the  target sphere is fixed in the box\. I just want to generate an uniform flow with fixed convection velocity as inlet boundary\.

You can move sphere instead of a liquid (isn't it the same?), repeatedly append atoms in front of the sphere and delete them and shrink box behind the sphere. So, I think, technically it can be done.

That being said, I like Axel's suggestion much more.


Clearly, the most straightforward approach is to apply a constant
force to the fluid particles. This will achieve something that is
close to a velocity inlet boundary condition. There are several
problems that I can think of:

1) the steady state flow rate can not be specified, only measured
2) the body force or pressure gradient will be proportional to local
fluid density which does not correspond precisely to a pressure-driven
3) the flow at the boundary will not be perfectly uniform due to
periodic images of the wake

1) This is not really a problem, just a matter of convenience, as Axel
pointed out
2) This can be solved by applying the force to the sphere instead of
the fluid. Note that if the cell contains no momentum sink such as a
fixed wall, then at steady state the fluid will simply reach
equilibrium with the sphere with both having the same streaming
3) Until you do the simulation, you will not know to what extent this
is a problem, so you should first assume it is not. You can test this
by running simulations with different box lengths and comparing. My
guess is that for a cell that is 10x longer than the sphere, there
will be no effect, and you can probably get away with much less than

I think adding and deleting chunks of atoms at both boundaries is a
terrible idea. It is complicated to do and will introduce additional
problems that will have to be managed. We use this method in shock
simulations of crystals, but that is a non-steady state problem in
which we would normally have to simulate a length of material
proportional to the duration of the simulation, which quickly becomes
prohibitively expensive.

Maybe an easier way to handle this (also suggest by Axel I think) is
to break up the flow by applying a strong Langevin thermostat biased
to a specified streaming velocity to the fluid that is farthest from
the sphere. This would require adding some extract logic to