1 Introduction

The two-phase Darcy equations are almost exclusively used to describe multiphase flow in a numerous applications ranging from hydrology (Bear 1972, 1970), contaminant hydrodynamics (Bear et al. 1996), petroleum engineering (Dake 1978) and carbon capture and sequestration (CCS) (Bui 2018) in the geosciences domain to transport in gas diffusion layers in electrocatalytic devices such as fuel cells (Simon et al. 2017), electrolysis and other novel concepts where CO2 is converted into base chemicals (Kondratenko et al. 2013). The multiphase Darcy equations are an engineering approach where Darcy’s law (Darcy 1856; Bear 1972) for single-phase flow at the continuum scale (Bear 1972; Bachmat and Bear 1987) which only holds for creeping flow at low Reynolds numbers (Hassanizadeh and Gray 1987) is extended to two or more phases (Richards 1931; Wyckoff and Botset 1936; Muskat and Meres 1936; Leverett 1941; Bear 1970) in a pragmatic fashion. Darcy’s law for single-phase flow is a law in a classical sense, i.e., even though empirically introduced by Henry Darcy (1856), it can be derived rigorously from upscaling Stokes flow at the pore scale to the Darcy scale for instance by averaging (Whitaker (1986)) or homogenization (Whitaker 1986). In contrast, the equations commonly used for two-phase flow, i.e., the two-phase Darcy equations, are just a phenomenological extension of the single-phase flow without a rigorous basis in the multiphase flow space. As a result of this simplification, empirical parameters are introduced such as relative permeability \(k_{r} \left( {S_{w} } \right)\) (or inverse resistance factors \(R_{\alpha }\)) and capillary pressure–saturation functions \(p_{c} \left( {S_{w} } \right)\). As shown in Fig. 1, these are not predicted within the framework of the two-phase Darcy equations (Bear 1972, 1970) and using alternative formulations by Hassanizadeh and Gray (1993), Gray and Miller (2014), Doster et al. (Doster et al. 2010).

Fig. 1
figure 1

Darcy’s law for single-phase flow in porous media, the phenomenological extension to two-phase flow and alternative formulations which all introduce new parameters such as relative permeability and capillary pressure–saturation functions which are not predicted within the respective framework but have to be either measured or computed from a microscopic approach such as Digital Rocks. After (Bear 1970)

The relative permeability relations have to be derived from flow measurements (Anderson 1987; Berg et al. 2008) or computed from a microscopic approach such as Digital Rock (Blunt et al. 2013; Alpak et al. 2019; Ramstad et al. 2019). In either case, relative permeability is determined from the phase fluxes and pressure gradients (Element and Goodyear 2002) which are then interpreted in the framework of the chosen flow equations. The relative permeability-saturation functions are the key parameters for practical situations, ranging from the injectivity of CO2 Berg et al. (2013) and the economics in hydrocarbon recovery to the efficiency of fuel cells (Simon et al. 2017). Since relative permeability depends significantly on the pore structure of the porous medium and the respective spatial distribution of wetting properties (Anderson 1987; Lin et al. 2019), for many applications relative permeability needs to be determined on a case-by-case basis which is usually accompanied with a significant experimental effort which can take in the petroleum industry several months per sample, starting with obtaining the preparing rock samples to executing the experimental flow measurements themselves. The results are then often parameterized with analytical functions which are used (after an upscaling step) in numerical simulators for, e.g., field-scale simulations of petroleum reservoirs.

Due to their somewhat empirical origin, it is—depending on the choice of the flow model—unclear what functional form the relative permeability functions should have and which physical parameters they should be based on. In the two-phase extension of Darcy’s law the common practice is to consider relative permeability to be a function of (wetting phase) saturation \(S_{w}\) which is somewhat intuitive because it is clear that the presence of a non-wetting phase in the pore space would hinder the flow of the wetting phase, and vice versa. It is, however, important to note that the original publications on the two-phase Darcy formalism (Richards 1931; Wyckoff and Botset 1936; Muskat and Meres 1936; Leverett 1941) did not say that relative permeability should be a function of saturation only.

There is a range of parameterizations such as the Brooks–Corey model (Brooks and Corey 1964) which is based on a capillary tubes approximation of the pore space (Tuller and Or 2001; Bear et al. 1987; Dane et al. 2011) (also with extensions to anisotropic media (Bear et al. 1987)) and use the saturation \(S_{w}\) as only state variable (McClure et al. 2018). Depending on the method, the two-phase Darcy equations can be formulated using viscous transport law with a similar structure as Poiseuille flow where \(k_{r}\) appears as a sort of effective transport coefficient or hydraulic conductivity factor. Nevertheless, they also include implicit effects of capillarity that reflects the connected pathways of wetting and non-wetting phases partition the pore space (Tuller and Or 2001). Also, the pore scale flow fields in 3D rock have a higher degree of similarity with sphere packs than tubes (Berg and Wunnik 2017) which raises the question of applicability of the physical picture of capillary tubes. On the other hand, relative permeability also includes flux contribution of capillary and capillary-inertial controlled pore scale mechanisms such as ganglion dynamics which provide flux without permanent connectivity (Rücker 2015, 2019; Zou et al. 2018). The Corey (Corey 1954) and LET models (Lomeland et al. 2005) are in some sense variants of the Brooks–Corey model which differ in functional form and number of parameters but are generalized without any close connection to an underlying physical model.

Recently the question was raised how the choice of the relative permeability parameterization affects the uncertainty of model predictions (Valdez et al. 2020; Berg et al. 2020). If, for instance, the Corey relative permeability parameterization was on the basis of first principle arguments, namely, the “correct” functional form, then in experiments we could directly determine irreducible saturations and endpoint relative permeability, which would reduce the degrees of freedom to two, i.e., the two Corey exponents. However, due to the phenomenological origin of the two-phase extension to Darcy’s law, there is no a-priori correct relative permeability parameterization. Therefore, the choice of the relative permeability parameterization becomes part of the uncertainty consideration itself. And indeed, different functional forms would be observed to result in different uncertainty ranges (Berg et al. 2020). One could even ask the question whether some of the uncertainty is generated by those who make the choice which functional representation is used. There are alternative approaches where, instead of specific analytical forms, more general spline and NURBS interpolations for tabulated relative permeability data are used (Bui 2018; Okano 2005). That circumvents to some extent the necessity to make a choice of a specific function while providing a form that is still suitable for numerical modeling, and even for inverse matching in an automated fashion (e.g., for Markov chain Monte Carlo (Bui 2018; Valdez et al. 2020)) because key properties such as monotonicity are preserved. However, the spline interpolation has still many degrees of freedom from an uncertainty reduction perspective even though the general goal is to reduce the number of model parameters as much as possible. Potential approaches to reduce the degrees of freedom would be to ensure continuity and monotonicity for the second- and third-order higher derivatives.

The common denominator is that for a given flow model, e.g., two-phase Darcy, there is additional uncertainty arising from the choice of the parameterization of relative permeability. The difficulties apply not only for the two-phase Darcy extension but in principle also for most of the alternative formulations for describing multiphase flow in porous media which are either based on more rigorous thermodynamic principles (Hassanizadeh and Gray 1993; Gray and Miller 2014; Niessner et al. 2011) or accounting for mass exchange between connected and disconnected phases (Doster et al. 2010). Depending on which exact formulation is used, there are consequences for primary variables (Bear and Nitao 1995) and parameters which relative permeability depends on. In the thermodynamically based formulations by Hassanizadeh and Gray (1993) and thermodynamically constrained averaging theory (TCAT) [21, 94, 95], relative permeability would in the most basic scenario depend on saturation and saturation gradient (Niessner et al. 2011), while in two-phase Darcy formulation, it is commonly assumed to depend on saturation only (Alpak et al. 1999). Even though that would have implications, i.e., that steady-state and unsteady-state relative permeability would be different; nevertheless, in the alternative formulations the exact form of the relative permeability function is not defined either, because they largely rely on Darcy scale concepts. In the absence of a causality-based microscopic theory which also include the flux of disconnected phases from pore scale dynamics (Rücker 2015, 2019; Zou et al. 2018; Armstrong et al. 2016), upscaled from pore to Darcy scale in a rigorous way, our ability to select the “best” set of multiphase flow equations for a specific application will always depend strongly on how well all involved parameters such as relative permeability and capillary pressure can be constrained by experiments and minimize the overall uncertainty.

