Title : In-situ hydrogen wettability characterisation for Underground Hydrogen Storage

Hydrogen storage in subsurface aquifers or depleted gas reservoirs represents a viable seasonal and/or long-term energy storage solution. However, currently, there is a scarcity of subsurface petrophysical data for the hydrogen system, limiting modelling work and industrial rollout. In this work, we address the knowledge gap by determining the wettability and Interfacial Tension (IFT) of the hydrogen-brine-quartz system using a multi-modal, insitu approach. We utilise the captive bubble, pendant drop and in-situ 3D micro-Computed Tomography (CT) methods to rigorously characterise a hydrogen-brine-Bentheimer rock system, applicable to high quartz sandstone storage systems generally. The captive bubble method determined the effective contact angle ranged between 29°-39° for pressures 6.8920.68MPa and salinities from distilled water to 5000ppm NaCl brine. In-situ methods confirmed the water-wet system with the mean of the macroscopic and apparent contact angle distributions being 39.77° and 59.75° respectively. Further confirmation of the water-wet system was provided by curvature analysis of fluid clusters. The pendant drop method determined that IFT decreased with increasing pressure in distilled water from 72.45 mN/m at 6.89MPa to 69.43 mN/m at 20.68MPa. No correlation was found between IFT and salinity for the 1000ppm and 5000ppm brines. Our fundamental studies provide insights into the physics of hydrogen wetting in multiphase environments of subsurface reservoirs. With this, we can make informed estimates of relative permeability and capillary pressure for the hydrogen-brine system to model the storage capacity and withdrawal rate of hydrogen in target reservoirs.


