Introduction

Diffusion equations can be obtained in poroelasticity at low frequencies, when the inertial terms are neglected (e.g. Carcione 2007). Chandler and Johnson (1981) have shown the equivalence between quasi-static fluid flow and Biot’s diffusive wave (see also Carcione 2007). Hence, fluid flow and pressure diffusion are phenomena described by the same differential equation. In hydrology and hydrocarbon exploration, diffusion equations are mainly used to model fluid flow in reservoir rocks (Peaceman 1977). Shapiro et al. (2002) describe the phenomenon of micro-seismicity caused by fluid injection in boreholes, while Müller (2006) provides a detailed physical analysis of the pore pressure induced by a fluid mass point source. His results support the hypothesis that the diffusive slow P-wave is mainly responsible for the triggering of microearthquakes.

Carcione and Gei (2009) simulated fluid-pressure diffusion in inhomogeneous media by considering a single fluid. The purpose of the present work is to generalise that approach to more than one fluid and use a similar method to solve the equations governing the flow. Possible applications involve simulation of fluid depletion and injection of hydrocarbons, geomechanical analysis of reservoirs (Settari and Mourits 1994) and micro-seismicity, as mentioned above. A convenient equation to define the stress–strain relation involving two fluids can be obtained from Biot’s theory of poroelasticity (Santos et al. 1990a, b; Ravazzoli et al. 2003). The diffusion can be fully uncoupled from the elastic deformations by neglecting the strain, but a less stringent condition can be obtained under uniaxial strain conditions, where the effect of the elastic deformations requires the modification of the rock stiffness involved in the diffusion equation. Uniaxial-strain conditions hold for the case of a fluid-injection source in a borehole, where the porous medium deforms uniaxially only in the vertical direction and the horizontal strains are zero. This approximation is valid for geological formations whose lateral dimensions are large compared to their thickness. In this case, the lateral deformations are small compared to the horizontal dimensions, and hence the lateral strain is approximately zero (e.g., Gutierrez and Lewis 2002).

In this work, we combine Biot’s poroelastic equations and the fluid mass conservation equations averaged to obtain a system of differential equations for the pore pressures and saturations of the wetting and non-wetting phases. The theory used here to define the stress–strain relations is a generalization of Biot’s theory and has been developed by Santos et al. (1990a, b) (see also Carcione et al. 2004). It is important to note here that the constitutive equations introduced by Santos et al. (1990a, b) have never been used to simulate fluid-flow phenomena, but only to describe wave propagation. Biot’s wave propagation theory, neglecting the acceleration terms, is equivalent to the consolidation theory if the infinitesimal stresses and pressures are assumed to be their absolute counterparts, since the stress–strain relations can be interpreted as a relation between incremental fields, where stress and strain are increments with respect to a reference stress and strain—the case of wave propagation—or, as relations between the absolute fields (consolidation theory; Biot 1941). Other models accounting for the coupling between the mechanical behaviour of the matrix and the fluid dynamics include the Hassanizadeh model (Hassanizadeh et al. 2002) and the Barenblatt–Biot model (Barenblatt and Gilman 1987).

The poroelastic stress–strain relation for the two fluids can be recasted as a first-order differential equation in time and allows us to obtain the fluid pressures and total flow velocity. On the other hand, the mass conservation equation can be recasted to obtain the advection–diffusion Richards equation which is coupled to the fluid pressures through the flow velocity. The diffusion term is determined by the capillarity effects. We first solve the pressure and saturation equation separately and test the results with known analytical solutions for the advection and diffusion equation in 1D and 2D space. Then, we investigate the effects of partial saturation and capillary forces on the pressure and saturation profiles and finally solve the coupled system, which consists in computing the flow velocity and then Richards’s equation for the fluid saturations. The algorithm is fully explicit and based on the Euler–Picard time stepping and on the Fourier pseudospectral method to compute the spatial derivatives (e.g., Carcione 2007). It has been shown that the Picard iteration method demonstrated perfect mass balance in fluid-flow equations when used with direct-grid methods such as the finite difference and finite element approximations in space (Zarba 1988). It is expected that the same performance can be achieved with the Fourier pseudospectral method. In this case, the model is discretized on a mesh the spatial derivatives are calculated with the fast Fourier transform. The spatial derivatives computed with the Fourier method have spectral accuracy and require coarser grids compared to finite-difference methods. The use of this spectral method overcomes two drawbacks: low accuracy and stringent stability conditions, since the error in time decays exponentially. The method has proved to be efficient when solving diffusion equations. (Carcione 2006, 2010; Carcione and Gei 2009).

