1 Introduction

The Riemann problem was introduced by Riemann in [1] for systems of hyperbolic conservation laws describing gas dynamics [2], Chap. 18]. In Lax’s comprehensive discussion of such systems [3], it was proved that for strictly hyperbolic systems (i.e., the eigenvalues of the system Jacobian are distinct), there is a unique solution of the Riemann problem provided the boundary data given by two constant states \(v^\mathrm{L}\) and \(v^\mathrm{R}\) are sufficiently close (in a precise sense). It has been demonstrated that Riemann problems for two-phase flow with multiple components typically are non-strictly hyperbolic. Nevertheless, some of these problems even with global data have been solved, e.g., [4, 5].

The basis for this paper is a general model for flow of two immiscible fluid phases in a one-dimensional porous medium. Assuming the flow is also incompressible and dispersion free, the Riemann problem for this model is

$$\begin{aligned} \left( v+a(v)\right) _{t}+f(v)_{x}=\ 0, \quad v(0,t)=v^\mathrm{L}, \quad v(x,0)=v^\mathrm{R}, \end{aligned}$$
(1)

where \(x\in [0,L], t \geqslant 0\), \(v=v(x,t)\in {\mathbb {R}}^n\), and \(a(v),f(v)\in {\mathbb {R}}^n\) are given twice differentiable functions, and \(v^\mathrm{L}\), \(v^\mathrm{R}\) are given constant states. We assume this system is hyperbolic, i.e., the eigenvalues of the Jacobian df are real. When the total volumetric flow rate (i.e., flow velocity) is also assumed to be constant, Riemann problems of the form (1) in some cases have known solutions, as will be reviewed in Sect. 2. In these cases, \(v\) represents overall component concentrations, \(f\) is a given component fractional flux function, and \(a\) is a given model for the stagnant component concentration, e.g., caused by components being adsorbed on the solid parts of the porous rock.

The known solutions to the Riemann problem (1) only apply to the situations where the total volumetric flux is constant, in which cases the solutions of (1) are self similar, \(v(x,t)=v(\xi );\xi =x/{t}\). If instead the pressures at the medium boundaries \(x=0,x=L\) are kept constant, the volumetric flux will not be constant, and solutions will therefore not be self similar.

In this paper, we consider the following problem associated with (1):

$$\begin{aligned} \left( u +a(u)\right) _{t}+U(t)f(u)_{x}=\ 0,\, \quad u(0,t)=u^\mathrm{L}, \quad u(x,0)=u^\mathrm{R}, \quad p(0,t)=p^\mathrm{L}, \quad p(L,t)=p^\mathrm{R}, \end{aligned}$$
(2)

The total volumetric flux \(U(t)\geqslant 0\) is related to the pressure \(p(x,t)\) through Darcy’s Law for the simultaneous flow of the two phases:

$$\begin{aligned} U(t)=-\Lambda (u)p_x, \end{aligned}$$
(3)

where \(\Lambda (u)\) is the total mobility of the fluid system. This total mobility is assumed to be known as a function of \(u\). It is assumed to be a smooth function, as is supported by a vast amount of physical experiments. The function \(U(t)\) in (2) is continuous, and \(p\) is piecewise differentiable in both \(x\) and \(t\). Since we assume incompressible flow, there cannot be any fluid accumulation anywhere in the medium at any time. Therefore, \(U\) is a function of \(t\) only. Adding the pressure boundary data in (2) to the data in (1) could render the system overdetermined. However, in (2) \(U(t)\) has become an unknown function as opposed to in (1) where \(U \equiv 1\), and it is shown below that \(U(t)\) in (2) is uniquely determined.

The main result of the paper is the following.

Theorem 1

If the Riemann problem (1) has a solution \(v\), the associated problem (2) also has a solution \(u,\ p,\ U(t)\), where \(u\) is given by

$$\begin{aligned} u(x,t)=v\left( \frac{x}{\Psi (t)} \right) , \end{aligned}$$
(4)

where

$$\begin{aligned} \Psi (t)=\int _{0}^{t}U(\tau )\,\mathrm{d}\tau . \end{aligned}$$
(5)

Furthermore, \(U(t)\) is uniquely determined from \(u(x,t)\) and the model boundary conditions, whereupon \(p(x,t)\) is uniquely determined from (3).

The determination of \(U(t)\) is given in Sect. 3. It is constructive in the sense that the function \(U(t)\) is uniquely determined in an algorithmic fashion.

