I’m a french student. I’m studying the LBM baut i’m not an expert…
I have found som matlab script on the website which are quite interresting.

But I’d like to simulate, in a simplified way, a Lava Lamp. And I don’t know how to modificate the scripts…
I think that the example of “2D percolation through a porous media” is quite similar, adding a term of gravity and the dependance of rho in function of temperature…

Can somebody help me, or give me the informations please?

Does anyone has the Matlab script for 2D percolation through a porous media??

I think that the lava lamp is an application which is relatively easy to simulate in lattice Boltzmann, because it has a low Reynolds number, and the two fluids have a low viscosity- and density-ratio. Actually, we often jokingly say that most multi-phase simulations done with lattice Boltzmann have roughly the physics content of a lava lamp. People then play with the units (aka “run the movie faster”) to re-interpret at least one of the fluids as a low-viscosity fluid.

Humor aside, I agree with ponja that you should take the multi-component Matlab script on lbmethod.org as a starting point for your simulation, and then add temperature as shown on the Rayleigh-Benard example. The Rayleigh-Benard example will be particularly useful, because it includes a buoyance force, just as you’ll need it. To have one of the fluids raise under the influence of buoyancy, you need to have two fluids with “different molecular mass”. In practice, this effect is obtained by applying a stronger buoyancy force to one fluid than to the other. An even simpler approach, to start with, is to apply buoyancy to one of the two fluids only.