  A numerical method is formulated for the solution of the advective
Cahn-Hilliard (CH) equation with constant and degenerate mobility in
three-dimensional porous media with non-vanishing velocity on the exterior
boundary. The CH equation describes phase separation of an immiscible binary
mixture at constant temperature in the presence of a mass constraint and
dissipation of free energy. Porous media/pore-scale problems specifically
entail high-resolution images of rocks in which the solid matrix and pore
spaces are fully resolved. The interior penalty discontinuous Galerkin method
is used for the spatial discretization of the CH equation in mixed form, while
a semi-implicit convex-concave splitting is utilized for temporal
discretization. The spatial approximation order is arbitrary, while it reduces
to a finite volume scheme for the choice of elementwise constants. The
resulting nonlinear systems of equations are reduced using the Schur complement
and solved via Newton's method. The numerical scheme is first validated using
numerical convergence tests and then applied to a number of fundamental
problems for validation and numerical experimentation purposes including the
case of degenerate mobility. First-order physical applicability and robustness
of the numerical method are shown in a breakthrough scenario on a voxel set
obtained from a micro-CT scan of a real sandstone rock sample.