There are many practical situations where the uncertainty range of relative permeability is of central importance. For instance, in many improved and enhanced oil recovery processes the incremental improvement of recovery by applying, e.g., an IOR concept or EOR agent, needs to be demonstrated in comparison with a regular water flood by laboratory experiments such as core floods. While many studies use the incremental recovery in a tertiary-mode core flood as evidence, that is actually not sufficient because of a range of secondary effects such as change in capillary end effect (Huang and Honarpour 1998) by the EOR agent that leads to incremental recovery in a core flood but not in the field. The proper evidence needs to be provided by extracting the \(k_{r} \left( {S_{w} } \right)\) and \(p_{c} \left( {S_{w} } \right)\) functions from the IOR/EOR flood and from the normal water flood and assess the impact of the IOR/EOR process on field scale on that basis (Masalmeh et al. 2014; Sorop et al. 2015). That requires inverse modeling of the core floods with and without the IOR/EOR agent (Masalmeh et al. 2014). A prominent example is the low-salinity effect where brines with controlled ion contents may in certain cases lead to an incremental recovery compared with water flood using the field brine. The incremental recovery is sometimes only 5–10% which is then a challenge on the accuracy of the core flooding experimental protocols including the numerical interpretation by inverse modeling (Sorop et al. 2015; Subbey et al. 2006).

A particular problem is analytical inversion of even the most basic flow equations, i.e., the two-phase Darcy equations exist for \(p_{c} = 0\) but are for the most relevant situations, i.e., \(p_{c} \ne 0\) not possible or practical. Analytical inversion is only possible for limiting cases, e.g., assuming a 1D homogeneous setting and zero capillary pressure (Johnson et al. 1959) which does not take account of capillary end effects (Huang and Honarpour 1998) and hence can lead to significant mis-interpretations (Masalmeh et al. 2014; Sorop et al. 2015). Even though some of these aspects can be addressed by more sophisticated analytical inversion methods (“intercept method”) (Gupta and Maloney 2016; Reed and Maas 2019), a multirate experimental protocol for each fractional flow is required and the capillary end effect (Gray and Miller 2014) needs to be fully contained within the core sample which is not always the case (Rücker 2015). General situations that involve capillary effects, heterogeneity and other experimental realities such as integrating several individual experiments that only in combination access the whole relevant saturation range from irreducible wetting to irreducible non-wetting saturation, can only adequately address by inverse modeling (Berg et al. 2020; Masalmeh et al. 2014; Sorop et al. 2015; Maas and Schulte 1997; Maas et al. 2011; Chen and Ruth 1993; Lenormand et al. 2016).

An inverse modeling (assisted “history matching”) approach is more versatile and universally applicable. In inverse modeling the numerical solution of the governing flow equations including capillarity pressure \(p_{c} \ne 0\) (Rücker 2019; Zou et al. 2018) (that also includes capillary end effects (Huang and Honarpour 1998)) are matched to experimental data by adjusting the model parameters. In practice, it is still common practice to “manually” interpret relative permeability measurements and only report the mean values; uncertainty assessment around the measurements and interpretation is often dismissed. There are only relatively few cases where error bars are reported (Berg et al. 2008, 2013; Alhammadi et al. 2019; Lin et al. 2019; Valdez et al. 2020) which show in most cases “forward” estimates of experimental uncertainties using the error propagation method (Berg et al. 2008) or consequences of heterogeneity (Okano 2005). They do not include the interpretation-related model-based and parameterization-based errors (Berg et al. 2020). However, a realistic uncertainty range may have significant implications in practice because it may make the difference between stable and unstable displacement (Berg and Ott 2012) or have economic implications. It is, therefore, a very much open question: How significant the interpretation-based uncertainty in multiphase flow studies is in relation to the purely experimental error.

Also assisted/automated approaches exist (Berg et al. 2013; Alhammadi et al. 2019; Lin et al. 2019; Valdez et al. 2020; Jenei 2017) and even recently machine learning approaches (Zhao et al. 2020); however, these methods focus typically on the matching aspect and less on the uncertainty quantification and aspects such as non-uniqueness of the match. Inverse modeling can be used to assess the full range of uncertainties (Berg et al. 2020). Inverse modeling is typically performed using a numerical two-phase Darcy simulator to model the experiment where the unknown parameters such as relative permeability such that a match with the experimental data is achieved. Traditionally, that has been achieved by manually varying the parameters of interest until the numerical model matches the experimental data (Sorop et al. 2015). Since perhaps a decade, there are also assisted and automated history matching solutions available for SCAL experiments (Valdez et al. 2020; Taheriotaghsara 2020; Manasipov and Jenei 2020; Maas and Schulte 1997; Maas et al. 2011, 2019; Chen and Ruth 1993; Lenormand et al. 2016; Taheriotaghsara et al. 2020) which are ultimately based on constrained optimization methods where a cost function quantifying the mismatch between model output and experimental data is minimized. Recent research revealed that such assisted or automatic history matching workflows could result in a significant degree of uncertainty caused by non-uniqueness of the inversion problem itself but also inter-correlation between fit parameters and other interpretation workflow-based effect (Berg et al. 2020).

There is a more recent trend in the literature to consider the inverse modeling workflow of core flooding experiments as a more general Bayesian inversion problem (Valdez et al. 2020; Manasipov and Jenei 2020), and methods such as Markov chain Monte Carlo (Valdez et al. 2020; Brooks 1998; Subbey et al. 2006) are employed. This has a very practical aspect, i.e., automatic interpretation of flow experiments to determine relative permeability (Maas and Schulte 1997; Maas et al. 2011; Chen and Ruth 1993; Lenormand et al. 2016), but the methodology could be also used to address much more fundamental questions, for instance, the long-standing problem which set of flow equations is appropriate or sufficient for two-phase flow in porous media, i.e., the phenomenological two-phase Darcy equation vs. the more rigorously derived thermodynamic equations such as Hassanizadeh and Gray (1993) or TCAT (Gray and Miller 2014). However, Bayesian inversion methods which have been applied to many problems in the domain of geosciences such as geophysics have in common that the result can be highly non-unique unless constraints are rigorously applied in terms of prior knowledge or extra data. Without appropriate constraints it is often not possible to distinguish equally likely scenarios.

In the domain of 2-phase flow, the classical example is the question of the viscous coupling terms (sometimes also referred to as relative permeability cross-terms) where a pressure gradient applied for the one phase can cause a flux of the other phase and vice versa. From the principles of fluid mechanics, i.e., stress continuity at fluid–fluid interfaces at pore scale flow, nonzero viscous coupling terms are expected. However, in a set of systematic studies Ayub and Bentsen came to the conclusion that the framework of 2-phase Darcy flow does not provide sufficient constraints that would allow to uniquely identify and quantify the coupling terms experimentally (Ayub and Bentsen 2005; Bentsen 2005). One of the underlying reasons is that there is too much flexibility in the phenomenological model parameters such as relative permeability with such a degree of uncertainty that masks the underlying flow physics. Without constraining relative permeability more and making a more rigorous assessment of the consequences on the uncertainties with which they can be determined from experimental data, it will be very difficult to provide experimental proof for the validity or preference of, e.g., a certain form of fundamental flow equation. To bring it to the point: without assessing and constraining the uncertainty of key parameters in flow models, different flow models become indistinguishable.

