1 Introduction

Foams constitute an attractive method to enhance oil recovery or subsurface fluid remediation due to their high viscosity, high potential for conformance control, low cost and low environmental impact.

To implement a large-scale foam operation, prior validation and injection optimization must be performed using reservoir modeling software. While some attempts have been made to integrate microstructural parameters such as average pore size into upscaled foam models (Ettinger and Radke 1992; Gassara et al. 2017), a great deal of foam behavior laws are derived from Darcy-scale laboratory experiments and require significant a posteriori parameter fitting to match observations. The numerical load would be greatly alleviated by the use, or at least constraint of, fitting parameters with a value obtained through a purely structural characterization of the porous medium.

Recent works on 2D micromodels (Géraud et al. 2016; Yeates et al. 2019) have shown that a range of foam behaviors exist that are highly likely to contribute to Darcy-scale flow properties. Indeed, trapped foams and high-velocity preferential paths have been repeatedly observed, displaying ranges of velocity much lower and higher, respectively, than those seen in Newtonian flow. Furthermore, it has been shown that high-velocity zones are accessed primarily by larger bubbles in a heterogeneous bubble distribution flow, containing the majority of flow in the model. The interest of characterizing the specific paths that these bubbles will take becomes obvious.

Describing local foam flow in porous media based on purely local microstructural aspects (e.g., whether individual pore or throat sizes affect the amount of flow they contain) is challenging as observations of large-scale phenomena such as preferential paths and trapped foam zones may necessitate similarly large-scale structural descriptors. Consequently, here we attempt a novel characterization approach, by integrating the notion of overall path (spanning inlet to outlet of the model) and ranking paths according to a numerical value derived from the components inside it.

Modeling porous media with graph models has been recently given new life due to increased measurement and computational capacity. Graph-based models have been used to find least resistance paths and predict breakthrough points successfully in heterogeneous porous media (Rizzo et al. 2017). Graph models have also found use in discrete fracture modeling to rapidly characterize, query, and interrogate fracture network connectivity (Viswanathan et al. 2018).

The path-proposing is done via an algorithm using a graph representation of the porous network. Nodes of the graph represent the pores, while the graph edge weights represent throats. This gives a labeled graph of connected objects, with edge weights given by a throat property of our choosing. The sum of edge weights of a given path between the source node and the target node \(p\left( {s \to t} \right)\), otherwise known as the path length, is then given by \(\mathop \sum \nolimits_{{i,j \in p\left( {s \to t} \right)}} w\left( {i,j} \right)\). The shortest path is then path that minimizes this sum. Many algorithmic solutions exist to this problem including Dijkstra’s shortest path algorithm (Dijkstra 1959) An extension of this problem is interested with the first k paths, ranked by increasing value of path length (k-shortest paths) and can be solved with Yen’s algorithm for example (Yen 1970).When applied to our porous network graph, solutions to the k-shortest paths problem often are small variants of the best path, with one or two elements of the paths changed, even for large values of k (> 5000). When combined with our observations of preferential path flow in the micromodels, in which a multitude of high-flow paths contain some degree of overlap, we are motivated to assimilate our problem to an extension of the k-shortest paths problem, the k-Shortest Paths with Limited Overlap (k-SPwLO). The path solutions to this problem are the k-shortest paths respecting a condition of maximal path overlap between one another. We make use of the recently published one-pass algorithm, a solution algorithm that efficiently proposes candidate paths with user-chosen maximal path overlap (Chondrogiannis et al. 2017). Experimentally observed flow maps serve as the basis for the comparison of proposed paths. Experimental images showing long preferential paths of flow in a fully characterized micromodel are analyzed according to a well-defined statistical workflow to quantify active and dead zones in the network. Paths are then proposed using a graph representation of the porous model. The path fit to experimental data is evaluated by counting the proportion of elements in the proposed paths that are active in experimental flow map, corresponding to a match value.

2 Materials and Methods

2.1 Foam Data Acquisition Procedure and Injection Conditions

We create velocity heatmaps by averaging local tracked bubble velocities over multiple sets of 200 high-frequency images of foam flow in a 2D glass micromodel at controlled experimental conditions. The bubble tracks were obtained with an ImageJ plugin (Nussbaum-Krammer et al. 2015) that uses a simple closest neighbour algorithm applied to sets of high-frequency binary images of flowing bubbles. We provide a diagram of the experimental setup in Fig. 1.

Fig. 1
figure 1

Experimental setup

Fixed injection rates and gas fractions are injected into a foaming device upstream of the micromodel then connected in series to a biphasic reservoir, then to the model. The purpose of the biphasic reservoir is described further down. The foaming device is a sandpack of 80 µm diameter silicon carbide grains. Pressure gradient over the model is measured, and images are acquired at steady state (constant pressure gradient over the model). Numerous pressure sensors are placed around the flow circuit for a rapid diagnostic of blockages or other experimental issues. Further details regarding the experimental data acquisition setup and procedure as well as the complete image processing procedure leading to bubble segmentation and bubble track creation are given in Yeates et al. (2019). Injections were performed with purified N2 gas. The surfactant solution was composed of deionized water with 30 g/L of NaCl and an alpha olefin sulfonate surfactant at 10 times the critical micelle concentration, supplemented with a betaine-based foam booster.

