text:
\section{Introduction}
\label{pnm_introduction}

\subsection{Background}
\label{pnm_backgound}
The continuous rise in atmospheric carbon dioxide concentrations due to the combustion of fossil fuels could, if not abated, lead to irreversible climate consequences \citep{Hartfield2018State2017}. In fact, the Intergovernmental Panel on Climate Change (IPCC) concluded that the combustion of fossil fuels, to generate electricity and heat, is responsible for at least 25\% of the total amount of CO$_{\text2}$ that has been emitted to the atmosphere by human activities \citep{IPCC2014ClimateChange.}. To reduce CO$_{\text2}$ emissions to the atmosphere to the required net-zero value, several methods, called `stabilization wedges' in \cite{Pacala2004StabilizationTechnologies.}, are required, including more wide-spread implementation of renewable energies and Carbon (or CO$_{\text2}$) Capture and geologic Storage (CCS). During CCS, CO$_{\text2}$ is captured at a point-source CO$_{\text2}$ emitter, such as a fossil-fueled power plant, a cement manufacturer, or other process industries, or directly from the air \citep{Fasihi2019Techno-economicPlants}, and is injected into suitable subsurface formations for permanent geologic storage \citep{IPCC2005CarbonStorage, Michael2010GeologicalOperations}. Geological storage of CO$_{\text2}$ can occur as structural/stratigraphic, capillary/residual, dissolution, and/or mineral trapping \citep{Benson2008COsub2/subFormations}, as discussed in more detail below. Ideally, the CO$_{\text2}$ storage formation (e.g. sandstone or carbonate rock) is overlain by more than one low- to practically zero-permeability caprock (consisting, for example, of shale). Such multiple confinements increase the CO$_{\text2}$ retention security, necessary to impede CO$_{\text2}$ leakage and upward migration.

It has been suggested \cite[e.g.,][]{Randolph2011CombiningSequestration, Randolph2011, Adams2014OnSystems,Adams2015AConditions,Garapati2015BrineWell, Ezekiel2020CombiningGeneration} to combine CCS and/or CO$_{\text2}$-based enhanced gas/oil recovery with geothermal energy extraction by using the CO$_{\text2}$, that is structurally trapped in the geologic reservoir, as the geothermal working fluid to extract enthalpy, while still permanently sequestering 100\% of the CO$_{\text2}$ as a CO$_{\text2}$ plume, constituting a CO$_{\text2}$ Capture, Utilization, and Storage (CCUS) system. During such  CO$_{\text2}$-Plume Geothermal (CPG) power plant operations, a portion of the geothermally heated CO$_{\text2}$ rises buoyantly to the land surface, passes through a turbine, is cooled, and is reinjected into the CO$_{\text2}$ storage reservoir, along with the CO$_{\text2}$ coming from the CO$_{\text2}$ capture facility.

The injection of CO$_{\text2}$ into a deep saline formation will lead to the displacement of some of the resident formation brine in the pore space (i.e. drainage).
Upon injection into the formation, the CO$_{\text2}$ tends to spread radially at the beginning, when the movement of the CO$_{\text2}$ is dominated by viscous forces. As the CO$_{\text2}$ plume continues to spread farther away from the injection location, the CO$_{\text2}$ will move upwards, due to buoyancy, approaching the overlying caprock, where it is prevented from further vertical movement and is thus essentially pooling upwards against the caprock (structural/stratigraphic trapping) (Figure~\ref{fig:pnm_conceputal_model}A). As caprocks are typically not perfectly horizontal, the CO$_{\text2}$ will tend to move updip and once the injection of CO$_{\text2}$ ends, possibly after many decades of CO$_{\text2}$ injection, the entire CO$_{\text2}$ plume will typically move updip. As shown in Figure~\ref{fig:pnm_conceputal_model}B, at the trailing edge of the CO$_{\text2}$ plume, brine can imbibe back into the pore space (i.e. imbibition), typically leading to the disconnection of small blobs (10s--100s of micrometers in size) of CO$_{\text2}$ (capillary/residual trapping). This phenomenon, at the continuum scale, can effectively immobilize a large portion of the injected CO$_{\text2}$ by capillary forces, slowing down the CO$_{\text2}$ plume migration, and increasing the CO$_{\text2}$ storage safety \citep{IPCC2005CarbonStorage,Krevor2015}. The amount of residual trapping depends on the pore-scale balance between viscous and capillary forces (quantifiable by the capillary number, $N_c$), wettability (i.e. contact angle), the saturation of the CO$_{\text2}$ (non-wetting) phase when drainage switches to imbibition, and pore-space geometry \citep{Zuo2014Process-dependentSandstone}.

Recent advances in core-flooding experiments and in-situ contact-angle measurements, using X-ray tomographic imaging, show that the CO$_{\text2}$-brine-quartz system is strongly water-wet, as contact angles of $\theta \mathrm{<50^{\circ}}$ were found \citep{Krevor2012RelativeConditions, Andrew2014Pore-scaleMicrotomography,Zuo2014Process-dependentSandstone}. The difficulties inherent in the prediction of CO$_{\text2}$-brine flow in deep reservoirs require analyzing capillary interactions at the pore scale in order to obtain the constitutive relationships between capillary pressure, $(P_\mathrm{c})$, relative permeability, $(k_\mathrm{r})$, and phase saturation, $(S_\mathrm{\kappa})$. Such multiphase fluid flow is controlled by a variety of interdependent physical factors, including the actual geometry of the porous medium, the fluid properties (viscosity and surface tension), and the interaction between the solid and the fluids (contact angle) \citep{Valvatne2004PredictiveMedia, Andrew2015TheConditions}. Henceforth, the brine and the CO$_{\text2}$ phases will be referred to as the wetting and the non-wetting phases, respectively.

In the following, we focus on the conditions, where capillary forces dominate over viscous forces (i.e. quasi-static conditions with low-capillary numbers of $\mathrm{\; 10^{-8} - 10^{-7}}$). These conditions are important after the CO$_{\text2}$ injection has stopped (Figure~\ref{fig:pnm_conceputal_model}). We apply the same fluid-displacement concepts as experimentally observed by \cite{Lenormand1983MechanismsDucts,  Lenormand1988NumericalMedia} and numerically predicted by \cite{Oren1998ExtendingModels} and \cite{Valvatne2004PredictiveMedia}.

Numerous oil/gas reservoirs in the Gulf of Suez (Egypt), that are either in the depletion phase or have already been depleted, could be suitable for CCS/CPG (i.e. CCUS) development. \cite{Hefny} characterize the Nubian Sandstone, a common rock type in hydrocarbon reservoirs, found in the Gulf of Suez, and investigate, if it has potential to be used for CCS and, in particlar, for CPG. Here, we focus on investigating the pore-scale CO$_{\text2}$-trapping mechanisms and on estimating the CO$_{\text2}$-storage-capacity estimation of the Nubian Sandstone, using three-dimensional imaging via a fast Synchrotron Radiation X‐ray CT source.
\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.82\textwidth]{CCS_Conceptual_model_f.pdf}}
\caption{\small{$\left[\mathrm{A}\right]$ Schematic diagram of key processes of CO$_{\text2}$ sequestration in a saline aquifer.
As caprocks are typically not perfectly horizontal, the injected CO$_{\text2}$ will tend to move updip and once the injection of CO$_{\text2}$ ends, the entire CO$_{\text2}$ plume will typically move updip.
At the trailing edge of the CO$_{\text2}$ plume, this leads to re-imbibition of native formation fluid (e.g., brine), reducing the CO$_{\text2}$ saturation in the pore space. When this imbibition process is completed, some amount of CO$_{\text2}$ remains trapped by capillary forces. This ``residual trapping" effectively immobilizes a large portion of the injected CO$_{\text2}$ and can, under favorable geologic conditions, remove the necessity of a sealing unit (caprock) to ensure permanent CO$_{\text2}$ storage underground. Depths are not to scale. $\left[\mathrm{B}\right]$ Typical pore-scale configurations of fluid distributions at various pore-space saturations.}}
\label{fig:pnm_conceputal_model}
\end{center}
\end{figure}
\subsection{Pore-scale trapping mechanisms}
\label{pnm_capillarytrapping}
Numerical modeling of two-phase flow in a natural porous medium at the pore scale is often employed to obtain two-phase constitutive relations such as capillary pressure and relative permeability curves, and to understand pore-scale displacement mechanisms \cite[e.g.][and references therein]{Patzek2001VerificationImbibition,Blunt2013Pore-scaleModelling,Berg2016ConnectedImbibition}. The application of high-flux synchrotron radiation in the hard X-ray range provides improved time and spatial resolution, permitting the investigation of the internal geometry and topology of microstructures down to sub-micrometer levels \citep{Donoghue2006SynchrotronEmbryos}. The constant improvement in both imaging capacity and computational power allows usage of discretized images of the pore structure as a computational mesh to perform fluid-flow simulations directly \citep{Blunt2013Pore-scaleModelling, Gostick2017}.

Pore-scale models can be broadly divided into direct numerical simulation models (such as volume-of-fluid and Lattice Boltzmann methods), and pore-network models (PNM). In addition to being computationally cheap, PNM can simulate flow in pore networks that preserve the pore connectivity expressed in pore-space images. Each (network) element is assigned a set of geometric properties (e.g. size and shape) that closely match the values measured directly from the images.

Using a high-performance computing cluster, the multiform geometrical and essential topological properties of the Nubian Sandstone pore network (PN) have been directly extracted from Synchrotron Radiation X‐ray Tomographic Microscopy (SRXTM) data. Further, we have performed quasi-static pore-network modeling,  based on the intricate structure of the Nubian Sandstone~PN. In this work, we are interested in the flow processes occurring between the two immiscible fluid phases at the trailing edge of the CO$_{\text2}$ plume and these processes' relevance for trapping CO$_{\text2}$ in Nubian Sandstone.

To investigate imbibition processes at the trailing edge of the CO$_{\text2}$ plume, the following pore-scale processes are considered:
\begin{enumerate}
    \item Piston-like (\textit{pl}) advance is characterized by the displacement of the nonwetting phase from a narrow pore throat into an adjoining pore body that was initially filled with the wetting phase. It causes a drop in capillary pressure, but it does not result in the trapping of the nonwetting phase.
    \item Snap-off (\textit{so}) occurs when two wetting layers in a pore body swell, such that they touch and coalesce, disconnecting the non-wetting phase within the neighboring pore bodies from the main connected pathway.
    \item Co-operative pore-body filling (\textit{cpf}) refers to the invasion of a non-wetting-phase-filled pore throat by arc menisci~(AM) or wetting layers initially present in corners, crevices and rough surfaces of the pore body. At a critical capillary pressure, the AMs fuse and the center of the throat spontaneously fills with the wetting phase. This can lead to the trapping of the non-wetting phase.
\end{enumerate}

\subsection{Objectives}
\label{pnm_objectives}
The main objective of this paper is to characterize the two-phase properties of the Nubian Sandstone as it pertains to CCS and CPG by implementing a quasi-static PN model. Of particular interest is the quantification of the potential for immobilization of CO$_{\text2}$ by capillary forces and how this compares to other sandstones. In addition, the PN model is used to simulate sequential primary drainage/main imbibition cycles to obtain capillary pressure--saturation and relative permeability--saturation curves. Such constitutive relationships are important inputs for large-scale numerical simulations of CCS/CPG operations. These results complement rigorous laboratory experiments for understanding fluid-displacement mechanisms in porous media.

We have endeavored to replicate pressure, temperature, and salinity conditions that are similar to those found in the reservoir of interest. An important outcome of this study is the basin-scale assessment of CO$_{\text2}$ storage capacity for Nubian Sandstone in the Gulf of Suez basin in which capillary trapping is considered.

\section{Rock formation characterization}
\label{pnm_rock_characterization}
The Nubian Sandstone -- a major reservoir-rock formation is found in Egypt and extends regionally-- has the potential to serve as a deep geological formation for long-term CO$_{\text2}$ storage and related applications, such as CPG-based power generation, as discussed in the introduction. \cite{Hefny} presented a three-dimensional static reservoir model for Nubian Sandstone, which includes the formation's geology and rock physics properties. For the current study, Nubian Sandstone blocks have been retrieved from the central Gulf of Suez (cGOS).

We conduct a routine optical microscopy analysis, employing an automated QEMSCAN (Quantitative Evaluation of Minerals by Scanning Electron Microscopy) Quanta~650F technique at the University of Geneva, Switzerland, providing quantitative mineralogical compositions at a scanning resolution of 5~$\mathrm{\micro m}$. Here, the mineral identification maps are based on back-scattered electron values, energy-dispersive X-ray spectra, and X-ray count rates. These tools are integrated to assess the mineralogical composition and rock type.

The QEMSCAN analysis shows that the majority of the distinguished mineral phases in the Nubian Sandstone are medium to fine quartz grains (85\%) with some kaolinite (8\%), 5\% k-feldspar, and 2\% other minerals, trapped within the pore system, as shown in Figure~\ref{fig:pnm_nubian_sandstone_qemscan_srxtm}A. The quartz grain types (which, in turn, are mainly monocrystalline with sharp edges; Figure~\ref{fig:pnm_nubian_sandstone_qemscan_srxtm}B) are cemented by silica. This Palaeozoic quartz arenite sandstone was deposited in continental to fluvial braided river systems. It represents the primary prolific conventional reservoir in the ~cGOS. Such a quartz-dominated system suggests that neither mineral dissolution/precipitation nor clay swelling require consideration during the quasi-static simulations.

For the laboratory rock physics experiments, three cylindrical plugs of  $\mathrm{25.5 \;mm}$ diameter and  $\mathrm{>\!30 \;mm}$ height were cored from the rock block parallel to each other to investigate the intrinsic rock properties and quantify possible anisotropies. A lathe was used to produce a high degree of parallelism between the upper and lower surfaces of the cylindrical plugs, with $\mathrm{\pm 5 \; \micro m}$ precision. The plugs were dried in an oven at $100\mathrm{^{\circ}C}$ for at least 48~hours to remove trapped pore fluid. Before performing further measurements, the plugs were stored in a desiccator with silica gel to prevent moisture from re-entering.

Using a gas-displacement-based apparatus (He-pycnometer Accupyc~II~1340, micromeritics), the matrix volumes of the cylindrical plugs were determined under ambient conditions in a range that keeps the standard deviation of the measurements below~5\%.  Beforehand, the plugs' masses were measured, using a high-precision balance ($\mathrm{\pm 5.0\times \!10^{-7} kg \; tolerance}$). The bulk volume, matrix volume, dry mass, grain density, and effective porosity (i.e. the volume of interconnected pores) were calculated.
\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.405\textwidth]{Nubian_QEMSCAN.pdf}}
{\small\includegraphics[width=0.4\textwidth]{Nubian_SRXTM2.pdf}}
\caption{\small{[A] The QEMSCAN image shows the dominance of fine-grained quartz in the Nubian Sandstone. [B] A 2D slice through the SRXTM-volume raw dataset of the Nubian Sandstone (voxel size is $\mathrm{0.65} \;\mathrm{\micro m^3}$). Dark gray areas are pore space (air), while light gray areas represent the mineral grains (quartz). Due to the experiment setup, the data that are used for pore-network modeling are located only within the marked white square. The corresponding file name of this slice \texttt{`SRXTM\_Nubian\_Sandstone\_06\_rec.8bit\_0084.tif'} is given in the full raw dataset. The full SRXTM raw dataset ($\mathrm{2560\!\times\!2560\!\times\!4320}$ pixels and 8-bits) is provided as a supplementary to this publication.} }
\label{fig:pnm_nubian_sandstone_qemscan_srxtm}
\end{center}
\end{figure}

