and where f$_{i}$ and g$_{i}$ are velocity distribution functions of the set of allowed velocities { c$_{i}$ } . In these expressions, lattice units for length, time, and mass are fixed to Δ x = 1, Δ t = 1, and Δ m = 1, respectively. The dynamics of the distribution functions consists of two steps. First, the distribution functions undergo a collision step, which corresponds to the right hand side of equations (8) and (9), where they are relaxed to equilibrium distribution functions, denoted by f eq i and g eq i . The relaxation timescale of this process is given by the parameters τ$_{f}$ and τ$_{g}$ . We fix τ$_{g}$ = 1, while τ$_{f}$ is related to the fluid viscosity through τ$_{f}$ = (6 η + 1) / 2. The extra term F f i corresponds to the external gravitational field [30]. After the collision step, the f$_{i}$ and g$_{i}$ are propagated to the neighboring nodes of the lattice according to the left hand side of equations (8) and (9). The mapping between the lattice-Boltzmann algorithm and the diffuse interface model presented above follows from the definition of the moments of the distribution functions. The f$_{i}$ are related to the fluid density and momentum by ρ = ∑ i f$_{i}$ and ρ v = ∑ i f$_{i}$ c$_{i}$ , while the g$_{i}$ are related to the order parameter by φ = ∑ i g$_{i}$. The relaxation process ensure the conservation laws ∑ i f$_{i}$ = ∑ i f eq i , ∑ i f$_{i}$ c$_{i}$ = ∑ i f eq i c$_{i}$ , and ∑ i g$_{i}$ = ∑ i g eq i . In the simulation runs we ensure that the fluid velocities are always smaller than the speed of sound, c$_{s}$ = 1 $_{/}$√$_{3; hence the flows can be considered incompressible.}$ To complete the model one needs expressions for the equilibrium distribution functions and for the forcing term in equations (8) and (9). These expressions are obtained by expanding f eq i and g eq i , as well as F f i , in powers of the velocity, and then by relating their higher order moments to the equilibrium properties of the diffuse interface model [28]. For our implementation the f eq i , g eq i and F f i read, F f i = 4 ω$_{ν}$ ( 1 − 1 2 τ$_{f}$ ) ( f · c$_{i}$ (1 + v · c$_{i}$ ) − v · f ) . and 12 g$_{i}$ ( r + c$_{i}$ , t + 1) − g$_{i}$ ( r , t ) = 1 τ$_{g}$ ( g$_{i}$ ( r , t ) − g eq i ( r , t )) , (9) f eq i = ρω$_{ν}$ ( A f ν + 3 v · c$_{i}$ + 9 2 vv : c$_{i}$c$_{i}$ − 3 2 v 2 + G f : c$_{i}$c$_{i}$ ) , g eq i = ρω$_{ν}$ ( A g ν + 3 v · c$_{i}$ + 9 2 vv : c$_{i}$c$_{i}$ − 3 2 v 2 + G g : c$_{i}$c$_{i}$ )