Two experiments are described in this study. We compare injections of same gas fraction but different injection rates. The two injections were performed in succession. Exp. 1 was at a gas fraction of 79% at an injection rate of 2.53 × 10–2 cm3/min. For Exp. 2, as lower injection rates were not obtainable with the gas flow controller, a biphasic reservoir was used, essentially a long coiled up tube, to enclose the gas and surfactant solution at the chosen gas fraction. The mixture was then pushed solely using the liquid pump, reaching much lower injection rates into the foaming device. The injection rate for Exp. 2 was 8.9 × 10–3 cm3/min. Despite an injection rate reduction of 65%, the measured pressure drop over the model decreased from 275 ± 4 mBar for the high-rate experiment to 189 ± 2 mBar for the low-rate experiment, corresponding to a 32% decrease in pressure gradient, showing a highly shear-thinning apparent viscosity profile coherent with other foam studies (Alvarez et al. 2001). Exp. 1 images are acquired at a frequency of 605 frames/second, while lower velocity Exp. 2 images are acquired at 302 frames/second. At these frequencies bubble displacement between frames is sufficiently large to allow a substantial total acquisition distance but small enough to be tracked correctly.

As previously shown (Géraud et al. 2016; Yeates et al. 2019), the majority of flow in a polydisperse foam injection into a heterogeneous medium is carried by the largest bubbles, in a series of preferential paths. Furthermore these paths show higher relative flow intensity than for Newtonian fluids (Yeates et al. 2019). Correct characterization and modeling of the flow within these preferential paths will constitute a significant part of macroscopic foam flow modeling due to the large contribution of flow solely in these paths. For the experimental comparison, we therefore only use the flow maps created from the flow of the right-hand side of the bubble size distributions. Limiting the analysis to flow maps created from larger bubble flow focuses the modeling effort on preferential paths. Indeed, as the larger bubbles travel almost uniquely in preferential paths, their flow maps present the largest velocity contrast between the preferential paths and the other zones, devoid of large bubble flow.

We show in Fig. 2 the bubble size spatial probability distributions with sample images for each experiment and highlight the bubbles contributing to the flow maps used in this study. The spatial probability distributions are weighted histograms of bubble frequency histograms, with each histogram frequency peak weighted by the average bubble size for the bin (taken as bin center value). Such distributions give a more accurate depiction of the bubble size distribution inside the medium. The bubble size distributions are established by counting bubbles measured in the entire model. The bubble sizes contributing to the flow maps in this study are highlighted in red.

Fig. 2
figure 2

Bubble frequency histograms and bubble sizes contributing to flowmaps in each case highlighted in red. A small part of a sample image is shown next to either distribution. Blue dots indicate the presence of solid grains. We observe that the lower minimum of considered bubble sizes is approximately equivalent in each experiment, but the experiment 2 distribution shows a larger right-hand tail. It is to be noted that although the higher bound shown here was cut for visibility, larger bubbles were observed (especially in experiment 2) and took up non-negligible areas of the porous volume

2.2 Micromodel Structure and Decomposition

The 2D micromodel used has previously been studied elsewhere (Yeates et al. 2019). It is a 69.7% porosity glass micromodel with a wet-etched depth of 40 µm. A flow spreading system consisting of successive symmetrical channel bifurcations is found on either side of the network. This system divides a single upstream channel into 8 channels evenly distributed across the model entrance. The permeability of the total model with the flow spreading system before and after the model is 4.7 Darcy. The network was designed from a slice of 3D Bentheimer rock image, obtained from X-ray tomography. This slice was then further modified to enable sufficient 2D connectivity. A binarized version of the model was decomposed into pores and throats using an adjustable watershed algorithm (Soille et al. 1990) with the tunable sensitivity parameter set to 2. The model decomposition gives a total of 3700 pores and 6284 throats. The throat radii show a unimodal distribution with sharp peak at 51 µm. A network extraction algorithm was developed and applied to the 2D decomposed porous medium to find neighborhood properties of each pore. Finally, a representative graph was created. We show the different steps of the graph extraction process in Fig. 3.

Fig. 3
figure 3

Image and network analysis process. Porous area is shown in black. Throats are shown in light green. Extracted graph nodes are shown as red circles with edges represented as gray tubes joining them. The displayed graph is superimposed on the initial network for clarity

Note here that this graph simply displays graph topology by positioning nodes on the centers of mass of the pores and edge lengths or widths are not representative of edge weights.

Due to the quantized pixel nature of the model image, and the design of the watershed algorithm, some of the throats were found to not be perfectly straight and resemble S-shapes. As we make substantial use of the throat size in our study, use of the throat length as given by the watershed interfaces (shown in green) was inadequate. Instead, we use the maximal Feret diameter of the watersheds, as measured with ImageJ analyze particles tool, to access the exact size of the throats. Half of the measured Feret diameter was then approximated to represent the throat radius, referred to in the rest of the article simply as throat size. We show the model and associated graph in their entirety in Appendix 1 with the added artificial inlet and outlet pores (described below) visible at each extremity.

2.3 Path-Proposing Algorithm

We make us of the recently published one-pass graph algorithm (Chondrogiannis et al. 2017), solution to the k-shortest paths with limited overlap problem (k-sPwLO), to provide a series of paths that resemble the preferential paths visible in our experiments.

In our context, to capture the specificity of the flow in the porous network, edge weights are represented by a function of the throat properties, initially the throat radii, located at the distance map minima of the porous network, that will contribute the most to variations in hydraulic conductivity. In this sense, we try to minimize the overall sum of edge weights given by throat radii, rather than distance. Note, that this problem is distinct from the shortest bottleneck, or widest path problem, which would yield the shortest source-to-target path with the largest minimum throat size.

Naturally, as we desire to find a path that spans the entirety of the model, we construct an artificial source node and target node representing the model inlet and outlet, sharing connections with all the nodes at each extremity of the model, as to not restrict the path-proposing procedure to a specific point in either side of the model. The model therefore assumes that the flow is uniform over time across the entrance of the model, which we ensure with the flow spreading system and the averaging of multiple acquisition datasets through time.