Darcy’s equations

We consider a porous medium (a rock for instance) saturated with two immiscible fluids and denote with the subscripts (and superscripts) w and n quantities related to the wetting and non-wetting phases, respectively. Let vs v ¯ n , and v ¯ w denote the interstitial particle-velocity vectors of the solid grains, non-wetting fluid and wetting fluid, respectively. First of all, we assume that the rock deforms slowly compared to multiphase flow. In this case, we have the relative particle-velocity components v i m = ϕ ( v ¯ i m - v i s ) ϕ v ¯ i m , i = 1 , 2 , 3 , m = n, w, whereϕ is the porosity. Then, Darcy’s equations relating Biot’s relative velocities and pressures pm are

S m v i m = - λ m ( p m , i - ρ m g δ i z ) , λ m = κ m η m , m = n , w
(1)

(Gai 2004, see Eqs. (2.12, 2.16) ; Santos et al. 1990a), where Sρη andκ denote saturation, density, viscosity and permeability, respectively, g is the gravity constant, i indicates the spatial variables x(1), y(2) and z(3),δ ij is Kronecker’s delta and the subindex “i” denotes spatial differentiation. Darcy’s velocities, as given in Gai (2004, Eq. 2.16), are ϕ N α v ¯ i m = N α v i m , where N α are the so-called (dimensionless) concentrations.

Stress–strain relations

Following Santos et al. (1990a, b), we define

ξ ˙ m = - v i , i m ,
(2)

whereξ is the variation of fluid content and a dot above a variable denotes time differentiation. Let ϵ i j denote the strain components of the solid grains let ϑ = ϵ 11 + ϵ 22 + ϵ 33 denote the dilatation field. Then, the total stress components and fluid stresses are

τ i j = 2 N ϵ i j + δ i j λ c ϑ - B 1 ξ n - B 2 ξ w , τ n = - ( S n + β + ζ ) p n + ( β + ζ ) p w = B 1 ϑ - M 1 ξ n - M 3 ξ w , τ w = - ( S w + ζ ) p w + ζ p n = B 2 ϑ - M 3 ξ n - M 2 ξ w ,
(3)

where

λ c = K c - 2 3 N ,
(4)

N is the dry-rock shear modulus and Kc is the undrained (closed) bulk modulus. It is

K c = K s ( K m + G ) K s + G ,
(5)

where Ks is the bulk modulus of the solid grains, Km is the dry-rock bulk modulus,