That raises the more general question on the resulting uncertainties of inverse modeling workflows, in particular with respect to the choice of relative permeability parameterizations which is a model-based uncertainty. Model-based uncertainties depend on the formulation of the inversion problem which includes the parameterizations for the relative permeability and capillary pressure, and the cost function for inverse modeling using optimization methods or the likelihood function for Bayesian inversion.

In this work, we use a recently developed inverse modeling workflow (Berg et al. 2020) to present a strategy with which some of the model-based uncertainties can be addressed systematically. The assessment is based on the two-phase Darcy equations which is the least complex form. We focus on two areas: (1) uncertainties arising from different weights of experimental data in the cost function and (2) the choice of the relative permeability parameterization.

2 Methods and Materials

The overall inverse modeling workflow is illustrated in Fig. 2 where experimental data that were obtained from core flooding experiments consisting of production curve, pressure drop, and saturation profiles (depending on the exact type of experiment) are matched by a numerical model by tuning the respective parameters of the flow model such as the relative permeability \(k_{r}\). An underlying assumption of the most-common interpretation scheme is that the displacement occurs in one dimension (1D), i.e., \(x\) and that the porous medium is homogeneous. More complex interpretations are possible, e.g., in 2D, also taking rock heterogeneity into account (Berg et al. 2013) which introduces more complexity and requires more independent measurements for interpretation. The focus of this work is on more conceptual issues of the interpretation methodology which is already present in the 1D homogeneous case.

Fig. 2
figure 2

Illustration of the assisted history matching workflow where experimental data are matched to the numerical solution of the governing equations (two-phase extensions of Darcy’s law) extracting the relative permeability functions

3 Data Sets and Core Flooding Experiments

Established methods to determine the relative permeability functions are unsteady-state (USS) or steady-state (SS) core flooding experiments that are done in rock samples. For most applications in petroleum engineering, the process of interest is the imbibition. In respective unsteady-state experiments (USS), brine is injected displacing crude oil. After brine breakthrough, there is simultaneous production of crude oil and brine. In steady-state experiments (SS), brine and crude oil are co-injected where the fractional flow \(f_{w}\) which is the ratio of wetting phase flux over total flux is continuously increased from zero (100% non-wetting phase) to 1 (100% wetting phase) injection.

The wetting phase is typically a field-specific saline brine, and the non-wetting phase is a field-specific crude oil. Cylindrical rock samples, “core,” are first cleaned, then saturated with brine, and de-saturated in a primary drainage process with oil in a centrifuge to reach the connate water saturation \(S_{w,c}\).

The data used in Sect. 0 are a synthetically created data set for an unsteady-state experiment where capillary pressure \(p_{c} = 0\). For generating the synthetic data set a Corey relative permeability representation with \(S_{w,c} = 0.1\), \(S_{n,r} = 0.2\), \(k_{r,w}^{0} = 0.5\), \(k_{r,n}^{0} = 0.9\), \(n_{w} = 2.0\) and \(n_{n} = 3.0\) is used. Using the assumed relative permeability parameters, production and pressure gradient across the core length are calculated numerically using an explicit approach with an upwind numerical scheme (LeVeque 1990). Since the solution of the flow equations for \(p_{c} = 0\) (Buckley and Leverett 1942; Welge 1952) does in terms of production curve in pore volumes (PV) and saturation profiles \(S_{w} \left( x \right)\) not depend on permeability, viscosity, or sample dimensions, the pressure drop is normalized, respectively.

The data in Sections 0–0 originate from a steady-state experiment conducted at reservoir condition, i.e., pressure of 100 bar and temperature of 120 °C. A cylindrical rock sample of 3.89 cm length and 3.76 cm diameter with 22.9% porosity and 181 \({\upmu} {\rm m}^{2}\) (183 mD) permeability was used. Starting point for the imbibition experiment conducted at a flow rate of \(Q_{T} = 60 {\rm cm}^{3} /h\) is a connate water saturation \(S_{w,c} = 0.08\). The fractional flow \(f_{w}\) is systematically increased from 0 to 1 using the sequence 0.0, 0.01, 0.05, 0.10, 0.25, 0.50, 0.75, 0.90. 0.95, 0.99 and 1.0 where at each fractional flow step sufficient time is given to reach a “steady-state,” i.e., an on average stable pressure-drop \({\Delta }p\) and saturation \(S_{w}\). At the end of the experiment a bump flood is conducted where the flow rate is increased to \(120 {\rm cm}^{3} /h\) and \(300 {\rm cm}^{3} /h\). During the experiment, the total pressure drop, \({\Delta }p\), along the core is measured by pressure gauges. It is unfortunately not possible to distinguish between the pressure drop of the aqueous and the oil phases. However, in steady-state experiments always the pressure drop of the flowing phase is measured, which is in an imbibition experiment at \(f_{w} = 0\) until about the maximum in \({\Delta }p\) the oil phase and after that until \(f_{w} = 1\) including the bump floods the aqueous phase. The saturation profiles \(S_{w} \left( x \right)\) are determined during the experiment by in situ X-ray saturation monitoring (Masalmeh et al. 2014; Sorop et al. 2015) at 20 positions \(x\) along the core. Typical uncertainties of steady-state experiments are around 5% for the saturation and 2–10% for pressure measurements depending on the pressure range, translating into an error of up to 10% in \(k_{r}\) using the error propagation method. Independent benchmarking studies which include the aspects of sample handling, cleaning suggest a repeatability of steady-state experiments within approximately that range. More details on the experimental protocols are given in (Sorop et al. 2015).

4 Flow Model for Two-Phase Flow

For two-phase flow in porous media, the flow model of the two-phase extension of Darcy’s law (Richards 1931; Wyckoff and Botset 1936; Muskat and Meres 1936; Leverett 1941) formulates the volumetric flux \(v_{\alpha }\) (normalized by cross-sectional area) of phase \(\alpha\) (\(\alpha = \left\{ {w,n} \right\}\) for wetting \(w\) and non-wetting phase \(n\) sometimes also referred to \(o\) for oil–water cases) as

$$v_{\alpha } = - \frac{{k_{r,\alpha } }}{{\mu_{\alpha } }}K\frac{{\partial p_{\alpha } }}{\partial x}$$
(1)

where \(k_{r,\alpha }\) is the relative permeability of phase \(\alpha ,\) \(K\) the permeability, \(\mu_{\alpha }\) the viscosity and \(p_{\alpha }\) the pressure of phase \(\alpha\). \(\partial /\partial x\) is the spatial derivative in \(x\)-direction. Note that this is in absence of gravity which then needs to be added to the pressure gradient (Richards 1931; Wyckoff and Botset 1936; Muskat and Meres 1936; Leverett 1941; Buckley and Leverett 1942; Dullien 1992).

The continuity equation

$$\phi \frac{{\partial S_{\alpha } }}{\partial t} + \frac{{\partial v_{\alpha } }}{\partial x} = 0$$
(2)

describes the conservation of mass where \(S_{\alpha }\) is saturation of phase α, and \(\partial /\partial t\) the time derivative.

For the case of incompressibility \(v_{w} + v_{n} = v_{T}\) is constant and the wetting and non-wetting phase saturation \(S_{w} + S_{n} = 1\). The phase pressure difference \(p_{n} - p_{w}\) between wetting and non-wetting phases is related to the capillary pressure

$$p_{c} = p_{n} - p_{w}$$
(3)

in order to close the system of equations. Further assumptions are that relative permeability and capillary pressure are functions of saturation only, i.e., \(k_{r,\alpha } = k_{r,\alpha } \left( {S_{w} } \right)\) and \(p_{c} = p_{c} \left( {S_{w} } \right)\).