As we want the largest throats to contribute the less to the overall sum, and hence be chosen in the paths, we use functions of the inverse of the throat size for edge weights. However, it is unclear which (positive) exponent \(\alpha\) should be used to include this throat size as an edge weight. The shortest path will then minimize the function \(\mathop \sum \nolimits_{{i,j \in p\left( {s \to t} \right)}} \left( {\frac{1}{{r\left( {i,j} \right)}}} \right)^{\alpha }\) in which \(r\left( {i,j} \right)\) is the radius of the throat connecting pores \(i\) to \(j\), and \(s\) and \(t\) represent the source or target nodes.

While individual throats radii will preserve their rank if they are raised to a power \(\alpha = 1\) or \(\alpha = 2\), the rank of a sum of throat radii forming a path will not be conserved for each exponent. The larger the value of \(\alpha\), the more a small, difficult to pass throat will contribute towards the sum. The proposed paths will then avoid smaller throats, at the price of increasing the overall path length and tortuosity. Inversely, a lower value of \(\alpha\) will render the algorithm less sensitive to the actual value of throat size, as the number of throats in the path becomes more significant. At the extreme of \(\alpha = 0\), all weights are the same and we retrieve the path with the least throats. We give an example of different proposed paths for different values of \(\alpha\) in Fig. 4. We see that different throat radii exponents produce different shortest paths when integrated as edge weights.

Fig. 4
figure 4

Motivational example. Optimal paths for different values of \({\upalpha }\) in a schematic example. Porous space is shown in white between gray solid obstacles. Throats are shown in blue. Multiple paths link the sources and destination pores, shown in red. Throat size values are given by white numbers, next to the relevant throats. For \({\upalpha } = 0\) the path shown by full black line is optimal, for \(\alpha = 1\) the path shown by the thinly dashed path is optimal, for \(\alpha = 2\) the path shown by thickly dashed line is optimal

The shortest paths connecting the two nodes marked by red dots are shown for values of \(\alpha = 0,1,2\). For \(\alpha = 0\), all the weights are equal to 1 and the optimal path is simply the one with the less throats, shown as a full black line passing a throat of size 2. For \(\alpha = 1\), the thinly dashed path is chosen with two throats of size value 5. Indeed, the sum edge of weights given by \(\mathop \sum \nolimits_{{i,j \in p\left( {s \to t} \right)}} \left( {\frac{1}{{r\left( {i,j} \right)}}} \right)\) is the smallest for the thinly dashed path, such as \(\frac{1}{5} + \frac{1}{5} < { }\frac{1}{7} + { }\frac{1}{7} + { }\frac{1}{7} < \frac{1}{2}\) or \(0.2 < 0.428 < 0.5\). For \(\alpha = 2\), the thickly dashed path is chosen, composed of three throats of size 7. Indeed, the sum edge of weights given by \(\mathop \sum \nolimits_{{i,j \in p\left( {s \to t} \right)}} \left( {\frac{1}{{r\left( {i,j} \right)}}} \right)^{2}\) is smallest for the thickly dashed path, such as \(\frac{3}{{7^{2} }} < \frac{2}{{5^{2} }} < \frac{1}{{2^{2} }}\) or \(0.061 < 0.08 < 0.25\), despite being the path with the most throats.

2.4 Experimental Path Matchs

To evaluate a candidate path, we make use of a system of classification of active/inactive pores of the experimental data, as previously described in Yeates et al. (2019), Appendix 2. Average pore velocity intensity values are compared to values for pores of similar sizes (split between 19 equidistant intervals of area). If a threshold is passed, then the pore is considered active. The threshold values are chosen as fractions of the average pore intensities for each of the pore sizes categories. In this way, we extract ourselves from making any assumptions on the way velocity intensity is spread out over the different pore sizes and simply recalculate a threshold value for each size category. We define two classification thresholds: half average (low threshold) and the average intensity (high threshold). The pores contained the proposed paths can then be tallied up and the proportion of active pores within the proposed path (situated between 0–1, i.e., the fraction of active pores within the candidate path) assesses quantitatively the match of the candidate path to the preferential path in the experimental image. This binary classification (i.e. active or inactive) method is preferred over a more direct method of taking average pixel intensity values of the whole path. Due to the high spread of average pore intensities, taking the average pixel value over the path may create the illusion of a satisfactory fit when only a restricted number of high-intensity pores are contributing, and the rest of the candidate path does not contain any flow.

In Fig. 5, we show the active/inactive pores for two different threshold values overlaid on the velocity map for both experiments studied. The active pores are shown in green and the inactive pores in red. We notice the path-like nature of the active pores, and the low-flow inactive pores, in red, situated in between these paths. In these experimental conditions, we observe an important number of active paths and flow distributed equally throughout all sections of the model.

Fig. 5
figure 5

Velocity maps with overlaid active/inactive pore classification. Measured velocity in the pores is shown as dark shade in the model. Each pore is colored and overlaid according to its activity. Active pores are shown in green while inactive pores are red. White areas of the image correspond to solid grains. Flow is from left to right

In Table 1, we display the proportion of active pores for each experiment and each threshold value, serving as a baseline for assessing the proposed paths. We note that the ratio of low to high threshold pores is equal for both experiments, demonstrating the equivalence between the two thresholds for both experiments.

Table 1 Proportion of active pores for each experiment and threshold value

3 Results

In the results section, we proceed by first giving statistics of the proposed paths in terms of geometrical and network properties only. Secondly, we show the match with experimental data of the proposed paths for the 1-parameter model. This sequence is then repeated for the 2-parameter model.

3.1 1-Parameter Model—Description and Path Properties

