1 Introduction

Due to advances in micro-structure characterisation and computational techniques, the modelling of pore-scale transport phenomena is increasingly important in ground water engineering and geostorage applications. Increasing the accuracy of rock representations would significantly improve the quality of forward simulations, which are increasingly important, e.g. in the context of carbon capture and storage. Reservoir rocks including sandstone (Øren and Bakke 2002) and carbonate rocks (Biswal et al. 2007) typically exhibit dual-scale micro-structures. Capturing multiple scales of porosity in rocks, like vugs, macro-, and micro-porosity, is a long-standing problem: while nano-computed tomography (nano-CT) and focused ion beam scanning electron microscopy (FIB-SEM) offer exceptional resolution of micro-structures, this comes at the expense of a very narrow field of view (FoV), typically missing larger-scale heterogeneity of the pore space entirely (Bai et al. 2013; Welch et al. 2017). X-ray micro-computed tomography (micro-CT) is capable of capturing heterogeneity at core scale but is limited to micron resolution (Arns et al. 2003). The problem can be partially overcome by the introduction of so-called super-resolution techniques (Chang et al. 2004; Glasner et al. 2009; Wang et al. 2018b), which increase the effective resolution by a factor 4 to 8 with the help of auxiliary high-resolution information for training. This approach is insufficient to accurately represent the micro-structure of clay regions when applied at X-ray micro-CT imaging resolution. Effective medium theories (Bruggeman 1935; Kirkpatrick 1971) describe the macroscopic behaviour of a micro-structure at larger scales, avoiding the need for explicitly resolved spatial information. A combination of the latter with direct imaging in the context of digital core analysis was proposed in the past (Arns et al. 2005). “Macroscopic” pore-scale spatial information is directly captured by micro-CT imaging of an appropriate resolution, and an effective medium representation is used for the finest elements of the system (micro-porosity, clays, etc.), including in recent upscaling approaches (Jiang and Arns 2021). However, this strategy has a significant limitation—every effective element or region needs to be large enough to possess the effective property of interest. If this condition is not, fulfilled problematic boundary conditions between regions of resolved and non-resolved porosity may arise. Another convenient approach for representing multiple spatial scales of rocks is pore-network modelling (Øren and Pinczewski 1994; Stig and Øren 1997). Due to strong abstractions of the local geometry and the need to incorporate mineralogy, it is less suited for the predictive modelling of NMR responses.

NMR transverse relaxation time (\(T_2\)) distributions are frequently used in reservoir characterisation to estimate pore size distributions and permeability (Kleinberg et al. 1994). However, \(T_2\) responses are sensitive to internal magnetic field inhomogeneities induced by susceptibility contrast between solids and fluids in rocks. Molecular diffusion in the presence of strong internal magnetic field gradients leads to additional dephasing, which enhances transverse relaxation, potentially invalidating the condition of ‘fast diffusion’ (Brownstein and Tarr 1979). Accounting for relaxation enhancement due to internal magnetic field gradients in pore-scale simulations requires the accurate calculation of these fields.

Over the past decades, two main numerical methods for deriving the internal magnetic field distribution in rocks have been established. The first method derives the magnetic field distribution by calculating the magnetic potential using the finite element method (FEM) to solve the Maxwell equations in zero-current condition. For instance, the internal magnetic field and internal gradients are simulated using thin sections of Berea sandstone (2D model) for multiple constituent phases (Chen et al. 2005). The 3D internal magnetic field of a single pore is calculated in Fordham and Mitchell (2018). More recently the 3D internal magnetic field was computed for digital rock samples (Connolly et al. 2019), assigning a mean magnetic susceptibility across all solid components.

The second method to calculate the internal magnetic field is based on a linear superposition of dipolar fields (also known as dipole approximation). Internal field distributions of random sphere packs were calculated (Drain 1962; Majumdar and Gore 1988; Audoly et al. 2003). The approach has been investigated for a periodic cylinder pack system, which represented the simplest pore geometry for visualisation of internal field distribution (Sen and Axelrod 1999). The application of the dipole approximation to 3D micro-CT images of rocks including for multiple mineral phases was demonstrated in the past (Arns 2004; Arns et al. 2007, 2011). However, the magnetic field distribution of the clay phase was calculated assuming a continuous effective medium with constant volume-weighted susceptibility for the entire clay region due to a lack of image resolution. Utilising directly a high-resolution micro-structure of clay regions poses a significant computational challenge. Such a micro-structure could be chosen to be periodic in a way that it still covers regional micro-structure patches (Arns et al. 2009). The latter resulted in local porosity variations and, therefore, average susceptibility variation at voxel scale. Calculating high-resolution internal magnetic fields then must consider near-field effects at intermediate scales. We note that resolving the micro-structure of kaolinite requires resolution of the order of 20 nm (Cui et al. 2021). A direct approach using, e.g. an \(n_\mathrm{c}^3\) voxel sub-domain, \(n_\mathrm{c}=1000\), of a micro-CT image at 2 μm resolution would result in fields of size \(100{,}000^3\), which is impractical.