A cylindrical subplug (with $ 6\;\mathrm{mm}$ diameter and $\mathrm{\sim \!10 \; mm}$ length, that was recovered from the main plug) was used to perform high-pressure Mercury Intrusion Porosimetry (MIP) to evaluate the pore radius, pore-size distribution (PSD), and porosity-related characteristics of Nubian Sandstone. The PSD observations are based on the behavior of a non-wetting liquid in a capillary, following the Young-Laplace relationship. The experiment was set up initially at low pressure ($\mathrm{40 \; MPa}$), followed by a stepwise increase in pressure up to~$\mathrm{400 \; MPa}$. At~$\mathrm{400 \; MPa}$, mercury can be forced to invade pores as small as $\mathrm{5 \;nm}$ in radius, constituting microporosity \citep{Karger2011FlowRock}. At high capillary pressures, the wetting phase (air) is pushed farther into the pore corners, as the radius of curvature of the interface decreases.

To validate the results of our PN quasi-static simulator, we compare the pore-volume density data and the scaled air--mercury $P_\mathrm{c}\!-\!S_\mathrm{w}$ experiment curve with the simulation results extracted from the 3D rock model. Mercury Intrusion Porosimetry (MIP) shows a lognormal pore-size distribution of the Nubian Sandstone samples. MIP also shows that the majority of the pore bodies fall within the resolvable range of our imaging capacity (Figure~\ref{fig:pnm_nubian_mip_psd}).
\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.83\textwidth]{MIP_Plot_NubianSandstone_latex_modified.pdf}}
\caption{\small{Pore-size distribution of the Nubian Sandstone sample and cumulative mercury volume intruded as a function of pore-throat radius and capillary pressure. Both are determined by Mercury Intrusion Porosimetry (MIP). The majority of pores in the Nubian Sandstone are located in the zone resolved by SRXTM. The mean diameter of the pore elements (throats) is shown above the pore-size distribution curve $\mathrm{\left(\overline{D} =4\times\!10^4 \; nm\right)}$.} }
\label{fig:pnm_nubian_mip_psd}
\end{center}
\end{figure}

\section{Computerized tomography scanning and image analysis}
\label{pnm_computerized_tomographic_image_analysis}

\subsection{Imaging technique}
\label{pnm_imaging_technique}
High‐resolution Synchrotron Radiation X‐ray Tomographic Microscopy (SRXTM) can be employed to investigate in a non-destructive and quantitative way the internal topology of micro-structures. The SRXTM measurements were conducted on a cylindrical subplug (with $ 6\;\mathrm{mm}$ diameter and $\mathrm{\sim \!10 \; mm}$ length that was recovered from the main plug). The parallelism of the ends of the cylindrically shaped subplug was achieved by gently grinding the cuttings, first on the side on a rock saw blade, then by hand, using sandpaper (grit 120).

We performed the imaging work at the TOmographic Microscopy and Coherent rAdiology experimenTs (TOMCAT) beamline station, at the third-generation synchrotron facilities, at the Swiss Light Source, Paul Scherrer Institute, Switzerland \citep[see][for technical specifications]{Marone2012RegriddingImaging.}. For the best-contrast phases (pore and solid), the sample was exposed to a parallel beam of monochromatic synchrotron X-ray radiation for $\mathrm{500\; ms}$ exposure time at $\mathrm{26 \; keV}$ photon energy and $\mathrm{401.25\; mA}$ ring current. This beam energy is optimized to provide a sufficient photon flux, capable of penetrating the $\mathrm{6\;mm}$ diameter subplug and ensuring the best image contrast (signal-to-noise ratio). The lower-energy X-rays that hit the cylindrical subplug and do not improve imaging were filtered out using $\mathrm{100\;\micro m \;Al}$, $\mathrm{10\;\micro m \;Cu}$, and $\mathrm{10\;\micro m \;Fe}$ sheets, while the remaining X-rays hit the cylindrical subplug. The field of view (FOV) covered $\mathrm{1.3\times1.4 \;mm^2}$ of the original size of the subplug.

The transmitted X-rays were converted into visible light by a cerium-doped lutetium aluminium garnet $\mathrm{(LuAG\!: 20 \;\micro m)}$ scintillator and projected at 10$\times$ magnification onto a high-speed CMOS camera (PCO.Edge 5.5; PCO AG, Germany) with $\mathrm{2560\!\times\!2560}$ pixels, leading to an effective pixel width of $\mathrm{0.65 \;\micro m}$. A sample-to-scintillator distance of $\mathrm{36 \;mm}$ yielded a small amount of edge enhancement in the images.

Each tomogram was computed from $1801$ projections ($\mathrm{500 \;ms}$ exposure time) over a $180\mathrm{^{\circ}}$ rotation by a gridded Fourier transform-based reconstruction algorithm with a Parzen filter using a filtered backprojection algorithm \citep{Marone2012RegriddingImaging.}. Projections were magnified by microscope optics and digitized by a high-resolution CCD camera, which results in 8-bit (256 gray values) tiff-format images. We provide, through the online access of this article, the SRXTM images data set along with a summary of the experiment conditions and the characteristic properties of the SRXTM images.

The reconstruction center was found for the first and last image in the sequence and linearly interpolated between these two values for the others. The reconstructed volumes were filtered with a $\mathrm{3\!\times\!3\!\times\!3}$ median filter, segmented with local connectivity-based thresholding, and processed further as described in the next section. The image datasets were then cropped around the plug so each one consisted of around $\mathrm{2160\!\times\!2160\!\times\!4320}$ $\left(\mathrm{\sim\!2.02\times\!10^{10}}\right)$ pixels with a voxel size of $\mathrm{0.65 \;\micro m^3}$ at 10-fold optical magnification. A 3D volume with dimension $\mathrm{2160\!\times\!2160\!\times\!4320}$ voxels was cropped from the original 3D raw data set to avoid poor image quality around the edges of the scan volume.
\subsection{Image processing and segmentation}
\label{pnm_image_processing_segmentation}
The gray-level SRXTM images of the Nubian Sandstone have only one major identifiable mineral phase (Quartz; from Section \ref{pnm_rock_characterization}) with sharp edges (Figure \ref{fig:pnm_nubian_sandstone_qemscan_srxtm}B). The attenuation coefficient of the X-ray (grayscale intensities) in the mineral phase is higher than the attenuation coefficient in pore spaces (darker gray). A bimodal histogram for each image, therefore, was applied using Otsu's method of automatic thresholding \citep{Otsu1979AHistograms}; Figure \ref{fig:pnm_watershed_segmentation_workflow}A. The threshold value was set for the local minimum to alleviate spurious creation of catchment basins.