To propose a series of realistic paths, the parameters we can input into the path-proposing algorithm are: the graph, which includes a function of throat sizes as edge weights; the number of desired paths, k; and finally the maximal allowed overlap value \(\theta\), given between 0 (no overlap) and 1 (paths can fully overlap). We share here some statistics of output paths for different functions of throat sizes, with varying maximal path overlap value. The number of output paths k, is maintained at a fixed value of 7. The throat size exponent spans 31 values, varying from 0 to a large value of 6, even if physically unrealistic, for the sake of assessing limiting behavior. The maximal overlap is restricted to 3 values for comparison: 0, 0.1, 0.5. The \(\theta = 0\) case describes a situation in which no pore can be shared between any of the proposed paths, effectively slicing the model in two separate parts for each new path found. The \(\theta = 0.1\) case allows limited overlap, in which some short passages that could be structurally attractive for flow, can be proposed in all the paths output by the algorithm. The \(\theta = 0.5\) case represents a higher boundary, in which the number of shared pores between proposed paths can be up to half of the pores in either of the paths. See Chondrogiannis et al. (2017) for a detailed description of \(\theta\) calculation.

It is to be noted that for a small number of cases, when calculation time was too long for 7 paths, the algorithm was restarted, aiming for 6 paths, until it reached a solution in a practical amount of time (here 2000 s). Figure 6 shows some characteristics of the proposed paths for each overlap value and throat size exponent. Statistics for each point are calculated as the average over all the 7 paths output by the algorithm.

Fig. 6
figure 6

Characteristics of proposed paths for different throat size exponent values

We observe that as the throat size exponent increases, the output path lengths increase, as described previously. We observe that for \(\alpha = 0\), the average throat size for the paths is close to the average model throat size, providing confirmation that these paths are independent of throat size. However, the average throat size seems to reach a plateau around a value of approximately \(\alpha = 2.5\). This is understood as follows: for higher exponent values, the algorithm outputs paths that will avoid smaller and smaller throats at the expense of creating longer paths. However, there exists a point in which the smaller, avoided throat contributes a negligible amount to the simple average, as the number of throats contributing to the average is ever increasing.

Another observation is the difference between the characteristics of the \(\theta = 0\) paths on one side, and the \(\theta = 0.1\) and \(\theta = 0.5\) paths on the other side. The number of throats for the \(\theta = 0\) paths at the lowest throat size exponent value is larger and the value of the plateau of the throat size average is smaller. This translates the fact that each proposed path for the \(\theta = 0\) output effectively separates the model into two parts and makes it harder to find short paths with small throat sizes in the created sections of the model.

3.2 Experimental Match: 1-Parameter Model

We now perform a scan over the proposed paths for each setting and attempt to retrieve the best fit to the experimental data. We display in Fig. 7 the active pore match values for both threshold values, for different values of \(\theta\) and throat size exponent for both experiments. Each exponent and \(\theta\) pair form an algorithm input setting from which all the pores in all the proposed paths are noted and compared against a dictionary of active pores for both thresholds and both experiments. One input setting is then evaluated in four different ways, as shown by the four distinct plots in Fig. 7. The match value is the ratio of active pores to all pores in the proposed paths for the given threshold value and is referred to interchangeably as a match percentage.

Fig. 7
figure 7

Path matches for high and low threshold values of both experiments for different overlap and throat size exponent settings

The observed match is globally very high. For Exp. 1, most input settings propose paths in which 90% of pores are active as defined by the low threshold and 65% as defined by the high threshold. In either threshold, such ratios are more than 25% above the model average (see Table 1). For Exp. 2, in most input settings 80% of the proposed pores are active as defined by the low threshold and 60% as defined by the high threshold. The best fits occur for throat size exponents between 1 and 3 for the low threshold pores and 1–2 for the high threshold pores. This still gives a large degree of uncertainty as to how to best describe foam preferential paths in a characterized porous medium. The match values for \(\theta = 0.1, 0.5\) are not significantly larger than the values obtained for \(\theta = 0\). The match values for the high threshold for \(\theta = 0.5\) however are significantly lower than the other values. For this reason, and for the reasons we previously mentioned issues occurring with the \(\theta = 0\) value, we shall use the value of \(\theta = 0.1\) for the rest of the analysis.

We first give some pore-scale images showing relatively satisfying results. In Fig. 8, we give three images of an overlay of the proposed paths calculated using \(\alpha = 2\), \(\theta = 0.1\), displayed on the flow data of Exp. 2. The active pores represented are from the high threshold activity classification. This is the image with the lowest number of active pores, so statistically hardest to match.

Fig. 8
figure 8

Examples of successful matches between model and experiment, flow is from left to right. Experimental velocity fields are shown in grayscale inside the pores (darker is higher velocity). The grains are in solid gray. The color code is the following: green pores are active in both experimental and proposed cases, red pores are proposed active but experimentally are inactive, purple pores are not proposed active but are experimentally active

We observe long sections of high intensity flow are correctly identified by the proposed paths (green overlay). The top image of Fig. 8 shows a chain of 30 pores in which 28 are correctly identified by a proposed path. The bottom right image of Fig. 8 shows a chain of pores in which 20 out of 21 are colored in green.

While these results are very encouraging, we still note some parts of the proposed paths that do not adhere well to the flow reality. One telling example is shown in the bottom right image of Fig. 8 in which the proposed path takes makes a sharp curve around an obstacle, while the flow takes a straighter alternative path. Here, we can start to see the limitations of using a simplified model of the network that only takes the throat size into account and disregards any notion of path distance or tortuosity. In Fig. 9, we give three more examples of proposed path failures occurring for the paths calculated using a throat size exponent of 2, \(\theta = 0.1\) and displayed over the flow data of Exp. 1. The active pores represented are from the low threshold activity classification. This is the image showing the largest number of active pores, in which a failed path match should statistically happen less often.

Fig. 9
figure 9

Examples of path match failure. Flow is from left to right. See Fig. 8 for color code