Most NMR response simulations are based on random walk algorithms, where each ‘walker’ is representative of a nuclear spin package (Mendelson 1990; Bergman et al. 1995). 2D anisotropic pore geometries involving different pore shapes were considered by Wilkinson et al. (1991). Comparisons of simulation and experiment for the mono-sized grain consolidation model led to good agreement with experiments (Straley and Schwartz 1996). However, internal magnetic field gradients were not included in these earlier studies. The dephasing spins are considered in a uniform gradient in a porous material (Valckenborg et al. 2002) and for ferromagnetic grains (Valckenborg et al. 2003). The NMR response is simulated with constant gradient based on a 3D model that includes arbitrary bi-modal pore size distributions by compacted spheres (Toumelin et al. 2003). Consider now NMR relaxation response simulations incorporating a general internal magnetic field. Random walk simulations on X-ray micro-CT images of heterogeneous sedimentary rock samples comparing different definitions of pore size were presented in Arns (2004). D\(T_2\) responses of Bentheimer and Berea sandstone were modelled based on micro-CT images including internal field effects (Arns et al. 2011). Recent work simulating \(T_2\) responses led to partial agreement with experiments; short relaxation times are not recovered (Connolly et al. 2019).

Another method for NMR relaxation response simulation is based on the FEM to solve the Bloch–Torrey equations for the evolution of the magnetisation. The magnetisation decay due to diffusion in the internal magnetic field gradient in a single pore of complex shape was explored in Fordham and Mitchell (2018). A recent study (Mitchell et al. 2019) involving intra- and inter-particle porosity compares random walks and FEM on simplified models. Due to different magnitudes of length scales in micro- and macro-pores, micro-porous grains were treated as effective medium.

The increasing sophistication of NMR simulators for porous media responses opens new applications regarding the extraction of intrinsic physical properties of complex materials when a high-resolution 3D physical representation is available, e.g. by micro-CT imaging. Recently, a comprehensive and efficient Bayesian optimisation framework to extract multiple intrinsic physical parameters simultaneously was introduced (Li et al. 2021). They demonstrated the framework on Bentheimer sandstone, extracting quartz surface relaxivity as well as effective diffusion and transverse relaxation time of unresolved clay regions.

The latter suggests that dynamic changes in surface properties, e.g. as result of wettability alteration (Shikhov et al. 2018, 2019), may be understood spatially resolved and inform modelling of two-phase flow (Wang et al. 2018a). For such an approach, it would be desirable to replace effective clay parameters with clay structure and surface properties. A first step in this direction has been presented by Cui et al. (2021), where a dual-scale model of Bentheimer sandstone described the heterogeneity of the rock including micro-porosity in clay regions. However, a multi-stage approach was used for the simulation of the NMR responses.

In this work, we present a dual-scale NMR solver which supports multiple clay micro-structures and accounts for the resultant internal magnetic fields at the highest resolution. The paper is organised as follows: we first introduce the materials including a simplified three-layer model, kaolinite model, and the representation of Bentheimer sandstone. This is followed by the dual-scale internal field calculation utilising the dipole approximation, based on a decomposition of the field into high- and low-resolution components and accounting for near- and far-field effects. We then introduce the dual-scale random walk approach to solve for NMR responses. Section 3 illustrates the accuracy of the simulation approach utilising the model material, and applications to Bentheimer sandstone with excellent match to experimental measurements. Finally, we report on the distributions of spatial internal magnetic field gradients and diffusion-averaged effective gradients for different regions of the sample.

Fig. 1
figure 1

3D three-layer model; a \(20 \times 20 \times 40\) voxel coarse-resolution sample, 3 μm/voxel, b \(400 \times 400 \times 400\) voxel micro-structure represented by the Gaussian Random Field, 60  nm/voxel, and c the \(1000 \times 1000 \times 2000\) voxel fully resolved model at 60 nm/voxel. The phases colour scheme: pore space—blue; “clay”—grey; solid—red

2 Materials and Methods

The study includes dual-resolution samples which consist of two categories. One is the coarse-resolution micro-CT image (around 2 to 4 μm resolution). The other is the fine-resolution artificially reconstructed 3D model (down to about 10 nm resolution). There can be N different fine-scale models with different porosity and micro-structure representing coarse-scale (unresolved) phases in the low-resolution image. The internal fields of these domains will be named as coarse field and fine field in the later discussion, with transition regions giving cause to near-field effects. The simple three-layer model is first introduced here to better explain the dual-scale internal field calculation methodology. We then transfer to complex rock geometry.

2.1 Three-Layer Model

The coarse-resolution sample (Fig. 1a) contains three parallel layers, assumed, respectively, as pore (top), unresolved “clay” phase (middle) which will be replaced by resolved micro-structure, and solid (bottom). Image size is \(20 \times 20 \times 40\) cubic voxel with resolution of 3 μm/voxel. The 3D micro-structure is constructed by a level cut through a Gaussian Random Field (GRF). For such fields, the resultant two-point correlation function can be calculated analytically and fitted to measured correlation functions, e.g. from 2D high-resolution SEM micrographs. We employ the field-field correlation function (Cahn 1965; Roberts 1997; Arns et al. 2004):

$$\begin{aligned} g(r)=\frac{e^{(-r/\xi )}-(r_\mathrm{c}/\xi )e^{-r/r_\mathrm{c}}}{1-r_\mathrm{c}/\xi }\frac{\sin 2\pi r/d}{2\pi r/d}, \end{aligned}$$
(1)

with cut-off scale \(r_\mathrm{c}\) = 0.7355, correlation length \(\xi\) = 0.9095 and domain size d = 7.6434 in voxel units. Actual values are given for concreteness but have no particular meaning other than defining the model structure. With the known g(r), realisations of GRF Z(\({\mathbf {x}}\)) are numerically generated using the fast Fourier transform (FFT) method utilising a one-level cut

