Page 230 - gas transport in porous media
P. 230
Stockman
226
Efficient Algorithms
13.2.4
The LB method can be quite calculation-intensive, and is simply not efficient for most
simple geometries. However, many of the problems experienced by newcomers to the
technique probably stem from coding inefficiencies. The calculations reported herein
have benefited from many speed optimizations in the source code. Some of these
optimizations, such as disambiguation of pointers, have been discussed previously
(Stockman et al., 1998). Since that publication, the code has been modified to use
SIMD (single-instruction, multiple data) programming, along with explicit prefetch;
these improvements resulted in ∼3-fold improvement in performance. The compiler
used for producing the executable code can make a great deal of difference. For
example, we found a factor 3.5 speedup in going from the most efficient version of
code compiled under gcc (the public domain compiler available through the GNU
project), to code compiled with Intel’s version 5.01 C. We found that the choice
of operating systems (OS; e.g., Linux vs. Microsoft Windows) made no difference
on the program speed, so long as the same version compiler was used on each OS.
Currently, the code is limited by the speed with which it can read and write vectors
to main memory, and performance is greatest on desktop computers with high-speed,
multiple-channel memory. It is notable that we have seen little improvement in the
code speed in 3.5 years, simply because the speed of memory access has not improved
greatly in that time.
13.3 BENCHMARKS AND ACCURACY
The following benchmarks illustrate the bounds of accuracy of the method, and
also provide background for the discussions in Section 13.5. Where necessary for
clarification, lu and ts units will be converted into centimeters and seconds; however,
most comparisons are made in dimensionless parameters. Of particular interest are
the Reynolds number (Re), Peclet number (Pe), and Schmidt number (Sc), defined as:
L L Pe
Re = U · , Pe = U · , and Sc = (13.8)
ν D m Re
where U is a characteristic speed and L is a characteristic length scale, defined for
the particular problem at hand. Usually L is the width or a particle or a pore.
2
(2) The D m for the self-study problem is 0.01 lu /ts. What are the Re, Pe, and Sc
for the channel calculation in Part 1?
13.3.1 Permeability of an Array of Spheres
The first test is calculation of permeability in a non-trivial geometry; in this case, in
an infinite array of spheres in a simple cubic (SC) geometry (Zick and Homsy, 1982).