We first review the structure of solutions of Riemann problems (1). Such a solution consists of a sequence of \(n+1\) constant states \(v^\mathrm{L}=v_0, v_1,\ldots , v_{ n}=v^\mathrm{R}\) separated by \(n\) elementary waves \(w_i(\xi )\), each of which is a shock (or contact discontinuity) or a smooth rarefaction wave. If we denote the smallest and largest velocities for the \(i\)th wave by \(\sigma _i^-\) and \(\sigma _i^+\), respectively, the solution of (1) can be written

$$\begin{aligned}&v^\mathrm{L}=v_0 ; \quad 0 \leqslant x \leqslant y_1=\sigma _1^-t, \nonumber \\&w_1(\xi ); \quad y_1 \leqslant x \leqslant x_1=\sigma _1^+t, \nonumber \\&\qquad \qquad \vdots \nonumber \\&v_{i-1} ; \quad x_{i-1} \leqslant x \leqslant y_i=\sigma _i^-t,\nonumber \\&w_i(\xi ); \quad y_i \leqslant x \leqslant x_i=\sigma _i^+t,\nonumber \\&\qquad \qquad \vdots \nonumber \\&v^\mathrm{R}=v_n; \quad \sigma _n^+t =x_n \leqslant x \leqslant L. \end{aligned}$$
(6)

If the \(i\)th wave is a rarefaction wave,

$$\begin{aligned} \frac{\mathrm{d}w_i(\xi )}{\mathrm{d}\xi }=r_i\left( w_i(\xi ) \right) \!, \end{aligned}$$
(7)

where \(r_i \in {\mathbb {R}}^n\) is the right eigenvector of df corresponding to the eigenvalue \(\lambda _i\). We also have \(\sigma _i^-=\lambda _i(v_{i}); \sigma _i^+=\lambda _i(v_{i+1})\). If the \(i\)th wave is a shock, the classical Rankine–Hugoniot condition for material balance across a shock is

$$\begin{aligned} \sigma _i^+=\sigma _i^-=\frac{[(f)_1]}{[(v)_1+\left( a_1(v)\right) _1]}=\cdots =\frac{[(f)_n]}{[(v)_n+\left( a_n(v)\right) _n]}, \end{aligned}$$
(8)

where \((\quad )_j\) denotes vector components and \([\quad ]\) is the jump in value across a shock.

We next describe the way the wave structures of (1) and (2) are related. Clearly, the right eigenvectors of df and \(U(t)\)df are the same, and if \(\lambda \) is an eigenvalue of df, \(U(t)\lambda \) is an eigenvalue of \(U(t)\)df. This defines the relationship between rarefaction waves for the two systems. Also, if \(\sigma \) is a shock velocity for (1) satisfying (8), \(U(t)\sigma \) is a shock velocity for (2). Let \((x,t)\) be given. For any wave value \(w_i(x/t)\) for (1) with velocity \(\sigma \),

$$\begin{aligned} \frac{\mathrm{d}x}{\mathrm{d}t}=\sigma \quad \mathrm{or} \quad x=\sigma \cdot t. \end{aligned}$$
(9)

Since \(U(t)\) is continuous, the location \(X\) of \(w_i(x,t)\) in a solution of (2) is well defined and

$$\begin{aligned} \frac{\mathrm{d}X}{\mathrm{d}t}=U(t)\sigma \quad \mathrm{or} \quad X=\Psi (t)\sigma . \end{aligned}$$
(10)

Hence, since \(U\equiv 1\) in (1) and \(v\) is self similar,

$$\begin{aligned} u(x,t)=v\left( \frac{1\cdot t}{\Psi (t)}x,t \right) =v\left( \frac{x}{\Psi (t)} \right) , \end{aligned}$$
(11)

which proves (4). The remainder of the proof of the Theorem 1 is the construction of \(U(t)\), which is given in Sect. 3. Once \(U(t)\) is known, \(p(x,t)\) follows from (3). We also formulate and prove two results on the smoothness of \(U(t)\) in Sect. 3.

In Sect. 2, we discuss the previous literature related to Riemann problem of the form (1). In Sect. 4, we present a calculated example and compare the analytical solutions in this paper with numerical solutions obtained from a first-order finite-difference method.

2 Previous work

In addition to being useful in interpretation of core flood experiments with constant pressure boundaries, the results in this paper also offer applications in numerical simulation. For example, streamline simulation is frequently used by the oil industry to compute fluid flow in reservoirs between injectors and producers [6, 7]. In streamline simulations, the pressure distribution is first solved from an elliptic equation subject to simplifying assumptions. Subsequently, streamlines are generated using the pressures, and finally, the fluid flow between injectors and producers can be calculated analytically along streamlines, provided that the Riemann problem at hand has a known solution. The popularity of this approach is primarily because of considerable time savings compared to conventional simulations. Previous streamline simulations using solutions of Riemann problems along streamlines could only be performed for cases of constant flow rates. A more common way to operate wells is by keeping flowing well bore pressure constant. The solutions derived in this paper therefore widen the applicability of streamline simulations. Riemann problem solutions can also be used as building blocks for the construction of numerical methods which can be used with general boundary conditions. Examples of this are the Random Choice Method, [810], and Godunov’s Method, [11].