The time evolution of saturation \(S_{w} \left( {x,t} \right)\) can be computed by combining governing Eqs. (1)–(3). In that process the fractional flow \(f_{w}\) is defined as

$$f_{w} = \frac{{\lambda_{w} }}{{\lambda_{w} + \lambda_{n} }} = \frac{1}{{1 + \frac{{k_{r,n} /\mu_{n} }}{{k_{r,w} /\mu_{w} }}}}$$
(4)

with the mobility \(\lambda_{\alpha } = k_{r,\alpha } /\mu_{\alpha }\) for phase α. Equation (1)–(4) can then be combined obtaining

$$\phi \frac{{\partial S_{w} }}{\partial t} + \frac{\partial }{\partial x}\left[ {f_{w} v_{T} } \right] + \frac{\partial }{\partial x}\left[ {f_{w} \lambda_{n} \frac{{\partial p_{c} }}{\partial x}} \right] = 0$$
(5)

which can be solved analytically for the case \(p_{c} = 0\) following the method of (Buckley and Leverett 1942; Welge 1952; Dullien 1992; Dake 1978).

For the more general case with \(p_{c} \ne 0\) Eq. (5) is solved numerically using an explicit scheme with an explicit finite difference scheme with time stepping control and covers two-phase incompressible flow with capillary pressure and gravity which has been implemented as native Python code (Berg et al. 2020). The computationally intensive components are compiled with the just-in-time compiler using the numba just-in-time compiler package. A typical simulation run for interpreting relative permeability experiments using 50 grid blocks in \(x\)-direction takes about 50 ms.

From the saturation profiles \(S_{w} \left( {x,t} \right)\) the production curve

$${\text{ Q}}\left( t \right) = \int\limits_{x} {S_{w} \left( {x,t} \right)dx}$$
(6)

can be computed by integration over \(x\) utilizing the concept of mass conservation.

4.1 Corey and LET Relative Permeability Parameterizations

Relative permeability is assumed to be only a function of saturation \(k_{r,\alpha } \left( {S_{w} } \right)\). The mobile or reduced saturation \(S_{red}\) is expressed

$$S_{red} = \frac{{S_{w} - S_{w,c} }}{{1 - S_{w,c} - S_{n,r} }}$$
(7)

where saturation \(S_{w}\) is re-scaled to the range between irreducible wetting \(S_{w,c}\) and non-wetting phase saturation \(S_{n,r}\).

The Corey relative permeability model (Corey 1954) is very commonly used where relative permeability is expressed in form of power law

$$\begin{aligned} k_{r,w} =\, k_{r,w}^{0} \left( {S_{red} } \right)^{{n_{w} }} \\ k_{r,n} = \,k_{r,n}^{0} \left( {1 - S_{red} } \right)^{{n_{n} }} \\ \end{aligned}$$
(8)

where \(k_{r,w}^{0} = k_{r,w} \left( {S_{n,r} } \right)\) and \(k_{r,n}^{0} = k_{r,n} \left( {S_{w,c} } \right)\) are the endpoint relative permeabilities of wetting and non-wetting phases at the respective irreducible saturations. \(n_{w}\) and \(n_{n}\) are the power law “Corey” exponents.

The LET model (Lomeland et al. 2005) has become more popular in particular for assisted or automatic history matching (Lenormand et al. 2016) by software packages or services such as Sendra, Cydar, and Scores where

$$\begin{aligned} k_{r,w} = k_{r,w}^{0} \frac{{S_{red}^{{L_{w}^{n} }} }}{{S_{red}^{{L_{w}^{n} }} + E_{w}^{n} \left( {1 - S_{red} } \right)^{{T_{w}^{n} }} }} \\ k_{r,n} = k_{r,n}^{0} \frac{{\left( {1 - S_{red} } \right)^{{L_{n}^{w} }} }}{{\left( {1 - S_{red} } \right)^{{L_{n}^{w} }} + E_{n}^{w} S_{red}^{{T_{n}^{w} }} }} \\ \end{aligned}$$
(9)

with the fit parameters \(L_{w}^{n}\), \(L_{n}^{w}\), \(E_{w}^{n}\), \(E_{n}^{w}\), \(T_{w}^{n}\), and \(T_{n}^{w}\).

For the parameterization of capillary pressure the expression by Skjaeveland et al. (Skjaeveland et al. 1998) is used

$$p_{c} = \frac{{c_{w} }}{{\left( {\frac{{S_{w} - S_{w,c} }}{{1 - S_{w,c} }}} \right)^{{a_{w} }} }} + \frac{{c_{n} }}{{\left( {\frac{{S_{n} - S_{n,r} }}{{1 - S_{n,r} }}} \right)^{{a_{w} }} }}$$
(10)

where \(S_{n} = 1 - S_{w}\) and \(c_{w}\), \(c_{n}\), \(a_{w}\) and \(a_{n}\) are adjustable parameters.

4.2 Inverse Modeling/History Matching Workflow and Uncertainty Estimation

Inverse modeling means that the predictions of the flow model as expressed in eqns. (1)–(8) are matched to experimental data (Hogg et al. 1008). An example is shown in Fig. 2 where for an unsteady-state experiment the prediction of the flow model is matched to experimentally measured production curve and pressure drop by adjusting the relative permeability, which is the result of interest of the inverse modeling.

The minimization of the mismatch between experimental data and model result is an optimization problem. The particular difficulty is that for finding the minimum in principle all fit parameters, e.g., all relative permeability parameters would need to be varied within the specified bounds. In the case of Corey or LET relative permeability models there are 6 or 10 parameters, respectively, meaning that the optimization would need to locate a minimum in a 6- or 10-dimensional space. If we include also parameters representing the capillary pressure, there would be 4 additional dimensions. It is not possible to directly search such a higher-dimensional space within reasonable effort. There are several computational strategies that can be used in practice. Gradient-based methods can find minima in higher-dimensional spaces. In this work we use the Levenberg–Marquardt algorithm (Levenberg 1944; Marquardt 1963) which performs a nonlinear least squares fit where the sum of the squared differences between data \(y_{i}\)

$$\chi^{2} = \mathop \sum \limits_{i} \frac{{\left( {y_{i} - f\left( {x_{i} } \right)} \right)^{2} }}{{\epsilon_{i}^{2} }}$$
(11)

which is the sum of the squared differences between experimental data yi with error \(\epsilon_{i}\) and model values \(f\left( {x_{i} } \right)\), is minimized.

Here we use the implementation of the Levenberg–Marquardt method through the curve_fit function of the Python optimization toolbox scipy.optimize. In this work the respective model values \(f\left( {x_{i} } \right)\) of the flow model from Eq. (5) are not available as a closed-form analytical solutions and instead \(f\left( {x_{i} } \right)\) are computed numerically. For the gradient-based Levenberg–Marquardt method also the Jacobian, i.e., the gradients of \(\chi^{2}\) with respect to varied model parameters, i.e., all relative permeability parameters in Eq. (7) and (8) or (9) such as \(k_{r,\alpha }^{0}\), \(S_{w,c}\) and \(S_{n,r}\) are required. In the absence of a closed-form analytical solution in scipy.optimize the Jacobian is computed numerically in an automated manner. curve_fit allows to specify bounds for each fit parameter which is important because an unbounded \(\chi^{2}\) fit can lead to unphysical solutions, e.g., arriving at \(S_{w,c} > 1\) or \(S_{n,r} > 1\). In practice, for most cases \(0.03 \le S_{w,c} \le 0.2\) and \(0.05 \le S_{n,r} \le 0.40\) (although there are exceptions); for the endpoint relative permeability \(0.05 \le k_{r,\alpha }^{0} \le 1\) are reasonable bounds although values \(k_{r,\alpha }^{0} > 1\) have been observed (Berg et al. 2008). For the Corey model \(1.5 \le n_{\alpha } \le 5\) are reasonable bounds. While in Section 0 we directly use the curve_fit function, in Sections 0–0 the lmfit package (Newville et al. 2014) is used which provides a high-level interface and extends its methods further. Alternative optimization toolboxes with different optimization methods and toolboxes have been recently published in Taheriotaghsara (2020), Manasipov and Jenei (2020).