It is worth noting that although many purple pores are visible, these do not describe a model failure as only a limited number of paths were calculated, and it is possible that a larger number of output paths could have included these. In the three cases shown here, we identify a common error: proposed paths go off the experimental track by moving into pores that are perpendicular to the flow direction and are not visited by the foam, despite not showing significantly small throat entrances.

3.3 2-Parameter Model—Description and Path Properties

We make an addition to the 1-parameter model to offset the proposed path failures occurring for pores branching outwards to the flow direction. We introduce a second local parameter in the description of the flow, the angle of the pore centers neighboring a throat in relation to the flow direction: noted \(\mu\). The angle is formed by the vector the connecting the two pores (oriented in the flow direction) and direction of pressure gradient. An example of the angle definition is shown in Fig. 10.

Fig. 10
figure 10

Simple example of \(\mu\). Two pores in black are connected by their centers (red dots) and projected onto the axis of flow, here shown as left to right

The value of \(\mu\) has therefore a maximal value of 90° when two neighboring pores are perpendicular with respect to flow direction, and a minimal value of 0° for pores aligned in parallel to flow. Inclusion of the \(\mu\) parameter in the edge weight of the throat connecting pores \(i\) to \(j\) in the graph, as noted by \(w\left( {i,j} \right)\), is done by taking a function the cosine of \(\mu\) and multiplying it by the throat size term. A similar function to the throat size term is used, with a simple exponent \(\beta\) that is left free to vary. We then write the edge weight function, with both throat size and µ angle terms as:

$$w\left( {i,j} \right) = \left( {\frac{1}{{r\left( {i,j} \right)}}} \right)^{\alpha } \left( {\frac{1}{{\cos \left( {\mu \left( {i,j} \right)} \right)}}} \right)^{\beta }$$

For simplicity, the allowed values of the \(\beta\) parameter vary in the same way as the \(\alpha\) parameter, in 31 equally spaced values from 0 to 6. We show statistics associated with the proposed paths in the 2D parameter space in Fig. 11.

Fig. 11
figure 11

Statistics of paths proposed in a 2D parameter space

Interesting 2-dimensional patterns appear. We note that the path lengths (Fig. 11, left) are of the same order as for the 1-parameter model. While the path lengths heatmap seems to have a global minimum in the bottom left corner for \(\left( {\alpha ,\beta } \right) = \left( {0,0} \right)\), it has two local maxima in the bottom right and top right corners for values of \(\left( {\alpha ,\beta } \right) = \left( {6,0} \right)\) and \(\left( {\alpha ,\beta } \right) = \left( {6,6} \right)\), respectively. In accordance with the explanation of the 1-parameter model results, path length increases as the algorithm is fed more and more widely spread edge weight values in the graph (i.e., some throat weights become so large that it chooses to take a series of smaller values with a lesser contribution to the overall path sum). The \(\left( {\alpha ,\beta } \right) = \left( {6,0} \right)\) path length maximum is then understood as occurring because of a widely spread throat size term only, with no contribution from the angle term, explaining the average throat size rise in this zone. The \(\left( {\alpha ,\beta } \right) = \left( {0,6} \right)\) path length maximum is then understood likewise, where a longer path is chosen on the basis on avoiding unfavorable pore-to-pore angles. The average throat size in \(\left( {\alpha ,\beta } \right) = \left( {0,6} \right)\) (Fig. 11, center) and angle cosine in \(\left( {\alpha ,\beta } \right) = \left( {6,0} \right)\) (Fig. 11, right) confirm this observation. For these parameter values, they respectively take the model average throat size and the model average cosine value (for the full model: \(\overline{r} = 51\;\upmu {\text{m}}\); \(\overline{\cos \left( \mu \right)} = 0.63)\). What is not easily understood is the decrease in path length across the \(\alpha = 6\) parameter series, before the rise to the \(\left( {\alpha ,\beta } \right) = \left( {6,6} \right)\) maximum. As the parameters are more and more spread out with the increasing exponents \(\alpha\) or \(\beta\), the path lengths along the \(\alpha = 6\) parameter series should therefore monotonically rise to the \(\left( {\alpha ,\beta } \right) = \left( {6,6} \right)\) maximum. This discrepancy reveals either a hidden relationship between the two supposed independent parameters \(r\) and \(\cos \left( \mu \right)\), or otherwise an oversight on the authors behalf in the way the weight spread is interpreted to contribute to path length, both these aspects are covered in detail in the final section of the discussion.

3.4 Experimental Match: 2-Parameter Model

We show in Fig. 12 colormaps of experiment match values for each edge weight parameter combination for both experiments and both thresholds.

Fig. 12
figure 12

Path matches for 2-parameter model combinations for both experiments and thresholds

We observe that many parameter combinations match the experimental paths well. Low values of β give the best matches. In fact, for Exp. 2, the best matches are observed for \(\beta = 0\), i.e., the one-parameter model. For Exp. 1, while a large zone of good experimental matches is observed for the low intensity threshold for values of \(\alpha\)\(< 3{ }\) and values of \(\beta < 1.6\), the best values for the high intensity threshold are observed for \(\left( {\alpha ,\beta } \right) = \left( {1.8 - 2.4 , 0.3 - 0.9} \right)\), i.e., for a non-zero \(\beta\), with the angle parameter adding capacity to match the data more closely. The best fit for Exp. 1, high threshold (Fig. 12, bottom left) using a 1-parameter model is obtained at \(\left( {\alpha ,\beta } \right) = \left( {1 , 0} \right)\) obtaining a match score of 0.749, while the best fit using a 2-parameter model: \(\left( {\alpha ,\beta } \right) = \left( {2.2 , 0.6} \right)\), achieves 0.7573, a small but non-negligible 1.1% increase.

