====== CFD made easy: Matlab showcases ======
It is extremely easy to implement lattice Boltzmann applications in regular geometries. The following Matlab scripts are only one or two pages long. Furthermore, they are self-consistent and merely use the basic matrix formalism of Matlab. They do not invoke external routines such as linear algebra packages or differential equation solvers. And yet, complex flows are simulated with high accuracy. The showcases include a lid-driven cavity, Rayleigh-Bénard convection and segregation of species in a multi-component fluid. In each case, a free Matlab script is available for download.
===== Lid-driven cavity =====
This picture was produced with {{numerics:cavity.m|the following Matlab script}}.
{{numerics:cavity.gif|2D lid-driven cavity}}
===== Rayleigh-Bénard convection =====
Here is{{numerics:rayleighBenard.m|the Matlab code}} which computes the following temperature-driven flow.
{{numerics:rayleighBenard.gif|Rayleigh-Benard convection}}
===== Segregation of species in a two-component flow =====
The following two-component flow is simulated with {{numerics:shanChen.m|this Matlab script}}.
{{numerics:shanChen.gif|Two-component fluid (Shan-Chen model)}}