In this work, theoretical modelling, quasi-three-dimensional (quasi-3D) simulations and micromodel experiments are conducted to study spontaneous imbibition with gravity in porous media micromodels. By establishing the force balance governing the spontaneous imbibition process, we develop a theoretical model for predicting the imbibition length against time in a rectangular capillary. The theoretical model is then extended to the prediction of a compact displacement process in a micromodel by using an equivalent width, which is derived by analogising the micromodel to a rectangular capillary. By simulating spontaneous imbibition in a rectangular capillary with various aspect ratios (
$\varepsilon$
), we show that the application condition of the quasi-3D method is
$\varepsilon \leqslant 1/3$
. Next, we simulate spontaneous imbibition in micromodels with various geometries and flow conditions. Fingering and compact displacement are identified for varying viscosity ratios and gravitational accelerations. At low (high) viscosity ratio of wetting to non-wetting fluids, an upward (downward) gravity can promote the stability of the wetting front, favouring the transition from fingering to compact displacement. In addition, we find that the depth-oriented interface curvature dominates the capillary effect during the imbibition, and such a mechanism is considered by introducing an equivalent contact angle into the theoretical model. With the help of equivalent width and contact angle, the theoretical model is shown to provide satisfactory prediction of the compact displacement process. Finally, a micromodel experiment is presented to further verify the developed theoretical model and the quasi-3D simulation.