Global solutions for many hyperbolic Riemann problems have yet to be found. A general theory for local existence and uniqueness of solutions of Riemann problems is described in [3] under the condition of strict hyperbolicity (distinct eigenvalues of the Jacobian).

However, flow phenomena in porous media are typically not strictly hyperbolic. The most well-known Riemann problem pertinent to the oil industry is the Buckley–Leverett theory for water injection in an oil reservoir [12, 13]. It is a single hyperbolic equation modeling the conservation of water. The conservation of oil is taken care of through the assumption of constant volumetric flux \(U\) both in space and time. Lake in [14], Chap. 5] gives a comprehensive description and easy to follow methodology for using and applying the Buckley–Leverett theory.

The first non-strictly multicomponent problem appearing in the literature with a complete global solution seems to be for single-phase (water) flow with dissolved components that adsorb on the rock in a nonlinear and coupled fashion, [4]. The adsorption causes a chromatographic separation of the individual components. A global solution of a non-strictly hyperbolic system modeling polymer flooding with nonlinear adsorption was presented in [15]. Here, the water phase contains dissolved polymer for the purpose of increasing the water viscosity to enhance sweep efficiency. Again, this was for constant volumetric flux in space and time. An example using this solution with constant pressure boundaries is presented in Sect. 4 of this paper.

A system with multiple adsorbing polymer components with decoupled adsorption was presented in [16]. This was generalized to a coupled adsorption model in [5]. A system describing four components, two-phase flow with components partitioning between the two phases was analyzed in [17, 18]. A comprehensive discussion and analysis of this is also presented in Orr [19], Chap. 5].

3 Construction of \(U(t)\). Proof of Theorem 1

In this section, we will use the following notation for a solution of  (2), see Eqs. (6) and (10):

(12)

The construction of \(U(t)\) consists of two main cases. If \( t_{\mathrm{BT},i} \) is the time when the \( i\)th wave is breaking through at \( x = L \), we consider

Case I: \( t \leqslant t_{\mathrm{BT},n}, \)

Case II: \( t_{\mathrm{BT},n} \leqslant t \leqslant t_{\mathrm{BT},n-1}. \)

The general result will then follow recursively from Case I and Case II, as will be explained at the end of this section.

Figure 1 shows an example with 4 waves \(w_1,w_2,w_3,w_4\) separated by the sequence of constant states \(v_o=v^\mathrm{L}, v_1, v_2, v_3, v_4=v^\mathrm{R}\). Case I is at a time before the fastest wave \(w_4\) breaks through at \(x=L\) (i.e., \(t\leqslant t_{\mathrm{BT},4}\)), and Case II is at a time after the fastest wave \(w_4\) has reached \(x=L\) and before the following wave \(w_3\) reaches \(x=L\) (i.e., \(t_{\mathrm{BT},4} \leqslant t\leqslant t_{\mathrm{BT},3}\)).

Fig. 1
figure 1

Example of waves and constant states

3.1 Case I. \( t \leqslant t_{\mathrm{B}T,n} \)

Assume u, \( U(t) \), \( p(x,t) \) is a solution of (2) and \( w_{i} \) is a rarefaction wave in u which we parameterize by \( s \in \left[ s_{i-1}, s_{i}\right] \); \( w_{i} (s_{i-1}) = Y_{i} \); \( w_{i}(s_{i})= X_{i} \).

By (3),

$$\begin{aligned} p(Y_{i},t) - p(X_{i},t) = U(t)\int \limits _{Y_{i}}^{X_{i}} \frac{\mathrm{d}x}{\Lambda (w_{i})}. \end{aligned}$$
(13)

If \( \lambda _{i} \) is the eigenvalue of \( df \) corresponding to \( w_{i} \), since \( f \) by assumption is twice differentiable, the eigenvalues of \( df \) are smooth and (10) gives

$$\begin{aligned} \frac{\mathrm{d}X}{\mathrm{d}s} = \Psi (t) \frac{\mathrm{d}\lambda _{i}}{\mathrm{d}s}. \end{aligned}$$
(14)

Hence,

