This manuscript presents a comprehensive study on the numerical simulation of gas transport in clay rock using the finite-element method, with a specific focus on the transition of the transport regime from single-phase to two-phase conditions. Our code demonstrates the capability to cover this transition seamlessly, without relying on common approaches such as the use of persistent primary variables or the switching of primary variables. In our simulations, the primary variables are gas pressure, capillary pressure, temperature, and displacement of the solid phase. To validate our approach, two benchmark tests were conducted. The first benchmark replicates a well-known scenario in the field of radioactive waste disposal, where gas injection induces a transition from single-phase to two-phase flow. The second benchmark simulates a core drilling experiment, where the mechanical unloading of a fully saturated domain results in the appearance of a gas phase. In addition to analyzing primary quantities, a comprehensive set of secondary variables was introduced to gain deeper insights into the model’s operation and enhance understanding of the underlying processes. By plotting these secondary variables alongside the primary quantities, a comprehensive understanding of the system’s behavior during the transition of flow regimes was obtained. The primary objective of this work is to improve our understanding and confidence in the model used for simulating large repository systems, particularly in the context of nuclear waste disposal and CO$$_2$$
2
storage. By successfully capturing the transition from single-phase to two-phase gas transport, our study provides valuable insights into the behavior of gas in clay rock. This enhanced understanding lays the groundwork for utilizing the model effectively in large-scale repository simulations, contributing to the advancement of the field of gas transport in clay rock.