\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.97\textwidth]{Figure_Watershed_segmentation_C.pdf}}
\caption{\small{Illustration of the marker-based watershed segmentation workflow on a 2D image. [A] Binarization of the same gray image shown in Figure \ref{fig:pnm_nubian_sandstone_qemscan_srxtm}B by implementing the multi-level Otsu method \citep{Otsu1979AHistograms}. [B] Application of the local Thickness filter with a spherical structuring element to get actual information about the pore-size distribution (i.e. determination of the radius of the largest sphere that fits inside the pore space; $R_\text{max}$) from the CT images. [C] The pore-size distributions determined using the simulated Local Thickness filter. The pore-volume distribution indicates that approximately 80\% of the total pore volume comprises pores with a radius smaller than $\mathrm{55 \; \micro m}$. The histogram of the pore distribution shows that the majority of the pore radii are in the range of $\mathrm{17 - 50 \; \micro m}$, closely matching the experiment values obtained from Mercury Intrusion Porosimetry; see Section \ref{pnm_rock_characterization} and Figure~\ref{fig:pnm_nubian_mip_psd}. [D] Distance transform of void space. [E] Peaks are properly located at the pore centers and marked with $5\times$ exaggerated red dots overlying the global distance transform map. [F] Segmented pore regions resulting from the marker-based watershed segmentation overlain by the mineral phase (black).}}
\label{fig:pnm_watershed_segmentation_workflow}
\end{center}
\end{figure}
Image segmentation is done by delineating and labeling sets of pixels within the domain of gray-level SRXTM images into a number of disjoint non-empty sets of objects depending on the gray-level histogram, neighborhood information, and prior knowledge of the image statistics \citep{Soille2014MorphologicalApplications}. The watershed transformation, which treats pixel values as local topography, was used to segment the images. However, watershed segmentation does not straightforwardly provide acceptable results due to over-segmentation. Alleviating this effect will be elaborated upon in the following. The Local Thickness filter replaces every voxel in the binary images with the radius of the largest spherical kernel that fits inside the void space (Figure~\ref{fig:pnm_watershed_segmentation_workflow}B). Analysis of the histogram of the voxel values provides information about the pore-size distribution as illustrated in Figure~\ref{fig:pnm_watershed_segmentation_workflow}C.

After thresholding, a labeling procedure was performed on the obtained binary images to isolate and quantify pore-space voxels from solid voxels using the Euclidian distance map. The distance transform of a bi-level image is defined by the shortest distance from every (pore-space) pixel to the nearest non-zero foreground-valued (solid) pixel and is employed to distinguish between pore bodies and pore throats. Every voxel is assigned to a pore, such that the distance map increases in the direction of the pore centre; (Figure~\ref{fig:pnm_watershed_segmentation_workflow}D). The algorithm also finds throat surfaces by looking for restrictions in the void space that bound pores: here the distance map increases on either side of the throat surface. The distance map is inverted as the watershed grows towards high intensity.

A Gaussian blur filter was applied to the distance transform map to smooth it and to minimize spurious peaks caused by the flat nature of the solids voxelated in the images. In order to minimize over-segmentation, a manual optimization yielded 0.35 and 5 as optimal values for the Gaussian blur filter and the Local Thickness filter, respectively.

Removal of the erroneous peaks that lead to over-segmentation was done individually and in an iterative way, using a minimal cubic structuring element during morphology dilation. The similarity between the maximized dilated peaks and the smooth distance map allows the recognition of new peaks. The comparison between the old peak(s) and the new peak(s) enables eliminating spurious errors. This is followed by applying the marker-based watershed transformation at the local minimum of a hypothetical 3D topography, from which basins are flooded to segment the images and separate the pores (Figure~\ref{fig:pnm_watershed_segmentation_workflow}F). It is possible to compute properties of pore-network elements, including diameters, coordinates, surface area, and volume, for pore bodies as well as diameters, perimeters, and lengths for pore throats. A detailed description of the extraction algorithm and the parameter definition of the PN elements is given in \cite{Gostick2017}.

\subsection{Pore-network construction}
\label{pnm_pore_network_construction}
Since the pore morphology of Nubian Sandstone is quite complex (Figures~\ref{fig:pnm_nubian_sandstone_qemscan_srxtm}B and~\ref{fig:pnm_watershed_segmentation_workflow}A), its topological quantification is challenging. Its 3D intricate pore network was constructed using the discretized elements, resulting from the marker-based watershed segmentation method (see Section~\ref{pnm_image_processing_segmentation} and Figure~\ref{fig:pnm_watershed_segmentation_workflow}). In this
paper, the geometrical properties of the extracted pore network refer to the distributions of the pore-body and pore-throat radii, lengths, and volumes. Additionally, relevant topological traits include the spatial connectivity, which prescribes how pore bodies are connected via pore throats (i.e. coordination number, $z$) and a shape-describing parameter for each pore-network element that will be used during numerical fluid-flow modeling (Figure~\ref{fig:pnm_nubian_3d_visualization_statisitics}). Coordination numbers range from $\mathrm{1\!-\!39}$ for the whole extracted network, with a mean coordination number of $\overline{z} \approx 4.1$, which is close to the value found by \cite{Dong2009Pore-networkImages} for Fontainebleau and Berea sandstones. Isolated clusters of pores (i.e. pores with a coordination number of zero) were removed from the pore network.

\begin{figure}[hbtp]
\begin{center}
{
\small\includegraphics[width=0.54\textwidth]{NubianVisualizationb.pdf}} \llap{\parbox[b]{3.3in}{[A]\\\rule{0ex}{2.40in}}}\hfill
{\small\includegraphics[width=0.44\textwidth]{pnm_nubian_sandstone_statisitics2.pdf}
{\llap{\parbox[b]{2.85in}{[B]\\\rule{0ex}{2.40in}}}}\hfill
{\llap{\parbox[b]{2.85in}{[C]\\\rule{0ex}{1.20in}}}}
}
\caption{\small{[A] 3D view of the Nubian Sandstone pore-network (domain size: $\!1.4\!\times\!1.4\!\times\!2.8 \;\mathrm{mm^3}$). The voxel SRXTM image shows the solid phase in gray, while the extracted pore elements are overlain. The pore bodies and pore throats are respectively rendered as red spheres and gray cylinders that are smaller than their actual sizes to improve visualization. [B] Histograms of pore-body and pore-throat radii as well as pore-throat lengths for the extracted pore network of the Nubian Sandstone. [C] The distribution of the coordination  number, ($z$), in the Nubian Sandstone pore network.} }
\label{fig:pnm_nubian_3d_visualization_statisitics}
\end{center}
\end{figure}
A three-dimensional visualization of the extracted pore network is presented in Figure~\ref{fig:pnm_nubian_3d_visualization_statisitics}A, where the red spheres represent pore bodies and gray cylinders represent the pore throats, where both appear to be properly located within the rendered voxel image. The regularity of the pore-element shapes is of course an over-simplified representation of the natural porous medium, lacking information of high relevance for two-phase flow. Many studies have focused on idealizing the geometry of pore-network elements to mimic such structure complexities and angularities \citep{Mason1991, Patzek2001ShapeFlow, ren2003ReconstructionEffects}. These idealized pore elements will be discussed in more detail in Section~\ref{pnm_shape_factor}.  The distributions of inscribed radii for the extracted pore-network elements are shown in Figure~\ref{fig:pnm_nubian_3d_visualization_statisitics}, while Table~\ref{tab:statistics_pnm_nubian} provides the statistical information of the pore-network properties, used in the simulations.
\input{pnm_statisitcs.tex}
\subsection{Representative elementary volume}
\label{pnm_rev}
Before simulating two-phase fluid flow within the constructed pore network (PN), the existence of a representative elementary volume (REV) has to be confirmed by the spatial distribution of its components (e.g. solid--void spaces) to satisfy a lower and an upper bound of the fluid-flow field. These bounds are required to ensure that the REV is sufficiently larger than a single pore and smaller than the flow domain, such that the phase saturations are independent of the REV size and representative of the macroscopic domain. Figure~\ref{fig:pnm_nubian_rev}A shows that the physical properties (here the porosity) are highly fluctuating as the sub-element volume considered is small, and the values stabilize and approach the experiment values, measured via different techniques and for different sizes, as the averaging volume increases.
The minimum size of the REV for Nubian Sandstone was found to be $\mathrm{\sim\!10^9 \;\micro m^3}$ (Figure~\ref{fig:pnm_nubian_rev}A).

\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.87\textwidth]{REV_NubianSandstone_c.pdf}}
\caption{\small{Quantification of the porosity of the Nubian Sandstone retrieved from SRXTM images. [A] The porosity is calculated for an increasingly large cube, starting from a voxel centered in the pore space. Symbols are experimental results of the whole-plug sample. The measured MIP skeleton porosity is 0.263, yielding 0.032 Hg-inaccessible porosity. The gray bar represents the spatial variability zone of porosity. [B] Porosity profile across two opposite faces in the Nubian Sandstone sample.} }
\label{fig:pnm_nubian_rev}
\end{center}
\end{figure}
In addition, Figure~\ref{fig:pnm_nubian_rev}B shows variations in the porosity profile as a function of distance across two opposite sides of the sample. These variations are very small and are thus neglected. The two sides correspond to the inlet and outlet boundaries in our PN simulations (Section~\ref{pnm_quasi_static_modelling}). Moreover, it is important to note that the anisotropy parameter of permeability, i.e. the ratio between the vertical and the horizontal permeability, is less than 5\%. Therefore, its significance, in relation to fluid flow effects can be neglected during our quasi-static simulations. We employ direct numerical simulations (DNS), based on the Lattice Boltzmann method (LBM), to determine the permeability anisotropy in the three orthogonal directions (Appendix~\ref{pnm_appendix_b}). In summary, we consider here that the Nubian Sandstone sample is mostly homogeneous in nature and that therefore the local fluid flow vectors always point in the opposite direction of the potential gradient during the simulations. The DNS results show no preferential flow direction, which, judging from the homogeneous nature of the samples (by visual inspection), is not surprising.
\section{Numerical methods}
\label{pnm_numerical_methods}
Over the past few decades, several studies have estimated fluid-flow properties from digital images of rocks \cite[e.g.][]{Valvatne2004PredictiveMedia,Blunt2013Pore-scaleModelling,Krevor2015,Rasmusson2016ATrapping,Rasmusson2018ResidualApproach,Qin2019AMedia}. In this paper, the laws of mass and volume conservation (incompressible and immiscible two-phase, laminar flow in a natural porous medium) are considered, where one fluid, supercritical CO$_{\text2}$ ($\mathrm{scCO_2}$), is the nonwetting phase, while the other (brine with a salinity of $\mathrm{\sim 40}$ \textperthousand) is the wetting phase. The thermophysical properties of these fluids are listed in Table~\ref{tab:pnm_thermophysics}. The salinity value refers to the surface water salinity in the Gulf of Suez after~\cite{Gavish1974GeochemistrySuez}. The assumption here is that seawater was injected into the  reservoir in the past to enhance the recovery of oil. We assume that initially, the brine fully filled the pore network of the Nubian Sandstone.

A quasi-static PNM simulator for $\mathrm{scCO_2}$ invasion after \cite{Qin2016Pore-NetworkCell} has been modified for this study, yielding capillary pressure and relative permeability curves:
\begin{itemize}
    \item The capillary pressure curve is achieved by simulating an invasion--percolation process.
    \item Two-phase relative permeabilities are calculated at each saturation state of the two-phase quasi-static displacement process, once system equilibrium is reached.
\end{itemize}
The parameterization of the capillary pressure curve is done with the well-known van~Genuchten~(VG) model (Equation~\ref{eqn: pnm_van_genuchten_fitting}), given as \citep{vanGenuchten1980ASoils1}:

\begin{equation}
    P_\mathrm{c} = \frac{1}{\alpha_{d,i}}\left( S_\mathrm{e}^{-1/m}-1\right)^{1/n}, \quad \mathrm{where} \; S_\mathrm{e} = \frac{S_\mathrm{w}-S_\mathrm{wr}}{1-S_\mathrm{wr}-S_\mathrm{nwr}}\,,
    \label{eqn: pnm_van_genuchten_fitting}