One particular feature of the Levenberg–Marquardt least squares method is that it also provides the uncertainties for each fit parameter. The standard deviation of each fit parameter is computed from the covariance matrix which is estimated from the Jacobian matrix around the convergence point of the fit, i.e., the slope of the \(\chi^{2}\) landscape around its minimum. A previous study, however, has shown that the \(\chi^{2}\) landscape for inverse modeling of unsteady-state and steady-state experiments can have multiple local minima (Berg et al. 2020). The respective aspect of non-uniqueness is therefore not reflected in the error bars computed from the covariance matrix of the \(\chi^{2}\) fit and can in reality be larger. On the other hand, when the \(\chi^{2}\) minimization runs into bounds specified for individual fit parameters, the Levenberg–Marquardt method has a problem of correctly estimating the Jacobian and respective standard deviation for fit parameters can be significantly over-estimated (Berg et al. 2020; Hogg et al. 1008). In addition, the \(\chi^{2}\) minimization converges against the ground truth only for data with Gaussian errors but can produce a significant mismatch when non-Gaussian errors are present which is demonstrated in the examples in Hogg et al. (1008).

For a correct assessment of uncertainties, in presence of non-Gaussian errors and multiple local minima, which seems to be the case for the relative permeability inversion (Berg et al. 2020), the Markov chain Monte Carlo (MCMC) method (Brooks 1998) is the more reliable approach. MCMC is used for instance by Valdez et al. (2020) for uncertainty estimation when fitting relative permeability models to experimental data. Here we use the emcee option in lmfit which utilizes the Emcee Python package (Foreman-Mackey et al. 1202). In total, 50,000 iterations were used for curve-fitting a \(k_{r}\) parameterization to tabulated \(k_{r}\) in Section 0 and 10,000 and 20,000 iterations for fitting the flow model to the raw data (\({\Delta }p\) and \(S_{w} \left( x \right)\)) in Section 0 (Berg et al. 2020).

5 Results and Discussion

The focus of results section is on assessing the impact on the choice of relative permeability parameterization on the resulting \(k_{r}\) and the associated uncertainty ranges. However, we first have to define the \(\chi^{2}\) function which is the cost function for the minimization. We will demonstrate that this already involves a choice that has an impact on the resulting \(k_{r}\) and the respective uncertainty range.

5.1 Weighting of Experimental Data in the Cost Function and Pareto Front

As detailed in Section 0 the inverse modeling is de-factor an optimization problem where an objective function \(\chi^{2}\) from Eq. (9) which is the sum of the squared differences between experimental data \(y_{i}\) and model prediction \(f\left( {x_{i} } \right)\) is minimized. In the case of multiphase flow experiments conducted in unsteady-state mode, analytical inversion methods (Johnson et al. 1959) suggest that required experimental data \(y_{i}\) are pressure production curve \({\text{Q}}\left( t \right) = \int_{x} {S_{w} \left( {x,t} \right)dx}\) (with error \(\delta Q_{i}\)) and the pressure drop \({\Delta }p\left( t \right)\) (with error \(\delta p_{i}\)). In that case, one can define the cost function

$$\chi^{2} = \mathop \sum \limits_{i} \frac{{\left( {Q_{nw,i} - Q_{nw,i}^{ref} } \right)^{2} }}{{\delta Q_{i}^{2} }} + \frac{{\left( {{\Delta }p_{i} - {\Delta }p_{i}^{ref} } \right)^{2} }}{{\delta p_{i}^{2} }}$$
(12)

such that it includes both production data and pressure drop which are simultaneously minimized, i.e., both experimentally measured production data and pressure drop are used to constrain the solution.

However, production data and pressure drop may have very different magnitude, depending on the permeability \(K\). For lower the permeability the \({\Delta }p\) terms would be much larger than the production data terms and give implicitly much more weight in the \(\chi^{2}\) minimization. Such a situation is shown in Fig. 3 where in a synthetic data set even without any noise (except for numerical errors which are < 0.1%, rounding is at the 10th decimal) the \(\chi^{2}\) minimization does not reproduce the ground truth, which is among other things a consequence of non-uniqueness (Berg et al. 2020). If the production data and pressure drop are, however, normalized by characteristic values,

$$\chi_{n}^{2} = \mathop \sum \limits_{i} \frac{1}{{\delta Q_{i}^{2} }}\left( {\frac{{Q_{nw,i} - Q_{nw,i}^{ref} }}{{Q_{nw}^{ref, max} }}} \right)^{2} + \frac{1}{{\delta p_{i}^{2} }}\left( {\frac{{{\Delta }p_{i} - {\Delta }p_{i}^{ref} }}{{{\Delta }p^{ref, max} }}} \right)^{2}$$
(13)
Fig. 3
figure 3

A ground truth set of relative permeability functions (“ref”) was used to forward model an unsteady-state displacement with capillary pressure \(p_{c} = 0\). Respective production curves and pressure drop (non-dimensional) are shown in the bottom panel. When minimizing \(\chi^{2}\) from Eq. (10) the solution does not reproduce the ground truth (left) even though an almost perfect match of both pressure drop and production curve is achieved (mismatch is on the order of the line width). If, however, the normalized \(\chi_{n}^{2}\) from Eq. (11) is minimized, the ground is exactly recovered

The ground truth is exactly recovered as shown in Fig. 3.

The significance of this observation is that even for a synthetic data set, on the basis of a Core relative permeability parameterization without any noise, the success of the model inversion depends on the choice of the cost function. A non-normalized \(\chi^{2}\) does not reproduce the ground truth in terms of relative permeability, while in terms of production curve and pressure drop an almost indistinguishable match (within the line thickness of the curves) is achieved. On very close inspection, for \(\chi^{2}\) there seems to be a somewhat lesser match for the production curve than for minimizing \(\chi_{n}^{2}\), but in a practical situation for data with noise the difference would fall below the noise level, while the different in \(k_{r}\) is much bigger. This behavior is known from typical ill-posed problems where interpreted properties are very sensitive to even small uncertainties in primary measurement quantities and highly dependent on the way the constraints are articulated. That is important to recognize, also in particular from the perspective of the more traditional approaches where the match is achieved by manual tuning where the objective function is not articulated and depends on the visual perception of the operator.

This observation is also indicative of the inevitable problem of the definition of the cost function and the weighting of different data which is not given by first principles but more of a choice. The cost function has to include at least the data sets required to constrain the solution that are already clear from analytical inversion. For instance, in an unsteady-state experiment both pressure drop and production data are required to constrain the solution. The question is how their contribution is weighted in a cost function.

In order to investigate what impact the weighting of production data and pressure drop, we modify the cost function \(\chi_{n}^{2}\) from Eq. (11) but include a weighting factor \(a\) between pressure drop and production data for the simplified case without any error (i.e., setting \(\delta Q_{i} = 1\) and \(\delta p_{i} = 1\))

$$\chi_{n}^{2} = \mathop \sum \limits_{i} \left( {1 - a} \right) \cdot \left( {\frac{{Q_{nw,i} - Q_{nw,i}^{ref} }}{{Q_{nw}^{ref, max} }}} \right)^{2} + a \cdot \left( {\frac{{{\Delta }p_{i} - {\Delta }p_{i}^{ref} }}{{{\Delta }p^{ref, max} }}} \right)^{2}$$
(14)

