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 the following Matlab script.

2D lid-driven cavity

2D lid-driven cavity

Rayleigh-Bénard convection

Here isthe Matlab code which computes the following temperature-driven flow.

Rayleigh-Benard convection

Rayleigh-Benard convection

Segregation of species in a two-component flow

The following two-component flow is simulated with this Matlab script.

Two-component fluid

Two-component fluid (Shan-Chen model)
 
numerics/matlab_samples.txt · Last modified: 2011/10/29 19:08 (external edit)
 
RSS - 2011 © FlowKit.com
Except where otherwise noted, text, pictures and animations on this site are licensed under a Creative Commons Attribution-Share Alike 3.0 License.