Re: Boundary conditions for fluid

From: Jeff Butterworth (butterwo@cs.unc.edu)
Date: Thu May 27 1993 - 19:41:58 UTC


In article <1993May27.071230.22564@crs4.it> ralf@grappa.crs4.it (Ralph Santos) writes:
>> I am programming a fluid flow model using a hexagonal mesh.  Its a 2-D
>> channel flow with a solid boundary at the 'top', a solid boundary at the
>> 'bottom' and the flow from 'left' to 'right'. The solid boundaries are non-
>> slip.
>>
>> I would appreciate hints on how to do the left and right boundary conditions.
>>
>> [descriptions of possible approaches]

What I think is being asked is simply what to do with particles when they
try to leave the lattice.  I don't think the original poster was asking
about how to implement a pressure gradient.  For most of my purposes, I
just use a periodic boundary condition in the X direction.  To implement
this, simply take particles leaving the grid from the right edge and
put them on the left edge and vice versa.

I have seen some papers that suggest a randomization process to use
as a particle leaves an edge and appears on the other one.  The Y position
of the particle is randomized.  That might be a good idea since it would
tend to break up any unrealistic correlations due to the periodicity of
the boundary conditions.  Note that this randomization wouldn't affect
the net momentum of the system since the particle would still be moving
in the same direction.

>An alternative to actually removing particles is to use periodic
>boundary conditions in the X direction and simply tweak the
>configurations at the left boundary, flipping the X momentum of
>particles travelling leftward through the left boundary.
>
> [discussion of boundary conditions and implementation of pressure gradient]
>
>However, the only thing that really counts is the average momentum
>contributed over time.  We can realize this in several ways:
>
>(1) Define a probability with which you sample sites for momentum
>    flipping, where not necessarily all of the sites sampled end
>    up contributing momentum, then measure the actual momentum
>    contributed after the fact.
>
>(2) Keep track of how much momentum you add at each step, and compute
>    an error, the difference between the momentum you wanted to add
>    and how much you actually added, then adjust the momentum at the
>    next step accordingly to make the average error zero.

Absolutely!  That was a wonderful description of the problems associated
with trying to implement a pressure gradient in a LGA.

One problem that I had when trying these methods was that sometimes I got
oscillations in the pressure gradient and other miscellaneous pains in
the neck.  It can be a tricky problem when you are trying to cause a very
low pressure gradient.  You might be trying to hit only 5 particles in
the current time step.  It's hard to tell how to modify your "goal"
momentum contribution when the number of particles you actually hit
jiggles around between 0 and 15.  My point is just that the statistically
noisy behavior of simple LGA can make them hard to control.

A great suggestion given to me by Dan Rothman is that you can hit particles
everywhere in the lattice rather than just on the left edge.  This gives
you many more candidate sites to try to hit at each time step.  It also
means that you reach steady state quicker and without pressure waves
coming from the left edge.

Now that I'm using lattice-Boltzmann techniques, my blood pressure is
much lower.  They use floating point numbers and are not very statistically
noisy, so they are much easier to control.

Jeff


This archive was generated by hypermail 2.1.7 : Tue Oct 14 2003 - 21:44:15 UTC