To interpret this result, we consider the varying flow rates in both experiments. Indeed, at lower flow rates, we observe that preferential paths are less chosen on the basis of immediate path straightness or pore-to-pore alignment with flow, as described by the angle parameter, and instead are mainly chosen as tradeoffs between path shortness and throat size, as described by the one-parameter model. For the faster flow experiment, we observe a greater overall number of accessed paths, which in turn creates a more parallel flow. In this way, we observe fewer paths branching off perpendicularly to the flow direction.

The colored image showing the results from Exp. 1, high threshold best fit, \(\left( {\alpha ,\beta } \right) = \left( {2.2 , 0.6} \right)\), shown by a small marker in Fig. 12, is shown in its entirety in Appendix 2. We observe large sections of the flow-carrying paths are correctly matched by the algorithm. While incorrectly proposed pores do appear (colored in red), upon inspection they mainly still contain flow, differing with the examples given in Fig. 9. Furthermore, as active/inactive pores are determined on a local basis and not included in a path, it is not even guaranteed that a model-spanning path of active pores will truly exist. Rather, the path should be evaluated in its capacity to capture the largest proportion of active pores in the model.

4 Discussion

4.1 Path-Based Flow Characterization Viability

Here, we stress the effectiveness of the path-based formalism by showing the results for the best model fit for Exp. 1, \(\left( {\alpha ,\beta } \right) = \left( {2.2 , 0.6} \right)\). In Fig. 13, we display how different models successfully capture high-flow pores, even with the simplest model explored \(\left( {\alpha ,\beta } \right) = \left( {0 , 0} \right)\), in which no structural parameters are included into the edge weights, and the paths are simply the shortest (in graph representation). However, it should be noted that the \(\left( {\alpha ,\beta } \right) = \left( {0 , 0} \right)\) model does implicitly take the porous structure into account as the decomposition into pores and throats itself was performed using a distance-map-based watershed.

Fig. 13
figure 13

Comparison of path prediction performance for experiment 1 for the best fit model, the shortest number of pores model, and the shortest distance model. N represents a cut-off number of the highest average velocity pores

A comparison is also made to a model proposing paths that minimize physical path distance. The paths minimizing the physical distance were obtained by taking as throat weight the sum of the distance between the pore center and throat center for both pores associated with the throat, \(\Delta {\text{PtP}}\). The sum of the weights for all throats in the path then was used as physical path distance. In Fig. 13, left we show for varying values of N, the percentage of N-highest average velocity pores in the entire model that are captured in the paths. For emphasis, the model-proposed paths are also compared to a random choice of pores (right). The success probability for the random choice of pores was simply the number of active pores over the total number of pores in the random selection.

We observe that the path-based models perform better than a random choice of pores (Fig. 13, right). Even the simplest model, based solely on minimizing the number of pores, successfully predicts a large degree of high flow pores, achieving similar results to the physically shortest paths. The similarity between the results of the shortest distance model and the smallest number of pores model seems to indicate that both descriptions are equivalent and could originate from a spiked distribution of distances between first neighbors. However, upon inspection of the proposed paths, this appears to be untrue and the proposed paths are observed to be quite distinct. The paths are shown in detail Appendix 3. We note that for the shortest distance paths (green), the mean path distance is 19,826 µm, composed of a mean 91.8 pores per path. The paths minimizing the number of pores have a path distance of 21,582 µm and are composed of 79.2 pores per path.

Finally, the best model fully predicts the 3 highest flow-carrying pores and almost 50% of the top 20. This demonstrates the viability of a path-based graph model for characterizing high flow zones for foam injections in a heterogeneous porous medium.

4.2 Difference Between Experiments

We note that the best models for each experiment take different parameter values. The active pores in Exp. 1, the high-rate experiment, are best predicted by the 2-parameter model with \(\left( {\alpha ,\beta } \right) = \left( {2.2 , 0.6} \right)\). However, Exp. 2, the low-rate experiment, is best predicted by the 1-parameter model with \(\left( {\alpha ,\beta } \right) = \left( {1.2, 0} \right)\). The problem this study attempts to solve, i.e., predicting preferential paths of a polydisperse foam in a heterogeneous porous medium, is akin to finding the paths of least series resistance for foam, evaluated for combinations of local structural parameters taken as hydraulic resistance. The path of least resistance then minimizes the sum of resistances between both ends of the model. For a rectangular channel, of width W, height H, length L and of fluid viscosity μ, the hydraulic resistance \(R_{{\text{h}}}\) for a monophasic fluid can be approximated by Eq. (1) as (Tanyeri et al. 2011), for \(H/W < 1\):

$$R_{{\text{h}}} = \frac{{12\;\upmu {\text{L}}}}{{WH^{3} \left( {1 - 0.63\;H/W} \right)}}$$

The path of least resistance then minimizes the sum \(R_{{{\text{tot}}}} = \sum R_{{\text{h}}}\) for all the channels in the model. The validity of this equation depends on the exact ratio \({ }H/W\). For values of \(H/W\) close to 0.5, the error is approximately 0.15% and for \(H/W = 0.1\) the error drops to 0.003%. We show a histogram of \(H/W\) values in Fig. 14 showing that most of the throats in our model respect this condition. We note that some smaller throats (as shown by the non-zero number of \(H/W>1\)) are clearly out of the domain of applicability of the above equation and the hydraulic resistance diverges for such widths. For \(H/W\) > 1, the calculation should invert H and W in the equation, retrieving a dependence on the width of W−3. However, we note these smaller throats are very limited in number and therefore should not be considered for the analysis as they have little chance of being used by the foam flow both statistically, and due to high pressure required for capillary entry.

Fig. 14
figure 14

Aspect ratio H/W distribution (left) and distribution of hydraulic resistance (right)