\end{equation}
In Equation \eqref{eqn: pnm_van_genuchten_fitting}, $S_\mathrm{e}$ is the effective saturation of the wetting phase, where $S_\mathrm{w}$, $S_\mathrm{wr}$, and $S_\mathrm{nwr}$ denote the wetting phase saturation attained by the primary drainage curve, the residual saturation of the wetting phase, and the residual saturation of the nonwetting phase, respectively, and $\alpha_\mathrm{d,i}$ $\left[\mathrm{Pa^{-1}}\right]$, $n$, and $m=1-1/n$ are the VG fitting parameters (Table~\ref{tab:pnm_result_sng_phase}). The subscripts `d' and `i' refer, respectively, to the drainage and imbibition process.

\input{pnm_thermophysics.tex}
\subsection{Shape factor}
\label{pnm_shape_factor}
A 2D slice of Nubian Sandstone (Figure~\ref{fig:pnm_nubian_sandstone_qemscan_srxtm}B) shows highly irregular geometries of the pore elements. Even though it is not feasible to reproduce these geometries explicitly in the PNM, it is important to consider their effect on the displacement process. It is necessary, therefore, to replace this geometry by an equivalent idealized geometry which leads to mathematically tractable problems, while at the same time reproducing the main features of the pore space, pertinent to two-phase flow.

\cite{Mason1991} introduced the shape-factor concept to describe the geometry of pore-network elements (i.e. pore bodies and pore throats) and their angularity for reliable two-phase flow simulations, where the wetting phase occupies the angular corners and the nonwetting phase represents the bulk (Figure~\ref{fig:pnm_triangle_cross_section_shape_factor}). The most common approach is to choose the shape -- i.e. either a circle, a triangle, or a square $\mathrm{(C\!-\!T\!-\!S)}$ -- whose shape factor (as defined in Equation~\ref{eqn: pnm_shape_factor_1}) is closest to that of the real pore, as the idealized pore geometry,
\begin{equation}
    \label{eqn: pnm_shape_factor_1}
    G = \frac{A}{P^2} \,,
\end{equation}
where $A$ represents the cross-sectional area of a pore or throat and $P$ is its corresponding perimeter.

Our marker-based watershed segmentation provided: (1) the region volume, $(V)$, by summing the number of voxels in that region; (2) the extended radius, $(R_\text{ext})$, given as half of the maximum value of the global distance map, lying within each pore region, which may lead to an overlap of two pore bodies; and (3) the inscribed radius, $(R_\text{ins})$, given as half of the maximum value of the local distance map (i.e. Euclidean distance for a single pore space), lying within each pore region. The length of an idealized pore element, $(L_\text{ipe})$, is the summation of the extended radius and the inscribed radius (i.e. Equation \ref{eqn: pnm_area_porespy}). The cross-sectional area of an idealized pore element, $(A_\text{ipe})$, and its perimeter, $(P_\text{ipe})$, can, therefore, be defined by Equations~\eqref{eqn: pnm_area_porespy} and \eqref{eqn: pnm_permeter_porespy}, respectively, given by:
\begin{equation}
    \label{eqn: pnm_area_porespy}
    A_\text{ipe} = \frac{V}{R_\text{ins}+R_\text{ext}}, \quad  \mathrm{where} \; R_\text{ins}+R_\text{ext} = L_\text{ipe}\,,
\end{equation}
\begin{equation}
    \label{eqn: pnm_permeter_porespy}
    P_\text{ipe} = \frac{2V}{R_\text{ins}(R_\text{ins}+R_\text{ext})}\,.
\end{equation}

For pore throats, the marker-based watershed segmentation counts the number of voxels in the throat with a distance transform value of~1, then multiplies the result by the voxel length to provide the pore throat perimeter. Its inscribed radius can be found from the maximum of the global distance transform. With Equations~\eqref{eqn: pnm_area_porespy} and~\eqref{eqn: pnm_permeter_porespy}, and substitution with Equation~\eqref{eqn: pnm_shape_factor_1}, we obtain a new equation that describes the shape factor of three-dimensional idealized pore elements,
\begin{equation}
    \label{eqn: pnm_shape_factor_new}
    G = \frac{R^2_\text{ins}}{4A_\text{ipe}}\,.
\end{equation}

From Equation~\eqref{eqn: pnm_shape_factor_new}, the shape factor values of $\sqrt{3}\big/36$, $1\big/4\pi$, and $1\big/16$ correspond to the 2D cross-sections of a scalene triangle, square, and circle, respectively. Statistical properties of pore-network elements using the newly reformulated shape factor (Equation~\ref{eqn: pnm_shape_factor_new}) are given in Table~\ref{tab:statistics_pnm_nubian}. The details of how to calculate the corner half-angles $\beta_1$, $\beta_2$, and $\beta_3$, with the convention of $[0 \leq  \beta_1 \leq \beta_2 \leq \beta_3 \leq \pi\big/2]$, as illustrated in Figure~\ref{fig:pnm_triangle_cross_section_shape_factor}, for a given shape factor, are given in \cite{Patzek2001VerificationImbibition}.

\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.55\textwidth]{Idealized_pore_element_pnm.pdf}}
\caption{\small{Wetting-phase (gray) distribution in a pore element, which has a triangular cross-section. The three half-corner angles, $\beta_1$, $\beta_2$, and $\beta_3$, are $\mathrm{15^{\circ}}$, $\mathrm{30^{\circ}}$, and $\mathrm{45^{\circ}}$, respectively. $\theta_\text{a}$ is the static advancing contact angle, $R$ is the radius of the inscribed circle, $r$ is the radius of the nonwetting--wetting-interface curvature, and $b$ denotes the distance from each apex to the corresponding nonwetting--wetting interface along the solid wall (red).} }
\label{fig:pnm_triangle_cross_section_shape_factor}
\end{center}
\end{figure}

\subsection{Quasi-static pore-network modelling}
\label{pnm_quasi_static_modelling}
The pore network (PN), initially fully filled with the wetting phase, is brought in contact with the nonwetting and wetting reservoirs at the inlet and outlet boundaries, respectively. The other boundaries are set to wall (no-flow) boundary conditions. Both reservoir pressure values are set to zero initially. When the primary drainage starts, we gradually increase the nonwetting reservoir pressure by small increments (less than~$\mathrm{5 \;Pa}$). After each increase, we check which pore bodies are invaded by the nonwetting phase. A pore body will be invaded by the nonwetting phase, once the following two conditions are both satisfied:
\begin{itemize}
    \item The nonwetting reservoir pressure is larger than its entry pressure,
    \item Both nonwetting and wetting phases in the pore body have pathways to the inlet and outlet reservoirs, respectively.
\end{itemize}
Then, the phase occupation in both pore bodies and pore throats is updated under the equilibrium condition. The capillary-pressure relationships, with respect to the wetting saturation used, are given in Appendix~\ref{pnm_appendix_a}. The primary drainage process is terminated once a pre-set maximum drainage pressure is achieved. At this stage, the wetting phase is present in the tight pores and crevices of the network, due to pore-structure trapping, and resides in the corners of the surface roughness of the pores. We use an interfacial tension of $\sigma = 0.0202$~N/m.

For main imbibition, we decrease the nonwetting reservoir pressure step-wise, by a small deduction (less than $\mathrm{5 \;Pa}$), allowing the wetting phase gradually to fill the pore bodies in each step. After each decrease, we check the scenarios of cooperative pore-body filling ($cpf$) and snap-off ($so$) in pore bodies and pore throats. For the cooperative filling of a pore body, if the local capillary pressure is larger than the threshold capillary necessary to fill the pore body, and the nonwetting and wetting phases have pathways to the inlet and outlet reservoirs, the pore body will be fully filled with the wetting phase by spontaneous imbibition. When snap-off happens in a pore throat, the pore throat will be completely occupied by the wetting phase. When snap-off happens in a pore body, the nonwetting phase will be locally trapped. For the remaining pore bodies and pore throats, the phase occupation is updated by the piston-type movement of arc menisci (AMs) or the main terminal meniscus (MTM) filling \citep{Ma1996EffectTubes} under the equilibrium condition. The relationships for checking snap-off events and the threshold capillary pressure for the cooperative filling, used here, are given in Appendix~\ref{pnm_appendix_a}.

Finally, in both drainage and imbibition processes, as long as the phase occupation needs to be updated, a search operation needs to be conducted to check if the nonwetting and wetting phases exhibit pathways that are connected to the inlet and outlet reservoirs, respectively. If both pathways can be found, the phase occupation will be updated to the new one. Otherwise, the update is aborted due to trapping.
\subsection{Calculation of relative permeability}
\label{pnm_calculation_relative_permeability}
For a given stage in the drainage or imbibition process, the conducting pathways of the nonwetting and wetting phases are known. For either phase, its volumetric conservation in a pore body is given by:
\begin{equation}
    \label{eqn: pnm_volumetric_conservation_quasistatic }
     \sum_{j=1}^{N_i} K^{\kappa}_{ij}\left(P^{\kappa}_{i}-P^{\kappa}_{j} \right) = 0\,.
\end{equation}
Here, $i$ is the pore-body index, $ij$ is the pore-throat index, $N_i$ is the coordination number, $\kappa$ is the phase indicator, $P\; \left[\mathrm{Pa}\right]$ is the pressure, and   $K^{\kappa}_{ij} \; \left[\mathrm{m^3/Pa/s}\right]$ is the conductivity, calculated by
\begin{equation}
    \label{eqn: pnm_relative_permeability_quasistatic}
    K^{\kappa}_{ij} = {1}\Bigg/{\left(\frac{l_{i}}{2g^{\kappa}_{i}} + \frac{l_{j}}{2g^{\kappa}_{j}}+\frac{l_{ij}}{g^{\kappa}_{ij}} \right)} \,,
\end{equation}
where $l \; \mathrm{[m]}$ is the length, and $g \; \left[\mathrm{m^4/Pa/s}\right]$ is the conductance, given in Appendix~\ref{pnm_appendix_a}.
With proper inlet and outlet pressure boundary conditions, Equation~\eqref{eqn: pnm_volumetric_conservation_quasistatic } can be used to solve for the pressure field. Then, Darcy's law is used to obtain the relative permeability for the given network saturation value.

\section{Results}
\label{pnm_results}
In the following sections, the pore-space geometry of the Nubian Sandstone sample, as determined experimentally using the relevant data from the MIP experiment, serves as an input for the image-based PNM extraction approach. In all the simulations that follow, we run primary drainage--main imbibition cycles using the quasi-static pore-network model, while varying the saturation at the point of reversal from drainage to imbibition.
\subsection{Pore-network calibration}
\label{pnm_result_pore_network_calibration}
We assume that the pore throats are volumeless elements of the pore network and account for resistance to flow, while pore bodies account for the pore volume but do not provide any resistance to flow. On a local level, however, the extracted PN of the Nubian Sandstone contains slate-shaped pores that have an aspect ratio (i.e. ratio of pore-body to pore-throat sizes) smaller than one. Only small spheres can be inscribed inside pore spaces with such pore-to-throat aspect ratios, but the throats could still be quite large. In this case, such a division into pore bodies and throats has little physical meaning. Therefore, we adjust the pore-throat radii until the measured capillary pressure--saturation relationship, obtained from the MIP experiment, is fulfilled. This is done by assuming that the aspect ratio of any pore-body/pore-throat pair must be greater than, or equal to, a given threshold value. The resulting minimum aspect ratio, $R_\text{asp}$, for the analyzed Nubian Sandstone sample in this work is 2.27, compared to 2.25 for Berea Sandstone \citep{ren2003ReconstructionEffects}. This calibration is done manually by trial-and-error.