The results of the \(\chi_{n}^{2}\) minimization from (12) as a function of weighting factor \(a\) between pressure drop and production data are shown in Fig. 4. The ground truth (dashed lines) is only recovered in a small range of weight factor \(0.1 \le a \le 0.3\) which is not a-priori obvious.

Fig. 4
figure 4

Results of the \(\chi_{n}^{2}\) minimization of (12) as a function of weighting factor \(a\) between pressure drop and production data for an unsteady-state experiment with \(p_{c} = 0\). The results indicate a non-systematic dependency of the Corey parameters of the relative permeability parameterization used here on the weighting factor \(a\). The ground truth (dashed lines) is only recovered in a small range of weight factor \(0.1 \le a \le\) 0.3

Even in a situation where the model is correct, i.e., a specific two-phase flow model (two-phase Darcy) is used to generate a synthetic data set (production curve and pressure drop) which is then subjected to the inverse modeling workflow, we see that the relative weighting of pressure drop and production data in the cost function matters. In other words, the optimization problem has more similarity with a bi-objective minimization where the solution lies on a Pareto front as shown in Fig. 5. The behavior is not like in a classical Pareto front where a monotonic trend between two limiting outcomes is observed. Instead, the behavior points more to the existence of non-uniqueness with multiple local minima in the cost function as already discussed in more detail in (Berg et al. 2020).

Fig. 5
figure 5

Corey parameters from Fig. 4 which are influenced by the weighting factor \(a\) of the pressure drop and production data in the cost function (Eq. (12)) plotted in pairs as often Pareto fronts in bi-objective minimization are visualized

That the impact of the variation of the weight factor between pressure drop and production curve on the Corey parameters is indeed significant can be seen when plotting the associated family of relative permeability curves as shown in Fig. 6.

Fig. 6
figure 6

Family of relative permeability curves corresponding to the Corey parameters from Figs. 4 and 5 for shifting the weight in the cost function from pressure drop to production curve matches

While the example of the unsteady-state experiment with synthetic capillary pressure \(p_{c} = 0\) is instructive to understand the inherent degree of uncertainty associated with inverse matching and the root cause of arbitrariness caused by the choice of the weighting factors between different types of constraining experimental data, we should not forget that an inherent issue of constant-rate unsteady-state experiments is the very limited posterior saturation range which makes this situation particularly problematic. In reality, the situation is more complex because the errors of production data and pressure drop can have different magnitude, which introduces further bias.

5.2 Manual Match and Fitting Relative Permeability Model to Tabulated kr vs. Integrated Match

The steady-state type of experiment samples a wider saturation range and is therefore, in principle, better conditions for inverse matching of relative permeability (Berg et al. 2020). An example of a data set of a steady-state experiment is displayed in Fig. 7. The experiment was manually matched with tabulated relative permeability \(k_{r} \left( {S_{w} } \right)\) using a capillary pressure–saturation function \(p_{c} \left( {S_{w} } \right)\) which was measured independently on a twin sample using a multispeed centrifuge approach (Fig. 7d).

Fig. 7
figure 7

Raw data of the steady-state experiment. The manual (inverse) match of pressure drop (a) and saturation profiles (b) resulted in the tabulated relative permeability data (c). For the match an independently measured capillary pressure–saturation function (d)

In the manual match also saturation \(S_{w} \left( {x,t} \right)\) profiles were considered which were experimentally measured by in situ X-ray saturation monitoring. The match for saturation profiles \(S_{w} \left( x \right)\) between experimental data and model shown in Fig. 7b is not perfect. For early times at the inlet there is a significant mismatch which is caused by the spontaneous imbibition part of the \(p_{c} \left( {S_{w} } \right)\) function (not visible in Fig. 7d which shows only the force part, the \(p_{c}\) values of the spontaneous part are not accessible with the centrifuge method). However, the saturation profiles at the outlet match very well including the capillary end effect (Huang and Honarpour 1998). Figure 7b directly illustrates the value of including saturation profiles in the inverse modeling approach as it provides via the shape of the capillary end effect a much more specific consistency check with the capillary pressure–saturation function.

In Fig. 8 the respective assisted history match of the data from Fig. 7 is shown. For the assisted match, the cost function \(\chi^{2}\) also included the match of the saturation profiles \(S_{w} \left( {x,t} \right)\). For simplicity, pressure data and saturation profiles were matched with equal weight. In addition, also the capillary pressure–saturation function \(p_{c} \left( {S_{w} } \right)\) was matched, i.e., included in the cost function, using the Skjaeveland et al. (Skjaeveland et al. 1998) parameterization from Eq. (8). In Fig. 8 we directly compare using the Corey and the LET parameterization for relative permeability.

Fig. 8
figure 8

Fit of the flow model to an experimental steady-state experiment data set matching pressure drop and saturation profiles simultaneously. When using a Corey function (ad) there are significant mismatches with the experimental data in terms of pressure drop (red arrows in a) and also the saturation profiles do not match that well (b). The resulting relative permeability is significantly different than the manual match (c). When using LET functions (E–H) the match is significantly better both in terms of pressure drop (e) and saturation profiles (f). The resulting relative permeability (g) is also much closer to the manual match (f). Note that here an independently measured capillary pressure–saturation function (black dots in d, h) where fitted simultaneously, because \(S_{o,r}\) was allowed to vary during the match. It becomes obvious that in the case of Corey functions the match to the steady-state experiment is not consistent with the capillary pressure–saturation function (d), while in the case of LET functions the fit is overall consistent (h)

The matches in Fig. 8 with Corey and LET functions produced different relative permeability-saturation functions which are directly compared in Fig. 9a. They result in different fraction flow curves, different breakthrough behavior and differences in the production curves as shown in Fig. 9b–d. In other words, in terms of parameter estimates, the differences between the choice of Corey and LET models in the inverse modeling workflows may indeed matter.

Fig. 9
figure 9

The difference between the fit of the experimental data from Fig. 8 with Corey and LET functions produces significantly different relative permeability-saturation curves (a). Even though the difference in the fractional flow \(f_{w}\) may not look that significant (b) the resulting saturation profiles (c) and production curve (d) are different both in terms of breakthrough time and in terms of produced oil

5.3 Impact of Relative Permeability Parameterization on Uncertainty Range

The comparison between using Corey and LET functions in Fig. 8 has demonstrated that uncertainty arises alone from the choice of the relative permeability parameterization which falls into the category of model-based error. In order to investigate the impact of the choice of the relative permeability representation further, we separate the fit of the flow model to the raw experimental \({\Delta }p\) and \(S_{w} \left( x \right)\) data and the fit of the relative permeability model by considering the tabulated \(k_{r} \left( {S_{w} } \right)\) from the steady-state flow experiment from Fig. 7 as the starting point and then proceed with fitting the relative permeability model to the tabulated data. Even though it has been demonstrated previously (Berg et al. 2020) that this leads to an overall largely increased uncertainty range, it does provide conceptual insight into the inter-correlations of fit parameters in Corey and LET relative permeability parameterization which may add to uncertainty. Corey and LET functions have different numbers of fit parameters which allows on the one hand LET to fit the data better than Corey as shown in Fig. 8, but perhaps the additional number of parameters may also have disadvantages. That raises the question whether parameters could be kept fixed during the fit to reduce the degrees of freedom, and what the respective impact on the uncertainty range is. If fixing fit parameters, which ones would make the biggest impact?

From the direct comparison of the uncertainty ranges in Fig. 10 we see that fitting relative permeability data with the LET model produces somewhat larger uncertainty ranges than the Corey functions, which may be a consequence of the increased number of parameters and respective inter-correlations which will be addressed in Sect. 0 in more detail. However, keeping \(S_{w,c}\) and \(S_{o,r}\) constant during the fit significantly reduces the uncertainty range. The respective uncertainty for each fit parameter is listed in Table 1.