The calculated hydraulic resistance from the equation above is also shown in a Log–Log plot making the throat width dependencies apparent (right). For simplicity, the throat length is taken a constant value here, given by half the mean \(\Delta {\text{PtP}}\) value for all first neighbors, and water viscosity is used. The \(R_{{\text{h}}}\) values are shown as red dots. To guide the reader, we give two lines displaying on one side the asymptotic dependency of \(R_{{\text{h}}}\) as W−1 at large throat widths and provide a W−2 line tangent to \(R_{{\text{h}}}\) values at lower widths. We supplement the plot with a histogram showing the distribution of widths in logarithmic space on top of Fig. 14, right. This plot shows that most throats are situated in an intermediate zone of mixed dependence between W−1 and W−2, demonstrating that a series of models with values of \(\alpha\) between 1 and 2 may in fact be physically appropriate. For this reason, and with the understanding that the average throat size in both models does not change significantly, (see Fig. 11, center), we will not justify the higher \(\alpha\) exponent in the best fit for Exp. 1 as its physical justification is not obvious.

The best model fit for Exp. 1, however, includes a non-zero contribution from the angle parameter, with \(\left( {\alpha ,\beta } \right) = \left( {2.2 , 0.6} \right)\). This is a demonstration of difference in behavior for higher velocity foams, in which, while showing a strong dependence to throat size, preferential paths are also chosen based on pore-to-pore alignment with pressure gradient, despite their capillary ease of entry.

In supplement, Fig. 15 displays the average velocity in the pores, rather than the number of active pores, to reinforce the validity of the model as best fit in both experimental matching frameworks. We observe a maximum located in the same parameter pair as found using the active/inactive pore classification.

Fig. 15
figure 15

Average velocity intensity for all paths in each setting. The best model is the same as shown in the active/inactive high threshold pore framework

The presence of a non-zero \({\upbeta }\) parameter in the best fit is confirmed microscopically by looking at the bubble displacement distributions. Access to individual bubble tracks can provide a displacement term in the Y-direction (perpendicular to pressure gradient) compared to total displacement in all directions. Y-displacement and total displacement were taken simply as Euclidean distances between start and end point of the bubble tracks. Taking the inverse sine of the ratio of Y to total displacement yields the angle of deviation of the bubble from the pressure gradient direction, named \(\phi\). We take care here to distinguish the displacement of flowing bubbles from the quasi-zero displacement of static bubbles, which adds noise to the final probability distribution by filling it with the displacement ratios of static bubbles. We show in Fig. 16 the different bubble displacement distributions that are bimodal in logarithmic space, allowing us to segment the flowing bubbles with ease as the right side of the bimodal local minimum for each distribution. Only the flowing bubbles are then considered in the deviation angle distribution shown on the right of Fig. 16.

Fig. 16
figure 16

Bubble displacement distribution (left) and bubble track deviation angle from pressure gradient (right) for both experiments

The deviation angle distribution confirms microscopically the different model fits for each experiment. While both angle probability distributions are symmetric and centered on zero, the faster flowing foam (Exp. 2) is more spiked in zero, showing a larger tendency for the bubbles to remain in parallel tracks to flow.

We offer the explanation that the higher flow rate and pressure gradient enable a larger number of paths to be accessed by the foam and remain aligned with pressure gradient to minimize the number of flow path intersections in which a large amount of energy is dissipated through viscous shearing. Inactive paths are observed more frequently in the lower velocity case. They can originate from either capillary difficulty of entry or insufficient pressure gradient required to dislodge trapped foams. The larger pressure gradient of Exp. 2 facilitates foam mobilization creating a larger number of active paths. In turn, a flow path crossing the medium in the Y-direction would imply numerous intersections with other active flow paths in which crossroads situations arise. Flow paths then cannot freely traverse the medium in the Y-direction due to pre-existing flow paths, staying aligned with pressure gradient. In this sense, the initial motivation of overlapping preferential flow paths requires some refining. While we observe that some flow paths join and create higher velocity sections for a given distance, or otherwise split into two branching downstream paths, we rarely observe point-like intersections between two continuously flowing paths from different directions. More exactly, these kinds of intersections create either flow paths that deflect off each other, if the geometry permits, or otherwise creates intermittent traffic-like flow. We give two examples of flow paths that show large vertical displacement in lower velocity experiment, while being contained by surrounding active paths in the high-velocity experiment.

In Fig. 17, we can observe two distinct cases in which pre-existing flow paths in the higher velocity experiment inhibits the foam access to these zones. Following the flow from left to right, we see preferential paths describing significant movement in the Y-direction only in Exp. 2 in two key areas circled in green.

Fig. 17
figure 17

Comparison of flow maps for two areas of interest for each experiment. We observe flow path deviation perpendicular to pressure gradient in Exp. 2, while access to these zones is denied by the presence of other flow paths in Exp. 1. We circle in green the exact access links that are crucial in keeping the flow in the straighter paths for the high-velocity experiment. Flow is from left to right in both examples. Note: colormap contrast has been forced in each example for clarity

As well as the different injection rates, the experiments also show variable bubble size distributions within the model. Larger bubbles contribute to the flow map in Exp. 2 as shown in Fig. 2. This could also be a source of dissimilarity in the fitted models. Indeed, while the lower bound of bubble sizes is roughly equivalent, larger bubbles could in fact guide the flow within Exp. 2. For a lower injection rate and lower induced pressure gradient, the necessary Laplace pressure gradient needed to enter certain smaller throats may not be achieved, and large bubbles will in fact test multiple downstream throats before entering the widest. The smaller bubbles shown in Exp. 1 will mostly be of the order of the throat size, therefore not probing multiple throats for the widest possible entrance. Instead, in this situation, straighter paths therefore are used.