Introduction
Viable energy alternatives to fossil fuels have been explored extensively for many decades (MA Green, 1982, Dresselhaus, 2001, Michael et al., 2010. The purpose of energy storage research is two-fold. First, to develop energy solutions that meet the demand of daily energy consumption, and second, to produce energy in a more environmentally friendly manner. Fossil fuels have a limited capacity long-term, as they are a non-renewable resource. The IEA World Energy Outlook 2020 confirms that current reserves will comfortably meet demand for the projected growth period until 2040; however, eventually a transition from fossil fuels will be necessary. Hydrogen as an energy carrier satisfies both requirements of an alternative energy source. It has higher energy per unit mass (142MJ/kg) compared to methane (56MJ/kg) and produces water as a by-product of combustion (Hoffman, 2012, Harrison et al., 2010. Hydrogen can also be stored in large volumes (10 8 Nm 3 ) for long periods of time (months to years) in underground formations (Zivar et al., 2021) yielding thousands of megawatts of power (Wolf, 2015). Hence, Underground hydrogen storage (UHS) is now being explored as a potential solution for the energy industry.
A long-standing issue with high uptake of renewable energy sources, such as wind and solar, are their susceptibility to daily and seasonal fluctuations in energy supply (Denholm et al., 2015). In conjunction with this, daily peak energy production from both sources does not align with demand creating an energy surplus during the day and deficit at night. It is thought that UHS can help to reduce the impact of these fluctuations, particularly for longer time scales (Wolf, 2015). Excess electrical energy from renewable sources can be converted to chemical energy in the form of hydrogen via electrolysis (Acar and Dincer, 2014). Hydrogen is then injected into underground formations, such as depleted gas reservoirs, aquifers, or salt domes (Lord et al., 2014). When demand increases hydrogen can be produced from underground reservoirs and either converted back to electricity using hydrogen fuel cells, directly used for combustion, or combined with natural gas for energy supply (Pilavachi et al., 2009). UHS requires knowledge of the physical properties of hydrogen, such as density, viscosity, and solubility, which are well known (De Lucia et al. 2015, Li et al. 2018, Leachman and Jacobsen, 2007 and the petrophysical properties of interfacial tension, wettability, and relative permeability to determine the storage capacity as well as injection and production rates of the gas (Juanes et al., 2006).
The petrophysical properties of hydrogen in porous media have been poorly understood until recent years. There have been very few studies investigating the interaction of hydrogen with reservoir fluids and rocks. Relative permeability is dependent on surface wetting properties, pore structure, and capillary number and is an important component to determine the rate of injection and production of gas (Armstrong et al., 2021). Yekta et al. 2018, provided the first insight into the relative permeability and capillary pressure of the hydrogen-water system in porous media using a Triassic sandstone sample. Hydrogen storage is expected to take place at depths up to 1000m below the surface (Matos et al., 2019) therefore experiments were performed at two different conditions representing a shallow depth (temperature 20°C and pressure 55 bar) and deeper depth (temperature 45°C and pressure 100 bar). This resulted in a receding contact angle of 21.57° and 34.92°, respectively; calculated using the Young-Laplace scaling equation with mercury and air. This experiment indicated that the hydrogenwater system in sandstones is strongly water-wet. However, there were no direct measurements of hydrogen-water wettability in the system, and these properties were inferred through capillary pressure and empirical scaling laws.
The intrinsic wetting property of a fluid refers to the relative preference of two immiscible fluids to coat the surface of a solid material (De Gennes, 1985). Investigation into the intrinsic wetting properties of the hydrogen-water system has been carried out by three studies to date. Firstly Iglauer et al. 2021, determined the advancing and receding contact angles of the hydrogen-water system using the tilted-plate method (Lander, 1993). Pressure ranged from 0.1-25MPa and temperature from 296-343K with 10%wt NaCl brine. The study utilised two different types of quartz, pure and aged, with increasing concentrations of stearic acid for one year. The pure quartz experiment remained strongly water-wet for all temperatures and pressures despite displaying an increasing trend in contact angle from 0° to a maximum of 50° at 343K and 25MPa. The quartz samples aged with stearic acid became weakly water-wet to intermediate-wet with contact angles increasing with increasing concentration of stearic acid. The second study was conducted by Pan et al. 2021, who investigated the change in wetting properties with temperature, pressure, stearic acid concentration, and organic acid carbon number for the hydrogen-water system. The focus of the paper was to determine the interfacial tension between the rock and fluid rather than the interfacial tension between the two fluids to gain a deeper understanding of the surface energies present in this system. The results indicated that the rock-fluid interfacial tension between clean quartz and hydrogen gas was 101mN/m at 5 MPa and 323K, 92mN/m at 5MPa and 343K. These values were much higher than the fluid-gas interfacial tension previously described in the literature, 68.9mN/m for 5Mpa and 323K . Each study demonstrates that the hydrogen-brine-quartz system should be water-wet. Finally, Hashemi et al. 2021b, used the captive bubble method (Kaveh et al., 2014) to measure the effective contact angle of hydrogen on quartz surfaces. The liquid phase was varied from distilled water to synthetic sea water and two different concentrations of brine 5000ppm NaCl and 50,000ppm NaCl. Temperature ranged from 20-50°C and pressure 20-100 bar. The volume of the hydrogen bubble for each experiment was found to decrease continuously from the point of injection until it disappeared. This created an effect where the contact angle was initially at its minimum when the volume of the bubble was at its largest and continually increased as the volume of the bubble reduced. This suggests that measurements were not taken at equilibrium. The intrinsic contact angle ranged between 25-45° indicating a water-wet system.
Prior to our paper there has only been one study, which examined the in-situ fluid properties of the hydrogen-water system in sandstone. Jha et al., 2021 performed a single cycle hydrogen-brine displacement sequence, finding the initial saturation of hydrogen to be 65% and the residual saturation to be 41%. However, the study was not focused on fluid wettability. Our paper provides, for the first time, a comprehensive characterisation of wettability and IFT of the hydrogen-brine-quartz system using in-situ methods. Threedimensional (3D) imaging using X-ray microcomputed tomography (micro-CT) imaging allows contact angles to be determined in opaque porous media (Scanziani et al. 2017, Alratrout et al., 2017, Ibekwe et al. 2020, Sun et al., 2020a. Wettability is represented by the spatial distribution of contact angle at the three-phase contact line between the two fluids and the solid surface. While the captive bubble method measures the contact angle on a typically smooth surface to determine the intrinsic contact angle, the in-situ method accounts for variations in surface roughness and pore shape irregularity providing a distribution of effective contact angles. The in-situ method is therefore more representative of realistic reservoir porous media. Several methods of in-situ contact angle measurement have been developed to date. Alratrout et al. 2017, designed a process for the automatic measurement of contact angle using segmented voxelized micro-CT images. The 3D local method provided an approximately Gaussian distribution of contact angles for water-wet Ketton limestone, with a relatively low standard deviation of 12°. Mixed-wet systems, however, had a large range of contact angles. Generally, methods that require characterisation of the three-phase contact line are susceptible to large variability in contact angle distribution due to image resolution effects at the contact line. Sun et al. 2020a, applied a geometric approach that utilised the Gauss-Bonnet theorem to characterise the wetting state of a multiphase system. This approach allowed the macroscopic contact angle (qmacro) to be inferred from interfacial curvature, interfacial area, and topological measurements rather than directly computing the average angle along the contact line from the sequence of local geometric contact angle measurements. The benefits of this approach are particularly apparent when attempting to determine wetting on rough surfaces with sub-resolution heterogeneity. The deficit curvature is much less sensitive to resolution when compared to direct measurement (Sun et al., 2020b). This is because the resolution required to measure the contact line is lost well before the topological structure of the contact line is lost.
Determining the effective and macroscopic contact angles of the hydrogen-water-quartz system will enable the effects of surface roughness and local pore geometry to be incorporated into pore-scale models providing a more accurate representation of fluid interaction in reservoir porous media. The comparison is made between effective contact angles determined previously in the literature and herein using the captive bubble method to the apparent and macroscopic contact angles determined with 3D micro-CT in-situ measurements. This approach elucidates previously unknown elements of hydrogen wettability in reservoir porous media and provides a basis for field scale simulation studies to determine the storage capacity, injectivity, and productivity of hydrogen.
Herein, we have determined the effective contact angle of the hydrogen-water-quartz system using the captive bubble method at various salinities and pressures. A comparison to previous literature is made. The effect of salinity and pressure on the surface energies in this system are also determined using the pendant drop method for IFT. The wettability of the system is further characterised using four methods of in-situ analysis. Firstly, the topological approach of Sun et al, 2020b is compared to the curvature analysis of Lin et al., 2019 applying the Gauss-Bonnet theorem and deficit curvature to the fluid clusters. This is followed by manual measurement of contact angle on segmented images and a comparison to the 3D local approach of Alratrout et al., 2017. The paper is organised as follows. Firstly, we present the methods and materials; next we discuss the results determined by captive bubble method, pendant drop method, in-situ contact angle measurements, and wettability analysis. This is followed by a discussion of the results and the implications for commercial UHS. Finally, a conclusion is presented outlining key results and future work.

Methods and Materials
Five methods were used to determine the contact angle of the hydrogen-water system in sandstones. First the captive bubble method provided the effective contact angle then the topological approach developed by Sun et al. 2020b, was applied to 3D micro-CT images to determine the macroscopic contact angle and contact angle distribution along with curvature analysis to determine the wetting state of the rock. This was compared with the 3D local method contact angle distribution (Alratrout., 2017). Finally manual measurements were taken using a segmented image on the plane orthogonal to the tangent of the three-phase contact line in ImageJ.
Interfacial tension was determined using the pendant drop method explained by Drelich et al. 2002. Two sets of conditions were explored for both contact angle and interfacial tension. These were high-pressure conditions (6.9-20.68MPa) to replicate reservoir pressures during UHS, and low pressure (0.69-1.72MPa) to make comparisons between the in-situ contact angle and captive bubble method contact angle.

Materials
Hydrogen with a purity of 99.99% from Coregas was used. A single sample of length 45mm, width 20mm and depth 3mm was machined from a larger slab of Bentheimer sandstone for the captive bubble method. The properties of Bentheimer sandstone have been well studied and extensively reported in the literature (Peksa et al., 2015). The sample for the micro-CT analysis was a core with 5mm diameter and 7.6mm length which was obtained from a larger homogenous core of Bentheimer sandstone. The pore volume (PV) of the core was 0.05ml. The porosity was assumed to be 0.21-0.27 based on the literature, with a permeability of 0.5-1D determined by core flood. Three synthetic brines were made for the captive bubble experiment using de-ionised (DI) water and pure sodium chloride to yield 1000, 2000 and 5000ppm salinity brines. Potassium Iodide (KI) was used as a contrast agent in the micro-CT experiments. A 16.7wt% KI solution was developed using pure KI and DI water. A bespoke flow cell was designed to obtain high resolution images from micro-CT scans. The cell was constructed entirely from PEEK (Polyetheretherketone) to avoid interference with Micro-CT image quality. A schematic of the cell is shown in Figure 1.

Captive Bubble Method
The experimental setup is depicted in Figure 2, below.

Figure 2. Schematic of Captive Bubble and Pendant drop experimental set-up
A high pressure, high temperature (HPHT) cell was used. The sample was mounted inside the HPHT cell using a bespoke fitting which provides a horizontal surface. The HPHT cell is sealed with two sapphire windows which allow visualisation of the sample and needle inside the cell. Images are captured using a high-resolution camera connected to a microscope. Two HIP manual pressure generator pumps were used to inject brine and hydrogen into the cell, a metering-valve was used for the controlled release of hydrogen. Omega pressure transducers recorded the pressure inside the cell, in the flowline filled with brine and in the flowline filled with hydrogen. The temperature remained at a constant ambient temperature of 25°C. Pressure was varied from 0.69 to 20.68MPa. The low pressure experiments allow us to compare the results to the in-situ contact angle measurements and the high pressure experiments are to determine the behaviour of the fluids at reservoir conditions. Contamination of equipment is a major source of error for contact angle measurements. Before the sample was placed in the HPHT cell the system was thoroughly cleaned. The flowlines were rinsed with dry nitrogen, the brine pump and inside of the HPHT cell were soaked in a hot bath of Toluene then rinsed with Toluene, rinsed with ethanol, washed with a mild detergent followed by flushing with one Litre of DI water. The sapphire windows were cleaned with Ethanol. The inside of the HPHT cell was finally flushed with dry nitrogen before the system was put under vacuum for 12hrs.
The surface of the sample was smoothed using 320 grit sandpaper. It was then rinsed with DI water before being placed in 100% isopropyl alcohol in the Soxhlet extractor for 5 hours. The sample was then left to dry in a 60°C oven for 24 hours. Prior to being mounted in the cell, the sample was sonicated with DI water for 1 minute. The HPHT cell was then saturated with DI water and left for 16 hours. Hydrogen was then introduced to the cell via the metering valve and a 1.52mm diameter needle inside the cell. Following each experiment gas was purged from the cell whilst the metering valve was closed to ensure no contamination of the pure hydrogen gas flowlines and pump. The brine was then replaced with different salinity and the cell once again saturated.
Hydrogen bubbles entering the cell and contacting the sample were allowed to equilibrate, photos were taken every 10 minutes for the contact angle experiment.

Pendant Drop Method
The same procedure used to determine the contact angle with the Captive Bubble Method was applied to determine the interfacial tension of the hydrogen-water system at the brine salinities and pressures mentioned earlier. The difference between the Pendant Drop Method and the Captive Bubble Method is that the hydrogen bubble entering the cell via the needle is kept in contact with the needle forming a drop of hydrogen due to the difference in surface energies. The hydrogen drop is allowed to equilibrate, and photos are taken every minute using a high-resolution camera. The photos are later analysed using ImageJ to determine the interfacial tension based on the method proposed by Drelich et al., 2002. The interfacial tension is dependent on the drop geometry and density difference between the two fluids.
where s is the interfacial tension, Dr is the difference in density between liquid and vapour phase, g is the gravitational constant, D is the equatorial diameter of the droplet, d is the diameter at the neck of the bubble a distance D from the top of the bubble and H is the shapedependent parameter which is related to the shape factor S=d/D by the following empirical equation: where Bi (i=0,1,2,3,4) and A are empirical constants for a particular range of shape-factor S, shown in Table 1. The compressibility factor of hydrogen gas was determined using the representation of Leachman et al., 2009. The critical pressure of hydrogen is 1.315MPa and the critical temperature of hydrogen is 33.19K (Leachman et al., 2009). The pressure in the low-pressure experiment ranged from 0.69 to 1.72MPa with temperature constant at 25°C (298°K). The compressibility factor ranged from 1.004 to 1.010. The pressure for the high-pressure experiment ranged from 6.9-20.68MPa which equated to a compressibility factor between 1.041 and 1.127. The density of DI water was 999.84kg/m 3 . Density varies with salinity approximately linearly at low concentrations of NaCl. The density of the 2000ppm NaCl solution was 1000.624kg/m 3 and the 5000ppm NaCl solution was 1001.8kg/m 3 .
The images from the Captive Bubble and Pendant Drop Methods were analysed using ImageJ. Numerical measurements were calibrated using the 1.52mm needle as a length scale reference. Images were converted to 8-bit grey-scale images. Image segmentation is then used to convert the grey-scale images into two unique well-defined regions. We used simple thresholding after the image was smoothed and sharpened. Simple thresholding was based on the provided histogram. Image droplets can be seen in Figure 3.

Calibration of the Experiment
The setup was calibrated against the measurements of Chow et al 2016. for the Nitrogen/water system. Measurements were taken at pressures ranging from atmospheric pressure to 20Mpa. Temperature was constant at 25°C.

In-Situ Contact Angle Method
The core, dimensions 5.0mm diameter and 7.6mm length, was placed in a 100% isopropyl alcohol solution in the Soxhlet extractor for 5 hours. It was then left to dry in the oven for 24 hrs at 60°C. The core which was completely saturated with air was inserted into the core holder and a scan was obtained for the dry image. The core remained inside the cell and Ethanol was used to remove air from the sample using a Vindum Engineering pump. A flow rate of 29ml/min was used for 500 PV's. A solution of 16.7wt% KI was then ran through the core. The flow rate was gradually ramped up from a low rate of 1ml/min to 29ml/min for 1mm saturated sample was then obtained.
Finally, the core was flooded with hydrogen. A pressure regulator was attached to a 1.3m 3 hydrogen cylinder which allowed pressure to be finely controlled up to 1.59MPa. A flowline was connected to one PEEK inlet flowline, the other inlet flowline was sealed with a Swagelock cap. The outlet flowline was connected to a Swagelock valve backpressure regulator. The outlet of the backpressure regulator was connected to a 1/16" tubing which was fed into a water bath to determine when breakthrough occurred. The inlet pressure from the hydrogen cylinder was set at 0.38MPa. An omega pressure transducer at the inlet of the backpressure regulator recorded the outlet pressure of the cell. The valve on the backpressure regulator was slowly adjusted until breakthrough occurred at 0.36MPa essentially replicating a bottom hole pressure controlled injection as would occur in a field setting. Injection would occur at a fixed bottom hole pressure into the reservoir, not necessarily at a fixed rate hence why we did not use a controlled flow rate for the experiment. Immediately after breakthrough the valve was closed and the core sealed. Gas from the inlet and outlet flowlines were purged into the fume cupboard and the core holder was imaged.
3D Micro-CT imaging was completed at the Tyree X-ray CT facility at the University of New South Wales using HeliScan TM micro-CT system. The samples were scanned in a helical trajectory with the following settings: 100kV, 120 µA, exposure time 0.43 s, 5 accumulations, and 0.2mm SST filter. The voxel size obtained from this sample is 5.15 µm. The tomographic reconstruction was performed using QMango software developed by the Australian National University.
Images were segmented using a Non-Local Means Filter followed by thresholding. The dry image has sufficient resolution to identify sandstone and clay minerals, while the wet image has sufficient resolution to identify the hydrogen gas. These 2 segmented domains are then registered to each other to create the 3-phase segmentation depicted in Figure 4.

Morphological Measurements
The Gauss-Bonnet theorem is used to relate the total curvature of a 3D fluid cluster and its surface to its topology as measured by the Euler characteristic. The deficit curvature represents the total angle of change along the contact line based on the contribution to the total curvature of the cluster. Intuitively the deficit curvature is a hypothetical extension of the fluid cluster into the solid surface to complete a perfect circle (Sun et al., 2020a). The more wetting a fluid becomes, the greater the deficit curvature. The deficit curvature provides a mathematical link between microscopic and macroscopic wetting states from a geometric perspective. Fluid clusters contact several parts of the complex geometry in multiphase systems. This creates multiple contact lines loops, one for each contact. The deficit curvature is an extensive property, increasing in proportion to the number of contact loops present, whereas contact angle is an intensive property. To connect these two measurements, macroscopic contact angle is defined based on the deficit curvature shown in Equation 3.
where 4 is the deficit curvature and . is the number of closed contact line loops formed on the solid surface.
Algorithm 1. described by Sun et al., 2020b was used to determine the macroscopic contact angle distribution of hydrogen in the core.
The mean curvature of the interface is defined by where 1 2 are the two principal curvatures. In addition, the Gaussian curvature describes the complex interfaces in mixed-wet systems with mean curvatures near zero. For water-wet rock, water resides in the small crevices and throats of the smallest pores whilst coating the surface of other pores. The non-wetting phase occupies the centre of the largest pores and forms quasi-spherical blobs with similar and positive biconvex curvature along the two principal axes 1 > 0, 2 > 0. Hence both the mean curvature and Gaussian curvatures are positive. In the opposite case where gas preferentially coats the surface of the rock forming a gas-wet system the water resides in the centre of the largest pores with the interface bulging into the wetting phase, which forms two similar but negative biconcave curvatures. The Gaussian curvature is large and positive. In the mixed-wet case we see interfaces with significant curvature however the curvature in one direction (k1) is almost equal in magnitude but opposite in sign compared to the curvature in the perpendicular direction k2. The mean curvature is small and near zero resulting in a Gaussian curvature 1 2 ≤ 0 (Lin et al., 2019). This analysis can be used to determine the wettability of our sample using curvature analysis.

3D local Method
Alratrout et al., 2017 developed a new method for in-situ contact angle analysis using 3D micro-CT imaging. The interfaces between the two immiscible fluids and the fluid and solid are identified on segmented images. The three-phase contact line is identified then the dot product of the two vectors perpendicular to the surfaces are used to determine the contact angle where they both meet at the contact line. We used algorithms 1,2 and 3 described by Alratrout et al., 2017 to determine the apparent contact angle distribution of hydrogen in the core.

Interfacial tension
The interfacial tension between hydrogen and distilled water, 1000ppm NaCl, 2000ppm NaCl and 5000ppm NaCl brine was determined using two sets of measurements. Firstly, a lowpressure test for pressures between 0.69-1.72MPa was conducted, shown in Figure 5. The results were comparable to the interfacial tension between air and water at low pressures and are consistent with the results produced by . There was little variance in the IFT over the low-pressure range for the hydrogen-distilled water system. The ghydrogen-water ranged from 71.99mN/m at 0.77MPa to 72.25mN/m at 1.72MPa. The ghydrogen-2000ppmBrine was found to be slightly lower than ghydrogen-water ranging from 62.14mN/m at 0.69MPa to 64.63mN/m at 1.72MPa. ghydrogen-5000ppmBrine was found to have the lowest IFT of the three low pressure experiments ranging from 62.8mN/m at 0.69MPa to 56.5mN/m at 1.72MPa. However, interference with the pendant drop was noted in the HPHT cell for pressures above 1.03MPa in the ghydrogen-5000ppmBrine scenario. Bubbles from the contact angle measurements came in contact with the gas bubble released from the needle. This distorted the pendant drop and provided erroneous measurements for IFT. Hence the IFT would be comparable between the two salinities at 0.69MPa and measurements above 1.03MPa were neglected for the ghydrogen-5000ppmBrine scenario. Temperature was constant at 298K for all experiments. Second, a high-pressure test was conducted with pressures between 6.89-20.68MPa, shown in Figure 6. The ghydrogen-water was found to decrease with increasing pressure from 72.45mN/m at 6.89MPa to 69.43mN/m at 20.68MPa. No correlation with pressure was found for the ghydrogen-1000ppmBrine system which ranged from 64.78mN/m at 6.89MPa to 63.29mN/m at 20.68MPa. No correlation with pressure was found with ghydrogen-5000ppmBrine which ranged from 67.28mN/m at 13.79MPa to 68.29mN/m at 20.68MPa. No correlation between salinity and IFT was found, although both ghydrogen-1000ppmBrine and ghydrogen-5000ppmBrine were lower than ghydrogen-water there was no concentration dependent relationship as ghydrogen-5000ppmBrine was higher than ghydrogen-1000ppmBrine. Temperature was constant at 298K for all experiments. Error bars were calculated using a tolerance of one pixel for measurements. This resulted in error propagation, and a total error between 10.9% and 15.2%. All measurements for the highpressure case fell within the error bars which indicate that effects of salinity and pressure are limited to this range. Figure 6. High-pressure Hydrogen-Brine IFT with distilled water, 1000ppm and 5000ppm NaCl brines.

Contact Angle
The effective contact angle was determined for both the low-pressure scenario (0.69-1.72MPa) and high-pressure scenario (6.89-20.68MPa) using distilled water, 1000ppm, 2000ppm and 5000ppm NaCl brine using the captive bubble method. The low-pressure data is shown in Figure 7 and the high-pressure data in Figure 8. Issues with the hydrogen bubble not wetting the surface of the rock were encountered, particularly for the distilled water experiment at low pressure. The hydrogen bubble would contact the surface and not remain connected to the surface. This indicates a very low contact angle, and highly non-wetting properties of hydrogen in this system. The effective contact angle was only determined for two pressures 0.77 and 0.86MPa using distilled water in the low-pressure scenario. The contact angle was found to be 27° for both measurements. There was no correlation between contact angle and pressure found with the 2000ppm brine. Contact angle ranged from 31° at 0.69MPa to 29° at 1.72MPa. There was no correlation between pressure and contact angle with the 5000ppm brine. Contact angle ranged from 35° at 0.69MPa to 33° at 1.72MPa. Temperature was constant at 298K for all experiments. Based on the low-pressure data a weak correlation between salinity and increased contact angle could be proposed. This would be due to an alteration of surface energies at the interface of the two fluids. However, if we compare the low-pressure data for IFT to that of contact angle we see an opposite trend in relation to salinity. Given the range of error for IFT and the lack of data points for contact angle no conclusive correlation can be established between salinity and contact angle.

Figure 7. Low-pressure Hydrogen-Brine-Quartz contact angle with distilled water, 2000ppm and 5000ppm brines. The error bars were at 5% to cover measurement and resolution errors
The data for the high-pressure scenario was much more comprehensive. No correlation between contact angle and pressure or contact angle and salinity was found. This may be due to the low solubility of hydrogen in water and would indicate little change in surface energies. The contact angle for distilled water ranged from 35° at 6.89MPa to 31° at 20.68MPa. The contact angle rose to a maximum of 39° between 10.34MPa and 13.79MPa before again falling. The contact angle for the 1000ppm NaCl brine solution was very consistent ranging between 29-31° for the full range of pressures from 6.89 to 20.68MPa. The contact angle for the 5000ppm NaCl brine solution was slightly higher than the 1000ppm solution ranging from 33° at 13.79MPa to 31° at 20.68MPa. Two different sized bubbles were formed at 18.96MPa hence two readings of contact angle. At pressures greater than 17.24MPa the contact angle for all three solutions was comparable. Temperature was constant at 298K for all experiments. The phenomena of dissolution and diffusion noted by Hashemi et al. 2021b, affecting the droplet size over time were not witnessed during this experiment. The droplet size remained constant throughout the experiment for all pressures. Measurements were taken at equilibrium conditions. Previously the literature has stated that dissolution and diffusion were very minimal in the hydrogen-brine system due to hydrogens low solubility in water. Li et al 2018, determined the mol fraction of hydrogen gas lost to solution at 20Mpa is 0.003, corresponding to a mass fraction of less than 0.00034, which is negligible.

In-Situ Wettability
The in-situ wettability and contact angles were determined using the topological approach (Sun et al., 2020a, b), curvature analysis (Lin et al, 2019), 3D local method (Alratrout et al., 2017), and manual measurement. All methods analysed segmented images of the 16.7% KI solution and hydrogen system.

Topological In-Situ Contact Angle Analysis
The macroscopic contact angles (qmacro) originally displayed a mean value of 53.13° for fluid clusters with a Euler characteristic of 1. However, even though the mean of qmacro was higher than the lab measured value (27-37° for low pressure system), the majority of the qmacro values fell in the range between 29° and 53° shown in Figure 9 as macroscopic contact angle including extreme Gaussian values.
The Gaussian curvature distribution for non-wetting clusters of the entire system displayed many extreme values present even following surface smoothing processes. This may be the reason why the mean of qmacro was higher than the measured effective contact angle values from laboratory experiments. Therefore, the extreme Gaussian curvature values (both positive and negative) were neglected for each fluid cluster. This resulted in the qmacro values closely aligning with those values measured in the laboratory. As shown in the Figure 9. Below as macroscopic contact angles neglecting extreme Gaussian values, the mean value is 39.77°， the median is 36°, and the mode is around 30°. Figure 9. Distribution of contact angles using in-situ morphological approach in comparison to 3D local method and manual measurement

Manual Measurement
The fluid cluster distribution throughout the core can be seen in Figure 10. &'' = 36.8° Figure 10. A) Segmented Micro-CT image slice for manual measurement with rock grains (dark grey), 16.7% KI brine (white) and hydrogen gas (black) B) Window of segmented image used for manual measurements A total of 15 contact angles were manually measured taking the normal to the three-phase contact line identified in Figure 8b. ImageJ was used to compare the effective contact angles determined by the captive bubble method with the macroscopic contact angle distribution of Sun et al., 2020 and the apparent contact angle distribution of Alratrout et al., 2017. Contact angles ranged from 22° to 90°. The median contact angle was 36° and the mean contact angle was 36.8°. The standard deviation was 20.7°. This can be seen in Figure 9 as the black line representing the mean apparent contact angle. The median and mean contact angles are in close agreement with the captive bubble effective contact angle measurements, however the large range of values can be attributed to image resolution and the inability to completely resolve the three-phase contact line which can contribute to segmentation errors as well as measurement errors.

3D Local Method
The 3D local method determined the mean value of the contact angle distribution to be 59.75° shown in Figure 9. Contact angle deviation is in line with expectations presented by Sun et al., 2020b with the mean value of the contact angle distribution provided by the 3D local method being 20 degrees higher than the intrinsic contact angle determined by experiment. This is due to resolution errors at the three-phase contact line. The resolution necessary to measure the contact angles along the three-phase contact line is lost well before the topological structure of the contact line is lost. The local method has a higher deviation of mean and standard deviation compared to the topological approach with lower resolution. The mean value of the 3D local method is the highest compared to topological and manual measurement methods with contact angle measurements for water-wet surfaces greater the intrinsic contact angle. The resolution of 5.15 micrometers may not have been sufficient to capture the three-phase contact line compared to the topological approach. Interestingly, the mean of the manual measurement was much lower than the 3D local method which both use a similar process. This may be due to such a small sample size being used, 15, for the manual measurement compared to greater than 300,000 for the 3D local method.

Wettability Analysis using fluid curvature
Curvature analysis indicates that hydrogen-brine-quartz is a water-wet system with the distribution of the sum of all mean curvatures greater than zero. A much greater number of instances where both principal axes 1 > 0, 2 > 0 compared to those when 1 < 0, 2 < 0 indicates that much of the core is water-wet with water residing on the surface of the rock and the non-wetting gas phase residing in the centre of the largest pores. Figure 11 shows concave water-wet distributions 1 > 0, 2 > 0 in pink and convex gas-wet distributions 1 < 0, 2 < 0 in yellow. This analysis further confirms the morphological and laboratory conclusions of a water-wet system.

Figure 11. Curvature analysis of hydrogen-brine Micro-CT images
An analysis of the results presented by effective contact angle laboratory measurements, macroscopic contact angle (qmacro), curvature analysis, manual measurement of fluid clusters on segmented micro-CT images, and the 3D local method all indicate that the hydrogenwater-quartz system is water-wet with median contact angles around 36°. This is in close agreement with previous literature that determined effective contact angles ranging between 25° and 45° (Hashemi et al., 2021b) and 0° to 50° .

Discussion and Implications for UHS
Wettability is one of the key parameters when assessing the feasibility of UHS operations. Surface wetting properties and residual fluid morphology are both inherently impacted by the contact angle and interfacial tension between reservoir fluids and lithology. The amount of gas that can be stored and subsequently retrieved is directly related to these two properties. The rate of gas injection and production is also related to these properties through relative permeability. We have shown that hydrogen-brine-quartz system is water wet. The repercussions of this being that a large percentage of gas can be recovered from porous reservoir rock. However, some gas will remain trapped in the pore space, as shown by Jha et al., 2021 which determined the residual hydrogen gas saturation to be 41% following one cycle displacement sequence with hydrogen and brine. As hysteresis occurs during cycles of injection and production, water preferentially wets the surface, and clusters of hydrogen will be rendered immobile, trapped in the centre of pores. The aim of UHS is to recover the entire volume of gas that is injected, as opposed to geological CO2 storage, which aims to immobilise the gas phase. The greatest recovery occurs in the presence of minimal surfaces which are brought about by intermediate-wet conditions (Lin et al., 2019). Hashemi et al., 2021a found that increasing the contact angle towards 90° resulted in a lower volume of trapped hydrogen due to reduction in capillary pressure. This in turn led to an increase in hydrogen relative permeability during secondary imbibition. Lithology also has a pivotal impact on residual gas saturations, with formations that have higher porosity and permeability having lower residual saturations. Thus, the most efficient reservoirs for UHS would be highly porous and permeable sandstone reservoirs which have aged quartz, altering the wettability of the hydrogen-brine-quartz system from highly water-wet toward intermediate wet conditions.
The effects of surface roughness and pore shape irregularity seemingly had minimal impact on the hydrogen-brine-quartz contact angle given the topological in-situ apparent contact angles were almost identical to the effective contact angles provided by the captive bubble method. The effects of image resolution may account for the differences in the contact angle distribution provided by the 3D local method and both the lab measured intrinsic contact angle and topological in-situ contact angle. This is because the resolution required to measure the contact line in the 3D local method is lost well before the topological structure of the contact line is lost.
Interfacial tension values in this study were found to be 71.99mN/m at 0.77MPa to 69.43mN/m at 20.68MPa which compare to those previously reported in the literature 72.3mN/m at 0.5MPa to 70.8mN/m at 20.1MPa . We found a trend with pressure for the interfacial tension between hydrogen and distilled water at high pressures (6.89-20.68MPa). However, no trend was found between salinity and interfacial tension. The interfacial tension values are comparable to those of Nitrogen, 71.1mN/m at 2MPa to 63.2mN/m at 20MPa, which may be considered as a potential cushion gas.
For comparison, the representation of Chow et al, 2018 (see also errata in Chow et al., 2020), gives a slightly increase in IFT at low pressure, and then a mostly linear decrease in IFT at higher pressures. The linear gradient from that representation at 25° C is -0.101 mN/m per MPa, and is consistent with our results within the error bars. Slowinski et al, 1957 andMassoudi andKing, 1974 also give IFT results for hydrogen and water at 25° C, but with consistently larger decreases in IFT compared to those of Chow et al., 2018. Massoudi and King estimated the gradient of the linear decline of IFT with pressure at -0.247 mN/m per MPa.
Concerns about hydrogen diffusing through cap rocks may not be warranted due to hydrogen's low solubility and high interfacial tension which will prevent diffusive loss of hydrogen through the cap rock and leakage through the pore space if capillary threshold entry pressures have been exceeded. The seal capacity of a reservoir is a function of pore size distribution, contact angle and IFT (Daniel, 2008). All of which impact the column height of gas stored. Contact angles for methane-brine and hydrogen-brine systems are assumed to be the same as both are water-wet with contact angles less than 50 degrees (This study, Hashemi et al, 2021, Yekta et al, 2018. Therefore, based on the IFT data (This study, , Chow et al., 2020, and assuming the contact angles for sealing rocks are similar to those for the reservoir rocks studied here, the column height of hydrogen stored will be greater than or equal to that of methane, which has significant implications for UHS in depleted gas reservoirs (Hassanpouryouzband et al., 2021;Ennis-King et al., 2021). This is a significant finding for the feasibility of UHS and understanding the interaction between reservoir fluids to design field development scenarios and improve the accuracy of simulation models.
The particular Bentheimer outcrop used in this study is between 88-97.5% quartz and is indicative of many reservoir sandstone samples from across the world. The results demonstrated are broadly applicable to the vast majority of depleted gas reservoirs and aquifers.

Conclusion
Our analysis has provided a comprehensive characterisation of wettability and IFT for the hydrogen-brine-quartz system at relevant pressures. We have shown that the system is strongly water-wet and outlined the implications of this for UHS. The captive bubble method was used to determine the effective contact angle of the hydrogen-water-quartz system at various salinities and pressures. The effective contact angle ranged between 27-39° for all pressures and salinities. The effect of salinity and pressure on the surface energies in this system were also determined using the pendant drop method for IFT. The IFT ranged between 71.99mN/m at 0.77MPa to 69.43mN/m at 20.68MPa for distilled water and hydrogen. A decreasing trend with increasing pressure was found for the interfacial tension between hydrogen and distilled water at high pressures (6.89-20.68MPa) however no trend was found between salinity and interfacial tension. The wettability of the system was characterised using four methods of in-situ analysis. The topological approach of Sun et al, 2020b, manual measurement of contact angle on segmented images, the 3D local approach of Alratrout et al., 2017 and curvature analysis of Lin et al., 2019. All in-situ analysis determined the system was water-wet, with the mean of contact angle distributions being 39.77°, 36.8° and 59.75° respectively. The results of this study provide crucial data for accurate modelling of relative permeability and capillary pressure to accurately predict feasibility of UHS in sandstone reservoirs. Future work will validate modelling using experimental determination of relative permeability and in-situ analysis of wettability at various saturations. The effects of hysteresis will also be examined to determine the impact on residual saturations.