$$\begin{aligned} Z({\mathbf {x}})=\left\{ \begin{matrix} 1, Z({\mathbf {x}})\geqslant \beta \\ 0, Z({\mathbf {x}}) < \beta \end{matrix}\right. , \end{aligned}$$
(2)

with level cut parameter \(\beta\) = 0.17. The fine-scale model structure is generated with periodic boundary conditions as \(400^3\) voxel domain with the model domain covering \(8^3\) voxels of the coarse-resolution image (Fig. 1b). To generate a fully resolved model, we map the coarse-resolution sample to a conforming subgrid. Each coarse-scale voxel corresponds to \(n_\mathrm{s}^3\) fine-scale voxels. Here, we chose \(n_\mathrm{s} = 3\,\upmu\mathrm{m}/0.06\,\upmu\mathrm{m} = 50\). This results in a \(1000 \times 1000 \times 2000\) voxel micro-structure at 60 nm resolution, where the unresolved middle layer of the structure is replaced by corresponding micro-structure voxels. The fully resolved model is visualised in Fig. 1c. Note the periodic repetition of the template \(400^3\) domain.

Fig. 2
figure 2

a A slice of 800\(^3\) tomogram of Bentheimer, 2.2 μm/voxel. b A slice of 800\(^3\) 5-phase segmented tomogram of Bentheimer, 2.2 μm/voxel. The phases colour scheme: pore space—blue; clay—light blue; quartz—green; feldspar—brown; high-density minerals—red

2.2 Bentheimer Sandstone

Bentheimer sandstone exhibits a more complex geometry and is often used as benchmark rock (Arns et al. 2011; Mitchell et al. 2013; Peksa et al. 2015). While Bentheimer sandstone does not contain a large amount of clay (around 1.9 wt% Shikhov et al. 2017), the clay type is mainly kaolinite and the reason we chose it for this study. An X-ray micro-CT image was acquired at resolution of 2.2 μm/voxel. More details about the specific sample and image acquisition can be found in our previous work (Shikhov and Arns 2017). The simulation presented here is based on an \(800^3\) central subset of the original image data. The sample is segmented into five phases, namely pore space, clay region (mixture of pore space and kaolinite), quartz, feldspar, and high-density minerals utilising an active contour method (Sheppard et al. 2014). Slices through the tomogram and segmented image are shown in Fig. 2.

2.3 Kaolinite Model

Kaolinite is one of the most common clay mineral constituents of sedimentary rocks, especially in sandstones. It is difficult to capture the booklets’ morphology of kaolinite (Fig. 3a, b) in the micro-CT image due to resolution limitations. We employ a 3D reconstruction technique (Cui et al. 2021) based on SEM images to overcome these limitations. Kaolinite booklets are distributed following a Boolean process with random unit rotation angles (Cui et al. 2021). Individual kaolinite platelets as constituents of the booklets are approximated as hexagonal plates with thickness of about 60 nm and diameter of 2-3 μm. To mimic the morphology of booklet units, we generate stacked hexagonal platelets, separated by a small separation distance (about 30 nm). In this study, we choose a domain size of \(n_\mathrm{f}^3\) voxel, \(n_\mathrm{f}=400\), with resolution 22 nm, which is 1/100 of micro-CT image resolution, to discretise the kaolinite micro-structure (Fig. 3c, d). The surface area (\(S_v\)) of the model is 18.7 \(m^2\)/g in agreement with the literature (East 1950).

Fig. 3
figure 3

Kaolinite images and model. a SEM image of a kaolinite pocket, b SEM of a kaolinite booklet structure, c slices through the \(400^3\) kaolinite model with porosity of 0.4; voxel size is 22 nm, d 3D-reconstructed kaolinite model

2.4 Internal Magnetic Field

The magnetic field at position \({\mathbf {r}}\) consists of the uniform external magnetic field \({\mathbf {B}}_{0}\) and the internal magnetic field \({\mathbf {B}}_{i}\) induced by the magnetic susceptibility contrast:

$$\begin{aligned} {\mathbf {B}}({\mathbf {r}}) = {\mathbf {B}}_{0} + {\mathbf {B}}_{i}({\mathbf {r}}). \end{aligned}$$
(3)

The dipole approximation is employed to calculate the nonuniform internal magnetic field (e.g. Song 2003); SI unit will be utilised. The dipole moment of an isolated sphere of radius \(r_D\) as function of distance r to the centre of the sphere is given by

$$\begin{aligned} {\mathbf {B}}_\mathrm{dip}= \left\{ \begin{array}{ll} \frac{\mu _0}{4\pi }\left[ \frac{3\mathbf {(m \cdot r)r}}{r^{5}}-\frac{{\mathbf {m}}}{r^3} \right] &{} \quad \mathrm {for}\quad r \ge r_D \\ \frac{2}{3}\mu _0{{\mathbf {m}}} &{} \quad \mathrm {for}\quad r \le r_D \end{array}\right. , \end{aligned}$$
(4)

where \(\mu _0 = 4\pi \times 10^{-7}\,\mathrm {NA}^{-2}\) is the magnetic permeability of the vacuum. The magnetic dipole moment of a single cubic voxel is calculated as \({\mathbf {m}}\approx \mu _0\chi _v{\mathbf {B}}_0\) for \(\chi _v \ll 1\), which is a good approximation for typical rock constituent minerals (Hürlimann 1998). The susceptibility field of a larger body is generated by assigning each voxel an isotropic magnetic volume susceptibility \(\chi _v({\mathbf {r}})\) according to phase occupancy at location \({\mathbf {r}}\). The induced change in magnetic field is linear in susceptibility, and the internal magnetic field can be calculated as a sum of dipoles. Then the internal magnetic field is given by the convolution of dipole and susceptibility field:

$$\begin{aligned} {\mathbf {B}}_{i}=\int _{R^3}\chi _\mathrm{v}({{\mathbf {r}}}){\mathbf {B}}_\mathrm{dip}({\mathbf {r}}-{{\mathbf {r}}}')d{{\mathbf {r}}}'. \end{aligned}$$
(5)

The approach is validated by deriving the dipole profile of a sphere discretised on a Cartesian regular grid with spacing \(\epsilon = \frac{1}{15} r_D\) and comparison with the analytical solution. Figure 4 depicts cross sections of the resultant fields and profiles along the z-axis through the centre of the dipole generated by a solid sphere inclusion (\(\chi _\mathrm{s}=5.0 \times 10^{-6}\)) in water (\(\chi _w=-9 \times 10^{-6}\)) with applied field \({\mathbf {B}}_0=(0,0,B_0)\).

Fig. 4
figure 4

Dipole field of a discrete sphere and comparison to the analytical solution at \(f=2\) MHz. a comparison of the dipole profile (in central xy-plane perpendicular to z) calculated numerically using Eq. (5) with the analytical solution given by Eq. (4); (\(\chi _\mathrm{s}=5.0 \times 10^{-6}\), \(\chi _w=-9 \times 10^{-6}\)), b central xz cross section of the internal field

Consider now the case of the three-layer model, which consists—at the coarse scale (Fig. 1a)—of one unresolved and two resolved phases. While the resolved phases directly take the magnetic susceptibilities \(\chi _w\) and \(\chi _\mathrm{s}\), each unresolved coarse-scale voxel maps to \(n_\mathrm{s}^3\) fine-scale voxels, a sub-domain of the fine-scale model as discussed previously. Consequently, the coarse-scale susceptibility of the unresolved phase \(\chi _u\) must vary locally (unless \(n_\mathrm{s}^3\) is the same size as the fine-scale model), and those voxels are assigned the local volume-weighted susceptibility

$$\begin{aligned} \chi _\mathrm{u}=\frac{\sum V_i\chi _i}{\sum V_i},\quad i=w,c, \end{aligned}$$
(6)

where \(\chi _\mathrm{c}\) stands for the volume susceptibility of pure clay. Convolution of the coarse-resolution susceptibility field \(\chi _v({\mathbf {r}})\) with the dipole field, where \(\chi _v({\mathbf {r}})\) takes the values \(\chi _\mathrm{s}\), \(\chi _w\), or \(\chi _u({\mathbf {r}})\), gives the coarse-resolution internal magnetic field \({\mathbf {B}}_\mathrm{i,c}\). The convolution establishes a macroscopic internal field trend in the unresolved phase as well as near-field perturbations in the resolved phase in regions close to the fine-scale structure.

The fine-scale field \({\mathbf {B}}_\mathrm{i,f}\) is calculated analogous to \({\mathbf {B}}_\mathrm{i,c}\), using the constituent material susceptibilities \(\chi _w\) and \(\chi _\mathrm{c}\). From \({\mathbf {B}}_\mathrm{i,f}\) we derive the coarse-scale averaged trend model \({\mathbf {B}}_\mathrm{i,t}\) covering the fine-scale domain. For our periodic fine-scale structure with \(n_\mathrm{f}=400\) (Fig. 1b) and \(n_\mathrm{s}=50\) the periodic trend model has a size of \(n_\mathrm{t}^3\) voxel with \(n_\mathrm{t}=n_\mathrm{f}/n_\mathrm{s}=8\). In practice, we can map \({\mathbf {B}}_\mathrm{i,t}\) to high resolution by tri-linear interpolation. At places where no fine-scale structure exists because the coarse-scale voxel belongs to a fully resolved phase, the associated trend value and fine-scale field are set to zero. A high-resolution internal magnetic field \({\mathbf {B}}_\mathrm{i}\) covering the whole simulation domain of size \((n_\mathrm{c} n_\mathrm{s})^3\) voxel can now be calculated as follows:

$$\begin{aligned} {\mathbf {B}}_\mathrm{i}({\mathbf {r}}) = {\mathbf {B}}_\mathrm{i,c}({\mathbf {r}}) + {\mathbf {B}}_\mathrm{i,f}({\mathbf {r}})-{\mathbf {B}}_\mathrm{i,t}({\mathbf {r}}). \end{aligned}$$
(7)

We note that the field \({\mathbf {B}}_i\) is never stored in memory but constructed locally when required for either a random trajectory during NMR simulations, to visualise parts of the high-resolution internal magnetic field, or to extract statistics.

Given \({\mathbf {B}}_i\equiv (0,0,B_z)\), the corresponding internal magnetic field gradients at image resolution are given by

$$\begin{aligned} G_i =\sqrt{ \left( \frac{\partial B_{z}}{\partial x}\right) ^{2}+ \left( \frac{\partial B_{z}}{\partial y}\right) ^{2}+ \left( \frac{\partial B_{z}}{\partial z}\right) ^{2}} \end{aligned}$$
(8)

and are calculated using central differences. In Sect. 3, we report histograms and visualisations of the internal gradient fields for different phases with the further distinction of including (\(G_i \equiv G_\mathrm{in}\)) or excluding (\(G_i\equiv G_\mathrm{ex}\)) voxels which have different phase neighbours. Not including gradients for voxels with different phase neighbours is reasonable, since near-surface interactions are included in surface relaxivity.

The accuracy of the internal field representation can be further improved by utilising a higher-resolution mesh at the coarse scale. In Sect. 3, we make a distinction between results for a fully resolved calculation where a single fine-scale grid is utilised (possible only for the artificial model), and for coarse-grid refinement factors between 1 and 5. While a factor of 1 indicates that the initial resolution of the coarser grid is utilised, it represents nevertheless a result for the dual-scale approach.

2.5 NMR Response Simulation

The NMR \(T_2\) relaxation response is simulated by a lattice random walk algorithm on the segmented image (Arns et al. 2011). In this study, we extend the method to dual-scale samples. Initial positions of the random walkers are chosen uniform randomly across the pore space. Since the dual-scale approach assigns either solid (quartz or kaolinite) or pore space to each fine-scale voxel, we use a simple rejection method. The random walk is carried out on a regular cubic lattice with resolution \(\epsilon\). Consequently, the time step \(\tau _i\) of a step i is given by \(\tau _i = 6 D({\mathbf {r}})/\epsilon ^2\), where \(D({\mathbf {r}})\) is the local diffusion coefficient. Since here the structure is fully resolved and we consider a single fluid, \(D({\mathbf {r}})=D_0\), where \(D_0\) is the free-diffusion coefficient of water. Bulk and surface relaxation are implemented as signal weighting factors for each step, with \(S_i = S_b\,S_\mathrm{s}\). Here \(S_b=\exp (-\tau _i/T_\mathrm{2,b}\)) is the contribution by bulk relaxation, and \(S_\mathrm{s}=1-6\rho _2\tau _i/(\epsilon A)\) the contribution by surface relaxation. For steps within the same fluid \(S_\mathrm{s} = 1\). A is a correction factor of order 1, which accounts for the details of the random walk implementation (Bergman et al. 1995). For imaged structures, this value is typically close to \(A = 3/2\). For Bentheimer sandstone, the surface relaxivity \(\rho _2\) of the solid takes the value of quartz (\(\rho _{2q}\)), feldspar (\(\rho _{2f}\)), high-density minerals (\(\rho _{2h}\)), or kaolinite (\(\rho _{2k}\)).

While \(\rho _2({\mathbf {r}})\) describes the relaxation processes at the surface, the contribution of the internal field to dephasing is calculated explicitly. The evolution of the phase for a spin package in relation to the Larmor frequency at the starting position \(\omega _0 = \gamma B_z(0)\) can be written as follows (Carr and Purcell 1954):

$$\begin{aligned} \Delta \phi&= \phi -\phi _0, \end{aligned}$$
(9)
$$\begin{aligned}&= \sum _{j=1}^{N} \gamma \tau _j [B_z(t_j)-B_z(0)], \quad t_j=\sum _{i=1}^{j} \tau _i, \end{aligned}$$
(10)
$$\begin{aligned}&= \sum _{j=1}^{N} \gamma \tau _j [B_z({\mathbf {r}}_j)-B_z({\mathbf {r}}_0)], \end{aligned}$$
(11)

where \(\gamma\) is the gyromagnetic ratio. \({\mathbf {r}}_0\) and \({\mathbf {r}}_j\) note the location of the start of the random walk and at time \(t_j\). The Carr–Purcell–Meiboom–Gill (CPMG) sequence (Carr and Purcell 1954; Meiboom and Gill 1958) is implemented by switching the sign of \(\Delta \phi\) after \(t_\mathrm{E}/2\), where \(t_\mathrm{E}\) is the echo spacing, and every \(nt_\mathrm{E}\), \(n=1,2,\ldots N-1\) thereafter, where N is the total number of echoes recorded (at echo positions \(t_\mathrm{E}/2\) after the phase switch). The phase variation caused by this diffusive relaxation is then incorporated into the calculation of each walker’s magnetisation, which becomes

$$\begin{aligned} M_w(t_j) = M_w(0) \cos [\Delta \phi (t_j)]\prod S_i. \end{aligned}$$
(12)

Averaging over random walks and recording at times \(t=nt_\mathrm{E}\) (\(n=1,2,\ldots N\)) results in the magnetisation decay M(t). The relaxation time distribution is obtained by fitting a multi-exponential decay to M(t). The effective gradient of a particular random path of \(N_\mathrm{s}\) steps can be calculated as follows:

$$\begin{aligned} G_\mathrm{eff}(\tau _N) = \frac{1}{\tau _{N_\mathrm{s}}}\sum _{j=1}^{N_\mathrm{s}}\tau _{j}\frac{B_z({\mathbf {r}}_{j})-B({\mathbf {r}}_{0})}{\Vert {\mathbf {r}}_{j}-{\mathbf {r}}_{0}\Vert } \,, \end{aligned}$$
(13)

with \(\tau _{N_\mathrm{s}}\) = \(\sum _{i=1}^{N_\mathrm{s}} \tau _i\) and where the sum extends over all terms for which \({\mathbf {r}}_j \ne {\mathbf {r}}_0\) and may be considered most meaningful for \(2\tau _{N_\mathrm{s}}\le t_\mathrm{E}\). Thus, \(G_\mathrm{eff}\) refers to a diffusion-averaged (effective) gradient over part of a magnetisation decay. We later report results for \(G_\mathrm{eff}(\frac{1}{2}t_\mathrm{E})\), avoiding refocusing pulses.

2.6 NMR Experiments

Bentheimer sandstone core plugs of \(25.4\,\)mm diameter and \(50\,\)mm length were saturated with 3% NaCl brine and transverse relaxation responses measured with a 2 MHz Magritek Rock Core Analyzer. The standard CPMG pulse sequence was utilised with echo-train length of 10 seconds. Measurements were recorded for two echo times (\(t_\mathrm{E} = 200\,\upmu\)s and \(t_\mathrm{E}=640\,\upmu\)s) to study the significance of internal magnetic field gradients. The signal-to-noise ratio (SNR) was set to at least 200. The acquired magnetisation decays were treated as multi-exponential signals and inverted into \(T_2\) relaxation distributions. Like for the NMR simulations, the inversion of the NMR relaxation decay into the relaxation time distribution was carried out utilising a non-negative least square approach with amplitude regularisation term (Hansen 1992).

3 Results and Discussion

The introduced internal field calculation method and associated NMR response simulation approach are demonstrated for the three-layer model first. We illustrate the field distribution change in the transition region with different degree of discretisation and the accuracy of the dual-scale model. Applications to Bentheimer sandstone including a discussion of internal field distributions follow:

3.1 Three-Layer Model

To verify the dual-scale \(B_i\) calculation method, we calculate the internal magnetic field \(B_i\) at full resolution directly for the \(1000\times 1000\times 2000\) resolved micro-structure (Fig. 1c) and compare it to the dual-scale approach with coarse-grid refinement factors of 1, 2, and 5 in Figs. 5 and 6. For concreteness, we present the fields for the common specific field strength of \(B_0=470\) Gauss corresponding to a frequency of \(f=2\) MHz for \(^1\)H NMR. The respective susceptibilities are given in Table 1; we assign a relatively high but not implausible paramagnetic susceptibility for pure clay to highlight the effects from internal fields.

Table 1 Magnetic susceptibility (\(\chi\)) and surface relaxivity (\(\rho _2\)) of each phase in the three-layer model

The \(B_i\) cross sections (Fig. 5) illustrate the overall closeness of the dual-scale approach with the full-scale calculation as well as the further improvement of the solution for the dual-scale approach when using grid refinement for the coarse-scale model, particularly in the transition region as visible in the rectangular cut-outs of Fig. 5. A grid refinement factor of 5, resulting in a coarse grid of \(100\times 100\times 200\) voxel with \(n_\mathrm{s}=10\) leads to excellent agreement.

Fig. 5
figure 5

Illustration of the different length scales present for the internal fields and their recovery utilising periodic fine-scale structure and a dual-scale internal field calculation. The central cross sections of the 1000 \(\times\) 1000 \(\times\) 2000 voxel \(B_i\) field for the three-layer model at 60 nm/voxel resolution (see also Fig. 1c) for an applied field of 470 Gauss (\(f=2\,\)MHz) are shown. a Fully resolved micro-structure; [b-d] dual-scale approach for coarse-grid refinement factors of b one, c two, and d five. The black squares in the transition zone are enlarged on the right side

This is further illustrated in Fig. 6a for a line crossing the coarse-scale phase boundaries perpendicularly.

Fig. 6
figure 6

Comparison between the 1D \(B_i\) profiles for the fully resolved reference (blue solid line) and the dual-scale method with different discretisation factors for an applied field of 470 Gauss (\(f=2\,\)MHz): factor = 1 (red dashed line), factor = 2 (yellow dashed line), and factor = 5 (purple dashed line). The boundary between macro–micro-scale is shown as black-dotted line. a For a typical trajectory vertical to the coarse-scale boundary along z-direction. b The transition region where the largest differences occur in (a)

We immediately note the large fluctuations in field associated with the fine-scale micro-structure, which is fully recovered by all grid refinement factors, as is the far field. From Fig. 6b, magnifying one of the transition regions, we see that the spatial extend of the difference between full and dual-scale approach close to the transition region drops drastically with increasing grid refinement. We note that the resolution of the micro-structure is exactly the same for all grid refinement factors here due to the alignment of the coarse-scale phase distribution with the grid. The main effect of the grid refinement is that the coarse-scale trend model of the fine-scale micro-structure has a higher resolution, which impacts on the accuracy of the convolution calculating the coarse-scale field contribution \({\mathbf {B}}_\mathrm{i,c}\) to \({\mathbf {B}}_i\) (see Eq. 5).

Consider now the simulation of NMR \(T_2\) relaxation responses utilising the dual-scale internal field calculation approach for the three-layer model. NMR simulation parameters are shown in Table 1. Since internal field effects are stronger for higher field strength or larger echo spacing (Kleinberg and Horsfield 1990), we calculate \(T_2\) distributions for the following four conditions: (1) \(f=2\) MHz, \(t_\mathrm{E} = 200\,\upmu\)s; (2) \(f=2\) MHz, \(t_\mathrm{E} = 640\,\upmu\)s; (3) \(f=20\) MHz, \(t_\mathrm{E} = 200\,\upmu\)s; (4) \(f=20\) MHz, \(t_\mathrm{E} = 640\,\upmu\)s. Comparisons of the NMR \(T_2\) responses corresponding to the fully resolved model and previously discussed dual-scale internal field representations are depicted in Fig. 7. For all chosen field strength and echo time combinations, the position of the main relaxation time peak is preserved, while the sharpness of the main peak is affected by the internal field discretisation. However, there are significant differences in the width and position of the short relaxation time peak. We note that a coarse-grid refinement of a factor five leads in all cases to excellent agreement between the full-resolution solution and the dual-scale simulation approach. We further remark that the dual-scale approach mimics well the apparent “coupling” of the two main peaks for the case of \(f=20\) MHz and \(t_\mathrm{E}=640\,\upmu\)s. The discretisation level of the internal field (recall that the fine-grid resolution \(\epsilon\) remains constant) becomes increasingly important with increasing field strength and longer echo times.

Fig. 7
figure 7

NMR \(T_2\) relaxation distribution for the three-layer model comparing full-resolution calculations to the dual-scale simulation approach for different coarse-grid refinement factors. a \(f=2\) MHz, \(t_\mathrm{E} = 200\,\upmu\)s; b \(f=2\) MHz, \(t_\mathrm{E} = 640\,\upmu\)s; c \(f=20\) MHz, \(t_\mathrm{E} = 200\,\upmu\)s; d \(f=20\) MHz, \(t_\mathrm{E} = 640\,\upmu\)s

3.2 Bentheimer Sandstone

The segmented micro-CT image of Bentheimer (coarse resolution, \(\epsilon =2.2\,\upmu\)m) is combined with the kaolinite model (fine resolution, \(\epsilon =22\,\)nm) to construct the high-resolution internal field \(B_i\) as well as the high-resolution micro-structure. However, jagged edges along phase boundaries defined by cubic voxels are magnified when refining the coarse-resolution sample. To reduce these artefacts, we use a surface interpolation technique to obtain smoother solid surfaces and consider refinement factors of 1, 2, and 4 (Fig. 8). This results in coarse-grid sizes of \(800^3\), \(1600^3\) and \(3200^3,\) respectively. The fine-scale grid is constructed at a resolution of \(\epsilon =22\,\)nm with a fine-scale (logical) grid size of \(80,000^3\) and \(n_\mathrm{s}=100\), \(n_\mathrm{s}=50\), and \(n_\mathrm{s}=25\) for the refinement factors of 1, 2, and 4.

NMR \(T_2\) response simulations are performed for two different echo spacings, \(t_\mathrm{E}=200\,\upmu\)s and \(t_\mathrm{E}=640\,\upmu\)s in order to investigate the significance of internal magnetic field gradients. Here, we only consider a field strength of 470 Gauss, for which we have experimental data. In an earlier study (Cui et al. 2021), we determined the effective parameters for the unresolved clay phase of Bentheimer sandstone by matching simulated NMR responses to experimental data. In this study, the surface relaxivities utilised in simulations were slightly adjusted compared to the previous study (Cui et al. 2021) to account for the integration of the internal field and micro-structure model into a single dual-scale simulation. Table 2 lists the utilised material properties \(\chi\) and \(\rho _2\) for each phase. Susceptibilities were set to typical values and agree with the measured volume susceptibility of the crushed sample.

Fig. 8
figure 8

Cross section of a subsection of the Bentheimer sandstone image illustrating the interpolated surface for increasing coarse-grid refinement factors. a Original image with voxel size of 2.2 μm, b Grid refinement factor 2 (1.1 μm/voxel), c grid refinement factor 4 (0.55 μm/voxel)

Fig. 9
figure 9

Measured and simulated transverse magnetisation decays for Bentheimer sandstone. a \(f=2\) MHz, \(t_\mathrm{E} = 200\,\upmu\)s; b \(f=2\) MHz, \(t_\mathrm{E} = 640\,\upmu\)s

Fig. 10
figure 10

\(T_2\) relaxation time distributions corresponding to magnetisation decays shown in Fig. 9. a \(f=2\) MHz, \(t_\mathrm{E} = 200\,\upmu\)s; b \(f=2\) MHz, \(t_\mathrm{E} = 640\,\upmu\)s

Table 2 Magnetic susceptibility (\(\chi\)) and surface relaxivity (\(\rho _2\)) of each constituent phase of Bentheimer sandstone

Simulations are compared to experiment in Figs. 9 and 10 depicting magnetisation decay and \(T_2\) distribution, respectively. We immediately note the good match between experiment and simulation for all dual-scale simulations. Grid refinement by a factor of 2 or 4 improves the match further, affecting mainly the peak position of the shorter \(T_2\) peaks. This implies that the internal magnetic field gradient resolution of the transition region between coarse- and fine-scale structure again matters in agreement with the findings for the three-layer model. This is despite the relatively small clay fraction existent in Bentheimer sandstone (about 2% volume fraction is covered by clay regions in the segmented image) and only considering the low field response (\(f=2\,\)MHz).

Consider now the spatial internal magnetic field gradient distributions across the pore space. Gradients in the solid are not considered and set zero for visualisation. We further differentiate between including (\(G_\mathrm{in}({\mathbf {r}}\))) and excluding (\(G_\mathrm{ex}({\mathbf {r}}\))) voxels at the solid–fluid boundary.

Cross sections of the spatial fields \(G_\mathrm{in}({\mathbf {r}})\) and \(G_\mathrm{ex}({\mathbf {r}})\) for a \(15{,}000^2\) sub-slice of the \(80,000^3\) volume are given in Fig. 11 and the corresponding histograms for the full sample are depicted in Fig. 12.

Fig. 11
figure 11

Cross section of a \(15{,}000^3\) subset of the \(80{,}000^3\) internal magnetic gradient fields (\(G_\mathrm{in}({\mathbf {r}})\)) at 22 nm/voxel; non-fluid voxels are set to zero values. a \(G_\mathrm{in}\), solid–fluid gradients included, b \(G_\mathrm{ex}\), solid–fluid gradients excluded

Fig. 12
figure 12

Histograms of the internal magnetic field gradients of the water phase including (\(G_\mathrm{in}\)) and excluding (\(G_\mathrm{ex}\)) the water-fluid boundary for different coarse-grid refinement factors. a, b Factor = 1; c, d factor = 2; e, f factor = 4. Left Comparison of \(G_\mathrm{in}\) and \(G_\mathrm{ex}\). Right Normal distribution fits to \(G_\mathrm{ex}\) (see also Table 3)

The spatial visualisation of internal magnetic field gradients (Fig. 11) highlights the difference between including and excluding fluid–solid gradients in regions of high surface area, e.g. clay regions. For longer-range gradients in the macro-pore space caused by larger homogeneous regions, the fields \(G_\mathrm{in}({\mathbf {r}})\) and \(G_\mathrm{ex}({\mathbf {r}})\) are visually almost indistinguishable. The difference in the respective internal gradient distributions can be seen as sharper offset peaks in Fig. 12 (left). The position and magnitude of this offset changes with increasing grid refinement factor since the discontinuity between solid and fluid is better resolved for higher refinement, while the larger resultant gradients are distributed across fewer voxels. In the right column of Fig. 12, we compare the distribution of \(G_\mathrm{ex}\) to a normal distribution, leading to a good fit with fit parameters given in Table 3 and highlighting the limited shift in peak position.

Table 3 Normal distribution parameters corresponding to the fits of \(G_\mathrm{ex}\) in Fig. 12 for different grid refinement factors

Most of the values fall into the range of \(10^{-1}\) G/cm to \(10^2\) G/cm, the mean values of \(G_\mathrm{ex}\) are 1.09 G/cm (factor 1), 1.12 G/cm (factor 2), and 1.17 G/cm (factor 4), and maximum internal magnetic field gradients can reach \(10^5\) G/cm. We note that very high gradients in the fluid can be generated by the high-density paramagnetic inclusions (see red region in Fig. 11).

The histograms of magnetic field gradients explored by NMR simulations (\(G_\mathrm{eff}\)) are shown in Fig. 13 for grid refinement factors of 1 and 4, where Eq. (13) is evaluated for \(\tau _{N_\mathrm{s}}=\frac{1}{2}t_\mathrm{E} = 100\) μs.

Fig. 13
figure 13

Histograms of the diffusion-averaged effective gradients \(G_\mathrm{eff}\) according to Eq. (13) with \(\tau _{N_\mathrm{s}}=\frac{1}{2}t_\mathrm{E} = 100\,\upmu\)s for different coarse-grid refinement factors. a Factor = 1, b factor = 4. The solid lines are Gaussian distributions over \(\log (G_\mathrm{eff})\) with respective parameters reported in Table 4

The shapes of the distributions are well described by normal distributions (see Table 4). The means of the diffusion-averaged gradients are around 1.07 G/cm. With increasing coarse voxel refinement, the \(G_\mathrm{eff}\) distributions broaden. There is a relative rise of both tails in Fig. 13 compared to Fig. 12 and associated drop in peak value, which can be explained by diffusional averaging. The distributions are limited to the range of \(10^{-3}\) G/cm to \(10^{3}\) G/cm since actual histogram contributions outside this range are difficult to discern from zero. Random walks do experience no gradients when interacting with the surface, since near-surface effects are incorporated into the surface relaxivity. Similarly, the very high gradients possible in the fluid when close to a paramagnetic mineral affect a larger region when accounting for diffusional averaging.

It is worth noting that the common approach to account for the effect of susceptibility contrast-induced internal magnetic field gradients is based on an analysis of relaxation regimes proposed by Hürlimann et al. (1995). It has been demonstrated that for the two asymptotic regimes (“free-diffusion” or “short time” typically applicable for larger pores; and “motional averaging” for smaller pores), the corresponding analytical expressions (Mitchell et al. 2010; Mitchell and Chandrasekera 2014) could be developed to account for the additional relaxation due to spin dephasing in magnetic field gradients. This enables standard petrophysical interpretations of the transverse relaxation responses in the fast diffusion limit, e.g. estimating pore size distributions, despite the presence of significant internal magnetic field inhomogeneities. For instance, it was applied to great benefit in the analysis of capillary trapping in sandstones subjected to partial desaturation by nitrogen and carbon dioxide (Connolly et al. 2017, 2019). However, the analytical approach requires the identification of a “mean” relaxation regime. Furthermore, the expressions so far were developed for two out of three relaxation regimes, being invalid for frequently reported intermediate regimes and coexisting regime mixtures. On the contrary, the dual-scale approach presented here does not require any assumption about governing relaxation regimes, offering potentially a tool to study associated problems. In particular, the coexistence of different regimes and significance of intermediate regimes in certain conditions even for diamagnetic on average sandstone were demonstrated in Cui et al. (2021).

Table 4 Normal distribution parameters corresponding to the fits of \(G_\mathrm{eff}\) in Fig. 13 for different grid refinement factors

4 Conclusions

This study introduced an effective NMR relaxation response modelling approach incorporating resolved internal magnetic fields enabling numerical simulations spanning five orders of magnitude in length scales on grids logically containing of the order of \(10^{15}\) cells. The internal magnetic fields were calculated via the dipole approximation in a dual-scale approach with trend model. The approach was validated against a model micro-structure and demonstrated for the Bentheimer sandstone as common benchmark rock. For the latter, NMR \(T_2\) responses of a \((1.76\,\mathrm {mm})^3\) domain were derived with grid resolution of 22 nm based on micro-CT images at 2.2 μm resolution and a clay micro-structure resolved at 22 nm resolution. Comparison of \(T_2\) distributions between simulation and experiment show excellent agreement.

A significant result is the influence of tri-linear interpolation on the position of shorter relaxation time modes. This is associated with reduced errors in the transition regions between macro- and micro-scale regions, where near-field effects become important. We note that the change in peak position cannot be explained by a change in surface relaxivity of the kaolinite model in practice, since the underlying cause is the transition region. This has significant implications for modelling more complex rock samples where clay fractions are larger and paramagnetic impurities more frequent.

Finally, we comment on the observed fine-scale internal field gradient distributions. Spatially we observe that larger gradients are associated with surfaces in an irregular way—with higher gradients at the solid–fluid boundary, which depending on the pore shape may extend more or less into the fluid. The diffusion-averaged effective gradients are well described by log-normal distributions.