These days I have some time to explore some ways to simulate flow through porous materials. The Lattice Boltzmann Method (LBM) caught my eye due to the possibilty to include multiple phases and its relative straight forward gridding of the simulation domain. This is just to summarize useful resources I found:
Palabos.org is a great resource with links, books and sample code.
LBMworkshop contains good introductory material including solved programming problems.
Sailfish is a Python based LBM simulation suite with emphasis on the use of Graphical Processing Units (GPUs)
Lattice Boltzamnn Modeling by Sukop and Thorne
A practical guide to get going. Good for engineering and quick results (includes code examples), but in my view it is not deep enough to really apply the technique to research questions.
The Lattice Boltzmann Equation for Fluid Dynamics and Beyond by Sauro Succi
A tough book for my taste, but worth reading for a deeper understanding.
And here are some of the simulations I did with the code from Palabos.org. It resembles a pipe with an inlet on the left side with a couple of square obstacles. With a low Reynolds number of Re=20 I got the following flow profile.
The length and direction of the arrows indicates the velocity at that point. The color scale white-red indicates the magnitude of the local velocity (dark red = high absolute velocity, white = zero velocity).
If I increase the Reynolds number to Re=120 turbulences begin to appear.