The $P_\mathrm{c}\!-\!S_\mathrm{w}$ relationship used for the calibration is obtained by extending the results of the MIP experiments from the mercury--air fluid pair, using a Leverett-$J$ scaling \citep{Leverett1941} to the CO$_{\text2}$--brine system (Table~\ref{tab:pnm_result_sng_phase}).
In addition, a van~Genuchten (VG) model was fitted to the $P_\mathrm{c}\!-\!S_\mathrm{w}$ curve as shown in Figure~\ref{fig:pnm_nubian_pc_sw_mip_pnm_vg}.

\input{pnm_result_sng_phase2.tex}

\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.80\textwidth]{mip_pnm_drain_imbib_pc_sw_nubian_lin_drain_imbib_b.pdf}}
\caption{\small{Results of the PN model calibration for the Leverett-$J$ versus wetting-phase-saturation drainage curve, using the results from the MIP experiments. The van~Genuchten fit is also shown. The primary drainage curves are shown with unfilled symbols. The PNM is used to predict the main imbibition curve, shown here with gray-filled symbols.} }
\label{fig:pnm_nubian_pc_sw_mip_pnm_vg}
\end{center}
\end{figure}
Table~\ref{tab:pnm_result_sng_phase} summarizes the intrinsic hydraulic and capillary properties of the Nubian Sandstone, using experimental and computational methods. The results of the quasi-static single-phase flow simulation shows that the absolute permeability is in agreement with the value obtained from the MIP experiment. It can be seen that the absolute permeability of the network $\left(\mathrm{2.00\times\!10^{-12}}\; \mathrm{m^2}\right)$ is close to that of the plug sample $\left(\mathrm{MIP \;experiment;}\; \mathrm{1.70\times\!10^{-12}}\; \mathrm{m^2}\right)$. The permeability obtained from direct numerical simulation, using the Lattice Boltzmann method (our in-house code, LBHydra, \cite{Walsh2010InterpolatedKinetics,Walsh2010MacroscaleMedia, Walsh2013DevelopingUnits}) is with  $\mathrm{2.57\times\!10^{-12}}\; \mathrm{m^2}$ slightly higher.

\subsection{Residual trapping in Nubian Sandstone}
\label{pnm_result_residual_trapping}
In this section, we investigate pore-scale fluid-displacement and trapping mechanisms by simulating primary drainage--main imbibition cycles. The  simulations use the calibrated pore network of the Nubian Sandstone sample (Section~\ref{pnm_result_pore_network_calibration}). We assume water-wet conditions and that the contact angle is constant for each process, i.e. that the receding contact angle, $\theta_\mathrm{r}$, is 0$\mathrm{^{\circ}}$ (primary drainage), and the advancing contact angle, $\theta_\mathrm{a}$, is 35$\mathrm{^{\circ}}$ (main imbibition). The primary drainage simulations stop when the pore-space saturation of the non-wetting phase reaches a target value, $S_\mathrm{nw,i}$. This is the initial condition for the subsequent main imbibition process, where the wetting saturation increases till the non-wetting phase is no longer connected to its reservoir. A visualization of the primary drainage--main imbibition cycle, with $S_\mathrm{nw,i}=10\%$ and an advancing contact angle of $35 \mathrm{^{\circ}}$, is shown in Figure~\ref{fig:pnm_nubian_quasi-static_ir01}. The brine-filled pores are shown in blue, while red represents CO$_{\text2}$-filled pores.
The figure shows clearly that most residual trapping takes place under low capillary pressures, i.e. towards the end of the imbibition cycle.
In the simulations, $S_\mathrm{nw,i}$ is varied between~0.1 and~0.9, in order to assess the effect of initial saturation on the residual nonwetting saturation.  Further discussions on the relationship between $S_\mathrm{nw,i}$ and $S_\mathrm{nw,r}$ (i.e. the initial--residual relationship,~IR) are provided in Section~\ref{pnm_IR_discussion}.
\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.80\textwidth]{Quasi-static_r01_simulation2.pdf}}
\caption{\small{Snapshots of the quasi-static simulations, with a wetting-phase (brine) saturation, at the point of reversal from drainage to imbibition, of $S_\mathrm{nw,i}=0.1$. The brine-filled pores are shown in blue, while red represents CO$_{\text2}$-filled pores. The upper panel shows a representative process of primary drainage at three different capillary pressures, while the lower panel shows imbibition. We use only half of the extracted pore network, shown in Figure~\ref{fig:pnm_nubian_3d_visualization_statisitics}A, as it is more appropriate for the simulations to have a cube-shaped domain.} }
\label{fig:pnm_nubian_quasi-static_ir01}
\end{center}
\end{figure}

Furthermore, we investigate two distinct processes, whose competition influences the residual trapping at the pore scale. The first is changing the system wettability from strongly water-wet (i.e. $\theta_\mathrm{a}= 0\mathrm{^{\circ}}$) to more neutrally water-wet (i.e. $\theta_\mathrm{a}= 50\mathrm{^{\circ}}$). The second is the sensitivity of residual trapping to the minimum aspect ratio, ${R_\text{asp}}$. In addition to ${R_\text{asp}}=2.27$, obtained during the pore-network calibration, we chose ${R_\text{asp}}$ values of~1.14 and~4.54 to analyze statistically the fluid distribution, the saturation map, and the trapping events. Figure~\ref{fig:pnm_nubian_IR_CA_curve} shows, how the amount of residually trapped CO$_{\text2}$ differs with contact angle and minimum aspect ratio, ${R_\text{asp}}$. Generally, more CO$_{\text2}$ trapping occurs at lower contact angles and higher minimum aspect ratios. However, this does not hold true for the lowest minimum aspect ratio of ${R_\text{asp}}=1.14$. In this case, $S_\text{nw,r}$ increases with increasing contact angle, and even surpasses those of the higher aspect ratios at high contact angles.

\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.395\textwidth]{IR_AR_CA_hystersis_nubian_Final.pdf}}
\caption{\small{Sensitivity of residual CO$_{\text2}$ trapping to different values of the advancing contact angle $\left(\theta_\mathrm{a}\;\left[ \mathrm{^{\circ}}\right]\right)$, as a function of the minimum aspect ratio of the pore network. The figure shows that an increase in the amount of trapped CO$_{\text2}$ corresponds to a decrease in the contact angle for the medium (2.27) and high (4.54) minimum aspect ratios. In contrast, the amount of residual CO$_{\text2}$ trapping increases with increasing advancing contact angle for the smallest minimum aspect ratio (1.14).} }
\label{fig:pnm_nubian_IR_CA_curve}
\end{center}
\end{figure}

\subsection{Relative permeability}
\label{pnm_result_relative_permeability}
In this study, the predicted values for the relative fluid permeabilities in the Nubian Sandstone sample are obtained via quasi-static pore-network modeling. These values are then compared to the two-phase experiment results, reported in \cite{Reynolds2018MultiphaseKingdom} for the Bunter Sandstone (UK) as well as to the VG functions, which were fitted to the capillary pressure curve, obtained from our MIP experiment (Figure~\ref{fig:pnm_nubian_kr_mip_bunter_vg}). Generally, there is a good agreement between the simulated relative permeabilities and the calculated values from the VG function (fitted with the capillary pressure curve). The Nubian Sandstone relative permeabilities tend to be higher than those observed experimentally for the Bunter Sandstone, but the same trend is seen. The end-point nonwetting-phase relative permeability, at the irreducible water saturation for the Nubian Sandstone sample, obtained from our PN simulations, is $k_\mathrm{r,nw}\left(S_\mathrm{w,ir} = 0.099 \right)\ = 0.794$.
\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.87\textwidth]{Kr_curve_nubian_pnm_vg_Reynolds_Final6.pdf}
\llap{\parbox[b]{4.85in}{[A: Brine]\\\rule{0ex}{1.9in}}}
\llap{\parbox[b]{0.95in}{[B: CO$_{\text2}$]\\\rule{0ex}{1.9in}}}
}
\caption{\small{Comparison between the predicted and the experiment-based relative permeability curves ($k_\mathrm{r}-S_\mathrm{w}$) for brine [A] and CO$_{\text2}$ [B] during the primary drainage and main imbibition processes, commencing at an initial wetting-phase saturation of~0.1 (i.e. $S_\mathrm{w,i}$, the saturation before the start of the main imbibition). Drainage is shown with filled symbols and imbibition is shown with open symbols. The comparison in relative permeability curves is between drainage--imbibition cycles of quasi-static pore-scale simulations and the fitted van~Genuchten model for Nubian Sandstone as well as experiment data for Bunter Sandstone after \cite{Reynolds2018MultiphaseKingdom}.} }
\label{fig:pnm_nubian_kr_mip_bunter_vg}
\end{center}
\end{figure}

We investigate the dependence of hysteresis, of the relative permeability curves, on the pore-scale phenomena described in Section~\ref{pnm_result_residual_trapping} (i.e. wettability and minimum aspect ratio), as shown in Figure~\ref{fig:pnm_nubian_kr_ca_ar_ir_curves}.
Based on the observations from our pore-network study, we infer that the hysteresis in the $k_\mathrm{r,nw}-S_\mathrm{w}$ relationship is primarily caused by the dependency of the swelling of arc menisci in pore corners during imbibition. The lower the initial wetting saturation (i.e. the wetting saturation when drainage switches to imbibition), the more the nonwetting phase (here CO$_{\text2}$) in the pore bodies tends to get disconnected at the end of the imbibition process, thereby becoming more isolated and immobilized, in part via cooperative pore-filling.

\subsection{Initial--residual saturation relationship for Nubian Sandstone}
\label{pnm_IR_discussion}
Two-phase modeling at the continuum scale can benefit significantly from realistic residual trapping (IR) constitutive relationships in order to quantify the magnitude of trapping \citep{Krevor2015}. Several empirical trapping models have been developed to describe residual trapping. The most widely used model for water-wet systems is that of \cite{Land1968CalculationProperties}. In this model, the residual saturation is calculated by
\begin{equation}
    \label{eqn: pnm_land_model}
    S_\mathrm{nw,r} = \frac{S_\mathrm{nw,i}}{1+CS_\mathrm{nw,i}}\, ,
\end{equation}
where, $C$ is the Land trapping coefficient, which is found by fitting a curve to a plot of the residual saturation of the nonwetting phase ($S_\mathrm{{nw,r}}$) versus the initial saturation at the end of drainage and prior to imbibition ($S_\mathrm{{nw,i}}$). The higher $C$ is, the lower is the amount of trapped nonwetting fluid (here CO$_{\text2}$), and therefore the weaker the hysteresis between drainage and imbibition. We use the calibrated pore network (Section~\ref{pnm_result_pore_network_calibration}) to estimate the trapping curve for the $\mathrm{CO_2-brine}$ pair in Nubian Sandstone and compare it with the trapping curves that were experimentally determined for similar rock types by \cite{Akbarabadi2013RelativeConditions} and \cite{Reynolds2018MultiphaseKingdom}.

\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.65\textwidth]{IR_curve_nubian_Reynolds_Final2.pdf}
\caption{\small{Predicted residual trapping of supercritical CO$_{\text2}$ in Nubian Sandstone, compared to experiment IR data for Berea and Ormskirk Sandstones. The predicted initial and residual saturations of CO$_{\text2}$ are obtained by quasi-static pore-network modelling. The solid lines represent Land model curves with the labeled coefficients, while the dashed line shows the fitted IR curve for PN-simulation results for the Nubian Sandstone.} }
\label{fig:pnm_nubian_IR_curve}
\end{center}
\end{figure}

For the Nubian Sandstone, with an advancing contact angle of 35$^\circ$, the best fit for the Land trapping coefficient (from Equation~\ref{eqn: pnm_land_model}) is~1.2, with~0.86 as the coefficient of determination. Nevertheless, $C$ exhibits a range of possible values between~0.1 \citep{Reynolds2018MultiphaseKingdom} and~1.6 \citep{Akbarabadi2013RelativeConditions} for Bunter and Berea Sandstones, respectively.
However, \cite{Krevor2015} reported a value of $C = 5$ for a wider range of rock types. Figure~\ref{fig:pnm_nubian_IR_curve} shows that the capillary trapping curves increase monotonically with initial saturation. At $S_\mathrm{nw,i}$ $\sim\!0.6$, the relationship is nearly linear. Interestingly, Nubian Sandstone has relatively good capillary trapping characteristics with up to 45\% of the CO$_{\text2}$ initially present remaining as a trapped fluid after imbibition. A similar residual trapping value has been observed by \cite{Spiteri2008ACharacteristics} for Berea Sandstone. It is worth noting, however, that in a mixed-wet system, residual trapping would be greatly reduced \citep{Spiteri2008ACharacteristics}.

\section{Discussion}
\label{pnm_discussion}
Overall, the Nubian Sandstone sample is relatively homogeneous, with only small variations in the porosity profile along its length (Figure~\ref{fig:pnm_nubian_rev}). The developed quasi-static pore network~(PN) simulator demonstrates the sensitivity of residual trapping in such a homogeneous sandstone to the key parameters wettability and minimum pore-body-to-throat aspect ratio.
\subsection{Sensitivity analysis of Pore-Network modelling}
\paragraph{Displacement mechanisms:}
Generally, three different pore-scale displacement mechanisms are possible during imbibition, as explained in Section~\ref{pnm_capillarytrapping}. Piston-type displacement is always favored over cooperative pore-body filling and snap-off, wherever piston-type displacement is topologically possible. However, in order for nonwetting-phase trapping to occur, cooperative pore-body filling or snap-off is required.

Figures~\ref{fig:pnm_nubian_pore_scale_displacment}A and \ref{fig:pnm_nubian_pore_scale_displacment}B show two histograms of the number of occurrences of each displacement mechanism in the pore bodies and pore throats, respectively. One can see that, for the two higher minimum aspect ratios, co-operative pore-body filling ($cpf$) is the main mechanism responsible for the trapping of the nonwetting phase in the pore bodies. $cpf$ occurs most often for $R_\text{asp} = 2.27$. Snap-off ($so$) is all but absent in the pore bodies. For $R_\text{asp} = 1.14$, however, $so$ is slightly more common than $cpf$. In addition, the number of snap-off events in the pore throats increases with increasing minimum aspect ratio. Such behavior is expected, as it is easier for the wetting phase, present in the corners of the pore throats, to connect (leading to snap-off) in narrow throats.
\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.9\textwidth]{trap_events_ar_ca_nubia.pdf}}
\caption{\small{Comparison between the fluid-displacement mechanisms in the pore-network model of the Nubian Sandstone as a function of wettability and minimum aspect ratio. We present here, the fluid-displacement processes that are responsible for (CO$_{\text2}$) trapping only: [A] cooperative pore-body filling ($cpf$) events and [B] snap-off events in pore throats. The white bars in the cooperative pore-body filling plot represent snap-off events in the pore body. The piston-like advance process, either in pore bodies [A] or pore throats [B], represent the remainder (up until a normalized frequency of~1) of each bar for each case.} }
\label{fig:pnm_nubian_pore_scale_displacment}
\end{center}
\end{figure}
\paragraph{Effect of wettability on residual CO$_{\text2}$ trapping:}
For $R_\text{asp} = 2.27$ and $R_\text{asp} = 4.54$, the relationship between the amount of residually trapped CO$_{\text2}$ and the contact angle is straightforward. The lower the contact angle, the higher the entry pressure required for a nonwetting CO$_{\text2}$ bubble in a pore body to invade a (narrow) pore throat. Hence, as shown in Figure~\ref{fig:pnm_nubian_IR_CA_curve}, $S_\text{nw,r}$ reduces with increasing contact angle. This behaviour is consistent with previous experiment results, using core-flooding computerized tomography on different sandstones \citep{Chatzis1983MagnitudeSaturation., Herring2013EffectSequestration,Geistlinger2014QuantificationMicrotomography, Krevor2015}.

However, this tendency is inverted for $R_\text{asp}=1.14$. It has been shown in imbibition experiments with low-aspect-ratio capillary micromodels, that strongly water-wet displacement yields better displacement efficiencies (sweep) than mixed-wet systems \citep{Mattax1961}. Hence, lower contact angles result in smaller residual trapping values in this case. The reason for this effect is that systems with high capillarity tend to show fluid distributions that are more homogeneous \citep{Mattax1961}, while larger clusters of nonwetting fluid can persist when capillary forces are less relevant (Figure~\ref{fig:pnm_trapping_map_low_aspect_ratio}), yielding more residual trapping.
\begin{figure}[hbtp]
\begin{center}
{\small\includegraphics[width=0.9\textwidth]{Trapping_AR_114_saturaion_map2.pdf}}

\caption{\small{Volume fraction (saturation) of the trapped nonwetting phase (CO$_{\text2}$) in the pore network, with $R_\text{asp}=1.14$, $S_\text{w,i}=10\,\%$, and $\theta_\mathrm{a}=0\,^\circ$ [A] and $\theta_\mathrm{a} =50\,^\circ$ [B] at the end of the imbibition process.} }
\label{fig:pnm_trapping_map_low_aspect_ratio}
\end{center}
\end{figure}
\paragraph{Effect of the pore-body-to-throat aspect ratio on residual trapping:}
For strongly water-wet systems, higher minimum aspect ratios yield more trapping (Figure~\ref{fig:pnm_nubian_IR_CA_curve}). This is again caused by the higher entry pressures that narrower pore throats have. As has been pointed out throughout this discussion, the case of $R_\text{asp} = 1.14$ behaves decidedly differently than the other two cases with larger aspect ratios. It should be noted though that such a low aspect ratio is uncommon in natural rocks. As such, the trapping behavior and trends depicted by the cases with $R_\text{asp} = 2.27$ and $R_\text{asp} = 4.54$ are more representative for CO$_{\text2}$ residual trapping in sandstone.

\subsection{Implications for CO$_{\text 2}$ storage in the Gulf of Suez Basin}
We explore the implications of this research, as a first attempt, for future implementation of CCS in the Egyptian context. Equation~\eqref{eqn: pnm_storage_capacity} is used to estimate the geologic CO$_{\text 2}$ storage capacity. It is consistent with methods used in previous studies to assess the prospective geologic storage of buoyant fluids in subsurface formations \citep{vanderMeer1995TheAquifers, Doughty2001,Kopp2009InvestigationsCoefficients,  Goodman2011U.S.Scale, NETL2015},
\begin{equation}
\label{eqn: pnm_storage_capacity}

    M_\mathrm{CO_2}^\mathrm{eff} = \zeta_{\mathrm{eff}}  V_\mathrm{res}^\mathrm{bulk} \rho_\mathrm{CO_2} (T,p),
\end{equation}
where, \textit{M}$_\mathrm{CO_2}^\mathrm{eff}$ is the effective storage capacity $\mathrm{\left[kg\right]}$,  $V_\mathrm{res}^\mathrm{bulk}$ is the bulk reservoir volume  $\mathrm{\left[m^3\right]}$, and $\rho_\mathrm{CO_2}$ is the CO$_{\text 2}$ density $\mathrm{\left[kg.m^{-3}\right]}$ as a function of the corresponding reservoir temperature and pressure. The dimensionless CO$_{\text 2}$-storage efficiency factor, $\zeta_{\text{eff}} \; \mathrm{\left[-\right]}$, represents the fraction of the total pore volume that can be occupied by the injected CO$_{\text 2}$. \cite{Doughty2001} proposed a method in which $\zeta_{\text{eff}}$ is estimated by a combination of the parameters provided in Equation~\eqref{eqn: pnm_storage_capacity_efficiency_factor}.
\begin{equation}
\label{eqn: pnm_storage_capacity_efficiency_factor}
    \zeta_{\mathrm{eff}}  = \overline{\phi}_{\text{avg}} \textit{C}_{\text g} \textit{C}_{\text h} C_\text{i},\quad \text{where} \;
    \zeta_{\mathrm{eff}} \in \left[0, \overline{\phi}_{\text{avg}}\right]\, .
\end{equation}
Here, $\overline{\phi}_{\text{avg}}$ is the average formation porosity $\mathrm{\left[-\right]}$, $\textit{C}_{\text g}$ and $\textit{C}_{\text h}$ are coefficients for the geometric capacity $\mathrm{\left[-\right]}$ and the heterogeneity capacity $\mathrm{\left[-\right]}$, respectively. The coefficient $\textit{C}_{\text i}$ is intrinsic capacity $\mathrm{\left[-\right]}$, which is controlled by multi-phase flow and transport phenomena; Equation~\eqref{eqn: pnm_intrinsic_capacity_storage_ci}.
\begin{equation}
\label{eqn: pnm_intrinsic_capacity_storage_ci}
C_\text{i} = C_\text{ig}+C_\text{il}\, ,
\end{equation}
where
$C_{\text {ig}}$ and $\textit{C}_{\text {il}}$ are the intrinsic capacity $\mathrm{\left[-\right]}$ for the CO$_{\text 2}$ and brine phase, respectively. $\textit{C}_{\text {ig}}$ can be estimated using Equation~\eqref{eqn: pnm_storage_capacity_efficiency_factor_Cig}.

\begin{equation}
\label{eqn: pnm_storage_capacity_efficiency_factor_Cig}
    \textit{C}_{\text {ig}}  \cong \textit{S}_\mathrm{g} ,
\end{equation}
where, the \textit{S}$_{\mathrm{g}}$ is the average saturation of CO$_{\text 2}$ within the CO$_{\text 2}$-plume. We use the residual CO$_{\text 2}$ saturation value of 0.4 obtained from the current pore-network analysis. Meanwhile, the \textit{C}$_{\mathrm{il}}$ coefficient can be estimated using Equation~\eqref{eqn: pnm_storage_capacity_efficiency_factor_Cil}.
\begin{equation}
\label{eqn: pnm_storage_capacity_efficiency_factor_Cil}
    \textit{C}_{\text {il}}  \cong \textit{S}_\mathrm{l}\chi_\mathrm{l}^\mathrm{g} \frac{\rho_\mathrm{l}}{\rho_\mathrm{g}},
\end{equation}
where, \textit{S}$_\mathrm{l} = 1-\textit{S}_{\mathrm{g} }$ is the average brine saturation $\mathrm{\left[-\right]}$, $\chi_\mathrm{l}^\mathrm{g}$ is the average CO$_{\text 2}$ mass fraction dissolved in the brine phase $\left[\text{kg}/\text{kg}\right]$, and $\rho_\mathrm{l}/\rho_\mathrm{g}$ stands for the density ratio between the CO$_{\text 2}$ and brine phases $\mathrm{\left[-\right]}$. We employ the commonly used thermodynamic models to describe the mole
fraction (solubility) of CO$_{\text 2}$ for a CO$_{\text 2}$-brine system provided by \cite{Duan2003AnBar} and \cite{Duan2006}.
The densities, as a function of the relevant pressure and temperature, are numerically obtained using the \cite{Span1996AMPa} equation of state for CO$_{\text 2}$ and \cite{Driesner2007TheXNaCl} for brine (considering the brine salinity discussed above).

In the Gulf of Suez basin, Nubian Sandstone is subdivided into three main zones with high reservoir qualities and interfingering of two relatively thin-shale aquitards between the sandstone aquifer zones. Such layer-type
heterogeneities tend to enhance sequestration capacity by counteracting gravitational forces \citep{Doughty2001}. Therefore, we choose a heterogeneity capacity coefficient $\textit{C}_{\text h}$ of 0.5 \citep{vanderMeer1995TheAquifers}. A range of geometrical capacity coefficients $\textit{C}_{\text g}$ is taken from \cite{Kopp2009InvestigationsCoefficients}: 0.19--0.63.

\begin{figure}[hbtp]
\begin{center}

{\small\includegraphics[width=0.4\textwidth]{gos_nubian_depth.pdf}}
{\small\includegraphics[width=0.407\textwidth]{gos_co2_density.pdf}}
\llap{\parbox[b]{5.05in}{[\textbf{A}]\\\rule{0ex}{7.05in}}}
\llap{\parbox[b]{2.5in}{[\textbf{B}]\\\rule{0ex}{7.05in}}}
\caption{\small{[A] Depth to the top of the Nubian Sandstone sequence in the Gulf of Suez (Egypt). The map is constructed based on the interpretation of aeromagnetic and geological data by \cite{Mesheref1976} for basement rocks and modified after \cite{Farhoud2009}. [B] The distribution of in-situ CO$_{\text 2}$ densities across the Gulf of Suez. CO$_{\text 2}$ density is calculated at the equivalent temperature and pressure after \cite{Span1996AMPa}'s equation of state. The red outline  bounds the potential area (with 9\,950 km$^{\text{2}}$ footprint) in the Gulf of Suez for CO$_{\text 2}$ to be in the supercritical phase. }  }
\label{fig:pnm_nubian_sandstone_depth_gos}
\end{center}
\end{figure}

Stratigraphically, Nubian Sandstone overlies the basement complex throughout most of the Gulf of Suez basin with an average thickness of 0.45~km \citep{Alsharhan1997LithostratigraphyEgypt}. The depth map for the basement complex was interpreted from the aeromagnetic and the geological data by \cite{Mesheref1976, Farhoud2009}. Therefore, the depth to the top of the Nubian Sandstone sequence was constructed by adding a vertical offset of 0.45 km to the interpreted depth map of the basement complex. The resultant map is shown in Figure~\ref{fig:pnm_nubian_sandstone_depth_gos}A with a maximum depth of 4.67~km.

\input{pnm_capacity_estimation_gos}

Temperature and pressure generally increase with burial depth but have opposite effects on CO$_{\text 2}$ density.
Following the geothermal gradient of 35.7 $^{\circ}$C/km and pressure gradient of 10.18 MPa/km after \cite{Hefny}, the range of CO$_{\text 2}$ density was found to be 640 -- 624 kg/m$^3$.
\cite{Hefny2020} estimated $\chi_\mathrm{l}^\mathrm{g}\; \mathrm{\left[-\right]}$ and $\rho_\mathrm{l}/\rho_\mathrm{g}$ ratio $\mathrm{\left[-\right]}$ as 0.057 and 1.48, respectively, both are calculated for an average temperature (118.24~$^\circ$C) and pressure (34.7~MPa), and brine salinity (0.66 mol/kg; Table~\ref{tab:pnm_thermophysics}) found in the Gulf of Suez. All calculated coefficients and parameters used to estimate the CO$_{\text 2}$ storage capacity in Nubian Sandstone are provided in Table~\ref{tab:pnm_capacity_estimation_gos}. In conclusion, our $\zeta_{\mathrm{eff}}$ estimation for Nubian Sandstone was found to be in the range of 0.005 -- 0.017 $\mathrm{\left[-\right]}$.

The \textit{M}$_\mathrm{CO_2}^\mathrm{eff}$ estimation covers a 9\,950 km$^{\text 2}$ surface area for the Gulf of Suez (marked by the red outline in Figure~\ref{fig:pnm_nubian_sandstone_depth_gos}B), where the subsurface conditions allow CO$_{\text 2}$ to be in the supercritical phase. We conclude that the Nubian Sandstone in the Gulf of Suez can store up to 14 -- 49 GtCO$_{\text 2}$, which alone can meet the Egyptian needs to store 250 MtCO$_{\text 2}$ emitted per annum \citep{Crippa2019} for the upcoming >227~years.

\section{Conclusions}
\label{pnm_conclusions}
\begin{itemize}
    \item
We investigate geologic CO$_{\text2}$ storage in a highly permeable formation, typical for Nubian Sandstone, Gulf of Suez (Egypt). This investigation consists of (1) constructing a realistic 3D pore network model that represents the characteristic features of Nubian Sandstone, (2) developing a quasi-static pore-network numerical simulator that mimics in-situ conditions that are similar to those prevailing at a CO$_{\text2}$-storage site, at the trailing edge of the CO$_{\text2}$ plume, and (3) predicting the two-phase flow characteristics.
    \item
Two-phase constitutive relationships, including the capillary pressure and relative permeability curves, are computed for water-wet rocks at a low capillary number. We determine a Land trapping coefficient of $C=1.2$ for the Nubian sandstone sample. These relationships can be employed in field-scale numerical models to estimate the extent of CO$_{\text2}$-plume migration, at a representative geological scale.
    \item
The estimated capillary-trapping curves for Nubian Sandstone are in good agreement with those observed experimentally for similar rocks. This confirms, that residual trapping due to hysteresis can be a key mechanism for long-term CO$_{\text2}$ storage in Nubian Sandstone.
    \item
One aspect, which has not been taken into account in this study, is contact-angle hysteresis, due to the lack of experiment measurements of the contact angle in Nubian Sandstone. We, therefore, consider uniform wettability in this work. Wettability hysteresis may be a topic of interest for future studies.
    \item
Our sensitivity study of the impact of wettability (i.e. advancing contact angle) on the magnitude of residual trapping shows that the trapped amount of CO$_{\text2}$ increases with decreasing contact angle for the cases, where the minimum pore-body-to-throat aspect ratio is~2.27 or~4.54. The inverse is the case when the minimum aspect ratio is only~1.14.
    \item
The pore-network model developed in this work improves our understanding of the different trapping mechanisms in Nubian Sandstone, as they pertain to CCS- and CPG-related applications.
\item
The result of a conservative approach for a basin-scale estimation of CO$_{\text2}$ storage capacity shows an attractive potential to store 14 -- 49 GtCO$_{\text2}$ in Nubian Sandstone, Gulf of Suez basin. This assessment is based on a horizontal caprock and incorporates the arrangement of several injection wells accessing all fault-blocks with a compartment-like basin. The existence of many of these required wells, due to the locally active hydrocarbon industry, is another attractive factor, contributing to potentially making CCS and CPG techno-economically feasibile in the Gulf of Suez.
\end{itemize}
\section*{Supplemental material}
\label{pnm_supplementary}
Supplemental material is provided to enable the reproducibility of our results. In addition, the SRXTM raw dataset of the Nubian Sandstone sample (in tiff format) has been made publicly accessible for the scientific community through the ETH~Zurich Research Collection repository [DOI: \href{https://doi.org/10.3929/ethz-b-000377881}{https://doi.org/10.3929/ethz-b-000377881}], which also contains descriptions of imaging conditions and characterizations of the rock samples through laboratory measurements \citep{Hefny2019DatasetDioxide}.

\section*{CRediT authorship contribution statement:}
\textbf{M. Hefny} conducted the experiments, analysed the data, prepared figures and wrote the main manuscript. \textbf{A. Ebigbo} supervised the whole work and wrote the main manuscript. \textbf{C.-Z. Qin} was responsible for coding pore-network model. \textbf{M.-O. Saar} secured the funding and the resources/infrastructure designed for the research work. All authors reviewed the manuscript.\par
\section*{Acknowledgments}
\label{pnm_acknowledgments}

We gratefully acknowledge funding for this work by the Government of Egypt and the Werner Siemens Foundation (Werner Siemens-Stiftung) for their support of the Geothermal Energy and Geofluids (GEG.ethz.ch) Group at ETH~Zürich, Switzerland. We appreciate the contributions made by C.~Schlepütz and M.~Stampanoni from TOMCAT's Paul Scherrer Institute in acquiring the SRXTM dataset used in this work. Thanks also go to the ClayLab ETH~Zürich, and in particular to M.~Plötz for his support with the Mercury Intrusion Porosimetry analysis. We are grateful to the Rock Physics and Mechanics Laboratory at ETH~Zürich for the permeability measurement support, employing experiments and numerical simulators. We further thank A.~Moscariello for allowing us to use the QEMSCAN analysis equipment at the University of Geneva. We conducted Pore-Network Extraction and IP Simulations, using the High-Performance Computing Cluster of the Geothermal Energy and Geofluid (GEG.ethz.ch) group at ETH~Zürich.
\section*{ORCID}
M. Hefny:  https://orcid.org/0000-0003-2568-6902 \\
C.-Z. Qin:  https://orcid.org/0000-0003-2793-3161 \\
M.O. Saar: https://orcid.org/0000-0002-4869-6452 \\
A. Ebigbo: https://orcid.org/0000-0003-3972-3786 \\

\section*{Conflict of interest}
The authors declare that they have no conflict of financial interest or personal relationships that could have appeared to influ-ence the work reported in this paper.
\markboth{Bibliography}{}
\bibliographystyle{apalike}

redpajama_set_name: RedPajamaArXiv


A striking addition to the flower bed.
Haven't assembled yet waiting for better weather.
A good looking,robust, obelisk. It does what it says. Excellent customer service. The only downside was slightly difficult to assemble, but changed things slightly for the second one and it was a dream.
Bought two Obelisks and are very pleased with them. Easy to put together and sturdy. Until the clematis grow up them they look good as garden sculptures. Very pleased all round.
Wanted a tall obelisk. This one fitted our needs and was at an excellent price.


The factory where the first ever Ben Sherman shirt was produced is set to be converted into a maisonette.
Brighton-born founder Alfred Sugarman rented a factory at 21 Bedford Square after returning from a spell in America where he worked at his father-in-law's clothes manufacturer and changed his name to Ben Sherman.
He began by making clothes for other people, but in 1963, the factory started producing his own shirts in the distinctive style which is now known around the world.
The shirts were soon adopted by the Mods, also closely linked with Brighton, then later by ska, 2 tone and then Britpop bands.
The factory has long-since relocated and converted to offices, most recently an accountants, but developer Robbie Anderson now wants to take it back further in time and restore it to its original use – as housing.
A series of applications have been submitted to Brighton and Hove City Council to take down the 1960s shopfront and replace it with a replica of the original bay window which the other houses in the Grade II listed terrace retain.
So far, none have been successful, but architect Dan Maitland is confident negotiations with Brighton and Hove City Council will eventually succeed.
He said: "The council is happy to support the conversion, but wants to make sure it is happy with the internal alterations.
He said that before it became a factory, it had been a nightclub in the 1940s and 50s and before that, it was believed to have been once used as a brothel.
Ben Sherman sold his company in the 1970s, and it changed hands again this week when it was bought by Marquee Brands, which says it wants to bring the brand to new markets in the far east and South America.
Michael DeVirgilio, president of Marquee, said: "Part of what drew us to the brand was its history and association with different culture movements over the years. These are incredible points of history in the music scene in the UK.


Granuform SRF is a slow release fertilizer specially developed for greens and tees. This fertilizer is highly suitable for an optimum fertilisation of greens. The nitrogen in most of the Granuform is made up for fifty percent of Methylene Urea (MU). The big advantage of MU is the slow release of nitrogen over a period of time. All Granuform fertilizers contain the trace elements Magnesium and/or Iron.
Granuform is available in various analyses to meet every possible demand of use and season. Granuform is highly soluble and has a homogenous granule size of 0,5 - 1mm. This leads to a wonderful spreading pattern and a uniform growing result.


text:
Q: Why session get expired We have an application (ASP Dot Net , Framework 4.0) in production which is deployed on IIS 7.5 window server 2012. Every day this application gets around 4000 requests, but the problem we are facing for the last couple of days is that some of the users complain their session gets expired. We have checked the application and don't see any error that can get the session expired. We've checked the IIS setting and pool setting, but we don't see any reason fair enough to sort out the issue.
Please help us in this regard to get this sorted out.

Probably I need to give more detail that helps you resolve my issue.
We work in professional organisation where we run many application on IIS for our clients. The issue we receiving is coming on one of the same application we build for our new client and deployed on IIS 8.0 server 2012.
In web config of our application time out is for one hour and further we make sure that we shouldn't route the user to session expire page if any other error comes. Now after making these changes we are pretty sure that issue should not be due to application configuration or due to the structure of it.
Now we are concern about the IIS. The different thing this time is we are using IIS 8.0 not IIS 7.5 which we are using on our all different servers for different applications.
Some of the IIS configuration you might be interested

*

*we have dedicated pool for the application further pool is configured 2.0 because application is on the framework 3.5.

*maximum worker process = 1

*Pool recycle in 28 hours

Let me know if you could guide me anything specifically if that is related to IIS 8.0 because we are thinking of reverting back to 7.5, its our production application and clients are keep complaining about it.

A: The Life time of a session of a user is set by the developer / yourself. So you have privilege to set the time a user session time out at the desired time. Here is the format of th declaration in the web.config.
<sessionState mode="Off|InProc|StateServer|SQLServer"
              cookieless="true|false"
              timeout="number of minutes"
              stateConnectionString="tcpip=server:port"
              sqlConnectionString="sql connection string"
              stateNetworkTimeout="number of seconds"/>

You can set the creation of cookies to true or false
Decide / dictate where the session information needs to be stored(server, database..)
These are some of the links that can help.
MSDN
MSDN2

A: I guess, you might have allocated the default application pool for this application in the IIS and the same application pool might have been shared among other applications too.
Step1: You should allocate separate application pool for each site in the IIS.
Step2: in application pool --> advanced settings --> Change the maximum worker process count to 1
If the above solution is not working, better try the solution which is given in https://technet.microsoft.com/en-us/library/cc781036(WS.10).aspx
Hope this helps.

redpajama_set_name: RedPajamaStackExchange


A key strategy in building the body of Christ is sending ambassador who share God's word internationally. Breaking the curse of sin through God's word enables people to walk in God's ways for spiritual influence. Trust God across national and denominational lines by networking ambassadors in prayerful unity. Then people can return to God by rebuilding the scattered church through His word and showing true justice and compassion to the needy.
God spoke to Zechariah during the reign of Darius to not be like their forefathers who did not return to Him and away from their evil ways so He could return to them. The forefathers finally repented saying the Lord Almighty did what their ways and practices deserved. Three months later God spoke again to Zechariah in a vision where a man rode a red horse with red, brown and white horses behind him. The angel revealed that these were ones the Lord sent to go throughout the earth. The angel of the Lord asked how long He would withhold mercy from Jerusalem and Judah during 70 years of His anger. The angel said to proclaim that God was very jealous for Jerusalem and Zion, but angry with the nations that felt secure. He would return to Jerusalem with mercy, rebuild His house and stretch the measuring line so His towns would overflow with prosperity. He would again comfort and choose Jerusalem. The angel showed Zechariah four horns that scattered Judah, Israel and Jerusalem. The Lord showed him four craftsmen to terrify and throw down these horns (Zech 1:1-21). Return to merciful God who rebuilds the scattered body of Christ according to His word.
He saw a man with a line to measure the dimensions of Jerusalem. Another angel said that Jerusalem would be a city without walls because of the great number of men and livestock. God would be wall of fire around it and its glory within. He punished those who touched His people considered as the apple of His eye. God lived among them and many nations joined with Him to become His people. All mankind were still before the Lord (Zech. 2:1-13). Trust God to work across national and denominational lines for His glory.
He saw Joshua the high priest standing before the angel of the Lord and Satan at his right side accusing him. The Lord rebuked Satan because He chose Jerusalem. He asked if this man was a burning stick snatched from the fire. The angel said to those standing by Joshua to take off his filthy clothes. God said He took away his sin and put rich garments on him including a clean turban. God said if Joshua walked in His ways, then he would govern His house and have a place among those standing there. He engraved an inscription on one stone with seven eyes. He removed the sin of this land in a single day. In that day, each of them would invite his neighbor to sit under His vine and fig tree (Zech. 3:1-10). Walk in God's ways confessing your sins for spiritual influence in His kingdom.
Zechariah saw a gold lampstand with a bowl on top with seven lights on it and two olive trees on both sides of the bowl. God's word to Zerubbabel answered, "Not by might nor by power, but by My Spirit." He said that Zerubbabel laid the foundation and completed the temple. Instead of despising the day of small things, men rejoiced when they saw the plumb line in the hand of Zerubbabel. These seven were the eyes of the Lord that ranged through the earth. The two olive branches beside the two gold pipes that poured golden oil represented the two who were anointed to serve the Lord (Zech. 4:1-14). Send Spirit-empowered ambassadors who share God's word to build up the body of Christ worldwide.
Zechariah saw a flying scroll representing the breaking of the curse over the whole land, which removed every thief and those who swore falsely. Sending it to every home destroyed the curse of Satan's power. He saw a measuring basket representing the iniquity of everyone. A woman inside represented wickedness. He pushed her back in the basket and the lead cover down over its mouth. Two women with wind in their wings like a stork lifted the basket before heaven and earth, took the basket to Babylon and build a house for it (Zech. 5:1-11). Break the curse of sin through the authority of God's word in every home and city.
Zechariah saw four chariots with four colors of horses representing the four spirits of heaven standing in the presence of the Lord before the whole world. The chariot with black horses went toward the north country, white horses to the west and multi-colored to the south, but straining to go throughout the earth. God said to take silver and gold from the exiles who arrived from Babylon and take it to Josiah who made a crown that was set on the head of Joshua the high priest. His name was Branch who branched out from this place and build the temple of God. He was clothed with majesty to sit and rule as a priest on his throne with harmony between the two. The crown was given to Heldai, Tobijah, Jedaiah and Hen son of Zephaniah as a memorial in the temple. Those far away came and helped build the temple if they diligently obeyed the Lord (Zech. 6:1-15). Network ambassador in prayerful unity to build the body of Christ internationally.
Two years later God told Zechariah that the people of Bethel sent Sharezer, Regem-Melech and their men to entreat God by asking the priests and prophets whether they should mourn and fast in the fifth month like previously. Were they really fasting for God 70 years or just feasting for themselves when they ate or drank? God told Zechariah to administer true justice; show mercy and compassion to one another; not oppress the widow, fatherless, alien or poor; and not think evil of each other. They made their hearts as hard as flint and did not listen to God's word sent by the earlier prophets. He scattered them among all nations where they were strangers in the desolate land (Zech. 7:1-14). Show true justice, mercy and compassion to the needy.


text:
Home›Destinations›Europe›Eastern Europe›Hungary›Southern Hungary›Pecs
Things to Do in Pecs
197km (122 miles) SW of Budapest
Pécs (pronounced Paych) is the largest and most beautiful city in the Mecsek Hills region. Although far from the Mediterranean sea, it has a Mediterranean feel with a generally warm and arid climate. Due to this, the hills produce some of the country's premium fruit.
Pécs is located just 32km (20 miles) from the Croatian border. Sopiane, as the Romans named it, has over 2,000 years of history still visible to speak of its past. In evidence are remnants of the Roman era which date back to around A.D. 350-400. The early Christian burial chamber dating back to the 4th century is the most noteworthy remains.
The later period of the Turkish rule and their structures are even more evident. The Turks occupied the city for over 140 years from 1543. The Inner City Parish Church is an incredibly beautiful place of worship, with an interesting history. It is located at the top of Szechenyi Square in the city center and you may not recognize it as a church, because it looks like a mosque. The Turks used the stones from St. Bartholomew's Church at the other end of the square, to build the mosque of Pasha Gazi Kassim. When the Turks were eradicated from the city in 1686, the mosque was occupied by Jesuits who restored it to a Catholic church.
It was in Pécs that the first university in the country was founded in 1367 while under the rule of King Louis the Great. While that university no longer exists, Pécs remains a university city. The current University of Pécs was founded on January 1, 2000, the merger of three institutions of higher learning: Janus Pannonius University, the Medical University of Pécs, and the Illyés Gyula Teacher Training College of Szekszárd.
Pécs continued to be a vibrant city through the 143-year Turkish occupation, in part because the greatest ruler of the Ottoman Empire, Suleiman II, made this his home. The Turks introduced a new culture with baths, and decorative and drinking fountains. Some of the most important Turkish remains in Hungary are landmark reminders of this historic time in the city life, such as the Mosque of Pasha Gazi Kassim.
The first public library in the country was created here by Bishop György Klimó in 1774. Maria Theresa, empress of the Austro-Hungarian Empire, gave the city the rank of Free Royal City in 1780. During the 19th century, four major companies opened factories: Littke (champagne), Hamerli (gloves), Angster (organs), and later in the century, Zsolnay (porcelain).
Those who live in Pécs declare it is the best city in the country. Pécs is a growing city. The people do not exhibit the inertia you might notice on a hot summer afternoon in Great Plain towns like Kecskemét or Szeged.
Walking up Janus Pannonius utca toward Széchenyi tér, about a block up the street, you cannot help but notice a small wrought-iron fence covered with padlocks. There are even padlocks hanging from padlocks in chains. The story goes that one young couple in love placed a padlock there as a token of their love. Others followed and now the fence is at risk from toppling under the weight. Someone started the same tradition on yet another fence just a minute's walk away from the original. If you look closely at the locks, you'll see names and dates engraved on them.
In 2010, Pécs will have the moniker "European Capital of Culture," sharing the title with Essen, Germany, and Istanbul, Turkey. Other than failed plans and the firing of the executives hired to spearhead the projects, it is uncertain at this writing what actually will be accomplished to celebrate this title. It has been fraught with problems that continued through the autumn of 2009.
Drinkers be aware that the consumption of alcoholic beverages in public areas was banned in Pécs from January 1, 2009. Violators are liable for a fine of up to 30,000 Ft. Smokers don't get any breaks either. No smoking is allowed within 50m of cultural, educational, health institutions, or churches, nor at bus stops or in playgrounds.
Arthur Frommer's Europe Buy Now
Frommer's AARP Places for Passion Buy Now
Frommer's EasyGuide to Croatia Buy Now

redpajama_set_name: RedPajamaCommonCrawl