where it is needed, particularly in the vicinity of the stretched metal phase. On the contrary, spatial resolution is reduced far from the metal-silicate interface, where velocity variations are spatially smoother.

The incompressible Navier-Stokes equations (eq. \[eq:NS\] and \[eq:imcomp\]) are solved with a Courant-Friedrichs-Lewy (CFL) condition limited time step, using a Bell-Collela-Glaz (BCG) advection scheme and a multigrid Poisson-Helmholtz solver for the viscous term. The BCG solver uses a second order upwind scheme. The diffusion term of the advection-diffusion equation (eq. \[eq:AD\]) is solved using a time implicit backward Euler discretization. The non-linear advection term of the equation is solved with the BCG scheme.

The two-phase flow is implemented using a level-set method. Each phase is characterized by its physical properties (*e.g.* diffusivity, viscosity, etc) and the initial value of the scalar and vector fields (*e.g.* temperature, concentration, velocity). The interface between the two phases is described by a level set function $\phi$ determining its shape. The time evolution of the interface between the phases is computed with a Volume-Of-Fluid (VOF) advection scheme. First, the interface is reconstructed defining lines (2D) in each cell corresponding to the interface. Then, these lines and planes are moved with a geometrical flux computation. 