Fig. 10
figure 10

Fitting the tabulated relative permeability from the manual match with Corey (a–b) and LET functions (c–f) using an MCMC approach for realistic error bars. The uncertainty envelope was constructed by computing upper and lower bounding curves from fit \(\pm\) standard deviations for each fit parameter from Table 1. The forward experimental error by error propagation is indicated by the error bars (a, c, e). Even though the LET function seems to match the data better, the uncertainty envelope is larger than for the Corey fit, which provides a worse match to the data, in particular for the water relative permeability (b). The uncertainty envelope of the LET fit (c, d) is significantly reduced when keeping \(S_{w,c}\) and \(S_{o,r}\) fixed (ef)

Table 1 Fit results and standard deviation (Std) of individual fit parameters (see 1st column) for the tabulated relative permeability data from Fig. 10 with Corey (column 2,3) and LET functions (column 4,5)

Note that the least-squares fit provides a better (perfect) match with the data points for the LET model, also \(k_{r,o}\) close to \(S_{o,r}\), but the uncertainty ranges are unrealistically large. The MCMC method has a somewhat worse fit to the data points but provides the realistic uncertainty range, which is here the important aspect. Irrespective of the inverse modeling method chosen, we find that fixing \(S_{w,c}\) and \(S_{o,r}\) reduces the uncertainty significantly, which intuitively makes sense as they provide the coupling between wetting and non-wetting phase relative permeability.

5.4 Impact of Fixing \({\varvec{S}}_{{{\varvec{w}},{\varvec{c}}}}\) and \({\varvec{S}}_{{{\varvec{o}},{\varvec{r}}}}\) in the Integrated Match

The sensitivity assessment from Fig. 10 suggests that keeping Sw,c and So,r fixed during least squares fit will lead to an overall reduced uncertainty when fitting tabulated kr data. The respective values for Sw,c and So,r have been taken from the independently measured \(p_{c} \left( {S_{w} } \right)\) function (solid points in Fig. 8d,h). The question is how big the impact will be when fitting directly the flow model to the raw data. The main question is not only how much fixing \(S_{w,c}\) and \(S_{o,r}\) will reduce the uncertainty but mainly how much it impacts the outcome of the match itself.

In Fig. 11 we show the same match of the flow model with Corey and LET relative permeability parameterization to the raw data as in Fig. 8 but keep \(S_{w,c}\) and \(S_{o,r}\) fixed. We observe that keeping \(S_{w,c}\) and \(S_{o,r}\) fixed has only very little impact on the match of the LET model and the resulting relative permeability. That means when using an LET model we have to worry less about whether we should fix or constrain \(S_{w,c}\) and \(S_{o,r}\) through imposed bounds as the raw data (which includes pressure drop, saturation profiles but also the tabulated \(p_{c} \left( {S_{w} } \right)\)) already constrains the data sufficiently.

Fig. 11
figure 11

Fit of the flow model to an experimental steady-state experiment data set matching pressure drop and saturation profiles simultaneously as Fig. 8 in but keeping \(S_{w,c}\) and \(S_{o,r}\) fixed. While for the LET model the impact on relative permeability is very minor (e–h), for the Corey model while having better consistency with \(p_{c} \left( {S_{w} } \right)\) (d) there is a significant mismatch with the pressure drop data (a). This makes it obvious that the Corey model cannot produce a consistent match with both experimentally measured pressure drop data in the steady-state experiment and the independently measured capillary pressure data

But there is an impact for the Corey representation. The match of the pressure profiles \({\Delta }p\) for each fractional flow is significantly worse than for the match in Fig. 9 where \(S_{w,c}\) and \(S_{o,r}\) are varied during the least squares fit, in particular after the \({\Delta }p\) maximum. The resulting relative permeability is also significantly different from the case where \(S_{w,c}\) and \(S_{o,r}\) are varied. They are also different from the LET match. From the trend one could even argue that differences between Corey and LET increase when keeping \(S_{w,c}\) and \(S_{o,r}\) fixed.

In other words, it appears as if the Corey parameterization already over-constrains the match and reducing the mismatches with the experimental data cannot be “forced” by constraining individual fit parameters more by imposing more restrictive bounds or fixing parameters.

The comparison of Figs. 11 and 8 clearly shows the impact of the choice of relative permeability parameterization. On the one hand it is clear that independent constraints such as \(S_{o,r}\), e.g., from an independently measured \(p_{c} \left( {S_{w} } \right)\) are always desirable as this leads to a de-coupling of correlations between fit parameters which will be discussed later in Sect. 3.6. However, when applying such a constraint, potential inconsistencies and other problems with the choice of the relative permeability parameterization are largely masked and are only indirectly visible as, e.g., a sub-optimal match of the pressure data (Fig. 11). By allowing \(S_{o,r}\) to vary, however, as shown in Fig. 8, the inconsistencies become clearly visible though the significant mismatch with the \(S_{o,r}\) from the \(p_{c} \left( {S_{w} } \right)\) function (Fig. 8D). This illustrates the usefulness of inverse modeling as diagnostic tool.

5.5 Uncertainty Ranges for Corey and LET Models in Integrated Match

The remaining question is now what the associated uncertainties are. As we have experienced already in a previous work (Berg et al. 2020) the uncertainty estimate from least squares fits can be unreliable when fit parameters run into imposed bounds. Therefore, the more reliable Markov chain Monte Carlo method will be used for the uncertainty assessment when fitting the flow model to the data.

For a full uncertainty analysis the least squares fit from Fig. 8 (where Sw,c and So,r are varied during the fit) was re-run with a Markov chain Monte Carlo (MCMC) simulation of the whole flow model (also varying Sw,c and So,r) with 20,000 iterations. The matches and resulting relative permeability are similar as these in Fig. 8 and, therefore, not shown. The respective error ellipses and posterior distributions are shown in Fig. 12.

Fig. 12
figure 12

Corner plot of MCMC simulation (20,000 iterations) of the whole flow model to experimental \(\Delta p\) and \(S_{w} \left( x \right)\) data with LET (a) and Corey models (b). The diagonal elements represent the probability density function of the respective parameter on the horizontal axis. The off-diagonal elements represent the error ellipses for pairs of 2 fit parameters, i.e., cuts through the multidimensional parameter space. Note that LET (a) and Corey (b) fits have different numbers of fit parameters. Key parameter pairs with similar interpretation for both LET and Corey functions are marked with colored frames as a guide to the eye

A magnification of the upper 4 × 4 region covering the parameters \(S_{w,c}\), \(S_{o,r}\), \(k_{r,w}^{0}\) and \(k_{r,o}^{0}\) is shown in Fig. 13. There are several commonalities for both the LET and the Corey functions. For both relative permeability parameterizations, the fit has run into an upper or lower bound of a fit parameter which causes the error ellipses to be “cutoff.” While MCMC handles the uncertainty correctly, this causes problems with the uncertainty analysis from the covariance matrix of least squares fits.

Fig. 13
figure 13

Magnified upper 4 × 4 region (covering the parameters \(S_{w,c}\), \(S_{o,r}\), \(k_{r,w}^{0}\) and \(k_{r,o}^{0}\)) of the corner plot from Fig. 12 of MCMC simulation (20,000 iterations) of the whole flow model to experimental \(\Delta p\) and \(S_{w} \left( x \right)\) data with LET (a) and Corey models (b). Diagonal error ellipses indicate correlations between the respective parameters. For the LET parameterization (a) we see overall more diagonal error ellipses than for Corey parameterization (b) which suggests that for LET the fit parameters are overall more correlated

