1: \begin{abstract}
2: % \par
3: 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.
4: 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.
5: Porous media\,/\,pore-scale problems specifically entail high-resolution images of rocks in which the solid matrix and pore spaces are fully resolved.
6: 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.
7: The spatial approximation order is arbitrary, while it reduces to a~finite volume scheme for the choice of elementwise constants.
8: The resulting nonlinear systems of equations are reduced using the Schur complement and solved via Newton's method.
9: 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.
10: 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.
11: \end{abstract}
12: