Pore-scale imaging of hydrogen displacement and trapping in porous media

(cid:1) Hydrogen injectivity and recovery in rock is imaged with x-ray computed micro-CT. (cid:1) Hydrogen recovery decreases with increasing reservoir depth. (cid:1) Hydrogen recovery increases with increasing brine ﬂow rate. (cid:1) Hydrogen trapping occurs via snap-off processes. (cid:1) Nitrogen is a poor proxy for hydrogen.


Introduction
The storage of surplus electrical energy could increase the utility of renewable energy sources thereby reducing the environmental impact of energy generation [1,2].Storage mediums like batteries, compressed air, capacitors, or flywheels are only applicable for the short-term and small-scale electricity storage [3].The use of hydrogen (H 2 ) as an energy vector however could provide long-term storage to balance the intermittent demand and supply challenges affecting renewable methods [3].Considering the low energy density of H 2 [4], storage of H 2 in large storage sites is the only solution for economical, gigawatt to terawatt-scale H 2 storage.Underground storage of H 2 in salt caverns is an established technology [5], yet, only subsurface porous media (saline aquifers and depleted oil and gas fields), can provide TWh storage capacities that could balance seasonal demands [4].Relative to cavern storage, inter-seasonal storage in porous media is poorly understood and introduces a range of other complexities [2], including potential pore-clogging by microbial growth [6], gas loss out of diffuse lateral boundaries, viscous fingering of H 2 into reservoir brines, residual trapping and possible reactions with the primary formation fluid and reservoir minerals [7e9].Each of these requires consideration of multiphase flow, transport and reaction [2,7].
Recent years have seen several studies on H 2 geochemistry [10e14] and the elucidation of many important flow characteristics of H 2 including; Hydrogen relative permeability and capillary pressure [15e18], interfacial tension (IFT) [19e21], and H 2 /brine/rock contact angles [16,19,20,22e28].Despite these advances important unknowns remain, e.g. the amount and type of cushion gas required in different geological settings, the risk for H 2 leakage via lateral boundaries and wells, the extent of microbial clogging and hydrogen consumption, and the degree of capillary trapping of H 2 as a function of pore size distribution.
Amongst the remaining unknowns, capillary trapping, which leads to a reduced volume of recoverable H 2, in this way impacting the economic feasibility of the H 2 storage operation, is of principal relevance [7].Pore scale observations are particularly valuable for the assessment of capillary trapping [24].Additional data describing the H 2 fluid flow and capillary trapping in different porous formations and under varying conditions are vital to make accurate predictions of the H 2 plume development and to define optimum production strategies [7].The capillary forces that control capillary trapping also control the relative permeability [7].As such studies on residual trapping give insight to a range of crucial input parameters for pore-scale and reservoir H 2 storage models.
The effects of the brine pore fluid pressures and of brine flow rate on capillary trapping of H 2 are hithertho unknown.The brine pore fluid pressure is linked to the reservoir depth via the hydrostatic gradient, hence an investigation of the latter could facilitate the definition of an optimal storage depth for gas recovery.The flowrate affects the capillary number, N c , via equation (1): where q is the flow, m is the viscosity of the invading fluid and s is the interfacial tension (IFT).As N c increases, viscous forces dominate capillary forces and capillary trapping of the nonwetting phase decreases [29].This capillary desaturation with increasing N c , depends on the rock type [30] and on the kind of nonwetting phase [29] and is observed around critical capillary numbers of 10 À5 to 10 À8 [29].
A non-destructive standard technique for visualization and analysis of wetting and non-wetting phase displacement processes in porous media is x-ray micro-computed tomography (mCT) [31].Pore-scale models are directly reliant on mCT images to build up the basic models for appropriate understanding of gas storage operations [32].Previously published mCT studies on two-phase flow in porous media involving gas have largely focused on supercritical carbon dioxide (sCO 2 ) in sandstones and limestones.Reported saturations of sCO 2 in non-aged (i.e.not wettability altered by exposure to oil or organic acids) water-wet rocks range from 30 to 60% during drainage and from 15 to 30% during imbibition, at N C between 10 À8 to 10 À6 and 10 À8 to 2 Â 10 À5 , respectively [31,33e36].Studies using subcritical, gaseous carbon dioxide (CO 2 ), which could be more readily compared to H 2 , are scarce.Yet, the characteristic trapping curves for sCO 2 and CO 2 , which show the residual saturation (S nwr ) as a function of initial saturation (S nwi ), are not significantly different [37].Saturations of nitrogen (N 2 ) during drainage and imbibition in sandstones with 6e22% porosity are 43e64% and 43%, respectively, at N C between 1-7x10 À8 [38,39].Carbon dioxide trapping increases at lower pressures due to decreasing water contact angles [40].Unlike in CO 2 storage, trapping is not desirable in geological H 2 storage as it leads to unrecoverable H 2 .
Some observational studies have suggested that H 2 is less wetting on rocks than CO 2 [23,25].At the time of writing four mCT studies, one micro-model study and one nuclear magnetic resonance (NMR) study on H 2 exist: Al-Yaseri et al. (2022) [41] used NMR to find H 2 S nwi and S nwr of 4% and <2%, respectively, in a Fontainebleau sandstone at 0.4 MPa and ambient temperature.Higgs et al. (2021) [19] mCT-imaged H 2 injection into a 5 mm diameter and 7.6 mm length core of Bentheimer sandstone at pressures of 6.8e20.8MPa and documented decreasing IFT between H 2 and water with increasing pressure (72.5 mN m À1 at 6.9 MPa to 69.4 mN m À1 at 20.7 MPa).Jha et al. (2021) [42] conducted a single cycle H 2brine displacement sequence in a 5 mm diameter and 15 mm length core of Gosford sandstone, and used mCT to calculate an S nwi of 65% during drainage and a S nwr of 41% after brine imbibition.Rock samples in Jha et al. (2021) [42] and Higgs et al. (2021) [19] were sufficiently short for capillary end effects to dominate the flow behaviour, where the wetting phase accumulates close to the production face of the core [43].The experiment by Jha et al. (2021) [42] was performed at ambient pressure and leaves open the question of variations in H 2 wetting and flow behaviour at reservoir conditions [23].Increasing pore fluid pressures have been reported to increase the gas saturation and pore network connectivity for N 2 in a brine wet, aged Bashijiqike tight sandstone (0.6% gas saturation at 2 MPa versus 43% at 8 MPa) [38].The effect of increases in N C from 7.7 Â 10 À7 to 3.8 Â 10 À4 on the H 2 flow through a sandstone micro-model at 0.5 MPa was investigated by Lysyy et al. (2022) [24] who found that S nwi increased correspondingly from 18% to 79% [24].Recently, Jangda et al. (2022) [44] reported S nwi and S nwr of 36% and 25%, respectively in unaged Bentheimer sandstone at 10 MPa and 50 C [44].In this work, we used mCT to investigate the displacement and capillary trapping of H 2 by brine in 4.7 mm diameter and 54e57 mm length Clashach sandstone cores as a function of gas and brine pore fluid pressure (2e7 MPa) and flow rate (20e80 ml min À1 , corresponding to H 2 and brine bulk N C of 1.7-6.8Â 10 À8 and 1.2-9.4Â 10 À6 , respectively).The objectives of this work were to 1) deduce the effect of pore fluid pressure on H 2 capillary trapping, where the pore fluid pressure can be related to injection pressure and reservoir pressure in a H 2 storage scenario, allowing the definition of optimum storage depths for H 2 recovery, and 2) deduce the effect of brine flow rates on H 2 capillary trapping, to determine if increased recovery is possible with increased flow rate.
We show that the H 2 S nwi is independent of pore fluid pressure but that higher brine pore fluid pressures during secondary imbibition increase capillary trapping of H 2 , indicating decreased H 2 recovery at greater reservoir depths and hence less favourable conditions for H 2 storage.Higher flowrates during secondary imbibition on the other hand decrease capillary trapping, indicating that some trapped H 2 may be recovered under high flow conditions.Our work advances the current understanding of H 2 flow in porous media by delivering the first realistic estimates on how much H 2 can be recovered from the subsurface after injection, disregarding any H 2 loss by microbial or geochemical reactions, as a function of reservoir depth and flow rate.
Two types of experiments were carried out: The first set of experiments (from now on referred to as UoE (Univeristy of Edinburgh) experiments) was carried out using the mCT instrument at the University of Edinburgh and were aimed at imaging the displacement and capillary trapping of H 2 by brine as a function of saturation after drainage and imbibition under different experimental conditions.Three UoE experiments were carried out that investigated the effect of pore fluid pressure (2e7 MPa), whereof each was repeated once (UoE exp.1e3, Table 1).The standard error on the H 2 saturation in the repeated experiments was calculated as the standard deviation devided by the square root of the number of repeated experiments.One UoE experiment looked at the  effect of the H 2 /brine injection ratio on the H 2 saturation (UoE exp.4, Table 1).This experiment was carried out to evaluate the effect of H 2 injection into aquifers with different magnitudes of brine flow (hydrodynamic aquifers), and to simulate the far field situation, where H 2 and brine move together.Another UoE experiment investigated the effect of secondary drainage and imbibition (UoE exp.5, Table 1).UoE exp.6 used N 2 instead of H 2 .This experiment was undertaken in order to compare the flow behaviour of the two gases, which is of relevance because N 2 is sometimes used as an analogue for H 2, e.g. in permeability measurements [10,17].Because rearrangement processes in the pore volume were noted previously for N 2 [38], UoE exp.7 (Table 1) was undertaken to examine the stability of H 2 in the rock volume over an experimental duration (10 h): Ten PV of H 2 were injected into a brine-saturated rock while keeping the pressure constant inside the pressure vessel, with imaging undertaken at the start and after 10 h.The effect of bulk capillary number on drainage and imbibition was deduced by a comparison of the results from UoE exp. 2 and 5 which used flowrates of 20 and 80 ml min À1 , respectively, and 5 MPa injection pressure (Table 1).
The second type of experiment (from now on referred to as the 'dry rock experiment'; Table 1) used synchrotron radiation (Diamond Light Source, I12-JEEP tomography beamline) to capture the time-resolved displacement of H 2 by brine in a dry, H 2 -saturated rock.This experiment served as a base of comparison to the displacements of H 2 in wet, brine-saturated rock (UoE experiments).The chosen set of experiments allowed for the detailed assessment of the mechanisms behind H 2 and brine displacement processes in Clasach sandstone and allowed quantifying the hitherto unknown H 2 recovery from porous rock as a function of pressure/depth and flow.
All experiments used a bespoke x-ray transparent core holder for a 5 mm diameter rock core, which was a scaled-up version of the cell described by Fusseis et al. (2014) [48].In UoE experiments a carbon-fibre reinforced PEEK pressure vessel was used to permit good x-ray transparency.The dry rock experiment used an aluminium pressure vessel to comply with the health and safety requirements at Diamond Light Source.The specifications of the pressure vessels of PEEK and aluminium were engineered with safety factors of 2 times or more over and above the maximum applied confining pressure (10 MPa; Table 1).
Rock cores for the experiments were obtained by diamond drill coring with a water-flushed chuck, followed by preparation of the core ends by grinding on a lathe.Experiments used a set of four high-pressure pumps (Cetoni Nemesys™, flowrate range 0.072 nl s À1 to 13.76 ml s À1 ): One for the injection of H 2 , one for the injection of brine, one to hold the backpressure and one for the confining pressure (Fig. 1).A bespoke manifold system composed of high-pressure 1/8" and 1/16" 316 stainless steel and 1/16" PEEK tubing (Swagelok, Top Industrie and Cole Parmer, respectively) connected the pumps to the coreflood cell (Fig. 1).Additional pressure transducers (ESI Technology; accuracy 0.1% full-scale) were coupled to the flow system at the inlet and outlet to allow for higher precision pressure monitoring than was possible using the integral pressure gauges in the syringe pumps.Cyclic H 2 and brine injections used a Clashach outcrop sample without further cleaning of 4.7 mm diameter and a relatively long length of 54e57 mm to avoid the influences of capillary end effects [49,50].To prevent leakage of H 2 into the confining fluid, the rocks were jacketed in aluminium foil and polyolefin heatshrink tubing and sealed with silicone adhesive between the conical-ended pistons within the pressure vessel.In UoE experiments, a water-wet rock was first saturated with brine (0.5 M CsCl) at a flow rate of 70 ml min À1 .Afterwards, H 2 was injected (drainage) into the brine-saturated rock at flow rates of 20e80 ml min À1 , based on desired capillary-regime N C of 1.7-6.8Â 10 À8 (The viscosity of H 2 is 9.01 mPa s at 298K and 4.7 MPa [51] and the IFT between H 2 and water is 72.6 mN m À1 at 298K and 5 MPa [52,53]).Subsequently, the brine was reinjected (imbibition) at flow rates of 20e80 ml min À1 , resulting in N C of 2.4-9.5 Â 10 À6 (using the same IFT between H 2 and water of 72.6 mN m À1 at 5 MPa and 298 K [52,53] and a viscosity of 1.247 Â 10 À3 Pa s at 5 MPa that was estimated from the reported 1.2503 Â 10 À3 Pa s and 1.233 Â 10 À3 Pa s at 0.1 MPa and 25 MPa, respectively, and 298 K [54]).The N C in the N 2 experiment was 3.5 Â 10 À8 during drainage (using an IFT of 73 mN m À1 between N 2 and water 1t 298K and 10 MPa [37] and a viscosity of 1.89x10 À5 Pa s at 5 MPa and 295K [51]).Each injection used ten pore volumes to ensure complete flushing of the sample cores with the injected fluid.
In the dry rock experiment, H 2 was directly injected into a dry rock at a flow rate of 70 ml min À1 .Subsequently, the brine (2 M KI) was injected at a flow rate of 5 ml min À1 , resulting in N C of 5 Â 10 À7 (using the same IFT between H 2 and water of 72.6 mN m À1 at 5 MPa and 298 K [52,53] and a viscosity of 1.07x10 À3 Pa s for 0.6 M KI and 293 K [45]).
The combined application of an x-ray transparent core holder and mCT allowed the visualization of the fluid saturation distributions at pore scale at each injection step.The difference in the x-ray attenuation coefficient of the fluids (H 2 and 0.5 M CsCl/2 M KI) provided an excellent contrast between the two fluid phases and the rock on the acquired mCT images, combined with the respective radiation energy in the two different laboratories.
3D volumes were acquired from the lower central portion of the sample to avoid the impact of capillary end effects on fluid saturation [49,50].For the UoE experiments, image acquisition used a mCT instrument built in-house at the University of Edinburgh, comprising a Feinfocus 10e160 kV reflection source, a Micos UPR-160-air rotary table and a Per-kinElmer XRD 0822 1 MP amorphous silicon flat panel detector with a terbium doped gadolinium oxysulfide scintillator.Data acquisition software was developed in-house.The following settings were used for UoE experiments: 120 keV, 16 W, 2 s exposure time, 1200 projections and 2 frames per stop.The voxel size was 5.4 mm 3 .In the dry rock experiment, timeresolved imaging of the H 2 and brine displacement processes was achieved by means of a 65 keV monochromatic beam detected by a high-resolution imaging camera with optical module 2 (PCO.edge5.5, 7.91 x 7.9 mm/pixel with FoV 20 mm Â 12 mm) using 17e25 ms exposure time and 900 projections.The voxel size was 7.9 mm 3 .

Image analysis
Tomographic reconstructions were undertaken by filtered back projection using Octopus 8.9 [55] on a GPU accelerated workstation.All subsequent image processing and analysis of tomographic data was performed using Avizo Version 9.1.1(FEI, Oregon, USA).Data from UoE experiments were processed using a non-local means filter [56].Processing of the dry rock experiment used a combination of median filter and unsharp mask to reduce image noise.Segmentation of UoE experiment data used a global threshold on the 2D greyscale image histogram, and encompassed two phases.In the waterwet scans, water and rock were treated as two discrete phases.In scans after brine and H 2 injections, the H 2 was treated as one phase and the brine and rock as a single separate phase, following protocols of Andrew et al. (2014) [34].Holes and spots which were at the resolution limit of the data were removed from all datasets (applied thresholds corresponded to 3 3 and 5 3 voxels, respectively).Based on the segmented image of the water-wet scan in UoE experiments, a pore size distribution was calculated.The 3D image was separated into discrete pores using Avizo's 'separate objects' module, which calculates a chamfer distance map of the pore-space and then applies a marker based watershed algorithm to the distance map to define discrete pore bodies as catchment basins, separated by the watershed which marks the location of pore throats (Figure A1d).Supporting information Fig. A1 shows the work flow for the water-wet scan.
In scans following brine and H 2 injections in UoE experiments, the segmented image was analysed in 3D using the 'labeling' and 'label analysis' modules to identify, label and measure the volume of each H 2 cluster.Hydrogen cluster size distributions were compared to the pore size distribution to evaluate the H 2 connectivity and identify trapping mechanisms during brine imbibition.

Capillary pressure
Recovered Clashach cores were submerged in 25% w/v NaOH solution (Fisher Scientific) for 2 h to remove the aluminium foil from the core surface, and rinsed in successive Milli-Q water, acetone and ethanol ultrasonic baths.Subsequently, the cores were cut and squared to the dimensions of 25 mm, overlapping the mCT visualized rock volumes, and cleaned ultrasonically with Milli-Q water to remove grinding products.Mercury injection capillary pressure (MICP) was performed on the cleaned cores, using a micromeritics automated mercury injection equipment (Autopore IV 9500) to estimate the capillary pressure-saturation relationship and pore size distribution.The pressure range tested was from vacuum to 379 MPa.

Characterization of the pore space
The mCT-evaluated porosity of the Clashach sandstone from the segmented volume of the water-wet rock was 12.5%e 13.5%, depending on the imaged region of the rock core.The MICP-evaluated pore throat size distribution showed a large number of very small pore throats with <5 mm radius and a small number of small to intermediate size pore throats (>5e90 mm) (Fig. 2).The largest pore throat had a radius of 195 mm (Fig. 2).The mCT-evaluated size distribution of the pores evidenced a narrow pore size distribution with comparably small pores with radii <50 mm (Figs. 2 and 4a).

Hydrogen wetting behaviour and stability in UoE experiments
Hydrogen sat in the centre of the pore bodies.Residual brine sat in corners, pore throats (Fig. 3b and c) and, as a subtraction of the water saturated scan from the H 2 -and brine filled rock revealed, in thin films around the grains (Fig. 3d).The injected H 2 remained stable within the pore volume under no-flow conditions and at constant pore fluid pressure over a time period of 10 h which was the maximum experimental duration (Fig. A2).
Effect of pore fluid pressure on hydrogen connectivity, saturation and recovery Hydrogen saturation during drainage was independent of the pore fluid pressure with 49.8%, 51.7% and 39.7%e52.6%saturation at pore fluid pressures of 2, 5 and 7 MPa, respectively (Fig. 4aec, f, Fig. A3).Hydrogen connectivity during drainage generally showed one large, connected cluster at all pore fluid pressures except for one out of three images at 7 MPa which showed three large clusters (Fig. 5, Fig. A3).During drainage, the largest H 2 cluster had a volume of 1 Â 10 8 mm 3 at all pore fluid pressures except for the one run at 7 MPa with the disconnected clusters were the largest volume was 7 Â 10 7 mm 3 (Fig. 5e).Hydrogen clusters during drainage were at all pore fluid pressures much larger than discrete pores with a maximum volume of 1.3 Â 10 6 mm 3 (Fig. 5e, a).Comparing all H 2 cluster size distributions during drainage (Fig. 5f) reveals that all drainage curves, including two of the distributions at 7 MPa (squares and rhombi), have largely the same distribution, however one of the three distributions at 7 MPa (triangles) is distinct.This outlier experiment corresponds to the experiment showing a lower S nwi (Fig. 4c).Capillary trapping of H 2 during imbibition seemed independent of the pore fluid pressure with 10%, 12% and 4e21% of trapped H 2 at 2, 5 and 7 MPa, respectively (Fig. 4aec,f, Fig. A3), corresponding to 20%, 22% and 11e43% of the initially injected H 2 .During imbibition, large H 2 clusters were broken down into smaller clusters (Fig. 5aed), in line with the visual changes of the H 2 clusters (Fig. 4aec and f).The largest H 2 clusters after imbibition remained above the maximum pore size during all experiments except for one experiment at 7 MPa (Fig. 5g and  a), showing that not only was H 2 trapped in discrete pore bodies but also as larger H 2 ganglia.The break-down of the largest H 2 clusters during imbibition caused the number of clusters in the size range log 4 to log 6 mm 3 to increase while the number of very small clusters of log 2e4 mm 3 typically decreased (Fig. 5bed).Comparing all H 2 cluster size distributions during imbibition (Fig. 5g) shows that the distributions at 2 and 5 MPa are largely the same while the imbibition distributions at 7 MPa are distinct.
Injections of H 2 and brine into the same rock volume and at the same flow rates and pore fluid pressures of 2e5 MPa were repeatable with small standard errors between 0.01 and 0.66% (Fig. 4a and b, Fig. 5b and c).At 7 MPa very distinct S nwi and S nwr were measured (Fig. 4c and f); During drainage the standard error was 4.8% at an average H 2 saturation of 47.4%.The standard error during imbibition was 8.5% at an average saturation of 12.9%.The pressure differences between inlet and outlet during the experiments were within the error of the pressure sensors of 0.1% full-scale.

Effect of hydrogen/brine injection ratio on hydrogen connectivity and saturation
We studied the effect of the H 2 /brine injection ratio on the H 2 saturation in order to evaluate the effect of H 2 injection into hydrodynamic aquifers, and to evaluate what happens in the far field, where fluids will be moving together.The results showed that the H 2 saturation and H 2 interconnected pore volume increased with increasing H 2 /brine injection ratio from 32.6% at 4 ml min À1 H 2 plus 16 ml min À1 brine to 43.2% at 16 ml min À1 H 2 plus 4 ml min À1 brine (Fig. 6).The H 2 clusters in simultaneous injection experiments occupied many of the same pore spaces as the clusters after H 2 in the unsteady state experiments at the same pressure and total flowrate (Figs.4b  and 6, Fig. A6), and even at the lowest H 2 brine injection ratio of 4 ml min À1 H 2 plus 16 ml min À1 brine, the H 2 clusters were large, and spanning multiple pores (Fig. 6a).The percolation threshold, i.e. one connected path from inlet to outlet, was apparently only reached at 100% H 2 injection (Fig. 4b vs. Fig.6, Fig. A6).The pressure differences between inlet and outlet during the simultaneous injection experiments were up to 0.05 MPa.
The H 2 cluster volume distributions were similar at different H 2 :brine injection ratios (Fig. 7a).However, with increasing ratio the smallest H 2 clusters of volume ~log 2 mm 3 decreased in number while the number of intermediate size (log 2.5 to log 6.25 mm 3 ) H 2 clusters and the volume of the biggest cluster increased (Fig. 7a), confirming observations of increasing H 2 saturation and connectivity with increasing injection ratio (Fig. 6).

Effect of flowrate on hydrogen saturation and recovery
At constant pore fluid pressure of 5 MPa, increases in the flowrate during drainage from 20 ml min À1 to 80 ml min À1 , corresponding to bulk N C of 1.7 Â 10 À8 to 6.8 Â 10 À8 , respectively, decreased the S nwi from 51.7% to 47.7% (Fig. 4b and d).Correspondingly, increases in the brine flowrate during imbibition from 20 ml min À1 to 80 ml min À1 , corresponding to bulk N C of 2.4 Â 10 À6 and 9.4 Â 10 À6 , respectively, reduced the S nwr from 11.5% to 7.2% (Fig. 4b and d).
In line with this, the H 2 cluster size distributions at the two flowrates showed that larger clusters were mobilized at 80 ml min À1 (maximum cluster sizes of log 6.25 mm 3 at 80 ml min À1 vs. log 6.75 mm 3 at 20 ml min À1 ; Fig. 7b).At both flowrates the largest H 2 clusters were still bigger than the largest pore of <log 6 mm 3 (Fig. 7b vs. Fig.6a), indicating that H 2 was trapped also as larger ganglia.

Secondary drainage and tertiary imbibition
Secondary drainage and tertiary imbibition did not significantly change the H 2 saturation (47.9% and 7.0%) compared to primary drainage and secondary imbibition (47.6% and 7.3%), based on results at 5 MPa and 80 ml min À1 flowrate (Fig. A4, Fig. 4d and e).

Dry rock experiment
In the dry-rock experiment, the brine entered the H 2 -filled dry rock via piston-like displacement, (Fig. 8b), eventually recovering the H 2 entirely (Fig. 8d).Before all H 2 was recovered, there was an intermediate stage where previously brine-filled pores (Fig. 8b) showed several very small H 2 bubbles (Fig. 8d).

Pore space
The mCT-evaluated porosity of the Clashach sandstone from the segmented volume of the water-wet rock of 12.5e13.6%was within the range of the published porosities of 11.1e14.4% for Clashach sandstone [45e47].The distributions of pore size and pore throat size as evaluated by mCT and MICP, respectively, suggested that mostly small pores of <50 mm radii were joined by very small throats of <5 mm radii with a few small to intermediate size throats of >5e90 mm radii in between (Fig. 2).The largest pore throat of 195 mm radius was probably measured at the surface of the rock core where the drilling process affected the pore space.The pore throat distribution for our Clashach sandstone sample was very similar to the pore throat distribution for Berea sandstone [57].Compared to the pore throat distributions for Bentheimer sandstone and Doddington sandstone [57], our Clashach sandstone sample showed smaller pore throat sizes.Limestones generally show a wider pore throat size distributions than sandstones [57].

H 2 flow behaviour and trapping mechanisms
Hydrogen behaved as a non-wetting phase, filling the centre of the pores, with residual brine in the pore corners and throats (Fig. 3b and c), indicating a water wetting system.The largest H 2 cluster was much larger than discrete pores at any pore fluid pressure during drainage (Fig. 5), indicating a good connectivity of the H 2 [58].Hydrogen trapping occurred via snap- off of H 2 ganglia (Fig. 9).Snap-off competes with piston-like, i.e. pore-filling, displacement during the displacement of a non-wetting fluid by a wetting fluid in porous media.and is known as the swelling of water in the corner layers of a pore throat during water invasion in water-wet porous rocks until the threshold capillary pressure is exceeded, resulting in spontaneous filling of the throat with water and disconnection of the non-wetting phase which can lead to trapping [58,59].Brine films around grains were not directly visible in the tomographic images (Fig. 3b and c) but were revealed by subtraction of the water-wet scan from the brine-saturated scan after H 2 injection, following the registration of the brine-saturated scan after H 2 injection to the water-wet scan (Fig. 3d and e).Fig. 3d and e suggest that brine films were discontinuous and very thin.When H 2 was injected into a dry rock, 100% of the injected H 2 could be recovered (Fig. 8e) which substantiated the theory that sub-resolution brine films around grains and snap-off of H 2 ganglia caused decreased H 2 recovery in experiments using an initially brine saturated rock (UoE experiments).The occurrence of several very small H 2 bubbles in the dry-rock experiment (Fig. 8d) indicated Roof snap-off [60] of H 2 ganglia

Effect of pore fluid pressure and hydrogen/brine injection ratio
We observed no dependence of the H 2 saturation during drainage on pore fluid pressure, considering that 2 out of 3 experiments at 7 MPa showed the same H 2 saturation of ~50% as at 2 and 5 MPa (Fig. 4aec,f, and Fig. A3).The one experiment at 7 MPa which had only 39.7% H 2 saturation (Fig. 4c, Fig. A3 and blue triangles in Fig. 5f) did also not have the same H 2 cluster size distribution as the remaining experiments (Fig. 5f), despite using the same experimental settings as for all other experiments at 7 MPa, and the log archives of the pore fluid pressures and injected volumes revealed no abnormalities.A shift in the distribution of cluster sizes can indicate a change in wettability, regardless of the measured H 2 saturation.Yet, as two of the results at 7 MPa showed a similar distribution as at the other pressures, it seems likely that this experiment is an outlier.The experiment was acquired after a filament change on the mCT apparatus, which implied that a slightly different part of the same rock core was imaged (13.6% vs. 12.5% porosity).Yet, in principle this should not have affected the results significantly, and subsequent experiments did return to show ~50% H 2 saturation, e.g. the H 2 stability experiment (Fig. A2).
The observed constant drainage H 2 saturations with increasing pore fluid pressures from 2 to 7 MPa are in line with a lack of a dependence of the H 2 wettability on pressure increases from 2 to 10 MPa in Berea and Bentheimer sandstone [22], with only very small increases of ~3e6 in the H 2 contact angles at pressure increases from 2 to 7 MPa in Basalt [25], clay [28] and quartz [23], and with previous findings of no change in the characteristic trapping curves for CO 2 and N 2 at a wide range of pressure and temperature conditions [37].The general anticipation of an increase in gas saturation with injection pressure [61,62] may still be valid over pressure ranges larger than the one investigated here.At unchanged wettability, the S nwi is controlled by the capillary pressure which in turn is controlled either by the fractional flow (during simultaneous injection) or by the viscous force pressure drop (during single fluid phase injection).Thus, the independence of the S nwi from the pore fluid pressure indicates that the viscous pressure drop  is not being significantly altered by the changing pressure, e.g., the H 2 viscosity change is not having a major impact on the force required to drive flow.Significant loss of H 2 from the gas phase at higher pressures by dissolution into the brine is precluded by the low solubility of H 2 of ~0.02 mol kgw À1 at 2.5 MPa [63].The H 2 stability experiments showed that H 2 saturation at 5 MPa did not change over a time period of 10 h (49.55% at time zero vs. 49.53% 10 h after; Fig. A2), evidencing a stable result and no H 2 loss by dissolution.Recent reports of a significantly increased S nwr when using H 2 -equilibrated brine over non H 2equilibrated brine in H 2 and brine displacement experiments in Bentheimer sandstone at 10 MPa and 50 C [44], indicate that employing a combination of high temperature and pressure causes significant dissolution of H 2.
Looking at the S nwr data only (Fig. 4aec,f), there was no clear dependency on pore fluid pressure during imbibition.Any change may, however, have been masked by the high variation between the two results at 7 MPa (4e21% Fig. 4c and  f).Considering that the experiment at 7 MPa with the low S nwi of 40% was identified as an outlier (see the discussion above4.3and Fig. 5f, blue triangles) and that the S nwr is a function of the S nwi where a lower S nwi will tend to overestimate recovery [57,64], we may disregard the S nwr of 4%.The large increase in trapped H 2 in the second full primary drainage and secondary imbibition experiment at 7 MPa (Fig. 4f) was probably due to the poorer initial H 2 connectivity [64].The H 2 cluster size distribution for this experiment showed an increase in the number of intermediate size clusters compared to the other experiments (Fig. 5g, dark yellow squares), without however shifting the cluster distribution, suggesting no wettability change.This indicates that variation in one or more of the other thermophysical properties edensity, viscosity, or IFT e have resulted in the impact on the pore scale fluid configuration (Fig. 10).Meanwhile, a poorer initial H 2 connectivity was not confirmed by the third repetition of primary drainage at 7 MPa (Fig. A3g).More experiments at 7 MPa are needed to confirm the result of increased trapping at higher pore fluid pressures.
Given a hydrostatic gradient of ~10 MPa/km an increase of the S nwr with increasing pore fluid pressure, as suggested by the second experiment at 7 MPa (Fig. 4f), would indicate that deeper aquifers are less favourable for H 2 storage operations.However, unlike our unsteady state experiments which showed barely any pressure difference between inlet and outlet, in a real H 2 storage operation, the well pressure is significantly higher than the reservoir pressure and the brine is not injected, but naturally flowing into previously H 2 -saturated rock when the H 2 is recovered again, due to a pressure difference.Our displacement study results are hence applicable to the fringe of the H 2 -saturated zone, only, where pressure differences are very small.A decreased H 2 recovery with depth would not align well with other criteria for an economical and safe H 2 storage operation, such as a lower cushion gas requirement with elevated depth [5] and reduced risks for H 2 -linked microbial activity at higher depths due to higher temperatures [6].
The pressure/depth effect on our results can be further related to the variation of key pore-scale displacement parameters for H 2 with depth (Fig. 10): The IFT of H 2 reduces with depth whereas the H 2 viscosity increases, both of which in theory should augment the displacement of H 2 with water and reduce the S nwr [66,67].However, increased S nwr with decreasing IFT and increasing viscosity has also been demonstrated [68] which may be due to a simultaneously increased likelihood of unstable displacement/non-uniform fronts [69,70] during both drainage and imbibition processes at decreasing IFT and increasing viscosity, based on the augmenting effect of both parameters on N C (Eq. ( 1)).Such unstable displacement processes at higher pore fluid pressures, addition to a variation in the thickness of the brine thin films with pressure, may explain the decrease in interconnected H 2filled pore volume from one large cluster at 2e5 MPa to three clusters at 7 MPa and have lead to increased snap-off and trapping during imbibition (Fig. 4f).
The S nwr of 10e21% was significantly lower than the previously reported H 2 S nwr of 41% for a Gosford sandstone under ambient conditions [42] but in line with 20e25% H 2 S nwr in a Bentheimer sandstone at 10 MPa and 50 C [44].As mentioned previously, the short length rock sample in Jha et al. (2021) [42] suggests that their results were affected by capillary end effects [49].However, the relatively high bulk N C of 2.3e2.4Â 10 À6 during brine imbibition in our experiments and those of Jangda et al. (2022) [44] may have mobilized more residual H 2 than under strict capillary regime conditions.Our results are higher than previously reported S nwr of <2% in a Fontainebleau sandstone at 0.4 MPa, ambient temperature and bulk Nc of 3.5*10 À8 [41], however the S nwi in this study was extremely low (4%).During simultaneous injection of H 2 and brine, which may be representative of H 2 injection into hydrodynamic aquifers or simulate the far field conditions, H 2 saturation and H 2 interconnected pore volume increased with increasing H 2 / brine injection ratio (Fig. 6).This indicated that a lower brine flow is favoured over high flow environments in terms of optimising the H 2 storage operation.The structure was apparently not percolating in any of the simultaneous injection experiments as opposed to during 100% H 2 injection (Fig. 6 vs. Fig.4b), yet considering significant pressure differences of up to 0.05 MPa between inlet and outlet in simultaneous injection experiments which were not observed in experiments injecting 100% H 2 , the connections between the H 2 clusters may have been broken when the injection (and thereby the pressure gradient) was stopped for the scan.

Effect of capillary number on initial and residual saturation
Classical pore-scale displacement theory predicts little change in residual phase saturation in response to increases in flow rate until the N C exceeds 10 À6 -10 À5 .However, for most subsurface there will be rapid decreases at N C of 10 À4 or more, when viscous forces become dominant [57].The bulk brine N C applied in this study (2.4-9.4Â 10 À6 ) was within the range of little saturation change but exceeded the threshold of N C < 10 À6 for which the flow generally is said to be capillary dominated [57].This may indicate that viscous forces caused a significant effect of N C on the S nwr in our experiments (Fig. 4b and d), and these forces are likely to be even greater at local scale than at bulk [57].The H 2 cluster size distribution after imbibition at N C ¼ 9.4 Â 10 À6 was shifted with respect to the distribution at N C ¼ 2.4 Â 10 À6 (Fig. 7b), indicating a change in the wetting behaviour and supporting previous findings of preferential desaturation of larger clusters at higher Nc [71].
We observed a 4% decrease in S nwi in our experiments when bulk N C was increased from 1.7 Â 10 À8 to 6.8 Â 10 À8 (Fig. 4b and d).Critical nonwetting phase N C of 2 Â 10 À8 and 10 À5 during imbibition have been reported for wateregas systems and water-oil systems, respectively [72], indicating that the threshold of N C < 10 À6 for capillary dominated flow [57] is not rigid.However, considering reported increases in the H 2 saturation after drainage with increasing N C from 7.7 Â 10 À7 to 7.7 Â 10 À5 [24], and acknowledging the small observed difference in S nwi , we cannot exclude that the effect of flow rate was down to experimental variability.

Comparison to nitrogen
The N 2 saturation was comparable to the H 2 saturation during drainage at similar N C of 1-3x10 À8 but the S nwr after imbibition was ~20% higher for N 2 than for H 2 (Fig. 4b and e).Using N 2 as a proxy for H 2 in experimental drainage and imbibition studies is hence not advisable.Considering the high degree of N 2 trapping, the use of N 2 as a cushion gas for H 2 storage operations which could reduce operational costs [7] seems favourable.Our results are lower than a reported 64% N 2 S nwi after drainage and 43% N 2 S nwr in a Berea sandstone (20e22% porosity) at 5.5 MPa and 20 C [39], and higher than 43% N 2 S nwi in a Bashijiqike tight sandstone (5.6% porosity) at 8 MPa and ambient temperature [38].The trend in the differences of the N 2 saturation in the above studies follows the same trend as the differences in the porosities of the studied sandstones, with the Clashach sandstone (14% porosity) being intermediate between the two other rocks.This indicates that porosity differences between the different rock types applied in the above experiments defined the observed N 2 saturations, yet differences in the pore throats dimensions may equally have contributed or caused this.It also suggests that S nwi and S nwr depend strongly on (the local conditions within) each rock, and that these rock type/local effects may mask any effect of injection conditions, whereas trends in the rock-specific behaviour will be controlled by pressure and flow conditions.Meanwhile observations of N 2 S nwi and S nwr of 15e26% and 8e17%, respectively, in a Fontainebleau sandstone with 9.7% porosity at 0.4 MPa, ambient temperature and Nc of 3.5 Â 10 À8 to 7 Â 10 À7 [41] do not confirm the relation between initial and residual saturations and porosity.This suggests that other parameters such as the absolute permeability of a rock also shape the rock specific response to N 2 and brine displacement processes.More studies on different types of rock and under similar injection conditions are needed to better understand the rock-specific differences in S nwi and S nwr .

Suitability of the Clashach sandstone for hydrogen storage
It has been postulated that the low viscosity of H 2 will cause the gas to travel swiftly, making it unsuitable for displacing brine [69] and causing low H 2 injectivity.In this work, we showed that from an injectivity and recovery perspective, untreated Clashach sandstone is suitable for underground H 2 storage.However, sandstones aged by exposure to humic acids may be more suitable analogue rocks for experimental investigations of H 2 storage in porous media [23].Considering that aging has previously been shown to alter the wettability of H 2 brine-quartz systems from highly water-wet toward intermediate-wet [23] the stated H 2 saturations for our untreated outcrop Clashach sandstone are expected to increase during drainage and decrease during imbibition, further the increasing suitability for H 2 storage.

Conclusion
In this work, a prima facie examination of H 2 flow and displacement processes in porous rock was carried out as a function of capillary numbers of 1.2-6.8Â 10 À8 for H 2 and 2.4-9.5 Â 10 À6 for brine, and of pore fluid pressures between 2e7 MPa.Results showed no clear influence of pore fluid pressure on H 2 saturation during drainage in the investigated pressure range, with ~50% of the pore space saturated with H 2 during drainage at all pressures.During imbibition, 20%, 22% and 43% of the initially injected H 2 was trapped at 2, 5 and 7 MPa, respectively, and a capillary number of 2.4 Â 10 À6 , indicating that higher pressure, i.e. deeper reservoirs are less favourable for H 2 storage.Injection of brine at higher capillary numbers reduced capillary trapping and increased H 2 recovery.Hydrogen recovery was distinct from N 2 recovery, suggesting that N 2 is a poor proxy for H 2 .Based on these results, we recommend more shallow, lower pressure sites for future H 2 storage operations in porous media.
Future work should aim to measure the influence of pressures above 7 MPa, elevated temperatures and rock aging on H 2 and brine displacement processes at a range of different capillary numbers and in different porous formations.Closer characterization of the pore space in terms of connectivity (Euler number), absolute and relative permeability, turtoisity and pore size could give further insight to understanding rockspecific responses during drainage and imbibition.Dynamic experiments using synchrotron light sources are recommended to examine displacement mechanisms closely.The presented experimental setup is suitable for investigating gas and brine displacement processes in a variety of porous samples, and is only limited by size of the pore matrix due to the resolution requirements of the m-CT scanner.
e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y x x x ( x x x x ) x x x

Fig. 1 e
Fig.1e Experimental setup showing the manifold system that connected the X-ray transparent pressure vessel to a set of four high-pressure Cetoni Nemesys™ pumps: one to inject H 2 , one inject brine, one to maintain backpressure and one to maintain confining pressure.The materials for the connections were 316 stainless steel (black), HPLC (green) and PEEK or carbon fibre reinforced PEEK (blue).The pressure vessel consisted of carbon fibre reinforced PEEK in UoE experiments and of aluminium in the dry rock experiment (see text).Pressure and flow rate control was achieved with the Q-mix software.(For interpretation of the references to color/colour in this figure legend, the reader is referred to the Web version of this article.)

Fig. 2 e
Fig. 2 e MICP-derived pore throat size distribution (a) and mCT-derived pore size distribution (b) Note that MICPderived counts were multiplied by a factor of 20 to facilitate visualization of the results.All plots used a bin size of 30.

Fig. 3 e
Fig. 3 e (a) Water-wet Clashach sandstone with the water shown in black and the rock in different shades of grey.(b) and (c) Brine-saturated Clashash sandstone after injection of H 2 .H 2 (black) fills the centre of the pores while the brine (dark grey) remains in corners and small pore throats around grains (different shades of grey).(d) and (e) Subtraction of the water-wet scan from the brine-saturated scan after H 2 injection, following registration of the brine-saturated scan after H 2 injection to the water-wet scan, revealing discontinuous brine thin films around grains.The rim around the Al foil in (d) is caused by continued shrinkage of the Al foil onto the rock during the experiments.(For interpretation of the references to color/colour in this figure legend, the reader is referred to the Web version of this article.)

Fig. 4 e
Fig. 4 e 3D rendering of H 2 and N 2 clusters with saturation percentages in UoE experiments.Discrete clusters were rendered in colors, where mainly one color marks one large, connected cluster and different colors indicate several, not connected clusters.(aec) Effect of pore fluid pressure on H 2 clusters and H 2 saturation after drainage and secondary imbibition.(a) 2 MPa, (b) 5 MPa and (c, f) 7 MPa, all at a constant flow rate of 20 ml min ¡1 , corresponding to capillary numbers of 1.7 £ 10 ¡8 and 2.4 £ 10 ¡6 during drainage and imbibition, respectively.Large, connected clusters that existed after drainage were broken down to numerous smaller clusters after imbibition, with apparently no clear relationship between H 2 saturation and pore fluid pressure.Experiments were repeated once at 2 and5 MPa, and at 7 MPa twice for drainage runs and once for imbition.For experiments at 2 MPa and 5 MPa averages and standard errors for the H 2 saturation are reported.For experiments at 7 MPa, due to the discrepancy in the results, both of the full primary drainage and imbibition experiments are visualized in (c) and (f).(d) Effect of cyclic injections on H 2 clusters and saturation: Averages and standard errors of the H 2 saturation after primary and secondary drainage, and after secondary and tertiary imbibition, all at 5 MPa pore fluid pressure and a flowrate of 80 ml min ¡1 , corresponding to a capillary number of 9.4 £ 10 ¡6 .(e) Nitrogen clusters and saturations during drainage and imbibition at 5 MPa pore fluid pressure and a flowrate of 20 ml min ¡1 .For the full display of the results see Fig. A3 and Fig A4. (For interpretation of the references to color/colour in this figure legend, the reader is referred to the Web version of this article.)

Fig. 5 e
Fig. 5 e (a) Pore size distribution as derived from the micro-CT image of the water-wet rock.Hydrogen cluster size distributions after drainage and imbibition in experiments at 20 ml min ¡1 flowrate and pore fluid pressures of 2 MPa (b), 5 MPa (c) and 7 MPa (d), and cumulative pore size and H 2 cluster size distributions at different pore fluid pressures (e), where squares, triangles and rhombi mark the distinct repeat experiments.(f) Hydrogen cluster size distribution after drainage for all experiments and (g) Hydrogen cluster size distribution after imbibition for all experiments.Note the large H 2 clusters of ~10 8 mm 3 that exist after drainage in (b)e(d).A decrease in the biggest cluster volume after imbibition in (b)e(d) along with an increase in the number of small clusters marks the change in H 2 structure during the drainage and imbibition processes.Histogram plots in (a)e(d), (f) and (g) used a bin size of 10.

Fig. 6 e
Fig. 6 e Effect of H 2 /brine injection ratio on H 2 saturation and H 2 connectivity during simultaneous H 2 and brine injection at 5 MPa (a) 4 ml min ¡1 H 2 plus 16 ml min ¡1 brine, (b) 10 ml min ¡1 H 2 plus 10 ml min ¡1 brine, (c) 16 ml min ¡1 H 2 plus 4 ml min ¡1 brine.Discrete H 2 clusters were rendered in colors, where mainly one color marks one large, connected cluster and different colors indicate several, not connected clusters.With increasing injection ratio H 2 saturation and H 2 connectivity increase.(For interpretation of the references to color/colour in this figure legend, the reader is referred to the Web version of this article.)

Fig. 7 e
Fig. 7 e (a) H 2 cluster size distributions during simultaneous injections of H 2 and brine at flowrate ratios of 16:4, 10:10 and 4:16 ml min ¡1 H 2 :brine and 5 MPa injection pressure.As the flowrate ratio of H 2 to brine increased, the number of intermediate size H 2 clusters increased and the volume of the biggest cluster increased.(b) Effect of flowrate during brine imbibition.All plots used a bin size of 10.

Fig. 8 e
Fig. 8 e The dry-rock experiment summarized.(a) H 2 -saturated, dry rock, (b) scan during brine imbibition shortly after appearance of the first brine in the rock, (c) scan during brine imbibition after 115 min, with several small, isolated H 2 bubbles inside pore bodies (d), and (e) brine-saturated rock after 2 h of imbibition showing 100% recoverability of H 2 .

Fig. 9 e
Fig. 9 e Example of a snap-off event.(a) Labelled H 2 -filled volume after drainage (orange), spanning over several pores and showing one large interconnected H 2 -filled pore volume, and total pore space (transparent blue).(b) Labelled H 2 -filled volume after brine imbibition (different coloured shades) and the total pore space (transparent blue) showing several, not connected H 2 ganglia and a snapped-off H 2 droplet (cobalt blue) in the centre, left hand side.(c) Pore body visualization of the same volume.(For interpretation of the references to color/colour in this figure legend, the reader is referred to the Web version of this article.)

Table 1 e
Overview over experiments.