OpenFOAM Tutorial | Multiphase Simulation

Written by cfd.ninja

The lock exchange is a classic multiphase benchmark: two fluids of different density sit separated by a barrier, the barrier is removed, and the denser one slides underneath while the lighter one moves above it.

It is a good test case because the answer is known. The speed of the gravity current follows from the density difference and the depth, so you can check whether your setup reproduces it rather than just producing a plausible picture.

In OpenFOAM the case is solved with an interface capturing solver based on the volume fraction, which is why two settings dominate the result: the Courant number, which has to stay low enough that the interface advances less than a cell per time step, and the mesh resolution along the path the front travels.

Related Articles