G = K f ( K m - K s ) ϕ ( K f - K s ) ,
(6)
K f = α γ S n K n + S w K w - 1 ,
(7)
α = 1 + ( S n + β ) ( γ - 1 )
(8)
B 1 = θ K c [ ( S n + β ) γ - β + ( γ - 1 ) ζ ] , B 2 = θ K c [ ( S w + ( 1 - γ ) ζ ] ,
(9)
θ = φ + ϕ 1 K m - 1 K c α φ + ϕ 1 K m - 1 K f - 1 ,
(10)
M 1 = - M 3 - B 1 / ( φ K m ) , M 2 = r B 2 / q + ζ / q , M 3 = - B 2 [ r / q + 1 / ( K m φ ) ] - ζ / q ,
(11)
β = p c p c , ζ = p ¯ w p c ,
(12)

where Ks is the bulk modulus of the grains, Kn and Kw are the bulk moduli of the non-wetting and wetting fluids, respectively, pc is the capillary pressure (i.e., the difference between the non-wet and wetting-fluid absolute pressures), p ¯ w is an average hydrostatic pressure (assumed to be zero in this work) and p c the derivative of pc with respect to Sn; moreover,

φ = 1 K s - 1 K m ,
(13)
γ = 1 + p c S n S w K w 1 + p c S n S w K n - 1 ,
(14)
r = S n + β K s + 1 K c - K m q B 2 + ( S n + β ) 1 - K c K s ,
(15)
q = ϕ 1 K n + 1 p c S n S w .
(16)

Uncoupling fluid flow and deformation

The fluid pressure is coupled with the strain of the matrix in Eq. (3). This fact makes the problem much more difficult to solve, but there are situations where these field variables can be uncoupled. They occur when the displacement field is irrotational or when the fluid is very compressible (e.g., Detournay and Cheng 1993). We may avoid such approximation by using a less stringent one. Let us assume the case of a fluid-injection source in a borehole, uniaxial strain conditions and vertical deformations only. In this case, the only non-zero differential strain is d ϑ = d ϵ 33 . Assuming no changes in the vertical stress, we obtain from Eq. (3):

d τ 33 = 0 ( λ c + 2 N ) d ϑ - B 1 d ξ n - B 2 d ξ w .
(17)

Using this result, the second and third Eq. (3) become

τ n = - ( S n + β + ζ ) p n + ( β + ζ ) p w = a 1 ξ n + a 3 ξ w , τ w = - ( S w + ζ ) p w + ζ p n = a 3 ξ n + a 2 ξ w , a 1 = B 1 2 / ( λ c + 2 N ) - M 1 , a 2 = B 2 2 / ( λ c + 2 N ) - M 2 , a 3 = B 1 B 2 / ( λ c + 2 N ) - M 3 .
(18)

More general approaches involving the coupling of fluid flow and deformation based on Biot’s equations are given in Gutierrez and Lewis (2002).

Mass conservation equations

The system of equations are complemented with the balance of mass

ϕ S ˙ m + · ( S m v m ) = s m , m = n , w
(19)

(Gai 2004, Eqs. 2.17–2.19; Peaceman 1977; Santos et al. 1990a), where vm = (v m1 v m2 v m3 )Tsm is the source or sink term and we have assumed constant volume factors.

The pressure and Richards equations

Replacing the flow velocities from Eq. (1) into the time derivative of Eq. (18) and into Eq. (19), we obtain

τ ˙ n = a 1 · b n p n - ρ n g + a 3 · b w p w - ρ w g , τ ˙ w = a 3 · b n p n - ρ n g + a 2 · b w p w - ρ w g , S ˙ n = 1 ϕ s n + · λ n ( p n - ρ n g ) , S ˙ w = 1 ϕ s w + · λ w ( p w - ρ w g ) , b m = λ m S m , m = n , w ,
(20)

where g is the gravity vector. These equations are subject to the constraints

p c = p n - p w , S n + S w = 1 .
(21)

From Eq. (18) we have

p n = [ ζ τ n - ( β + ζ ) τ w ] / Q , p w = [ ( S w + ζ ) τ n - ( S n + β + ζ ) τ w ] / Q , Q = β S w + ζ ( S w - S n )
(22)

and the first constraint Eq. (21) becomes

p c = - ( S w τ n + S n τ w ) / Q .
(23)

In particular, we set

τ n = 1 S w [ ( 1 - S w ) τ w - Q p c ] , S n = 1 - S w .
(24)

From Eq. (20), we obtain the system to be solved:

τ ˙ w = a 3 · b n p n - ρ n g + a 2 · b w p w - ρ w g , τ n = 1 S w [ ( 1 - S w ) τ w - Q p c ] , ϕ S ˙ n = · ( h n S n ) - c t · f n S n - · ( λ w f n ( ρ n - ρ w ) g ) - ( f n - 1 ) s n - f n s w , c t = - ( λ n p n + λ w p w ) + ( λ n ρ n + λ w ρ w ) g ,
(25)

where the third (Richards’s) equation is obtained in “Appendix Act is the total Darcy velocity. This system is complemented with Eqs. (18) and (22), subject to the initial condition (pw0, Sw0). In the limit S w 1 (assuming the residual saturations Srw = Srn = 0), a 2 - M , where M is given in Eq. (10) of Carcione and Gei (2009) and the first Eq. (25) becomes Eq. (9) of that paper.

The algorithm to solve these equations is explicit in the time variable, t = j dt, where dt is the time step and j = 0 , 1 , . It uses the forward Euler method to approximate the time derivatives and the Fourier pseudospectral method to compute the spatial derivatives (e.g., Carcione 2006, 2007; Carcione and Gei 2009). We assume an initial state (pw0Sw0), compute τw at j + 1 (first equation) assuming the saturations obtained at j on the r.h.s. of the equations. Then, we computeτn, the pressures with Eq. (22) and solve the last two equation for Sn at j + 1 proceed to the next time step. To improve the Euler method we solve the saturation Eq. (25) by using the Picard method (Pang 2006) (see “Appendix B”).

Fourier analysis

The characteristics of the pressure diffusion can be analysed with a Fourier analysis. Let us assume a kernel of the form p w = exp [ i ( ω t - k · x ) ] , whereω is the angular frequency, k is the complex wavenumber vector and x is the position vector. Assuming homogeneous properties, we have k = k (l1l2l3)T, where k = Re ( k ) - i α ¯ , α ¯ is the attenuation factor l i are the direction cosines defining the propagation direction, where Re takes the real part.

From Eqs. (18) and (22) we have τ w = - S w p w + ζ p c and τ ˙ w = - S w p ˙ w at constant saturation. Substituting the above kernel into the first Eq. (25), in the absence of source, gives the dispersion equation

i ω = ( a 3 λ n + a 2 λ w ) k 2 ,
(26)

We define the complex velocity as

v c = ω k = ( 1 + i ) - ω ( a 3 b n + a 2 b w ) 2
(27)

(the quantity inside the square root is positive). The same kinematic concepts used in wave propagation (acoustics and electromagnetism) are useful in this analysis (see Carcione 2007, Chap. 8). For S w 1 , we obtain the complex velocity of Carcione and Gei (2009).

The phase velocity of the pressure front and respective attenuation factor can be obtained from the complex velocity as

v p = Re v c - 1 - 1 and α ¯ = - ω Im ( v c - 1 ) ,
(28)

respectively, where Im takes imaginary part. The skin depth is the distance d for which exp ( - α ¯ d ) = 1/e, wheree is Euler’s number. It is usually taken as the effective distance of penetration of the signal. Then, d = 1 / α ¯ .

Numerical simulations

Tests are performed in the cases where analytical solutions exist. First, we consider the first Eq. (25) in the homogeneous case, without gravity, Sw = 1 and pw0 = 0. In this case,τw =  − pw, a3 = 0 and a2bw =  − Mκ /ηw, where M is given in Eq. (10) of Carcione and Gei (2009). We obtain the equation

p ˙ w = κ M η w Δ p w + δ ( x ) δ ( t ) ,
(29)

where Δ is the Laplacian,κ is the absolute permeability and hereδ is the Dirac delta function, representing the source. The analytical solution is the Green’s function given by Eq. (35) in Carcione and Gei (2009). We consider the 1D case, the material properties shown in Table 1, a number of grid points n x = 165 and a grid spacing dx = 4 m/n x . Figure 1 compares numerical and analytical time histories (normalized) at 24 cm from the source computed with a time step dt = 10 μs. The agreement is excellent.

Table 1 Material properties
Fig. 1
figure 1

Comparison between the numerical (symbols) and analytical (solid line) solutions of the pressure field (normalized) at 100 % wetting-fluid saturation. The receiver is located at 24 cm from the source

In the absence of sources and gravity effects and D = h n / ϕ (constant), an analytical solution is known for the 1D version of the third Eq. (25), i.e.,

S ˙ n = D x x S n - c f n x S n , c = c t ϕ ,
(30)

where D is a diffusivity, for the initial condition Sn (x,0) = 0 and boundary conditions Sn (x0 , t) = 1 and S n ( , t ) = 0 . It is given by

S n = 1 2 erfc x - x 0 - c f n t 2 D t + 1 2 exp ( c f n ( x - x 0 ) / D ) erfc x - x 0 + c f n t 2 D t ,
(31)

where erfc is the complementary error function (Peaceman 1977, Eq. 4.35). In 1D space ct is a constant since ∂ct/∂x = 0. The velocity at which the saturation front travels is

v = c f n = c t f n ϕ .
(32)

Equation (30) with pc = 0 (D = 0) is the Buckley–Leverett (1942) equation. To solve Eq. (30), we consider D = 0.01 , f n = 0.9 and the velocity field shown in Fig. 2a, where c0 = 1.2 m/s, i.e., c =  − c0 for x ≤ x0 and c =  +c0 for x ≥ x0, where Sn (x0 = 0 , t) = 1. An important parameter is the Courant number C, giving the distance traveled due to advection in a time step dt with respect to the grid spacing, i.e., C = c f n d t / d x . Being explicit, the algorithm is stable for C < 1, which means that one cannot advect the saturation more than one grid cell in a single time step. Accuracy requires a time step smaller than that imposed by stability. Figure 2b shows the comparison between the numerical and analytical solutions at 1 s, where n x = 429, dx = 4 m/n x and dt = 0.2 ms. The analytical solution is shown for x > x0.

Fig. 2
figure 2

Velocity field (a) and comparison between the numerical (symbols) and analytical (solid line) solutions corresponding to Richards’s Eq. (30) with boundary conditions (b)

In 2D space, assuming diffusivity anisotropy ( D x , D z ) a flow velocity (v x  , v z ) and a point-source injection, Eq. (30) can be generalized as

S ˙ n = ( D x x x + D z z z ) S n - f n ( v x x + v z z ) S n + s 0 δ ( t ) δ ( x ) δ ( z ) ,
(33)

where s0 is the rate of injection per unit area and the solution to this equation yields the Green function. It is well known that this equation can be recast as a pure diffusion equation. Let us use an analogy and consider the x-direction. If we are traveling in a train moving at velocity f n v x , we do not see the advection. If the train starts to move at t = 0 and x = 0, its location is x = f n v x t and we may define a moving coordinate x = x - f n v x t , so that x = 0 always. With respect to those moving coordinates, we have the following diffusion equation:

S ˙ n = ( D x x x + D z z z ) S n + s 0 δ ( t ) δ ( x ) δ ( z ) ,
(34)

whose solution, at the original coordinates, is

S n ( x , z ) = s 0 4 π t D x D z exp - ( x - f n v x t ) 2 4 D x t - ( z - f n v z t ) 2 4 D z t
(35)

(Carslaw and Jaeger 1984; Carcione 2007). If the injection occurs at (x0z0), the solution is obtained by simply replacing t by t − t0, x by x − x0 and z by z − z0. In 1D space the solution is S n ( x ) = ( s 0 / 4 π t D x ) exp - ( x - f n v x t ) 2 / ( 4 D x t ) . We consider n x  = n z = 429, dx = dz = 4 m/n x and dt = 0.2 ms. Recall that the discrete spatial delta is represented by 1/dx in 1D space and 1/(dx dz) in 2D space. Figure 3 compares 1D (a) and 2D (b) numerical and analytical solutions at t = 1 s for D x  = D z = 0.01 D, v x = v z = v 0 / 2 with v0 = 1.2 m/s at all the grid points.

Fig. 3
figure 3

Comparison between 1D (a) and 2D (b) numerical (symbols) and analytical (solid line) solutions corresponding to Richards’s Eq. (30) with a point source

Next, we consider the boundary condition Sn (x0 , t) = 1, a radial velocity flow as shown in Fig. 4a and ( v = v 0 r ^ ), with v0 =1.2, f n = 1.2 and the same diffusivity of the previous examples. Figure 4b shows the snapshot of the saturation, where we have taken n x  = n z = 1,287, dx = dz = 4 m/n x and dt = 0.2 ms.

Fig. 4
figure 4

Velocity field (a) and saturation at t = 1 s corresponding to Richards’s Eq. (30) with boundary conditions (b)

Now we consider the mobilities and the capillary pressure effects. The permeabilities are given by

κ n = κ 1 - S ew ( 1 - S ew 1 / p ) 2 p , κ w = κ S ew [ 1 - ( 1 - S ew 1 / p ) p ] 2 , S ew = S w - S rw 1 - S rw
(36)

(van Genuchten 1980; Lo et al. 2007), whereκ is the absolute permeability, 0 < p < 1 Srn and Srw are residual saturations. These relations are based on laboratory experiments performed on various porous rocks during imbibition and drainage processes (neglecting hysteresis effects).

The capillary pressure as a function of saturation is the van Genuchten function

p c = P 0 ( S * - 1 / p - 1 ) 1 - p , p c = 1 - p p P 0 1 - S rw ( S * - 1 / p - 1 ) - p S * - 1 - 1 / p , S * = S w - S rwv 1 - S rwv ,
(37)

where P0 is a reference pressure (e.g., Goumiri et al. 2011) and Srwv = 0.1 Srw. Here, p c = d p c / d S n . Relative permeabilities and capillary pressure as a function of the wetting-fluid saturation are shown in Fig. 5, whereκ = 0.8 D, Srw = 0.25, Srn = 0.05, P0 = 10 kPa and p = 0.75. Figure 6 display the advective and diffusive terms f n and hn appearing in the Richards Eq. (25).

Fig. 5
figure 5

Permeabilities (a) and capillary pressure (b) as a function of the wetting-fluid saturation

Fig. 6
figure 6

Advective (a) and diffusive (b) parameters as a function of Sw

We now solve the first Eq. (25) for partial saturation with an initial condition in the wetting-fluid pressure field, without gravity effects and considering the capillary pressure. The equations are

τ ˙ w = a 3 · b n p n + a 2 · b w p w , τ n = 1 S w [ ( 1 - S w ) τ w - Q p c ] , p w = [ ( S w + ζ ) τ n - ( S n + β + ζ ) τ w ] / Q p n = [ ζ τ n - ( β + ζ ) τ w ] / Q .
(38)

The initial condition is

p w ( x , 0 ) = f ( x ) = p 0 + p 1 exp [ - k 0 2 ( x - x 0 ) 2 ] ,
(39)

where p0 = 1 MPa, p1 = 0.1 MPa k0 = 3/m. We consider the properties of Table 1, Srw = 0.05, Srn = 0.05 and p = 0.5. We first test the case where there is an analytical solution, i.e. only the presence of the wetting phase (Sw = 1) and an initial condition f ( x ) = p 1 exp [ - k 0 2 ( x - x 0 ) 2 ] . The 1D Green’s function is well known (Carslaw and Jaeger 1984; Carcione and Gei 2009) and is given by G ( x ) = ( 4 π d t 0 ) - 1 / 2 exp [ - ( x - x 0 ) 2 / ( 4 d t 0 ) ] , where d = κM/ηw and t0 is a given time. The numerical solution fits the analytical solution (not shown here), which is given by p w ( x ) = G * f , where “*” denotes spatial convolution. The next simulation considers three saturations with and without the presence of capillary pressure. We take n x  = n z = 165, dx = dz = 4 m/n x and dt = 50 μs. The results at 60 ms are shown in Fig. 7, where the reference initial condition is also shown. Increasing wetting-fluid saturation implies attenuation and dispersion with higher levels at higher wetting-fluid saturations. The presence of capillary pressure produces a shift of the curves downwards. Figure 8 shows the non-wetting fluid pressure, which is not affected by capillary effects.

Fig. 7
figure 7

Snapshots of the wetting-fluid pressure at 60 ms without (a) and with (b) capillary pressure. Theline without symbols corresponds to the initial condition

Fig. 8
figure 8

Snapshots of the non-wetting fluid pressure at 60 ms with capillary pressure

Now, we compute the numerical solution of Richards’s Eq. (25) at different saturations, with and without capillary effects. We ignore sources and gravity. We have

ϕ S ˙ n = · ( h n S n ) - c t · f n S n , c t = - ( λ n p n + λ w p w ) ,
(40)

where

f n = f n ( 1 - S rw ) λ n λ n 1 - f n - f n λ w , λ n = κ 2 η n 1 - S rw 1 - S w ( 1 - S w 1 / p ) 2 p 1 + 4 1 - S w 1 - S rw ( S w - 1 / p - 1 ) - 1 S w - 1 , λ w = - κ [ 1 - ( 1 - S w 1 / p ) p ] 2 η w S w 1 - ( 1 - S w 1 / p ) p + 4 ( 1 - S w 1 / p ) p - 1 S w 1 / p .
(41)

We then apply the boundary condition Sn (x0 , t) = 1 − Srw. We consider a 1D medium with c =  − c0 for x ≤ x0 and c =  +c0 for x ≥ x0, where c0 = 0.4 m/s. The grid size is n x = 315, with dx = 4 m/n x . Figure 9 shows a snapshot of the saturation at 15 s as a function of distance, where we have used P0 = 10 kPa, p = 0.75, a time step dt = 0.05 ms and K = 10 iterations of the Picard algorithm (see “Appendix B”). The capillarity pressure has little effect on the shape of the saturation front.

Fig. 9
figure 9

1D snapshot of the non-wetting saturation at 15 s

In order to appreciate the capillarity effects, we consider P0 = 1 GPa, p = 0.5, c0 = 0.4 m/s, Sn (x0 , t) = 1 − Srw − 0.01, the previous mesh and a time step dt = 0.1 ms. Figure 10a shows snapshots of the saturation at different propagation times, where the front propagates at a velocity of approximately 3.25 m/s. The velocity actually depends on the fluid saturations. The front velocity Eq. (32) as a function of the wetting fluid saturation is shown in Fig. 10b.

Fig. 10
figure 10

1D snapshot of the non-wetting saturation at successive propagation times (a) and front velocity (b). Capillarity effects dominate

Finally, we solve the coupled system Eq. (25) in 1D space, where the flow velocity (last equation) is obtained by solving for the pressures (first and second equations). We set the initial condition Eq. (39), with p0 = 1 MPa, p1 = 0.1 MPa, and k0 = 3/m, Srw = 0.25, Srn = 0.05 and 95 % water saturation at t = 0. Then, we apply the boundary condition Sn (x0 , t) = 0.95 − Srw, with P0 = 1 GPa and p = 0.5. We take n x  = n z = 165, dx = dz = 4 m/n x K = 10 and dt = 10 μs. Figure 11 shows the saturations at various propagation times. Diffusion effects due to the capillarity forces dominate in this case.

Fig. 11
figure 11

Snapshots of the non-wetting saturation from the solution of the coupled system of Eq. (25)

Conclusions

We have developed a fully explicit algorithm to simulate the injection of a non-wetting fluid into a porous medium saturated with a wetting fluid. The fluid pressures are obtained from the stress–strain relation of the theory of poroelasticity, from which the total (Darcy) flow velocity is computed. This velocity determines the advection term of Richards’s saturation equation. Then, the coupled pressure–saturation system of equations is solved with the Euler–Picard time stepping algorithm and the Fourier pseudospectral method. The example assumes oil injection in a water-saturated porous medium. Analytical solutions allow us to verify the accuracy of the results in various situations, where the two unknown variables (pressure and saturation) are uncoupled, with and without capillarity effects based on the van Genuchten functions. Strong capillary forces have to be assumed to see the effects as shown in the simulations of the saturation front. Here, we have considered two fluids. The extension of the theory to include gases, which requires to include pressure–volume–temperature and chemical effects, will be developed in a future work.