The presence of the higher throat size exponent \(\alpha = 2.2\) in Exp. 1 best fit is more intriguing. This exponent could either reflect a physical phenomenon for faster flowing foams or could be a consequence of the hydraulic resistance’s intermediate dependence (between \(\alpha=1\)  and \(\alpha = 2\) ) to the throat sizes of the model, as shown in Fig. 14, right. Finally, this effect could be a product of the interaction between the two parameters within the model. Indeed, we can remark that the good model fit zone, shown in bright colors in Fig. 12, has a shape that evolves diagonally in the positive direction of both \({\upalpha }\) and \({\upbeta }\). This behavior could show that the two components of the graph weight function interact non-trivially, and is explored in more detail in the following subsection. In this sense, the higher exponent of the best fit for Exp. 1 could simply be a consequence of the best model necessitating a non-zero value of \(\beta\).

4.3 Edge Weight Distributions and Proposed Paths

Motivating the analysis of this subsection is the non-monotonic behavior of the path lengths observed from \(\left( {\alpha ,\beta } \right) = \left( {0,6} \right)\) to \(\left( {\alpha ,\beta } \right) = \left( {6,6} \right)\), as observed in Fig. 11, left, which in turn could be linked to the repeatedly observed good fit zone that evolves diagonally in direction of positive \({\upalpha }\) and \({\upbeta }\).

In this subsection, however, we set aside the experimental data to focus on the relationship between the input graph edge weights and properties of the proposed paths.

We first explore the parameter independence. We display in Fig. 18 a histogram showing the distribution of values of the angles \(\mu\), with a boxplot displaying the spread of values of throat size for each angle category, dividing the values into 10 quantiles with an equal number of points from 0 to \(\pi /2\).

Fig. 18
figure 18

Histogram of \(\mu\) and boxplot of parameter independence in the 2-parameter model

The histogram shows a roughly uniform distribution of angles \(\mu\) from 0 to \(\pi /2\) radians. However, a noticeable unexpected spike occurs around the \(\pi /4\) value. The boxplot shows a median throat value that raises slightly in the central quantile and shows a smaller data spread towards the central values of \(\mu\). We believe this behavior, as well the spike occurring around \(\pi /4\) for the angle histogram, is a consequence of the way in which the watershed algorithm establishes throats and pores from the binarized model. They indeed may induce a small bias in our structural decomposition. The alternative explanation, in which the angles distribution displays a naturally occurring spike in the \(\pi /4\) value (due to grain packing arrangements or other), seems unrealistic. We furthermore believe the small trend observed in Fig. 18, right, does not represent a significant dependence between the two structural parameters used.

Secondly, we explore the underlying assumptions linking widely spread edge weight distributions to longer paths. Different combinations of parameters produce different edge weight distributions for the graph input to the path-proposing algorithm. Properties of this distribution are believed to be linked to the path length, and we explore here the edge weight distributions and how they affect the proposed paths. Values of the throat size term,\(r\), take values all above 1, displaying a roughly Gaussian distribution (Yeates et al. 2019). The values of \(\left( \frac{1}{r} \right)^{\alpha }\), therefore, lie between 0 and 1. Similarly, values of the throat size term,\(\cos \left( \mu \right)\), are between 0 and 1, while \(\left( {\frac{1}{\cos \left( \mu \right)}} \right)^{\beta }\) is bounded by [1 − ∞[. We show in Fig. 19 different edge weight histograms for different parameter combinations.

Fig. 19
figure 19

Edge weight distributions in terms of different parameter combinations

We observe in Fig. 19a that increasing the \(\beta\) parameter spreads the distribution in the positive direction, while maintaining many values at \(w = 1\). Raising the \({\upalpha }\) parameter as shown in Fig. 19b spreads the distribution in both direction and shifts it towards smaller values of \(w\). As the parameters are independent, increasing both in combination therefore combines both effects without any further interaction as shown in Fig. 19c; it spreads the distribution both ways and shifts it to the left, but creates a more significant spread on the right-hand tail due to the raised \(\beta\) parameter. As we can see, both the variance and mean of edge weight distributions change with each parameter combination. We show the parameter distribution skew in Fig. 20.

Fig. 20
figure 20

Edge weight distribution skew for all model weights

We suspect that the non-monotony of the path lengths function visible on the \(\alpha = 6\) parameter series is related to the skew of the distribution. Indeed, a decrease in the calculated skew of the edge weight distribution occurs where the path lengths dips along the \(\alpha = 6\) series. This could indicate an interaction between the parameters in the model that explains why the proposed paths match experimental data relatively well in a large zone diagonally situated in the positive \(\alpha\) and \(\beta\) directions. The edge weight distribution is significantly less skewed in this region, which leads the path-proposing algorithm to output shorter paths that are closer matches to the preferential paths observed in the foam experiments.

5 Conclusion

In this study, we show how a simple graph-based model can successfully capture zones of high-flow in experimental foam data in a porous medium. From experimentally established flow maps for different experiments, we attempt to characterize the paths chosen by the largest bubbles that have previously been shown to contain a significant portion of the flow in a series of distinct paths. The two experiments investigated here are performed with varying injection rates and display slightly different bubble size distributions. A graph representation of the porous network is used in which edge weights are chosen as functions of two separate throat properties. A model parameter optimization is done to establish the best model fits for each experiment individually. We show how a simple 1-parameter model based on throat size retrieves a large amount of the high flow areas in a complex medium. Furthermore, we include a 2nd local structural parameter that describes the alignment of pores with respect to pressure gradient. We observe that a larger sensitivity to the pore alignment parameter exists for the experiment with a higher injection rate, with smaller sized bubble sizes, whereas the 1-parameter model best describes slower injections with the presence of large bubbles. While this path-based approach shows promise by identifying high-flow zones in a complex medium using a simple model, further investigation into the effect of varying model structure and injection conditions in necessary to generalize the behavior seen here.