$$\begin{aligned} p(Y_{i},t) - p(X_{i},t)= U(t)\Psi (t)\int \limits _{s_{i-1}}^{s_{i}}\frac{1}{\Lambda (w_{i})}\frac{\mathrm{d}\lambda _{i}}{\mathrm{d}s}\mathrm{d}s. \end{aligned}$$
(15)

If \( w_{i} \) is a shock, then

$$\begin{aligned} p(Y_{i},t) - p(X_{i},t)= 0, \end{aligned}$$
(16)

since \( p \) is continuous.

We define

$$\begin{aligned} {\mathcal {J}}_{i} = \left\{ \begin{array}{l@{\quad }l} 0 &{} \text{ if } w_i \text{ is } \text{ shock }, \\ \displaystyle \int \limits _{s_{i-1}}^{s_{i}}\frac{1}{\Lambda (w_{i})}\displaystyle \frac{\mathrm{d}\lambda _{i}}{\mathrm{d}s}\mathrm{d}s &{} \text{ if } w_i \text{ is } \text{ rarefaction. } \end{array} \right. \end{aligned}$$
(17)

Then, the following applies to both rarefactions and shocks:

$$\begin{aligned} p(Y_{i},t) - p(X_{i},t)= U(t)\Psi (t){\mathcal {J}}_{i}. \end{aligned}$$
(18)

When integrating (3) between \( X = 0 \) and \( X = L \) , we get (since in case I, \( X_{n}\leqslant L \)):

$$\begin{aligned} p^\mathrm{L} - p^\mathrm{R} = U(t)\left[ \sum \limits _{i=1}^{n-1}\left( \frac{Y_{i+1}-X_{i}}{\Lambda (v_{i})}+\Psi (t){\mathcal {J}}_{i}\right) + \frac{L - X_{n}}{\Lambda (v^\mathrm{R})}\right] . \end{aligned}$$
(19)

We next use (10) to relate the end points \( Y_{i} \), \( X_{i} \) of any wave to the leading edge of the fastest wave, \( X_{n} \).

From (10),

$$\begin{aligned} \left[ Y_{i},X_{i}\right] = \left[ \sigma _{i}^{-}\Psi (t),\sigma _{i}^{+}\Psi (t)\right] , \end{aligned}$$
(20)

and

$$\begin{aligned} X_{n} = \sigma _{n}^{+}\Psi (t). \end{aligned}$$
(21)

Hence,

$$\begin{aligned} \frac{\mathrm{d}Y_{i}}{\mathrm{d}X_{n}} = \frac{\sigma _{i}^{-}}{\sigma _{n}^{+} } = \beta _{i} \ \ \mathrm{and} \ \ \frac{\mathrm{d}X_{i}}{\mathrm{d}X_{n}} = \frac{\sigma _{i}^{+}}{\sigma _{n}^{+} } = \alpha _{i}, \end{aligned}$$
(22)

where \( \alpha _{i}\), \( \beta _{i} \) are constants. Hence, since \( X_{i} = Y_{i} \) at \( t = 0 \),

$$\begin{aligned} Y_{i} = \beta _{i}X_{n}; \ X_{i} = \alpha _{i}X_{n}. \end{aligned}$$
(23)

Substituting (23) in (19) and rearranging and also using \( X_{n} = \Psi (t)\sigma _{n}^{+} \), we arrive at

$$\begin{aligned} \Delta p = U(t)\left[ \left( \sum \limits _{i=1}^{n-1}\left( \frac{\beta _{i+1}-\alpha _{i}}{\Lambda (v_{i})} + \frac{{\mathcal {J}}_{i}}{\sigma _{n}^{+}}\right) - \frac{1}{\Lambda (v^\mathrm{R})}\right) X_{n} + \frac{L}{\Lambda (v^\mathrm{R})}\right] . \end{aligned}$$
(24)

Solving (24) for \( U(t) \) and substituting in (10),

$$\begin{aligned} \frac{\mathrm{d}X_{n}}{\mathrm{d}t}= U(t)\sigma _{n}^{+}. \end{aligned}$$
(25)

Hence,

$$\begin{aligned} \frac{\mathrm{d}X_{n}}{\mathrm{d}t}= \frac{\Delta p \sigma _{n}^{+}}{AX_{n} + B}, \end{aligned}$$
(26)

where \( \Delta p \), \( A \), \( B \) are constants given by

$$\begin{aligned} \Delta p = p^\mathrm{L} - p^\mathrm{R}, \end{aligned}$$
(27)
$$\begin{aligned} A = \sum \limits _{i=1}^{n-1}\left( \frac{\beta _{i+1} - \alpha _{i}}{\Lambda (v_{i})}+\frac{{\mathcal {J}}_{i}}{\sigma _{n}^{+}}\right) - \frac{1}{\Lambda (v^\mathrm{R})}, \end{aligned}$$
(28)
$$\begin{aligned} B = \frac{L}{\Lambda (\nu ^{\mathrm{R}})}. \end{aligned}$$
(29)

Integrating the separable Eq. (26), we find an explicit expression for \( X_{n} \) as a function of time:

$$\begin{aligned} X_{n} = \frac{-B + \sqrt{B^{2} + 4ACt}}{A}, \end{aligned}$$
(30)

where

$$\begin{aligned} C = 2\Delta p \sigma _{n}^{+}. \end{aligned}$$
(31)

The unknown velocity \(U(t)\) is then determined explicitly from  (24),

$$\begin{aligned} U(t) = \frac{\Delta p}{\sqrt{B^{2} + 4ACt}}. \end{aligned}$$
(32)

The pressure distribution \( p(x,t) \) can now be calculated from (3) using (32).

3.2 Case II. \( t_{\mathrm{BT},n} \leqslant t \leqslant t_{\mathrm{BT},n-1} \)

If \( w_{n} \) is a shock, \( X_{n} = Y_{n} \). Therefore, in this case, \( v^\mathrm{R} \) is no longer present in \( \left[ 0,L\right] \) and the situation is identical to case I with \( v^\mathrm{R}:=v_{n-1} \) and \( n:= n-1 \). It therefore suffices to consider \( w_{n} \) being a rarefaction wave. Let this smooth wave be parameterized by \( s\in \left[ s_{n-1},s_\mathrm{R}\right] \) with \( w_n(s_{n-1}) = v_{n-1} \) and \( w_{n}(s_\mathrm{R}) = v^\mathrm{R} \). Let \(s\) be arbitrary but fixed in this interval, and let \( t_{s} \) be the time when \( w_{n}(s) \) reaches \( X = L \). We will next determine \( U(t_{s}) \) which will complete case II since \( s \) was arbitrary. Let \( t^{*} \) be the time when the leading edge of \( w_{n} \) reaches \( L \), i.e., \( X_{n} = L \). Let \( X(s,t^{*}) \) be the location of \( w_{n}(s) \) at \( t = t^{*} \). Let \(\overline{t} \in \left[ t^{*}, t_{s}\right] \) be arbitrary. The movement of \( w_{n} \) is depicted in Fig. 2 as three profiles at times \( t^{*} \), \( \overline{t} \) and \( t_{s} \) vs. \( X \).

Fig. 2
figure 2

The rarefaction wave at three different times after its leading edge has reached \(x=L\)

In order to capture the dynamics of the system, it is necessary to determine \( U(\overline{t}) \); \( \overline{t} < t_{s} \) and then,

$$\begin{aligned} U(t_{s})= \lim \limits _{\overline{t} \rightarrow t_{s}}U(\overline{t}). \end{aligned}$$

Let \( \overline{s} \) be the parameter for which \( X_{n}(\overline{s})=L \) at \( t=\overline{t} \). Then, by (10), similar to (19) with \( w_{n} \) being a rarefaction wave,

$$\begin{aligned} \Delta p = U(\overline{t})\left[ \sum \limits _{i=1}^{n-1}\frac{Y_{i+1}-X_{i}}{\Lambda (v_{i})}+\Psi (\overline{t})\sum \limits _{i=1}^{n-1}{\mathcal {J}}_{i} +\Psi (\overline{t})\int \limits _{s_{n-1}}^{\overline{s}} \frac{1}{\Lambda (\omega _{n})}\frac{\mathrm{d}\lambda _{n}}{\mathrm{d}s}\mathrm{d}s\right] . \end{aligned}$$
(33)

Using (10),

$$\begin{aligned} \Psi (\overline{t}) = \frac{X(\overline{t},s)}{\lambda _{n}(s)} \ \end{aligned}$$
(34)

and

$$\begin{aligned} U(\overline{t})=\frac{1}{\lambda _{n}(s)}\frac{\mathrm{d}X(\overline{t},s)}{\mathrm{d}t}. \end{aligned}$$
(35)

Similar to (22), we define

$$\begin{aligned} \frac{\mathrm{d}Y_{i}}{\mathrm{d}X(\overline{t},s)}=\beta _{i}; \quad \frac{\mathrm{d}X_{i}}{\mathrm{d}X(\overline{t},s)}=\alpha _{i} \end{aligned}$$
(36)

and find

$$\begin{aligned} Y_{i}=X(\overline{t},s)\beta _{i}; \quad X_{i}=X(\overline{t},s)\alpha _{i}. \end{aligned}$$
(37)

In (33), we substitute (34) for \( \Psi (\overline{t}) \), \( X_{i} \) and rearrange, to arrive at

$$\begin{aligned} X(\overline{t},s)\frac{\mathrm{d}X(\overline{t},s)}{\mathrm{d}t}=\frac{\Delta p \lambda _{n}^{2}(s)}{A_{1}\lambda _{n}(s)+B_{1} +\displaystyle \int \limits _{s_{n-1}}^{\overline{s}}\frac{1}{\Lambda (\omega _{n})}\frac{\mathrm{d}\lambda _{n}}{\mathrm{d}s}\mathrm{d}s}, \end{aligned}$$
(38)

where

$$\begin{aligned} A_{1} = \sum \limits _{i=1}^{n-1}\frac{\beta _{i+1}-\beta _{i}}{\Lambda (v_{i})}; \quad B_{1} = \sum \limits _{i=1}^{n-1}{\mathcal {J}}_{i}. \end{aligned}$$
(39)

Integrating (33) between \( t^{*} \) and \( \overline{t} \) and letting \( \overline{t} \rightarrow t_{s} \), we find

$$\begin{aligned} X(t^{*},s)^{2} - L^{2} = \frac{2 \Delta p \lambda _{n}(s)^{2}(t_{s} - t^{*})}{A_{1}\lambda _{n}(s)+B_{1}+\displaystyle \int \limits _{s_{n-1}}^{s} \frac{1}{\Lambda (\omega _{n})}\frac{\mathrm{d}\lambda _{n}}{\mathrm{d}s}\mathrm{d}s}. \end{aligned}$$
(40)

We then go back to (30), from which we can calculate \( t^{*} \) (with \( X_{n} = L \)). Furthermore,

$$\begin{aligned} X(t^{*},s)=\Psi (t^{*})\lambda _{n}(s). \end{aligned}$$
(41)

Therefore, (40) provides an explicit expression for \( t_{s} \). Re-introducing \( U(t_{s}) \) in (40), we find

$$\begin{aligned} U(t_{s})=\frac{X(t^{*},s)^{2}-L^{2}}{2L\lambda _{n}(s)(t_{s}-t^{*})}. \end{aligned}$$
(42)

To summarize, \( t^{*} \) is calculated from (30), then \( t_{s} \) is calculated from (40), and finally \( U(t_{s}) \) from  (42). Since \( s \) was arbitrary, this completes Case II.

The two above cases complete the proof of Theorem 1, since once the fastest wave is no longer present in \( \left[ 0, L \right] \), we can repeat the construction of \( U(t) \) with \( v^\mathrm{R} = v_{n-1} \); \( n:= n-1 \).

In this section, we finally discuss and prove a Proposition on the smoothness of the total velocity \(U(t)\). This is done by considering the critical times when the leading and trailing points (\(X_i\) and \(Y_i\)) of different waves pass the outlet end \(X=L\) of the medium.

It is not immediately clear that (42) is consistent with the fundamental equations in (10) as \(t_s \rightarrow t^*\). However, we have

$$\begin{aligned} \lim _{t_s \rightarrow t^*} \frac{\mathrm{d}X(t^*,s)}{\mathrm{d}t}= & {} \lim _{t_s \rightarrow t^*} \frac{X(t^*,s)-L}{t^*-t_s} = \lim _{t_s \rightarrow t^*}\frac{X^2(t^*,s)-L^2}{(X(t^*,s)+L)(t^*-t_s)}\nonumber \\= & {} \lim _{t_s \rightarrow t^*}\frac{X^2(t^*,s)-L^2}{2L(t^*-t_s)} = U(t^*)\lambda (s_\mathrm{R}). \end{aligned}$$
(43)

The result then follows from the fact that \(U\) is continuous and \(w_n\) is a rarefaction wave with continuous eigenvalue \(\lambda \).

Proposition 1

The solution \(U(t)\) in Theorem 1 is differentiable when a shock wave \(w_n\) passes the outlet end \(X=L\) if and only if

$$\begin{aligned} \frac{\sigma _{n}^{+}}{\Lambda (v_{n})} = \frac{\sigma _{n-1}^{+}}{\Lambda (v_{n-1})}. \end{aligned}$$
(44)

Proof

The terms in (24) were expressed using \(X_n\). Let \(t^*\) be the time where the shock reaches \(X=L\). For \(t>t^*\), \(X_n\) is no longer meaningful, and we instead express the terms in (24) using \(X_{n-1}\) since \(X_{n-1}\) is present in the system after \(t^*\). Let

$$\begin{aligned} g_B(t)=\sum _{i=1}^{n} \left( \frac{\bar{\beta }_{i+1}-\bar{\beta }_{i}}{\Lambda (v_i)} +\frac{1}{\sigma _{n-1}^*}{\mathcal {J}}_i \right) x_{n-1}+\frac{L-\bar{\alpha }_nX_{n-1}}{\Lambda (v_n)}, \end{aligned}$$
(45)

where \(\bar{\beta }_{i}\), \(\bar{\alpha }_i\) are the quantities in (22) expressed in terms of \(X_{n-1}\). Then, with reference to (22), \(U(t)\) before \(X_n\) reaches \(x=L\) is \(\Delta p/g_B(t)\). Similarly, after \(x_n\) has reached \(x=L\), we define

$$\begin{aligned} g_A(t)=\sum _{i=1}^{n} \left( \frac{\bar{\beta }_{i+1}-\bar{\beta }_{i}}{\Lambda (v_i)} +\frac{1}{\sigma _{n-1}^*}{\mathcal {J}}_i \right) x_{n-1}+\frac{L-X_{n-1}}{\Lambda (v_{n-1})}, \end{aligned}$$
(46)

with \(\Delta p/g_A(t)\) being \(U(t)\) after \(X_n\) has reached \(x=L\). We note that \(g_A(t^*)=g_B(t^*)\) and find

$$\begin{aligned} \left( \frac{\mathrm{d}U}{\mathrm{d}t}\right) ^+(t^*)=-\frac{\Delta p g'_A(t^*)}{g_A^2(t^*)}=\frac{\Delta p}{g_A^2(t^*)}\left[ k_1-\frac{\bar{\alpha }_n}{\Lambda (v_{n-1})} \right] X_{n-1}'(t^*) \end{aligned}$$
(47)

and

$$\begin{aligned} \left( \frac{\mathrm{d}U}{\mathrm{d}t}\right) ^-(t^*)=-\frac{\Delta p}{g_B^2(t^*)}\left[ k_1-\frac{1}{\Lambda (v_{n-1})} \right] X_{n-1}'(t^*), \end{aligned}$$
(48)

where \(k_1\) is constant.

Hence, \( {U^{\prime }}(t^{*}) \) exists if and only if

$$\begin{aligned} \frac{\overline{\alpha }_{n}}{\Lambda (v_{n})} = \frac{1}{\Lambda (v_{n-1})}, \end{aligned}$$
(49)

or

$$\begin{aligned} \frac{\sigma _{n}^{+}}{\Lambda (v_{n})} = \frac{\sigma _{n-1}^{+}}{\Lambda (v_{n-1})}. \end{aligned}$$
(50)

This proves Proposition 1. \(\square \)

Corollary 1

The function \(U(t)\) is differentiable during the time interval when a rarefaction wave (or a constant state) passes the outlet at \(X=L\).

Proof

By continuity, for a rarefaction wave, the relationship (44) is satisfied as an infinitesimal shock. \(\square \)

The relationship (37) is in general not valid for a shock, although it may happen coincidentally. An example on this is as follows:

Assume that a shock \( w_{n} \) is followed by a rarefaction \( w_{n-1} \) such that \( \sigma _{n-1}^{+} = \sigma _{n}^{+} \). Then,  (50) means that \( \Lambda (v_{n}) = \Lambda (v_{n-1}) \), i. e. the total mobility is the same on both sides of the shock. Typically, \( \Lambda \) for a single conservation law has the shape depicted in Fig. 3, where \( s_{1} \), \( s_{2} \) are parameter values on each side of a shock, and (50) is satisfied.

Fig. 3
figure 3

\( \Lambda \) versus saturation

4 Calculated examples

In the oil industry, The Buckley–Leverett solution (1941) is synonymous with fractional flow theory where an immiscible fluid displaces another in one-dimensional flow in a porous medium. Physically, fractional flow theory describes the linear displacement of one phase by another immiscible phase where there is a front described by a shock or sudden change in concentration. In its simplest form, it describes one component displacing another immiscible component in one dimension in the absence of diffusive and compressible flow, i.e., water displacing oil [12, 13]. Mathematically, the Buckley–Leverett equation is a first-order hyperbolic partial differential conservation equation in time and space.

We give an example on how the theory in this paper can be applied to a polymer flooding case where the viscosity of the water phase is linearly dependent on the concentration of polymer added.

In addition to demonstrating the computational algorithm, the purpose of this example is to demonstrate the significant difference between the solutions based on the constant flow rate assumption, and the constant pressure boundary assumption of this paper. Furthermore, a grid sensitivity study is presented using a first-order finite-difference approximation, comparing the analytical and numerical solutions.

The example is based on the results of [15], where the constant flow rate assumption is used to analyze the Riemann problem for polymer flooding with nonlinear adsorption. This provides the Riemann problem solution (1) needed for the construction of \( U(t) \) in Theorem (1).

The hyperbolic system of conservation laws for this polymer flooding process is

$$\begin{aligned} s_{t} + f(s, c)_{x} = 0, \quad \left[ sc + a(c) \right] _{t} + \left[ f(s, c)\right] _{x} = 0, \end{aligned}$$
(51)

where \( t\geqslant 0 \) ; \( x \in {\mathbb {R}} \); the state vector \( (s, c)\in I \times I \) represents water saturation and polymer concentration. Furthermore \( f: I \rightarrow {\mathbb {R}} \) and \( a : I \rightarrow {\mathbb {R}} \) are twice differentiable functions modeling the fractional flux of the water phase and polymer adsorption on the rock surface, respectively. We use the following explicit expressions:

$$\begin{aligned} f(s, c) = \frac{s^{2}}{s^{2} + (0.5 + 100c)(1 - s)^{2}}, \end{aligned}$$
(52)
$$\begin{aligned} a(c) = \frac{0.2c}{1 + 10c}. \end{aligned}$$
(53)

The functions \( f \) and \( a \) are graphed in Figs. 4 and 5 for \( c \in \left[ 0.00, 0.01 \right] \).

Fig. 4
figure 4

Fractional flow functions

Fig. 5
figure 5

Adsorption function

We consider the Riemann problem for (51) with \( s^\mathrm{R} = 0.25 \); \( s^\mathrm{L} = s_{o} = 0.70 \); \( c^\mathrm{L} = 0.01 \); \( c^\mathrm{R} = 0.00 \). The solution is detailed in [15] and shown in Fig. 6 at a fixed time.

Fig. 6
figure 6

Saturation profiles at a fixed time

The solution is composed of three waves. The slowest wave is a rarefaction \((v_1)\) corresponding to the eigenvalue \({\partial f}/{\partial s}\). The middle wave \((v_2)\) is a shock corresponding to the eigenvalue \(f / (s+a'(c))\), and the fastest wave is a shock \((v_3)\) corresponding to the eigenvalue \({\partial f}/{\partial s}\) .

The waves are separated by two constant states, \(s_1=0.639\) and \(s_2=0.514\). The integrals in (17) are \({\mathcal {J}}_{2}=\mathcal {J}_{3}=0\) since waves 2 and 3 are shocks, and the coefficients \(A,B,C\) in (28), (29), (31) are easily obtained by numerical integration and summarized in Table 1:

$$\begin{aligned} A= 1-{v_2\over v_3} {1\over \lambda _T(s_2, c^\text {R})}+\frac{1}{v_3}{\mathcal {J}}_1-\frac{1}{\lambda _T(s^\mathrm{R},c^\mathrm{R})}, \quad B=\frac{L}{\lambda _T(s^\mathrm{R},c^\mathrm{R})}, \quad C=\frac{2\Delta p}{\phi }v_3. \end{aligned}$$
(54)

The solution \( U(t) \) of Theorem 1 for the above Riemann problem is shown in Fig. 7, together with the constant flow rate solution with \( U(t)\equiv 0.89 \). As can be seen, the constant pressure boundary solution \( U(t) \) decreases from \( 0.89 \) initially to \( 0.50 \) at the minimum and then increases to \( 0.53 \). Clearly, it represents a big error to use the constant flow rate solution in an approximation for a constant pressure boundary case.

Table 1 Integration coefficients for the example (see text)
Fig. 7
figure 7

Solution in Theorem 1 for the example

A numerical simulation of the polymer case was also carried out using a first-order upwind method with implicit treatment of pressure and explicit treatment of saturation. Figure 8 shows the variation in numerical versus analytically computed total volumetric flux results. The simulations were performed with 20 and 200 grid points As Fig. 8 indicates, a reasonable resolution of \(U(t)\) is obtained using 200 grid points.

Fig. 8
figure 8

Numerical solution compared to analytical solution in Fig. 6

5 Conclusions

Existing solutions to global Riemann problems with constant volumetric flux have been extended to constant pressure boundaries with variable flux. The derivation mathematically describes the explicit behavior before the first wave breaks through, between waves and post breakthrough of the trailing rarefaction waves. The continuity and smoothness of the flux is also described. The application of the constant pressure boundary solution is illustrated with an example on polymer flooding.