Stephan Helou has created a toolkit for Lattice Boltzmann methods (LBM). His code makes it simple to set up 2D and 3D CFD simulations which evaluate the interactions of fluid and rigid bodies. All kernels are fully parameterized and support multiple types of boundaries (periodic boundary conditions, no-slip, free-slip, Zou He). Obstacles may be primitive geometric bodies (cubes, cylinders, spheres) or arbitrary shapes, including any concave shapes and freeform surfaces. The kernels have been thoroughly validated.
The toolkit relies on LibGeoDecomp for its runtime management and parallelization.
In this run we simulated a mixture of aluminum with 2.0% copper on a 425x425x425 grid. The copper makes up 2 percent of the mass, which corresponds to 1.73% of the atoms. Each cell represents a cube with an edge length of 0.5μm. After approximately 19000 time steps the dendrite reached the boundaries of the simulation space. We used periodic boundary conditions, as for all of our dendrite simulations, which allows the dendrite to take up a large part of the simulation space without rendering the simulation physically inaccurate.
The video is also available for download.
We build this mock-up of a gas chromatography simulation to illustrate the applicability of the library to simulations which rely topologies other than regular grids. The video shows how a gas with two substances in solution is pumped through a column filled with activated carbon (indicated by the spherical shapes). The two diagrams on the right show the relative fraction of each substance in the solution. The activated carbon reduces the flow speed, which is why pressure is build up on the bottom of the column, while a vacuum forms at the top. The carbon also absorbs the second substance to a certain degree, which is why it arrives at the top later than the first substance.
For this simulation we placed the cells randomly on the 2D plane and used a Voronoi diagram do determine their shapes. Tiles of these cells were embedded into container cells. The container did act as an adapter for LibGeoDecomp, to which the model appeared to be a regular stencil code.