In terms of the size of error ellipses, i.e., uncertainty ranges there are no dramatic differences between LET and Corey functions which can be directly seen in Table 2. Even though the standard deviation is consistently smaller for Corey fits they are both in the second decimal or smaller which is a range where in practice it would not make any difference.

Table 2 LET and Corey parameters from the MCMC fit and respective standard deviations

For both relative permeability parameterizations, the error ellipses are diagonal for several parameter pairs which suggests correlations between the respective fit parameters which will be discussed in more detail in Sect. 0. Only the location and orientation of error ellipses are entirely different for LET and Corey functions illustrating that the fit converged to a different optimum. Also, for the Corey function the error ellipses appear more compact, while for the LET function show often elongated trajectories outside of the main error ellipses with several local minima. Possible reasons are that the LET function as more degrees of freedom which can lead to possible more non-uniqueness (Berg et al. 2020).

Whether the error ellipses from Figs. 12 and 13 truly reflect the uncertainty is also connected to the question whether the residuals, i.e., the mismatch between model and experimental data in the \({\Delta }p\) and \(S_{w} \left( x \right)\) space are symmetric and random and fall within the standard deviation of the experimental data. As we can see in Fig. 14 this is not the case, neither for Corey nor LET functions. There are systematic deviations in both pressure \({\Delta }p\) and saturation \(S_{w} \left( x \right)\) outside of the typical standard deviation of the experimental data. Even though generally, for LET the residuals are smaller than for Corey functions, both relative permeability representations do not fully represent the data, or there are actually issues with the underlying flow model. It is clear that this is less the case for the LET model, which clearly points out that with LET functions the experimental data are described better which makes LET the preferred function compared with Corey functions.

Fig. 14
figure 14

Residuals for pressure (a,c) and saturation (b,d) of the MCMC match using a Corey (A,B) and an LET function (c,d). For the LET the residuals are notably smaller than for the Corey function

5.6 Correlation of Fit Parameters

In the previous sections we have seen already various indications for correlations between fit parameters. That can cause errors of individual parameters to increase because uncertainty of one parameter can be “lumped” via the cross-correlation into another parameter. Correlations of fit parameters can be obtained from the covariance matrix of the least squares fit. The (symmetric) correlation matrix \(C\left( X \right)\) is obtained from the covariance matrix of the least squares fit by

$$\begin{array}{*{20}c} {cov\left( {X,Y} \right) = K_{XY} } \\ {corr\left( X \right) = C\left( X \right) = \left( {diag\left( {K_{XX} } \right)} \right)^{{ - \frac{1}{2}}} K_{XX} \left( {diag\left( {K_{XX} } \right)} \right)^{{ - \frac{1}{2}}} } \\ \end{array}$$
(15)

A high degree of correlation is indicated by larger positive values of, e.g., \(C = + 1\) and anti-correlation by large negative values of, e.g., \(C = - 1\).

We begin the correlation analysis with the fit of the tabulated \(k_{r}\) from Fig. 10 using Corey and LET functions. We see strong correlations and anti-correlations between all fit parameters, in particular between at least one of the endpoint \(k_{r}\) and other fit parameters, both for Corey and LET fits, as illustrated in the visualization of the correlation matrix from Eq. (13) displayed in Fig. 15 shows. Note that since the correlation matrix is symmetric and diagonal elements are per definition 100% correlated, i.e., \(C = 1\), only the lower-half off-diagonal elements are displayed.

Fig. 15
figure 15

Correlation matrix for the fit of the tabulated \(k_{r}\) from Fig. 10 using a Corey function (a) and an LET function (b). In both cases there are high correlations (\(C \approx { } + 1\)) or anti-correlations (\(C \approx { } - 1\)) between at least one of the relative permeability endpoints and the other fit parameters. When keeping \(S_{w,c}\) and \(S_{o,r}\) fixed, the correlations are significantly smaller (c) and occur only between \(T\) and \(E\) which has very little impact on the shape of the curve. This indicates that indeed, \(S_{w,c}\) and \(S_{o,r}\) are mainly responsible for the high correlations of fit parameters because they represent the coupling between \(k_{r,w}\) and \(k_{r,o}\). When keeping two other parameters fixed, e.g., \(T_{w}\) and \(T_{o}\) the correlations are again high (d)

In both cases there are high correlations (\(C \approx + 1\)) or anti-correlations (\(C \approx - 1\)) between at least one of the relative permeability endpoints and the other fit parameters. When keeping \(S_{w,c}\) and \(S_{o,r}\) fixed, the correlations are significantly smaller and for the LET model occur only between \(T\) and \(E\) which has very little impact on the shape of the curve. This indicates that indeed, \(S_{w,c}\) and \(S_{o,r}\) are mainly responsible for the high correlations of fit parameters because they represent the coupling between \(k_{r,w}\) and \(k_{r,o}\). When keeping two other parameters fixed, e.g., \(T_{w}\) and \(T_{o}\) the correlations are again high. This suggests that the root cause is the coupling between \(k_{r,w}\) and \(k_{r,nw}\) via \(S_{w,c}\) and \(S_{o,r}\). When performing a LET fit with \(S_{w,c}\) and \(S_{o,r}\) fixed, the correlations are much weaker, only occurring between \(T_{w,o}\) and \(E_{w,o}\) which does not have a significant impact on the shape of the curve. When allowing \(S_{w,c}\) and \(S_{o,r}\) to vary and fix two other parameters, e.g., \(T_{w,o}\), again very high correlations or anti-correlations are observed.

Interestingly, fitting the whole flow model (without fixing \(S_{w,c}\) and \(S_{o,r}\)) does overall diminish the correlations between fit parameters not significantly as shown in Fig. 16. The impact is bigger for the Corey model than the LET model. However, individual correlations can change significantly compared with fitting tabulated \(k_{r}\), in particular for the LET model.

Fig. 16
figure 16

Correlation matrix for the fit of the whole flow model directly to the experimental data from Fig. 8 using a Corey function (a) and a LET function (b)

Ultimately, the correlations assuming still significant magnitude suggest that both Corey and LET models are not yet optimum parameterizations for the experimental data. While the Corey model appears to be over-constrained which results in mismatches with the experimental data, the LET model has more degrees of freedom that allows a better description of the data, but cross-correlations of fit parameters and non-Gaussian residuals indicate that we are still dealing with a phenomenological parameterization that is not yet the optimum description of the data. This may be the starting point for a comparison of different flow models and relative permeability cross-terms.

6 Summary and Conclusion

In this work, an assisted history matching workflow where experimental core flooding data are matched to the numerical solution of two-phase Darcy equations and the relative permeability functions are extracted. The associated uncertainty was investigated by inverse modeling, and the impact of relative permeability parameterization on the uncertainty of multiphase flow models was studied. The analysis focused on two main areas: (1) uncertainties arising from different weights of experimental data in the cost function, (2) the choice of the relative permeability parameterization. The assessment was based on the two-phase Darcy equations; the Corey and LET relative permeability parameterizations were compared.

Inverse modeling requires some level of choices: these range from the parameterization of, e.g., relative permeability-saturation functions to weights of the different type of constraining experimental data in the cost function and the overall matching strategy (manual vs. full model match). This work illustrates the impact of these choices on the result and the uncertainty ranges in the inverse modeling process. Because of the highlighted problems and impact of choices, the inverse modeling does not provide a universal solution; rather, it should be seen as a diagnostic tool that exposes the limitations in interpretation workflows which exist irrespective of inverse modeling or other interpretation strategies that are used. Future work is aimed at assessing whether better choices in interpretation workflows and optimized experimental workflows can minimize these issues.

This work also demonstrates the problems associated with simple modeling of the experiments using manual matches or simple search routines where all parameters in the governing equations are varied. Rather, as many parameters as possible should be found independently before fitting those that remain.